keyring-chatbot-agent-sdk-test 0.1.8 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -28,7 +28,8 @@ Is there any token you want to buy?`,trendingTokensError:"Sorry, I encountered a
28
28
 
29
29
  Select a token to interact with:`,viewBalancesEmpty:"You don't have any tokens in your wallet on this chain.",viewBalancesFetchError:"Sorry, I encountered an error fetching your balances.",buttonSendToken:"Send {symbol}",buttonSwapToken:"Swap {symbol}",buttonBuyMoreToken:"Buy more {symbol}",actionSendNativeLabel:"Send Native Token",actionSendNativeDesc:"Send native token (ETH, BNB, MATIC, etc.) to an address",actionSendTokenLabel:"Send Token (ERC20)",actionSendTokenDesc:"Send an ERC20 token to an address",actionSwapTokenLabel:"Swap Token",actionSwapTokenDesc:"Swap one token for another",actionApproveTokenLabel:"Approve Token",actionApproveTokenDesc:"Approve a spender to use your tokens",actionWrapNativeLabel:"Wrap Native Token",actionWrapNativeDesc:"Wrap native token (ETH → WETH)",actionUnwrapNativeLabel:"Unwrap Native Token",actionUnwrapNativeDesc:"Unwrap native token (WETH → ETH)",actionSendNftLabel:"Send NFT",actionSendNftDesc:"Transfer an ERC721 or ERC1155 NFT to another address",fieldToAddress:"Recipient Address",fieldAmount:"Amount",fieldTokenContract:"Token Contract",fieldTokenSymbol:"Token Symbol",fieldDecimals:"Decimals",fieldTokenIn:"From Token",fieldTokenInSymbol:"From Symbol",fieldTokenOut:"To Token",fieldTokenOutSymbol:"To Symbol",fieldTokenInDecimals:"From Decimals",fieldTokenOutDecimals:"To Decimals",fieldSpenderAddress:"Spender Address",fieldAmountUnlimited:"Amount (empty = unlimited)",fieldNftContract:"NFT Contract",fieldTokenId:"Token ID",fieldTokenStandard:"Token Standard",fieldNftName:"NFT Name",formMustBePositiveInteger:"Must be a positive integer",formAmountExceedsNft:"Amount cannot exceed available balance {max}",receivedButtonValue:"Received: {value}",actionExecutedFor:'Action "{action}" executed for: {value}',buyTokenHelp:"I'll help you buy {symbol}. Let me show your available tokens to trade with.",tokenNotFoundOnChain:`I couldn't find the token "{symbol}" on this chain. Here are the trending tokens you can buy:`,swapPreparing:"Preparing your swap...",swapConfirmYes:"Yes",swapChooseFrom:"Please choose which token you want to swap from:",swapChooseTo:"You want to swap {symbol}. Please choose which token you want to receive:",swapNeedDetails:'I need more details for your swap. Please specify which tokens you want to swap (e.g. "Swap 1 ETH to USDC").',viewNftsLoading:"Let me show you your NFT collection!",sendTokenChoose:"Which token would you like to send?",sendNftChoose:"Which NFT would you like to send?",swapChooseToken:"Which token would you like to swap? Here are your current balances:",spendable:"Spendable",welcomeMessage:`**Welcome! 🚀**
30
30
  You're connected and ready to explore DeFi! I can help you trade, check prices, and analyze your portfolio when you need it.`,sendOtherNfts:`
31
- If you want to send other NFTs, please provide the contract address, NFT ID`},ja:{chatTitle:"Keyring Agent",closeChat:"チャットを閉じる",messagePlaceholder:"メッセージを入力...",sendMessage:"メッセージを送信",botIsTyping:"ボットが入力中...",canIHelpYou:"何かお手伝いできることはございますか?",replyToMessage:"メッセージに返信",replyingTo:"返信先:",replyingToYou:"あなた",replyingToAgent:"Keyring Agent",cancelReply:"返信をキャンセル",suggestionAskText:"質問・調査のお願い",suggestionAskUserMessage:"質問があります",suggestionAskBotReply:"何でも聞いてください",suggestionBuyText:"トレンドトークンを購入",walletConnectedChainUnsupported:"ウォレットは接続されていますが、このチェーンは取引に対応していません。トレンドのトークンを表示するには、対応しているチェーンに切り替えてください。",walletNotConnected:"トレンドのトークンを表示するには、ウォレットを接続してください。",actionProcessing:"⏳ トランザクションを処理中...",actionSuccess:"✅ トランザクションが完了しました",actionFail:"❌ アクションがキャンセルされたか、失敗しました",txSubmitted:"⏳ トランザクションを送信しました。確認を待機中...",txConfirmed:"✅ トランザクションが確認されました!",txReverted:"❌ オンチェーンでトランザクションがリバートされました。",txTimeout:"⚠️ トランザクションは送信されましたが、タイムアウトしました。手動で確認してください。",txSuccessful:"✅ トランザクションに成功しました!",txFailed:"❌ トランザクションに失敗しました。もう一度お試しください。",txNoHandler:"⚠️ トランザクションハンドラーが設定されていません。",txInsufficientGas:"⚠️ **ガス代({symbol})が不足しています!** 保有量は {balance} {symbol} ですが、手数料に約 {fee} {symbol} 必要です。ウォレットにチャージして再試行してください。",txError:"❌ エラー: {message}",swapConfirmButton:"確定",swapConfirmValue:"スワップを確定する",swapReadyToProceed:"スワップを実行しますか?",swapEstimationError:"⚠️ スワップの見積もりを取得できません。エラー: {error}",formCancel:"キャンセル",formExecute:"実行",formProcessing:"⏳ 処理中...",formBalance:"残高:",formTokenNotFound:"ウォレット内にトークンが見つかりません。",formNoBalance:"ウォレットに {symbol} の残高がありません。",formInsufficientBalance:"残高不足です。利用可能: {balance} {symbol}",formFieldRequired:"{field} は必須項目です",formInvalidAddress:"無効なアドレスです (0x + 40文字の16進数)",formMustBePositive:"正の数値を入力してください",formMustBeValidNumber:"有効な数値を入力してください",openChat:"チャットを開く",openChatTitle:"チャットサポートを開く",walletBalanceSpendable:"これは {chain} チェーン上のウォレットの利用可能な残高です。この取引に使用するコインを選択してください。",walletNoTokensFound:"申し訳ありませんが、{chain} チェーン上のウォレットにトークンが見つかりませんでした。取引するためのトークンを保有しているかご確認ください。",walletFetchFailed:"ウォレット残高を取得できませんでした。もう一度お試しください。",walletFetchError:"ウォレット残高の取得中にエラーが発生しました。",insufficientFeeToken:"手数料が不足しています。取引手数料をカバーするのに十分な {symbol} を保有しているか、別のトークンを選択してください。",selectAmountOf:`使用する {symbol} の数量を選択してください:
31
+ If the NFT you want to send is not in the list above, please visit our website to send it.
32
+ {link}`},ja:{chatTitle:"Keyring Agent",closeChat:"チャットを閉じる",messagePlaceholder:"メッセージを入力...",sendMessage:"メッセージを送信",botIsTyping:"ボットが入力中...",canIHelpYou:"なにかお手伝いできることはありますか?",replyToMessage:"メッセージに返信",replyingTo:"返信先:",replyingToYou:"あなた",replyingToAgent:"Keyring Agent",cancelReply:"返信をキャンセル",suggestionAskText:"質問・調査のお願い",suggestionAskUserMessage:"質問があります",suggestionAskBotReply:"何でも聞いてください",suggestionBuyText:"トレンドトークンを購入",walletConnectedChainUnsupported:"ウォレットは接続されていますが、このチェーンは取引に対応していません。トレンドのトークンを表示するには、対応しているチェーンに切り替えてください。",walletNotConnected:"トレンドのトークンを表示するには、ウォレットを接続してください。",actionProcessing:"⏳ トランザクションを処理中...",actionSuccess:"✅ トランザクションが完了しました",actionFail:"❌ アクションがキャンセルされたか、失敗しました",txSubmitted:"⏳ トランザクションを送信しました。確認を待機中...",txConfirmed:"✅ トランザクションが確認されました!",txReverted:"❌ オンチェーンでトランザクションがリバートされました。",txTimeout:"⚠️ トランザクションは送信されましたが、タイムアウトしました。手動で確認してください。",txSuccessful:"✅ トランザクションに成功しました!",txFailed:"❌ トランザクションに失敗しました。もう一度お試しください。",txNoHandler:"⚠️ トランザクションハンドラーが設定されていません。",txInsufficientGas:"⚠️ **ガス代({symbol})が不足しています!** 保有量は {balance} {symbol} ですが、手数料に約 {fee} {symbol} 必要です。ウォレットにチャージして再試行してください。",txError:"❌ エラー: {message}",swapConfirmButton:"確定",swapConfirmValue:"スワップを確定する",swapReadyToProceed:"スワップを実行しますか?",swapEstimationError:"⚠️ スワップの見積もりを取得できません。エラー: {error}",formCancel:"キャンセル",formExecute:"実行",formProcessing:"⏳ 処理中...",formBalance:"残高:",formTokenNotFound:"ウォレット内にトークンが見つかりません。",formNoBalance:"ウォレットに {symbol} の残高がありません。",formInsufficientBalance:"残高不足です。利用可能: {balance} {symbol}",formFieldRequired:"{field} は必須項目です",formInvalidAddress:"無効なアドレスです (0x + 40文字の16進数)",formMustBePositive:"正の数値を入力してください",formMustBeValidNumber:"有効な数値を入力してください",openChat:"チャットを開く",openChatTitle:"チャットサポートを開く",walletBalanceSpendable:"これは {chain} チェーン上のウォレットの利用可能な残高です。この取引に使用するコインを選択してください。",walletNoTokensFound:"申し訳ありませんが、{chain} チェーン上のウォレットにトークンが見つかりませんでした。取引するためのトークンを保有しているかご確認ください。",walletFetchFailed:"ウォレット残高を取得できませんでした。もう一度お試しください。",walletFetchError:"ウォレット残高の取得中にエラーが発生しました。",insufficientFeeToken:"手数料が不足しています。取引手数料をカバーするのに十分な {symbol} を保有しているか、別のトークンを選択してください。",selectAmountOf:`使用する {symbol} の数量を選択してください:
32
33
 
33
34
  利用可能: {balance} {symbol}`,swapFeeWarning:`
34
35
  ⚠️ **手数料の {symbol} が不足しています!**
@@ -56,8 +57,9 @@ If you want to send other NFTs, please provide the contract address, NFT ID`},ja
56
57
  {list}
57
58
 
58
59
  操作するトークンを選択してください:`,viewBalancesEmpty:"このチェーン上のウォレットにトークンは見つかりませんでした。",viewBalancesFetchError:"残高の取得中にエラーが発生しました。",buttonSendToken:"{symbol} を送信",buttonSwapToken:"{symbol} をスワップ",buttonBuyMoreToken:"{symbol} をさらに入手",actionSendNativeLabel:"ネイティブトークンを送信",actionSendNativeDesc:"ネイティブトークン (ETH, BNB, MATIC など) をアドレスに送信します",actionSendTokenLabel:"トークンを送信 (ERC20)",actionSendTokenDesc:"ERC20トークンをアドレスに送信します",actionSwapTokenLabel:"トークンをスワップ",actionSwapTokenDesc:"トークンを別のトークンに交換します",actionApproveTokenLabel:"トークンを承認",actionApproveTokenDesc:"支出元(Spender)によるトークンの使用を許可します",actionWrapNativeLabel:"ネイティブトークンをラップ",actionWrapNativeDesc:"ネイティブトークンをラップします (ETH → WETH)",actionUnwrapNativeLabel:"ネイティブトークンをアンラップ",actionUnwrapNativeDesc:"ネイティブトークンをアンラップします (WETH → ETH)",actionSendNftLabel:"NFTを送信",actionSendNftDesc:"ERC721またはERC1155 NFTを別のアドレスに転送します",fieldToAddress:"受信者アドレス",fieldAmount:"数量",fieldTokenContract:"トークンコントラクト",fieldTokenSymbol:"トークンシンボル",fieldDecimals:"デシマル (小数桁数)",fieldTokenIn:"元のトークン",fieldTokenInSymbol:"元のシンボル",fieldTokenOut:"先のトークン",fieldTokenOutSymbol:"先のシンボル",fieldTokenInDecimals:"元のデシマル",fieldTokenOutDecimals:"先のデシマル",fieldSpenderAddress:"支出元 (Spender) アドレス",fieldAmountUnlimited:"数量 (空欄 = 無制限)",fieldNftContract:"NFTコントラクト",fieldTokenId:"トークンID",fieldTokenStandard:"トークン規格",fieldNftName:"NFT名",formMustBePositiveInteger:"正の整数を入力してください",formAmountExceedsNft:"数量は利用可能な残高 {max} を超えることはできません",receivedButtonValue:"受取額: {value}",actionExecutedFor:"アクション「{action}」が {value} に対して実行されました",buyTokenHelp:"{symbol} の購入をお手伝いします。まず、交換に使用可能なトークンを表示します。",tokenNotFoundOnChain:"このチェーン上でトークン「{symbol}」が見つかりませんでした。購入可能なトレンドトークンはこちらです:",swapPreparing:"スワップの準備中...",swapConfirmYes:"はい",swapChooseFrom:"交換元(支払う)トークンを選択してください:",swapChooseTo:"{symbol} をスワップします。受け取りたいトークンを選択してください:",swapNeedDetails:"スワップの詳細が必要です。交換したいトークンを指定してください(例:「1 ETH を USDC にスワップ」)。",viewNftsLoading:"あなたのNFTコレクションを表示します!",sendTokenChoose:"どのトークンを送信しますか?",sendNftChoose:"どのNFTを送信しますか?",swapChooseToken:"どのトークンをスワップしますか?現在の残高はこちらです:",spendable:"利用可能",welcomeMessage:`**ようこそ! 🚀**
59
- 新時代の金融へ。DeFiの世界を解き放て!トレード、価格チェック、ポートフォリオ分析など、いつでもお手伝いします。`,sendOtherNfts:`
60
- 他のNFTを送信する場合は、コントラクトアドレスとNFTIDを入力してください`},cn:{chatTitle:"Keyring Agent",closeChat:"关闭聊天",messagePlaceholder:"请输入消息....",sendMessage:"发送消息",botIsTyping:"机器人正在输入",canIHelpYou:"有什么我可以帮您的吗?",replyToMessage:"回复消息",replyingTo:"正在回复",replyingToYou:"您",replyingToAgent:"Keyring Agent",cancelReply:"取消回复",suggestionAskText:"提问",suggestionAskUserMessage:"我有一个问题",suggestionAskBotReply:"随便问我任何事情",suggestionBuyText:"购买热门代币",walletConnectedChainUnsupported:"您的钱包已连接,但当前链不支持交易。请切换到支持的链以查看热门代币。",walletNotConnected:"请连接您的钱包以查看热门代币。",actionProcessing:"⏳ 正在处理交易...",actionSuccess:"✅ 交易已完成",actionFail:"❌ 操作取消或失败",txSubmitted:"⏳ 交易已提交。正在等待确认...",txConfirmed:"✅ 交易已确认!",txReverted:"❌ 交易在链上被退回(Reverted)。",txTimeout:"⚠️ 交易已提交但确认超时。请手动检查。",txSuccessful:"✅ 交易成功!",txFailed:"❌ 交易失败。请重试。",txNoHandler:"⚠️ 未配置交易处理器。",txInsufficientGas:"⚠️ **{symbol} 余额不足以支付 Gas 费!** 您当前有 {balance} {symbol},但交易费预计需要 ~{fee} {symbol}。请充值钱包后重试。",txError:"❌ 错误: {message}",swapConfirmButton:"确认",swapConfirmValue:"确认兑换",swapReadyToProceed:"准备好进行兑换了吗?",swapEstimationError:"⚠️ 无法获取兑换估算。错误: {error}",formCancel:"取消",formExecute:"执行",formProcessing:"⏳ 正在处理...",formBalance:"余额:",formTokenNotFound:"您的钱包中未找到该代币。",formNoBalance:"您的钱包中没有 {symbol} 余额。",formInsufficientBalance:"余额不足。可用余额: {balance} {symbol}",formFieldRequired:"{field} 是必填项",formInvalidAddress:"地址无效 (0x + 40位十六进制字符)",formMustBePositive:"必须为正数",formMustBeValidNumber:"必须为有效数字",openChat:"打开聊天",openChatTitle:"打开聊天支持",walletBalanceSpendable:"这是您在 {chain} 链上钱包的可选余额。请选择您想用于此次交易的代币。",walletNoTokensFound:"抱歉,我在 {chain} 链上的钱包中没找到任何代币。请确保您有代币可以进行交易。",walletFetchFailed:"抱歉,无法获取您的钱包余额。请重试。",walletFetchError:"抱歉,获取钱包余额时出错。",insufficientFeeToken:"手续费不足。请确保您有足够的 {symbol} 来支付交易费用,或选择其他代币。",selectAmountOf:`选择要使用的 {symbol} 数量:
60
+ 接続が完了し、DeFiを探索する準備が整いました!トレード、価格チェック、ポートフォリオ分析など、いつでもお手伝いします。`,sendOtherNfts:`
61
+ 送信したいNFTが上のリストにない場合は、ウェブサイトから送信してください。
62
+ {link}`},cn:{chatTitle:"Keyring Agent",closeChat:"关闭聊天",messagePlaceholder:"请输入消息....",sendMessage:"发送消息",botIsTyping:"机器人正在输入",canIHelpYou:"有什么我可以帮您的吗?",replyToMessage:"回复消息",replyingTo:"正在回复",replyingToYou:"您",replyingToAgent:"Keyring Agent",cancelReply:"取消回复",suggestionAskText:"提问",suggestionAskUserMessage:"我有一个问题",suggestionAskBotReply:"随便问我任何事情",suggestionBuyText:"购买热门代币",walletConnectedChainUnsupported:"您的钱包已连接,但当前链不支持交易。请切换到支持的链以查看热门代币。",walletNotConnected:"请连接您的钱包以查看热门代币。",actionProcessing:"⏳ 正在处理交易...",actionSuccess:"✅ 交易已完成",actionFail:"❌ 操作取消或失败",txSubmitted:"⏳ 交易已提交。正在等待确认...",txConfirmed:"✅ 交易已确认!",txReverted:"❌ 交易在链上被退回(Reverted)。",txTimeout:"⚠️ 交易已提交但确认超时。请手动检查。",txSuccessful:"✅ 交易成功!",txFailed:"❌ 交易失败。请重试。",txNoHandler:"⚠️ 未配置交易处理器。",txInsufficientGas:"⚠️ **{symbol} 余额不足以支付 Gas 费!** 您当前有 {balance} {symbol},但交易费预计需要 ~{fee} {symbol}。请充值钱包后重试。",txError:"❌ 错误: {message}",swapConfirmButton:"确认",swapConfirmValue:"确认兑换",swapReadyToProceed:"准备好进行兑换了吗?",swapEstimationError:"⚠️ 无法获取兑换估算。错误: {error}",formCancel:"取消",formExecute:"执行",formProcessing:"⏳ 正在处理...",formBalance:"余额:",formTokenNotFound:"您的钱包中未找到该代币。",formNoBalance:"您的钱包中没有 {symbol} 余额。",formInsufficientBalance:"余额不足。可用余额: {balance} {symbol}",formFieldRequired:"{field} 是必填项",formInvalidAddress:"地址无效 (0x + 40位十六进制字符)",formMustBePositive:"必须为正数",formMustBeValidNumber:"必须为有效数字",openChat:"打开聊天",openChatTitle:"打开聊天支持",walletBalanceSpendable:"这是您在 {chain} 链上钱包的可选余额。请选择您想用于此次交易的代币。",walletNoTokensFound:"抱歉,我在 {chain} 链上的钱包中没找到任何代币。请确保您有代币可以进行交易。",walletFetchFailed:"抱歉,无法获取您的钱包余额。请重试。",walletFetchError:"抱歉,获取钱包余额时出错。",insufficientFeeToken:"手续费不足。请确保您有足够的 {symbol} 来支付交易费用,或选择其他代币。",selectAmountOf:`选择要使用的 {symbol} 数量:
61
63
 
62
64
  可用余额: {balance} {symbol}`,swapFeeWarning:`
63
65
  ⚠️ **手续费所需的 {symbol} 不足!**
@@ -86,7 +88,8 @@ If you want to send other NFTs, please provide the contract address, NFT ID`},ja
86
88
 
87
89
  选择一个代币进行操作:`,viewBalancesEmpty:"您在该链的钱包中没有任何代币。",viewBalancesFetchError:"抱歉,获取您的余额时出错。",buttonSendToken:"发送 {symbol}",buttonSwapToken:"兑换 {symbol}",buttonBuyMoreToken:"购买更多 {symbol}",actionSendNativeLabel:"发送原生代币",actionSendNativeDesc:"将原生代币 (ETH, BNB, MATIC 等) 发送到指定地址",actionSendTokenLabel:"发送代币 (ERC20)",actionSendTokenDesc:"将 ERC20 代币发送到指定地址",actionSwapTokenLabel:"兑换代币",actionSwapTokenDesc:"将一种代币兑换为另一种",actionApproveTokenLabel:"授权代币",actionApproveTokenDesc:"授权支出方使用您的代币",actionWrapNativeLabel:"包装 (Wrap) 原生代币",actionWrapNativeDesc:"包装原生代币 (例如 ETH → WETH)",actionUnwrapNativeLabel:"解包 (Unwrap) 原生代币",actionUnwrapNativeDesc:"解包原生代币 (例如 WETH → ETH)",actionSendNftLabel:"发送 NFT",actionSendNftDesc:"将 ERC721 或 ERC1155 NFT 转移到另一个地址",fieldToAddress:"接收者地址",fieldAmount:"金额",fieldTokenContract:"代币合约",fieldTokenSymbol:"代币符号",fieldDecimals:"精度 (Decimals)",fieldTokenIn:"源代币 (From)",fieldTokenInSymbol:"源代币符号",fieldTokenOut:"目标代币 (To)",fieldTokenOutSymbol:"目标代币符号",fieldTokenInDecimals:"源代币精度",fieldTokenOutDecimals:"目标代币精度",fieldSpenderAddress:"支出方 (Spender) 地址",fieldAmountUnlimited:"金额 (留空 = 无限制)",fieldNftContract:"NFT 合约",fieldTokenId:"代币 ID",fieldTokenStandard:"代币标准",fieldNftName:"NFT 名称",formMustBePositiveInteger:"必须为正整数",formAmountExceedsNft:"金额不能超过可用余额 {max}",receivedButtonValue:"收到: {value}",actionExecutedFor:'操作 "{action}" 已执行,对象为: {value}',buyTokenHelp:"我会帮您购买 {symbol}。让我为您显示可用于交易的代币。",tokenNotFoundOnChain:'我在该链上没找到代币 "{symbol}"。以下是您可以购买的热门代币:',swapPreparing:"正在准备兑换...",swapConfirmYes:"是",swapChooseFrom:"请选择您想从哪个代币进行兑换:",swapChooseTo:"您想兑换 {symbol}。请选择您想收到的代币:",swapNeedDetails:"我需要更多关于兑换的细节。请指定您想兑换的代币(例如 “将 1 ETH 兑换为 USDC”)。",viewNftsLoading:"正在为您展示 NFT 收藏!",sendTokenChoose:"您想发送哪个代币?",sendNftChoose:"您想发送哪个 NFT?",swapChooseToken:"您想兑换哪个代币?以下是您的当前余额:",spendable:"可用余额",welcomeMessage:`**欢迎! 🚀**
88
90
  您已连接并准备好探索 DeFi!我可以帮您进行交易、查询价格,并在需要时分析您的资产组合。`,sendOtherNfts:`
89
- 如果您想发送其他 NFT,请提供合约地址和 NFT ID`}};function go(e,t){return ho[t]?.[e]??ho.en[e]??e}function Vs(e,t){return e.replace(/\{(\w+)\}/g,(n,s)=>t[s]??`{${s}}`)}const wo=te.createContext(void 0),Gs=({children:e,initialLanguage:t="en"})=>{const[n,s]=te.useState(t);te.useEffect(()=>{t&&s(t)},[t]);const o=te.useCallback(r=>go(r,n),[n]),a=te.useCallback((r,i)=>Vs(go(r,n),i),[n]);return O.jsx(wo.Provider,{value:{language:n,setLanguage:s,t:o,ti:a},children:e})},cn=()=>{const e=te.useContext(wo);if(!e)throw new Error("useLanguage must be used within a LanguageProvider");return e},Ys=te.memo(({onClick:e,buttonSize:t=56})=>{const{t:n}=cn(),s=o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),e())};return O.jsx("button",{className:"chat-button",onClick:e,onKeyDown:s,"aria-label":n("openChat"),title:n("openChatTitle"),type:"button",children:O.jsx("img",{src:Ws,width:t,height:t,alt:"Ask AI"})})});function ut(e){const t={formatters:void 0,fees:void 0,serializers:void 0,...e};function n(s){return o=>{const a=typeof o=="function"?o(s):o,r={...s,...a};return Object.assign(r,{extend:n(r)})}}return Object.assign(t,{extend:n(t)})}const bo="2.46.3";let Nn={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,version:`viem@${bo}`};class me extends Error{constructor(t,n={}){const s=n.cause instanceof me?n.cause.details:n.cause?.message?n.cause.message:n.details,o=n.cause instanceof me&&n.cause.docsPath||n.docsPath,a=Nn.getDocsUrl?.({...n,docsPath:o}),r=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...a?[`Docs: ${a}`]:[],...s?[`Details: ${s}`]:[],...Nn.version?[`Version: ${Nn.version}`]:[]].join(`
91
+ 如果您想发送的 NFT 不在上方列表中,请访问我们的网站进行发送。
92
+ {link}`}};function go(e,t){return ho[t]?.[e]??ho.en[e]??e}function Vs(e,t){return e.replace(/\{(\w+)\}/g,(n,s)=>t[s]??`{${s}}`)}const wo=te.createContext(void 0),Gs=({children:e,initialLanguage:t="en"})=>{const[n,s]=te.useState(t);te.useEffect(()=>{t&&s(t)},[t]);const o=te.useCallback(r=>go(r,n),[n]),a=te.useCallback((r,i)=>Vs(go(r,n),i),[n]);return O.jsx(wo.Provider,{value:{language:n,setLanguage:s,t:o,ti:a},children:e})},cn=()=>{const e=te.useContext(wo);if(!e)throw new Error("useLanguage must be used within a LanguageProvider");return e},Ys=te.memo(({onClick:e,buttonSize:t=56})=>{const{t:n}=cn(),s=o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),e())};return O.jsx("button",{className:"chat-button",onClick:e,onKeyDown:s,"aria-label":n("openChat"),title:n("openChatTitle"),type:"button",children:O.jsx("img",{src:Ws,width:t,height:t,alt:"Ask AI"})})});function ut(e){const t={formatters:void 0,fees:void 0,serializers:void 0,...e};function n(s){return o=>{const a=typeof o=="function"?o(s):o,r={...s,...a};return Object.assign(r,{extend:n(r)})}}return Object.assign(t,{extend:n(t)})}const bo="2.46.3";let Nn={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,version:`viem@${bo}`};class me extends Error{constructor(t,n={}){const s=n.cause instanceof me?n.cause.details:n.cause?.message?n.cause.message:n.details,o=n.cause instanceof me&&n.cause.docsPath||n.docsPath,a=Nn.getDocsUrl?.({...n,docsPath:o}),r=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...a?[`Docs: ${a}`]:[],...s?[`Details: ${s}`]:[],...Nn.version?[`Version: ${Nn.version}`]:[]].join(`
90
93
  `);super(r,n.cause?{cause:n.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=s,this.docsPath=o,this.metaMessages=n.metaMessages,this.name=n.name??this.name,this.shortMessage=t,this.version=bo}walk(t){return yo(this,t)}}function yo(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?yo(e.cause,t):t?null:e}class Bn extends me{constructor({max:t,min:n,signed:s,size:o,value:a}){super(`Number "${a}" is not in safe ${o?`${o*8}-bit ${s?"signed":"unsigned"} `:""}integer range ${t?`(${n} to ${t})`:`(above ${n})`}`,{name:"IntegerOutOfRangeError"})}}class Js extends me{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed ${n} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}}function Ot(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function Je(e){return Ot(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}function ln(e,{dir:t="left"}={}){let n=typeof e=="string"?e.replace("0x",""):e,s=0;for(let o=0;o<n.length-1&&n[t==="left"?o:n.length-o-1].toString()==="0";o++)s++;return n=t==="left"?n.slice(s):n.slice(0,n.length-s),typeof e=="string"?(n.length===1&&t==="right"&&(n=`${n}0`),`0x${n.length%2===1?`0${n}`:n}`):n}class Ao extends me{constructor({offset:t,position:n,size:s}){super(`Slice ${n==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${s}).`,{name:"SliceOffsetOutOfBoundsError"})}}class ko extends me{constructor({size:t,targetSize:n,type:s}){super(`${s.charAt(0).toUpperCase()}${s.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`,{name:"SizeExceedsPaddingSizeError"})}}function Dt(e,{dir:t,size:n=32}={}){return typeof e=="string"?bt(e,{dir:t,size:n}):zs(e,{dir:t,size:n})}function bt(e,{dir:t,size:n=32}={}){if(n===null)return e;const s=e.replace("0x","");if(s.length>n*2)throw new ko({size:Math.ceil(s.length/2),targetSize:n,type:"hex"});return`0x${s[t==="right"?"padEnd":"padStart"](n*2,"0")}`}function zs(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new ko({size:e.length,targetSize:n,type:"bytes"});const s=new Uint8Array(n);for(let o=0;o<n;o++){const a=t==="right";s[a?o:n-o-1]=e[a?o:e.length-o-1]}return s}const js=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Lt(e,t={}){return typeof e=="number"||typeof e=="bigint"?pe(e,t):typeof e=="string"?To(e,t):typeof e=="boolean"?vo(e,t):ft(e,t)}function vo(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(Ut(n,{size:t.size}),Dt(n,{size:t.size})):n}function ft(e,t={}){let n="";for(let o=0;o<e.length;o++)n+=js[e[o]];const s=`0x${n}`;return typeof t.size=="number"?(Ut(s,{size:t.size}),Dt(s,{dir:"right",size:t.size})):s}function pe(e,t={}){const{signed:n,size:s}=t,o=BigInt(e);let a;s?n?a=(1n<<BigInt(s)*8n-1n)-1n:a=2n**(BigInt(s)*8n)-1n:typeof e=="number"&&(a=BigInt(Number.MAX_SAFE_INTEGER));const r=typeof a=="bigint"&&n?-a-1n:0;if(a&&o>a||o<r){const l=typeof e=="bigint"?"n":"";throw new Bn({max:a?`${a}${l}`:void 0,min:`${r}${l}`,signed:n,size:s,value:`${e}${l}`})}const i=`0x${(n&&o<0?(1n<<BigInt(s*8))+BigInt(o):o).toString(16)}`;return s?Dt(i,{size:s}):i}const qs=new TextEncoder;function To(e,t={}){const n=qs.encode(e);return ft(n,t)}const Qs=new TextEncoder;function Fn(e,t={}){return typeof e=="number"||typeof e=="bigint"?Xs(e,t):typeof e=="boolean"?Ks(e,t):Ot(e)?Ct(e,t):Eo(e,t)}function Ks(e,t={}){const n=new Uint8Array(1);return n[0]=Number(e),typeof t.size=="number"?(Ut(n,{size:t.size}),Dt(n,{size:t.size})):n}const pt={zero:48,nine:57,A:65,F:70,a:97,f:102};function Co(e){if(e>=pt.zero&&e<=pt.nine)return e-pt.zero;if(e>=pt.A&&e<=pt.F)return e-(pt.A-10);if(e>=pt.a&&e<=pt.f)return e-(pt.a-10)}function Ct(e,t={}){let n=e;t.size&&(Ut(n,{size:t.size}),n=Dt(n,{dir:"right",size:t.size}));let s=n.slice(2);s.length%2&&(s=`0${s}`);const o=s.length/2,a=new Uint8Array(o);for(let r=0,i=0;r<o;r++){const l=Co(s.charCodeAt(i++)),b=Co(s.charCodeAt(i++));if(l===void 0||b===void 0)throw new me(`Invalid byte sequence ("${s[i-2]}${s[i-1]}" in "${s}").`);a[r]=l*16+b}return a}function Xs(e,t){const n=pe(e,t);return Ct(n)}function Eo(e,t={}){const n=Qs.encode(e);return typeof t.size=="number"?(Ut(n,{size:t.size}),Dt(n,{dir:"right",size:t.size})):n}function Ut(e,{size:t}){if(Je(e)>t)throw new Js({givenSize:Je(e),maxSize:t})}function Mt(e,t={}){const{signed:n}=t;t.size&&Ut(e,{size:t.size});const s=BigInt(e);if(!n)return s;const o=(e.length-2)/2,a=(1n<<BigInt(o)*8n-1n)-1n;return s<=a?s:s-BigInt(`0x${"f".padStart(o*2,"f")}`)-1n}function dn(e,t={}){const n=Mt(e,t),s=Number(n);if(!Number.isSafeInteger(s))throw new Bn({max:`${Number.MAX_SAFE_INTEGER}`,min:`${Number.MIN_SAFE_INTEGER}`,signed:t.signed,size:t.size,value:`${n}n`});return s}function Pn(e,t){return({exclude:n,format:s})=>({exclude:n,format:(o,a)=>{const r=t(o,a);if(n)for(const i of n)delete r[i];return{...r,...s(o,a)}},type:e})}const So={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function On(e,t){const n={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?dn(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?dn(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?So[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(n.authorizationList=Zs(e.authorizationList)),n.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof n.v=="bigint"){if(n.v===0n||n.v===27n)return 0;if(n.v===1n||n.v===28n)return 1;if(n.v>=35n)return n.v%2n===0n?1:0}})(),n.type==="legacy"&&(delete n.accessList,delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.yParity),n.type==="eip2930"&&(delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),n.type==="eip1559"&&delete n.maxFeePerBlobGas,n}const _s=Pn("transaction",On);function Zs(e){return e.map(t=>({address:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}function $s(e,t){const n=(e.transactions??[]).map(s=>typeof s=="string"?s:On(s));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:n,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}const ea=Pn("block",$s);function ta(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,blockTimestamp:e.blockTimestamp?BigInt(e.blockTimestamp):e.blockTimestamp===null?null:void 0,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}const na={"0x0":"reverted","0x1":"success"};function oa(e,t){const n={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(s=>ta(s)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?dn(e.transactionIndex):null,status:e.status?na[e.status]:null,type:e.type?So[e.type]||e.type:null};return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}const sa=Pn("transactionReceipt",oa),aa={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function ra(e,t){const n={};return typeof e.authorizationList<"u"&&(n.authorizationList=ia(e.authorizationList)),typeof e.accessList<"u"&&(n.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(n.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?n.blobs=e.blobs.map(s=>ft(s)):n.blobs=e.blobs),typeof e.data<"u"&&(n.data=e.data),e.account&&(n.from=e.account.address),typeof e.from<"u"&&(n.from=e.from),typeof e.gas<"u"&&(n.gas=pe(e.gas)),typeof e.gasPrice<"u"&&(n.gasPrice=pe(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(n.maxFeePerBlobGas=pe(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(n.maxFeePerGas=pe(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(n.maxPriorityFeePerGas=pe(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(n.nonce=pe(e.nonce)),typeof e.to<"u"&&(n.to=e.to),typeof e.type<"u"&&(n.type=aa[e.type]),typeof e.value<"u"&&(n.value=pe(e.value)),n}function ia(e){return e.map(t=>({address:t.address,r:t.r?pe(BigInt(t.r)):t.r,s:t.s?pe(BigInt(t.s)):t.s,chainId:pe(t.chainId),nonce:pe(t.nonce),...typeof t.yParity<"u"?{yParity:pe(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:pe(t.v)}:{}}))}const Rt=2n**256n-1n;function Ht(e){return typeof e[0]=="string"?Et(e):ca(e)}function ca(e){let t=0;for(const o of e)t+=o.length;const n=new Uint8Array(t);let s=0;for(const o of e)n.set(o,s),s+=o.length;return n}function Et(e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}class xo extends me{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class la extends me{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}}class da extends me{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}}const ua={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 da({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new la({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new xo({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new xo({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function Io(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(ua);return n.bytes=e,n.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}function St(e,t="hex"){const n=No(e),s=Io(new Uint8Array(n.length));return n.encode(s),t==="hex"?ft(s.bytes):s.bytes}function No(e){return Array.isArray(e)?fa(e.map(t=>No(t))):pa(e)}function fa(e){const t=e.reduce((o,a)=>o+a.length,0),n=Bo(t);return{length:t<=55?1+t:1+n+t,encode(o){t<=55?o.pushByte(192+t):(o.pushByte(247+n),n===1?o.pushUint8(t):n===2?o.pushUint16(t):n===3?o.pushUint24(t):o.pushUint32(t));for(const{encode:a}of e)a(o)}}}function pa(e){const t=typeof e=="string"?Ct(e):e,n=Bo(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(o){t.length===1&&t[0]<128?o.pushBytes(t):t.length<=55?(o.pushByte(128+t.length),o.pushBytes(t)):(o.pushByte(183+n),n===1?o.pushUint8(t.length):n===2?o.pushUint16(t.length):n===3?o.pushUint24(t.length):o.pushUint32(t.length),o.pushBytes(t))}}}function Bo(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new me("Length is too large.")}const ma={gwei:9,wei:18},ha={ether:-9,wei:9};function Le(e,t){let n=e.toString();const s=n.startsWith("-");s&&(n=n.slice(1)),n=n.padStart(t,"0");let[o,a]=[n.slice(0,n.length-t),n.slice(n.length-t)];return a=a.replace(/(0+)$/,""),`${s?"-":""}${o||"0"}${a?`.${a}`:""}`}function ga(e,t="wei"){return Le(e,ma[t])}function xt(e,t="wei"){return Le(e,ha[t])}function Fo(e){const t=Object.entries(e).map(([s,o])=>o===void 0||o===!1?null:[s,o]).filter(Boolean),n=t.reduce((s,[o])=>Math.max(s,o.length),0);return t.map(([s,o])=>` ${`${s}:`.padEnd(n+1)} ${o}`).join(`
91
94
  `)}class wa extends me{constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class ba extends me{constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",Fo(t),"}","","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 ya extends me{constructor({storageKey:t}){super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Math.floor((t.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}function Aa(e){if(!e||e.length===0)return[];const t=[];for(const n of e){const{chainId:s,nonce:o,...a}=n,r=n.address;t.push([s?Lt(s):"0x",r,o?Lt(o):"0x",...Kt({},a)])}return t}function Po(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),s=typeof e.blobs[0]=="string"?e.blobs.map(a=>Ct(a)):e.blobs,o=[];for(const a of s)o.push(Uint8Array.from(t.blobToKzgCommitment(a)));return n==="bytes"?o:o.map(a=>ft(a))}function Oo(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),s=typeof e.blobs[0]=="string"?e.blobs.map(r=>Ct(r)):e.blobs,o=typeof e.commitments[0]=="string"?e.commitments.map(r=>Ct(r)):e.commitments,a=[];for(let r=0;r<s.length;r++){const i=s[r],l=o[r];a.push(Uint8Array.from(t.computeBlobKzgProof(i,l)))}return n==="bytes"?a:a.map(r=>ft(r))}function ka(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Do(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function zt(e,...t){if(!ka(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function un(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Lo(e,t){zt(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function va(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function jt(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Dn(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function rt(e,t){return e<<32-t|e>>>t}const Ta=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Ca(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function Ea(e){for(let t=0;t<e.length;t++)e[t]=Ca(e[t]);return e}const Uo=Ta?e=>e:Ea;function Sa(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function Ln(e){return typeof e=="string"&&(e=Sa(e)),zt(e),e}class Mo{}function Ro(e){const t=s=>e().update(Ln(s)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function xa(e,t,n,s){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,s);const o=BigInt(32),a=BigInt(4294967295),r=Number(n>>o&a),i=Number(n&a),l=s?4:0,b=s?0:4;e.setUint32(t+l,r,s),e.setUint32(t+b,i,s)}function Ia(e,t,n){return e&t^~e&n}function Na(e,t,n){return e&t^e&n^t&n}class Ba extends Mo{constructor(t,n,s,o){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=n,this.padOffset=s,this.isLE=o,this.buffer=new Uint8Array(t),this.view=Dn(this.buffer)}update(t){un(this),t=Ln(t),zt(t);const{view:n,buffer:s,blockLen:o}=this,a=t.length;for(let r=0;r<a;){const i=Math.min(o-this.pos,a-r);if(i===o){const l=Dn(t);for(;o<=a-r;r+=o)this.process(l,r);continue}s.set(t.subarray(r,r+i),this.pos),this.pos+=i,r+=i,this.pos===o&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){un(this),Lo(t,this),this.finished=!0;const{buffer:n,view:s,blockLen:o,isLE:a}=this;let{pos:r}=this;n[r++]=128,jt(this.buffer.subarray(r)),this.padOffset>o-r&&(this.process(s,0),r=0);for(let z=r;z<o;z++)n[z]=0;xa(s,o-8,BigInt(this.length*8),a),this.process(s,0);const i=Dn(t),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const b=l/4,D=this.get();if(b>D.length)throw new Error("_sha2: outputLen bigger than state");for(let z=0;z<b;z++)i.setUint32(4*z,D[z],a)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const s=t.slice(0,n);return this.destroy(),s}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:s,length:o,finished:a,destroyed:r,pos:i}=this;return t.destroyed=r,t.finished=a,t.length=o,t.pos=i,o%n&&t.buffer.set(s),t}clone(){return this._cloneInto()}}const yt=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),fn=BigInt(2**32-1),Ho=BigInt(32);function Fa(e,t=!1){return t?{h:Number(e&fn),l:Number(e>>Ho&fn)}:{h:Number(e>>Ho&fn)|0,l:Number(e&fn)|0}}function Pa(e,t=!1){const n=e.length;let s=new Uint32Array(n),o=new Uint32Array(n);for(let a=0;a<n;a++){const{h:r,l:i}=Fa(e[a],t);[s[a],o[a]]=[r,i]}return[s,o]}const Oa=(e,t,n)=>e<<n|t>>>32-n,Da=(e,t,n)=>t<<n|e>>>32-n,La=(e,t,n)=>t<<n-32|e>>>64-n,Ua=(e,t,n)=>e<<n-32|t>>>64-n,Ma=Uint32Array.from([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]),At=new Uint32Array(64);class Ra extends Ba{constructor(t=32){super(64,t,8,!1),this.A=yt[0]|0,this.B=yt[1]|0,this.C=yt[2]|0,this.D=yt[3]|0,this.E=yt[4]|0,this.F=yt[5]|0,this.G=yt[6]|0,this.H=yt[7]|0}get(){const{A:t,B:n,C:s,D:o,E:a,F:r,G:i,H:l}=this;return[t,n,s,o,a,r,i,l]}set(t,n,s,o,a,r,i,l){this.A=t|0,this.B=n|0,this.C=s|0,this.D=o|0,this.E=a|0,this.F=r|0,this.G=i|0,this.H=l|0}process(t,n){for(let z=0;z<16;z++,n+=4)At[z]=t.getUint32(n,!1);for(let z=16;z<64;z++){const k=At[z-15],x=At[z-2],B=rt(k,7)^rt(k,18)^k>>>3,S=rt(x,17)^rt(x,19)^x>>>10;At[z]=S+At[z-7]+B+At[z-16]|0}let{A:s,B:o,C:a,D:r,E:i,F:l,G:b,H:D}=this;for(let z=0;z<64;z++){const k=rt(i,6)^rt(i,11)^rt(i,25),x=D+k+Ia(i,l,b)+Ma[z]+At[z]|0,S=(rt(s,2)^rt(s,13)^rt(s,22))+Na(s,o,a)|0;D=b,b=l,l=i,i=r+x|0,r=a,a=o,o=s,s=x+S|0}s=s+this.A|0,o=o+this.B|0,a=a+this.C|0,r=r+this.D|0,i=i+this.E|0,l=l+this.F|0,b=b+this.G|0,D=D+this.H|0,this.set(s,o,a,r,i,l,b,D)}roundClean(){jt(At)}destroy(){this.set(0,0,0,0,0,0,0,0),jt(this.buffer)}}const Ha=Ro(()=>new Ra);function Wa(e,t){return Ha(Ot(e,{strict:!1})?Fn(e):e)}function Va(e){const{commitment:t,version:n=1}=e,s=e.to??(typeof t=="string"?"hex":"bytes"),o=Wa(t);return o.set([n],0),s==="bytes"?o:ft(o)}function Ga(e){const{commitments:t,version:n}=e,s=e.to??(typeof t[0]=="string"?"hex":"bytes"),o=[];for(const a of t)o.push(Va({commitment:a,to:s,version:n}));return o}const Wo=6,Vo=32,Un=4096,Go=Vo*Un,Yo=Go*Wo-1-1*Un*Wo,Jo=1;class Ya extends me{constructor({maxSize:t,size:n}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${n} bytes`],name:"BlobSizeTooLargeError"})}}class zo extends me{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class Ja extends me{constructor({hash:t,size:n}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${n}`],name:"InvalidVersionedHashSizeError"})}}class za extends me{constructor({hash:t,version:n}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${Jo}`,`Received: ${n}`],name:"InvalidVersionedHashVersionError"})}}function ja(e){const t=e.to??(typeof e.data=="string"?"hex":"bytes"),n=typeof e.data=="string"?Ct(e.data):e.data,s=Je(n);if(!s)throw new zo;if(s>Yo)throw new Ya({maxSize:Yo,size:s});const o=[];let a=!0,r=0;for(;a;){const i=Io(new Uint8Array(Go));let l=0;for(;l<Un;){const b=n.slice(r,r+(Vo-1));if(i.pushByte(0),i.pushBytes(b),b.length<31){i.pushByte(128),a=!1;break}l++,r+=31}o.push(i)}return t==="bytes"?o.map(i=>i.bytes):o.map(i=>ft(i.bytes))}function qa(e){const{data:t,kzg:n,to:s}=e,o=e.blobs??ja({data:t,to:s}),a=e.commitments??Po({blobs:o,kzg:n,to:s}),r=e.proofs??Oo({blobs:o,commitments:a,kzg:n,to:s}),i=[];for(let l=0;l<o.length;l++)i.push({blob:o[l],commitment:a[l],proof:r[l]});return i}class it extends me{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}class pn extends me{constructor({chainId:t}){super(typeof t=="number"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}class Wt extends me{constructor({cause:t,message:n}={}){const s=n?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${s?`with reason: ${s}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"})}}Object.defineProperty(Wt,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(Wt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted|gas required exceeds allowance/});class It extends me{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${xt(n)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"})}}Object.defineProperty(It,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class Mn extends me{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${xt(n)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"})}}Object.defineProperty(Mn,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class Rn extends me{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}is higher than the next one expected.`,{cause:t,name:"NonceTooHighError"})}}Object.defineProperty(Rn,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class Hn extends me{constructor({cause:t,nonce:n}={}){super([`Nonce provided for the transaction ${n?`(${n}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(`
92
95
  `),{cause:t,name:"NonceTooLowError"})}}Object.defineProperty(Hn,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class Wn extends me{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}exceeds the maximum allowed nonce.`,{cause:t,name:"NonceMaxValueError"})}}Object.defineProperty(Wn,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class Vn extends me{constructor({cause:t}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
@@ -412,7 +415,7 @@ Response: {"action":"swap_token","message":"<friendly explanation>","parameters"
412
415
 
413
416
  User: "swap token" or "I want to swap" or "đổi token" (no specific tokens mentioned)
414
417
  Response: {"action":"swap_token","message":"<friendly explanation, e.g. Which token would you like to swap?>","parameters":{"token_in":"","token_in_symbol":"","token_in_decimals":"","token_out":"","token_out_symbol":"","token_out_decimals":"","amount":""}}`}const Ts={1:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",10:"0x4200000000000000000000000000000000000006",56:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",137:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",8453:"0x4200000000000000000000000000000000000006",42161:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"},vn=[{name:"transfer",type:"function",stateMutability:"nonpayable",inputs:[{name:"to",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{name:"approve",type:"function",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{name:"allowance",type:"function",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]}],Cs=[{name:"deposit",type:"function",stateMutability:"payable",inputs:[],outputs:[]},{name:"withdraw",type:"function",stateMutability:"nonpayable",inputs:[{name:"wad",type:"uint256"}],outputs:[]}],ji=[{name:"safeTransferFrom",type:"function",stateMutability:"nonpayable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]}],qi=[{name:"safeTransferFrom",type:"function",stateMutability:"nonpayable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"id",type:"uint256"},{name:"amount",type:"uint256"},{name:"data",type:"bytes"}],outputs:[]}];function nn(e,t){return t||ct[e]?.rpcUrls?.default?.http?.[0]}function Qi(e){const{action:t,parameters:n,fromAddress:s,chainId:o}=e;switch(t){case"send_native":return Ki(n,s,o);case"send_token":return Xi(n,s,o);case"approve_token":return _i(n,s,o);case"wrap_native":return Zi(n,s,o);case"unwrap_native":return $i(n,s,o);case"send_nft":return tc(n,s,o);default:throw new Error(`Action "${t}" does not produce a transaction`)}}function Ki(e,t,n){const{to_address:s,amount:o}=e;if(!s)throw new Error("Recipient address is required");if(!o)throw new Error("Amount is required");const a=mt(o,18).toString();return{from:t,to:s,data:"0x",value:a,chainId:n,description:`Send ${o} native token to ${s}`}}function Xi(e,t,n){const{contract_address:s,to_address:o,amount:a,decimals:r,token_symbol:i}=e;if(!s)throw new Error("Token contract address is required");if(!o)throw new Error("Recipient address is required");if(!a)throw new Error("Amount is required");const l=parseInt(r)||18,b=mt(a,l),D=kt({abi:vn,functionName:"transfer",args:[o,b]});return{from:t,to:s,data:D,value:"0",chainId:n,description:`Send ${a} ${i||"tokens"} to ${o}`}}function _i(e,t,n){const{contract_address:s,spender_address:o,amount:a,token_symbol:r}=e;if(!s)throw new Error("Token contract address is required");if(!o)throw new Error("Spender address is required");const i=a&&a?.trim()!==""?mt(a,18):Rt,l=kt({abi:vn,functionName:"approve",args:[o,i]});return{from:t,to:s,data:l,value:"0",chainId:n,description:`Approve ${a||"unlimited"} ${r||"tokens"} for ${o}`}}function Zi(e,t,n){const{amount:s}=e;if(!s)throw new Error("Amount is required");const o=Ts[n];if(!o)throw new Error(`WETH not supported on chain ${n}`);const a=mt(s,18).toString(),r=kt({abi:Cs,functionName:"deposit"});return{from:t,to:o,data:r,value:a,chainId:n,description:`Wrap ${s} native token`}}function $i(e,t,n){const{amount:s}=e;if(!s)throw new Error("Amount is required");const o=Ts[n];if(!o)throw new Error(`WETH not supported on chain ${n}`);const a=mt(s,18),r=kt({abi:Cs,functionName:"withdraw",args:[a]});return{from:t,to:o,data:r,value:"0",chainId:n,description:`Unwrap ${s} WETH`}}function ec(e){return["send_native","send_token","approve_token","wrap_native","unwrap_native","send_nft"].includes(e)}async function lo(e){const{transactionHash:t,chainId:n,pollingInterval:s=3e3,timeout:o=12e4,rpcUrl:a}=e,r=nn(n,a);if(!r)throw new Error(`No RPC endpoint for chain ${n}`);const i=Date.now();for(;Date.now()-i<o;){try{const b=await(await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_getTransactionReceipt",params:[t]})})).json();if(b.result){const D=b.result;return{status:D.status==="0x1"?"success":"fail",blockNumber:D.blockNumber,gasUsed:D.gasUsed,effectiveGasPrice:D.effectiveGasPrice}}}catch(l){console.warn("eth_getTransactionReceipt poll error:",l)}await new Promise(l=>setTimeout(l,s))}throw new Error(`Transaction ${t} was not mined within ${o/1e3}s`)}async function uo(e){const{tokenAddress:t,ownerAddress:n,spenderAddress:s,chainId:o,rpcUrl:a}=e,r=nn(o,a);if(!r)return console.warn(`No RPC endpoint for chain ${o}, assuming no allowance`),BigInt(0);try{const i=kt({abi:vn,functionName:"allowance",args:[n,s]}),b=await(await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_call",params:[{to:t,data:i},"latest"]})})).json();return b.result&&b.result!=="0x"?BigInt(b.result):BigInt(0)}catch(i){return console.warn("checkAllowance failed:",i),BigInt(0)}}function Tn(e){const{tokenAddress:t,spenderAddress:n,fromAddress:s,chainId:o,tokenSymbol:a,amount:r}=e,i=r&&BigInt(r)>0n?BigInt(r):Rt,l=kt({abi:vn,functionName:"approve",args:[n,i]});return{from:s,to:t,data:l,value:"0",chainId:o,description:`Approve ${a||"token"} for swap`}}function tc(e,t,n){const{contract_address:s,token_id:o,to_address:a,token_standard:r,amount:i,nft_name:l}=e;if(!s)throw new Error("NFT contract address is required");if(!o)throw new Error("Token ID is required");if(!a)throw new Error("Recipient address is required");const b=(r||"ERC721").toUpperCase(),D=BigInt(o);let z,k;if(b==="ERC1155"){const x=BigInt(i||"1");z=kt({abi:qi,functionName:"safeTransferFrom",args:[t,a,D,x,"0x"]}),k=`Send ${x>1n?x.toString()+"x ":""}${l||"NFT"} (ERC1155 #${o}) to ${a}`}else z=kt({abi:ji,functionName:"safeTransferFrom",args:[t,a,D]}),k=`Send ${l||"NFT"} (ERC721 #${o}) to ${a}`;return{from:t,to:s,data:z,value:"0",chainId:n,description:k}}async function Cn(e){const{address:t,chainId:n,rpcUrl:s}=e,o=nn(n,s);if(!o)return console.warn(`No RPC endpoint for chain ${n}`),new re(0);try{const r=await(await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_getBalance",params:[t,"latest"]})})).json();return r.result&&r.result!=="0x"?new re(BigInt(r.result).toString()):new re(0)}catch(a){return console.warn("getNativeBalance failed:",a),new re(0)}}async function on(e){const{from:t,to:n,data:s,value:o,chainId:a,rpcUrl:r}=e,i=nn(a,r);if(!i)return console.warn(`No RPC endpoint for chain ${a}`),new re(0);try{const[l,b]=await Promise.all([fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_estimateGas",params:[{from:t,to:n,data:s,...o&&o!=="0"?{value:o}:{}}]})}),fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:2,method:"eth_gasPrice",params:[]})})]),[D,z]=await Promise.all([l.json(),b.json()]),k=D.result?new re(BigInt(D.result).toString()):new re(0),x=z.result?new re(BigInt(z.result).toString()):new re(0);return k.times(x).times(1.1)}catch(l){return console.warn("estimateTransactionFee failed:",l),new re(0)}}async function fo(e){const{chainId:t,rpcUrl:n}=e,s=nn(t,n);if(!s)return console.warn(`No RPC endpoint for chain ${t}`),new re(0);try{const a=await(await fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_gasPrice",params:[]})})).json();return a.result&&a.result!=="0x"?new re(BigInt(a.result).toString()):new re(0)}catch(o){return console.warn("getGasPrice failed:",o),new re(0)}}var ne={},sn={exports:{}},nc=sn.exports,Es;function oc(){return Es||(Es=1,(function(e,t){(function(n,s){var o="1.0.39",a="",r="?",i="function",l="undefined",b="object",D="string",z="major",k="model",x="name",B="type",S="vendor",v="version",ge="architecture",y="console",J="mobile",Q="tablet",he="smarttv",we="wearable",Ee="embedded",c=500,d="Amazon",p="Apple",C="ASUS",u="BlackBerry",g="Browser",E="Chrome",h="Edge",w="Firefox",I="Google",N="Huawei",F="LG",X="Microsoft",se="Motorola",ue="Opera",Ce="Samsung",Se="Sharp",q="Sony",ye="Xiaomi",Ne="Zebra",qe="Facebook",Qe="Chromium OS",ot="Mac OS",Ve=" Browser",st=function(W,M){var U={};for(var _ in W)M[_]&&M[_].length%2===0?U[_]=M[_].concat(W[_]):U[_]=W[_];return U},Be=function(W){for(var M={},U=0;U<W.length;U++)M[W[U].toUpperCase()]=W[U];return M},Oe=function(W,M){return typeof W===D?ke(M).indexOf(ke(W))!==-1:!1},ke=function(W){return W.toLowerCase()},Gt=function(W){return typeof W===D?W.replace(/[^\d\.]/g,a).split(".")[0]:s},gt=function(W,M){if(typeof W===D)return W=W.replace(/^\s\s*/,a),typeof M===l?W:W.substring(0,c)},lt=function(W,M){for(var U=0,_,oe,V,A,P,de;U<M.length&&!P;){var ie=M[U],ve=M[U+1];for(_=oe=0;_<ie.length&&!P&&ie[_];)if(P=ie[_++].exec(W),P)for(V=0;V<ve.length;V++)de=P[++oe],A=ve[V],typeof A===b&&A.length>0?A.length===2?typeof A[1]==i?this[A[0]]=A[1].call(this,de):this[A[0]]=A[1]:A.length===3?typeof A[1]===i&&!(A[1].exec&&A[1].test)?this[A[0]]=de?A[1].call(this,de,A[2]):s:this[A[0]]=de?de.replace(A[1],A[2]):s:A.length===4&&(this[A[0]]=de?A[3].call(this,de.replace(A[1],A[2])):s):this[A]=de||s;U+=2}},at=function(W,M){for(var U in M)if(typeof M[U]===b&&M[U].length>0){for(var _=0;_<M[U].length;_++)if(Oe(M[U][_],W))return U===r?s:U}else if(Oe(M[U],W))return U===r?s:U;return M.hasOwnProperty("*")?M["*"]:W},Yt={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},R={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},K={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[v,[x,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[v,[x,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[x,v],[/opios[\/ ]+([\w\.]+)/i],[v,[x,ue+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[v,[x,ue+" GX"]],[/\bopr\/([\w\.]+)/i],[v,[x,ue]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[v,[x,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[x,v],[/quark(?:pc)?\/([-\w\.]+)/i],[v,[x,"Quark"]],[/\bddg\/([\w\.]+)/i],[v,[x,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[v,[x,"UC"+g]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[v,[x,"WeChat"]],[/konqueror\/([\w\.]+)/i],[v,[x,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[v,[x,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[v,[x,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[v,[x,"Smart Lenovo "+g]],[/(avast|avg)\/([\w\.]+)/i],[[x,/(.+)/,"$1 Secure "+g],v],[/\bfocus\/([\w\.]+)/i],[v,[x,w+" Focus"]],[/\bopt\/([\w\.]+)/i],[v,[x,ue+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[v,[x,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[v,[x,"Dolphin"]],[/coast\/([\w\.]+)/i],[v,[x,ue+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[v,[x,"MIUI "+g]],[/fxios\/([-\w\.]+)/i],[v,[x,w]],[/\bqihu|(qi?ho?o?|360)browser/i],[[x,"360"+Ve]],[/\b(qq)\/([\w\.]+)/i],[[x,/(.+)/,"$1Browser"],v],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[x,/(.+)/,"$1"+Ve],v],[/samsungbrowser\/([\w\.]+)/i],[v,[x,Ce+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[x,/_/g," "],v],[/metasr[\/ ]?([\d\.]+)/i],[v,[x,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[x,"Sogou Mobile"],v],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[x,v],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[x],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[x,qe],v],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[x,v],[/\bgsa\/([\w\.]+) .*safari\//i],[v,[x,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[v,[x,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[v,[x,E+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[x,E+" WebView"],v],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[v,[x,"Android "+g]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[x,v],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[v,[x,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[v,x],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[x,[v,at,Yt]],[/(webkit|khtml)\/([\w\.]+)/i],[x,v],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[x,"Netscape"],v],[/(wolvic)\/([\w\.]+)/i],[x,v],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[v,[x,w+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[x,[v,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[x,[v,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[ge,"amd64"]],[/(ia32(?=;))/i],[[ge,ke]],[/((?:i[346]|x)86)[;\)]/i],[[ge,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[ge,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[ge,"armhf"]],[/windows (ce|mobile); ppc;/i],[[ge,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[ge,/ower/,a,ke]],[/(sun4\w)[;\)]/i],[[ge,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[ge,ke]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[k,[S,Ce],[B,Q]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[k,[S,Ce],[B,J]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[k,[S,p],[B,J]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[k,[S,p],[B,Q]],[/(macintosh);/i],[k,[S,p]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[k,[S,Se],[B,J]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[k,[S,N],[B,Q]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[k,[S,N],[B,J]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[k,/_/g," "],[S,ye],[B,J]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[k,/_/g," "],[S,ye],[B,Q]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[k,[S,"OPPO"],[B,J]],[/\b(opd2\d{3}a?) bui/i],[k,[S,"OPPO"],[B,Q]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[k,[S,"Vivo"],[B,J]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[k,[S,"Realme"],[B,J]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[k,[S,se],[B,J]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[k,[S,se],[B,Q]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[k,[S,F],[B,Q]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[k,[S,F],[B,J]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[k,[S,"Lenovo"],[B,Q]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[k,/_/g," "],[S,"Nokia"],[B,J]],[/(pixel c)\b/i],[k,[S,I],[B,Q]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[k,[S,I],[B,J]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[k,[S,q],[B,J]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[k,"Xperia Tablet"],[S,q],[B,Q]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[k,[S,"OnePlus"],[B,J]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[k,[S,d],[B,Q]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[k,/(.+)/g,"Fire Phone $1"],[S,d],[B,J]],[/(playbook);[-\w\),; ]+(rim)/i],[k,S,[B,Q]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[k,[S,u],[B,J]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[k,[S,C],[B,Q]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[k,[S,C],[B,J]],[/(nexus 9)/i],[k,[S,"HTC"],[B,Q]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[S,[k,/_/g," "],[B,J]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[k,[S,"TCL"],[B,Q]],[/(itel) ((\w+))/i],[[S,ke],k,[B,at,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[k,[S,"Acer"],[B,Q]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[k,[S,"Meizu"],[B,J]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[k,[S,"Ulefone"],[B,J]],[/droid.+; (a(?:015|06[35]|142p?))/i],[k,[S,"Nothing"],[B,J]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[S,k,[B,J]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[S,k,[B,Q]],[/(surface duo)/i],[k,[S,X],[B,Q]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[k,[S,"Fairphone"],[B,J]],[/(u304aa)/i],[k,[S,"AT&T"],[B,J]],[/\bsie-(\w*)/i],[k,[S,"Siemens"],[B,J]],[/\b(rct\w+) b/i],[k,[S,"RCA"],[B,Q]],[/\b(venue[\d ]{2,7}) b/i],[k,[S,"Dell"],[B,Q]],[/\b(q(?:mv|ta)\w+) b/i],[k,[S,"Verizon"],[B,Q]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[k,[S,"Barnes & Noble"],[B,Q]],[/\b(tm\d{3}\w+) b/i],[k,[S,"NuVision"],[B,Q]],[/\b(k88) b/i],[k,[S,"ZTE"],[B,Q]],[/\b(nx\d{3}j) b/i],[k,[S,"ZTE"],[B,J]],[/\b(gen\d{3}) b.+49h/i],[k,[S,"Swiss"],[B,J]],[/\b(zur\d{3}) b/i],[k,[S,"Swiss"],[B,Q]],[/\b((zeki)?tb.*\b) b/i],[k,[S,"Zeki"],[B,Q]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[S,"Dragon Touch"],k,[B,Q]],[/\b(ns-?\w{0,9}) b/i],[k,[S,"Insignia"],[B,Q]],[/\b((nxa|next)-?\w{0,9}) b/i],[k,[S,"NextBook"],[B,Q]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[S,"Voice"],k,[B,J]],[/\b(lvtel\-)?(v1[12]) b/i],[[S,"LvTel"],k,[B,J]],[/\b(ph-1) /i],[k,[S,"Essential"],[B,J]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[k,[S,"Envizen"],[B,Q]],[/\b(trio[-\w\. ]+) b/i],[k,[S,"MachSpeed"],[B,Q]],[/\btu_(1491) b/i],[k,[S,"Rotor"],[B,Q]],[/(shield[\w ]+) b/i],[k,[S,"Nvidia"],[B,Q]],[/(sprint) (\w+)/i],[S,k,[B,J]],[/(kin\.[onetw]{3})/i],[[k,/\./g," "],[S,X],[B,J]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[k,[S,Ne],[B,Q]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[k,[S,Ne],[B,J]],[/smart-tv.+(samsung)/i],[S,[B,he]],[/hbbtv.+maple;(\d+)/i],[[k,/^/,"SmartTV"],[S,Ce],[B,he]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[S,F],[B,he]],[/(apple) ?tv/i],[S,[k,p+" TV"],[B,he]],[/crkey/i],[[k,E+"cast"],[S,I],[B,he]],[/droid.+aft(\w+)( bui|\))/i],[k,[S,d],[B,he]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[k,[S,Se],[B,he]],[/(bravia[\w ]+)( bui|\))/i],[k,[S,q],[B,he]],[/(mitv-\w{5}) bui/i],[k,[S,ye],[B,he]],[/Hbbtv.*(technisat) (.*);/i],[S,k,[B,he]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[S,gt],[k,gt],[B,he]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[B,he]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[S,k,[B,y]],[/droid.+; (shield) bui/i],[k,[S,"Nvidia"],[B,y]],[/(playstation [345portablevi]+)/i],[k,[S,q],[B,y]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[k,[S,X],[B,y]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[k,[S,Ce],[B,we]],[/((pebble))app/i],[S,k,[B,we]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[k,[S,p],[B,we]],[/droid.+; (glass) \d/i],[k,[S,I],[B,we]],[/droid.+; (wt63?0{2,3})\)/i],[k,[S,Ne],[B,we]],[/(quest( \d| pro)?)/i],[k,[S,qe],[B,we]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[S,[B,Ee]],[/(aeobc)\b/i],[k,[S,d],[B,Ee]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[k,[B,J]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[k,[B,Q]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[B,Q]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[B,J]],[/(android[-\w\. ]{0,9});.+buil/i],[k,[S,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[v,[x,h+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[v,[x,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[x,v],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[v,x]],os:[[/microsoft (windows) (vista|xp)/i],[x,v],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[x,[v,at,R]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[v,at,R],[x,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[v,/_/g,"."],[x,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[x,ot],[v,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[v,x],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[x,v],[/\(bb(10);/i],[v,[x,u]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[v,[x,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[v,[x,w+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[v,[x,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[v,[x,"watchOS"]],[/crkey\/([\d\.]+)/i],[v,[x,E+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[x,Qe],v],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[x,v],[/(sunos) ?([\w\.\d]*)/i],[[x,"Solaris"],v],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[x,v]]},H=function(W,M){if(typeof W===b&&(M=W,W=s),!(this instanceof H))return new H(W,M).getResult();var U=typeof n!==l&&n.navigator?n.navigator:s,_=W||(U&&U.userAgent?U.userAgent:a),oe=U&&U.userAgentData?U.userAgentData:s,V=M?st(K,M):K,A=U&&U.userAgent==_;return this.getBrowser=function(){var P={};return P[x]=s,P[v]=s,lt.call(P,_,V.browser),P[z]=Gt(P[v]),A&&U&&U.brave&&typeof U.brave.isBrave==i&&(P[x]="Brave"),P},this.getCPU=function(){var P={};return P[ge]=s,lt.call(P,_,V.cpu),P},this.getDevice=function(){var P={};return P[S]=s,P[k]=s,P[B]=s,lt.call(P,_,V.device),A&&!P[B]&&oe&&oe.mobile&&(P[B]=J),A&&P[k]=="Macintosh"&&U&&typeof U.standalone!==l&&U.maxTouchPoints&&U.maxTouchPoints>2&&(P[k]="iPad",P[B]=Q),P},this.getEngine=function(){var P={};return P[x]=s,P[v]=s,lt.call(P,_,V.engine),P},this.getOS=function(){var P={};return P[x]=s,P[v]=s,lt.call(P,_,V.os),A&&!P[x]&&oe&&oe.platform&&oe.platform!="Unknown"&&(P[x]=oe.platform.replace(/chrome os/i,Qe).replace(/macos/i,ot)),P},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return _},this.setUA=function(P){return _=typeof P===D&&P.length>c?gt(P,c):P,this},this.setUA(_),this};H.VERSION=o,H.BROWSER=Be([x,v,z]),H.CPU=Be([ge]),H.DEVICE=Be([k,S,B,y,J,he,Q,we,Ee]),H.ENGINE=H.OS=Be([x,v]),e.exports&&(t=e.exports=H),t.UAParser=H;var Z=typeof n!==l&&(n.jQuery||n.Zepto);if(Z&&!Z.ua){var le=new H;Z.ua=le.getResult(),Z.ua.get=function(){return le.getUA()},Z.ua.set=function(W){le.setUA(W);var M=le.getResult();for(var U in M)Z.ua[U]=M[U]}}})(typeof window=="object"?window:nc)})(sn,sn.exports)),sn.exports}var Ss;function sc(){if(Ss)return ne;Ss=1,Object.defineProperty(ne,"__esModule",{value:!0});function e(T){return T&&typeof T=="object"&&"default"in T?T.default:T}var t=te,n=e(t),s=oc(),o=new s,a=o.getBrowser(),r=o.getCPU(),i=o.getDevice(),l=o.getEngine(),b=o.getOS(),D=o.getUA(),z=function(f){return o.setUA(f)},k=function(f){if(!f){console.error("No userAgent string was provided");return}var m=new s(f);return{UA:m,browser:m.getBrowser(),cpu:m.getCPU(),device:m.getDevice(),engine:m.getEngine(),os:m.getOS(),ua:m.getUA(),setUserAgent:function(Y){return m.setUA(Y)}}},x=Object.freeze({ClientUAInstance:o,browser:a,cpu:r,device:i,engine:l,os:b,ua:D,setUa:z,parseUserAgent:k});function B(T,f){var m=Object.keys(T);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(T);f&&(L=L.filter(function(Y){return Object.getOwnPropertyDescriptor(T,Y).enumerable})),m.push.apply(m,L)}return m}function S(T){for(var f=1;f<arguments.length;f++){var m=arguments[f]!=null?arguments[f]:{};f%2?B(Object(m),!0).forEach(function(L){Q(T,L,m[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(T,Object.getOwnPropertyDescriptors(m)):B(Object(m)).forEach(function(L){Object.defineProperty(T,L,Object.getOwnPropertyDescriptor(m,L))})}return T}function v(T){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?v=function(f){return typeof f}:v=function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},v(T)}function ge(T,f){if(!(T instanceof f))throw new TypeError("Cannot call a class as a function")}function y(T,f){for(var m=0;m<f.length;m++){var L=f[m];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(T,L.key,L)}}function J(T,f,m){return f&&y(T.prototype,f),T}function Q(T,f,m){return f in T?Object.defineProperty(T,f,{value:m,enumerable:!0,configurable:!0,writable:!0}):T[f]=m,T}function he(){return he=Object.assign||function(T){for(var f=1;f<arguments.length;f++){var m=arguments[f];for(var L in m)Object.prototype.hasOwnProperty.call(m,L)&&(T[L]=m[L])}return T},he.apply(this,arguments)}function we(T,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");T.prototype=Object.create(f&&f.prototype,{constructor:{value:T,writable:!0,configurable:!0}}),f&&c(T,f)}function Ee(T){return Ee=Object.setPrototypeOf?Object.getPrototypeOf:function(m){return m.__proto__||Object.getPrototypeOf(m)},Ee(T)}function c(T,f){return c=Object.setPrototypeOf||function(L,Y){return L.__proto__=Y,L},c(T,f)}function d(T,f){if(T==null)return{};var m={},L=Object.keys(T),Y,Ae;for(Ae=0;Ae<L.length;Ae++)Y=L[Ae],!(f.indexOf(Y)>=0)&&(m[Y]=T[Y]);return m}function p(T,f){if(T==null)return{};var m=d(T,f),L,Y;if(Object.getOwnPropertySymbols){var Ae=Object.getOwnPropertySymbols(T);for(Y=0;Y<Ae.length;Y++)L=Ae[Y],!(f.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(T,L)&&(m[L]=T[L])}return m}function C(T){if(T===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T}function u(T,f){if(f&&(typeof f=="object"||typeof f=="function"))return f;if(f!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return C(T)}function g(T,f){return E(T)||h(T,f)||w(T,f)||N()}function E(T){if(Array.isArray(T))return T}function h(T,f){var m=T==null?null:typeof Symbol<"u"&&T[Symbol.iterator]||T["@@iterator"];if(m!=null){var L=[],Y=!0,Ae=!1,Me,Ke;try{for(m=m.call(T);!(Y=(Me=m.next()).done)&&(L.push(Me.value),!(f&&L.length===f));Y=!0);}catch(In){Ae=!0,Ke=In}finally{try{!Y&&m.return!=null&&m.return()}finally{if(Ae)throw Ke}}return L}}function w(T,f){if(T){if(typeof T=="string")return I(T,f);var m=Object.prototype.toString.call(T).slice(8,-1);if(m==="Object"&&T.constructor&&(m=T.constructor.name),m==="Map"||m==="Set")return Array.from(T);if(m==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(m))return I(T,f)}}function I(T,f){(f==null||f>T.length)&&(f=T.length);for(var m=0,L=new Array(f);m<f;m++)L[m]=T[m];return L}function N(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
415
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var F={Mobile:"mobile",Tablet:"tablet",SmartTv:"smarttv",Console:"console",Wearable:"wearable",Embedded:"embedded",Browser:void 0},X={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",EdgeChromium:"Edge Chromium",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},se={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},ue={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},Ce=function(f){switch(f){case F.Mobile:return{isMobile:!0};case F.Tablet:return{isTablet:!0};case F.SmartTv:return{isSmartTV:!0};case F.Console:return{isConsole:!0};case F.Wearable:return{isWearable:!0};case F.Browser:return{isBrowser:!0};case F.Embedded:return{isEmbedded:!0};default:return ue}},Se=function(f){return z(f)},q=function(f){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none";return f||m},ye=function(){return typeof window<"u"&&(window.navigator||navigator)?window.navigator||navigator:!1},Ne=function(f){var m=ye();return m&&m.platform&&(m.platform.indexOf(f)!==-1||m.platform==="MacIntel"&&m.maxTouchPoints>1&&!window.MSStream)},qe=function(f,m,L,Y,Ae){return{isBrowser:f,browserMajorVersion:q(m.major),browserFullVersion:q(m.version),browserName:q(m.name),engineName:q(L.name),engineVersion:q(L.version),osName:q(Y.name),osVersion:q(Y.version),userAgent:q(Ae)}},Qe=function(f,m,L,Y){return S({},f,{vendor:q(m.vendor),model:q(m.model),os:q(L.name),osVersion:q(L.version),ua:q(Y)})},ot=function(f,m,L,Y){return{isSmartTV:f,engineName:q(m.name),engineVersion:q(m.version),osName:q(L.name),osVersion:q(L.version),userAgent:q(Y)}},Ve=function(f,m,L,Y){return{isConsole:f,engineName:q(m.name),engineVersion:q(m.version),osName:q(L.name),osVersion:q(L.version),userAgent:q(Y)}},st=function(f,m,L,Y){return{isWearable:f,engineName:q(m.name),engineVersion:q(m.version),osName:q(L.name),osVersion:q(L.version),userAgent:q(Y)}},Be=function(f,m,L,Y,Ae){return{isEmbedded:f,vendor:q(m.vendor),model:q(m.model),engineName:q(L.name),engineVersion:q(L.version),osName:q(Y.name),osVersion:q(Y.version),userAgent:q(Ae)}};function Oe(T){var f=T?k(T):x,m=f.device,L=f.browser,Y=f.engine,Ae=f.os,Me=f.ua,Ke=Ce(m.type),In=Ke.isBrowser,ol=Ke.isMobile,sl=Ke.isTablet,Us=Ke.isSmartTV,Ms=Ke.isConsole,Rs=Ke.isWearable,Hs=Ke.isEmbedded;if(In)return qe(In,L,Y,Ae,Me);if(Us)return ot(Us,Y,Ae,Me);if(Ms)return Ve(Ms,Y,Ae,Me);if(ol||sl)return Qe(Ke,m,Ae,Me);if(Rs)return st(Rs,Y,Ae,Me);if(Hs)return Be(Hs,m,Y,Ae,Me)}var ke=function(f){var m=f.type;return m===F.Mobile},Gt=function(f){var m=f.type;return m===F.Tablet},gt=function(f){var m=f.type;return m===F.Mobile||m===F.Tablet},lt=function(f){var m=f.type;return m===F.SmartTv},at=function(f){var m=f.type;return m===F.Browser},Yt=function(f){var m=f.type;return m===F.Wearable},R=function(f){var m=f.type;return m===F.Console},K=function(f){var m=f.type;return m===F.Embedded},H=function(f){var m=f.vendor;return q(m)},Z=function(f){var m=f.model;return q(m)},le=function(f){var m=f.type;return q(m,"browser")},W=function(f){var m=f.name;return m===se.Android},M=function(f){var m=f.name;return m===se.Windows},U=function(f){var m=f.name;return m===se.MAC_OS},_=function(f){var m=f.name;return m===se.WindowsPhone},oe=function(f){var m=f.name;return m===se.IOS},V=function(f){var m=f.version;return q(m)},A=function(f){var m=f.name;return q(m)},P=function(f){var m=f.name;return m===X.Chrome},de=function(f){var m=f.name;return m===X.Firefox},ie=function(f){var m=f.name;return m===X.Chromium},ve=function(f){var m=f.name;return m===X.Edge},xe=function(f){var m=f.name;return m===X.Yandex},ae=function(f){var m=f.name;return m===X.Safari||m===X.MobileSafari},j=function(f){var m=f.name;return m===X.MobileSafari},ee=function(f){var m=f.name;return m===X.Opera},G=function(f){var m=f.name;return m===X.InternetExplorer||m===X.Ie},$=function(f){var m=f.name;return m===X.MIUI},fe=function(f){var m=f.name;return m===X.SamsungBrowser},ce=function(f){var m=f.version;return q(m)},Te=function(f){var m=f.major;return q(m)},Fe=function(f){var m=f.name;return q(m)},Ie=function(f){var m=f.name;return q(m)},De=function(f){var m=f.version;return q(m)},_e=function(){var f=ye(),m=f&&f.userAgent&&f.userAgent.toLowerCase();return typeof m=="string"?/electron/.test(m):!1},Ge=function(f){return typeof f=="string"&&f.indexOf("Edg/")!==-1},dt=function(){var f=ye();return f&&(/iPad|iPhone|iPod/.test(f.platform)||f.platform==="MacIntel"&&f.maxTouchPoints>1)&&!window.MSStream},Ye=function(){return Ne("iPad")},Pt=function(){return Ne("iPhone")},an=function(){return Ne("iPod")},rn=function(f){return q(f)};function Jt(T){var f=T||x,m=f.device,L=f.browser,Y=f.os,Ae=f.engine,Me=f.ua;return{isSmartTV:lt(m),isConsole:R(m),isWearable:Yt(m),isEmbedded:K(m),isMobileSafari:j(L)||Ye(),isChromium:ie(L),isMobile:gt(m)||Ye(),isMobileOnly:ke(m),isTablet:Gt(m)||Ye(),isBrowser:at(m),isDesktop:at(m),isAndroid:W(Y),isWinPhone:_(Y),isIOS:oe(Y)||Ye(),isChrome:P(L),isFirefox:de(L),isSafari:ae(L),isOpera:ee(L),isIE:G(L),osVersion:V(Y),osName:A(Y),fullBrowserVersion:ce(L),browserVersion:Te(L),browserName:Fe(L),mobileVendor:H(m),mobileModel:Z(m),engineName:Ie(Ae),engineVersion:De(Ae),getUA:rn(Me),isEdge:ve(L)||Ge(Me),isYandex:xe(L),deviceType:le(m),isIOS13:dt(),isIPad13:Ye(),isIPhone13:Pt(),isIPod13:an(),isElectron:_e(),isEdgeChromium:Ge(Me),isLegacyEdge:ve(L)&&!Ge(Me),isWindows:M(Y),isMacOs:U(Y),isMIUI:$(L),isSamsungBrowser:fe(L)}}var Ue=lt(i),En=R(i),Sn=Yt(i),lc=K(i),dc=j(a)||Ye(),uc=ie(a),xn=gt(i)||Ye(),Is=ke(i),Ns=Gt(i)||Ye(),Bs=at(i),fc=at(i),Fs=W(b),Ps=_(b),Os=oe(b)||Ye(),pc=P(a),mc=de(a),hc=ae(a),gc=ee(a),Ds=G(a),wc=V(b),bc=A(b),yc=ce(a),Ac=Te(a),kc=Fe(a),vc=H(i),Tc=Z(i),Cc=Ie(l),Ec=De(l),Sc=rn(D),xc=ve(a)||Ge(D),Ic=xe(a),Nc=le(i),Bc=dt(),Fc=Ye(),Pc=Pt(),Oc=an(),Dc=_e(),Lc=Ge(D),Uc=ve(a)&&!Ge(D),Mc=M(b),Rc=U(b),Hc=$(a),Wc=fe(a),Vc=function(f){if(!f||typeof f!="string"){console.error("No valid user agent string was provided");return}var m=k(f),L=m.device,Y=m.browser,Ae=m.os,Me=m.engine,Ke=m.ua;return Jt({device:L,browser:Y,os:Ae,engine:Me,ua:Ke})},Gc=function(f){var m=f.renderWithFragment,L=f.children,Y=p(f,["renderWithFragment","children"]);return Fs?m?n.createElement(t.Fragment,null,L):n.createElement("div",Y,L):null},Yc=function(f){var m=f.renderWithFragment,L=f.children,Y=p(f,["renderWithFragment","children"]);return Bs?m?n.createElement(t.Fragment,null,L):n.createElement("div",Y,L):null},Jc=function(f){var m=f.renderWithFragment,L=f.children,Y=p(f,["renderWithFragment","children"]);return Ds?m?n.createElement(t.Fragment,null,L):n.createElement("div",Y,L):null},zc=function(f){var m=f.renderWithFragment,L=f.children,Y=p(f,["renderWithFragment","children"]);return Os?m?n.createElement(t.Fragment,null,L):n.createElement("div",Y,L):null},jc=function(f){var m=f.renderWithFragment,L=f.children,Y=p(f,["renderWithFragment","children"]);return xn?m?n.createElement(t.Fragment,null,L):n.createElement("div",Y,L):null},qc=function(f){var m=f.renderWithFragment,L=f.children,Y=p(f,["renderWithFragment","children"]);return Ns?m?n.createElement(t.Fragment,null,L):n.createElement("div",Y,L):null},Qc=function(f){var m=f.renderWithFragment,L=f.children,Y=p(f,["renderWithFragment","children"]);return Ps?m?n.createElement(t.Fragment,null,L):n.createElement("div",Y,L):null},Kc=function(f){var m=f.renderWithFragment,L=f.children;f.viewClassName,f.style;var Y=p(f,["renderWithFragment","children","viewClassName","style"]);return Is?m?n.createElement(t.Fragment,null,L):n.createElement("div",Y,L):null},Xc=function(f){var m=f.renderWithFragment,L=f.children,Y=p(f,["renderWithFragment","children"]);return Ue?m?n.createElement(t.Fragment,null,L):n.createElement("div",Y,L):null},_c=function(f){var m=f.renderWithFragment,L=f.children,Y=p(f,["renderWithFragment","children"]);return En?m?n.createElement(t.Fragment,null,L):n.createElement("div",Y,L):null},Zc=function(f){var m=f.renderWithFragment,L=f.children,Y=p(f,["renderWithFragment","children"]);return Sn?m?n.createElement(t.Fragment,null,L):n.createElement("div",Y,L):null},$c=function(f){var m=f.renderWithFragment,L=f.children;f.viewClassName,f.style;var Y=f.condition,Ae=p(f,["renderWithFragment","children","viewClassName","style","condition"]);return Y?m?n.createElement(t.Fragment,null,L):n.createElement("div",Ae,L):null};function el(T){return(function(f){we(m,f);function m(L){var Y;return ge(this,m),Y=u(this,Ee(m).call(this,L)),Y.isEventListenerAdded=!1,Y.handleOrientationChange=Y.handleOrientationChange.bind(C(Y)),Y.onOrientationChange=Y.onOrientationChange.bind(C(Y)),Y.onPageLoad=Y.onPageLoad.bind(C(Y)),Y.state={isLandscape:!1,isPortrait:!1},Y}return J(m,[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var Y=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:Y===0,isLandscape:Y===90})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){(typeof window>"u"?"undefined":v(window))!==void 0&&xn&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return n.createElement(T,he({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}]),m})(n.Component)}function tl(){var T=t.useState(function(){var Ae=window.innerWidth>window.innerHeight?90:0;return{isPortrait:Ae===0,isLandscape:Ae===90,orientation:Ae===0?"portrait":"landscape"}}),f=g(T,2),m=f[0],L=f[1],Y=t.useCallback(function(){var Ae=window.innerWidth>window.innerHeight?90:0,Me={isPortrait:Ae===0,isLandscape:Ae===90,orientation:Ae===0?"portrait":"landscape"};m.orientation!==Me.orientation&&L(Me)},[m.orientation]);return t.useEffect(function(){return(typeof window>"u"?"undefined":v(window))!==void 0&&xn&&(Y(),window.addEventListener("load",Y,!1),window.addEventListener("resize",Y,!1)),function(){window.removeEventListener("resize",Y,!1),window.removeEventListener("load",Y,!1)}},[Y]),m}function Ls(T){var f=T||window.navigator.userAgent;return k(f)}function nl(T){var f=T||window.navigator.userAgent,m=Ls(f),L=Jt(m);return[L,m]}return ne.AndroidView=Gc,ne.BrowserTypes=X,ne.BrowserView=Yc,ne.ConsoleView=_c,ne.CustomView=$c,ne.IEView=Jc,ne.IOSView=zc,ne.MobileOnlyView=Kc,ne.MobileView=jc,ne.OsTypes=se,ne.SmartTVView=Xc,ne.TabletView=qc,ne.WearableView=Zc,ne.WinPhoneView=Qc,ne.browserName=kc,ne.browserVersion=Ac,ne.deviceDetect=Oe,ne.deviceType=Nc,ne.engineName=Cc,ne.engineVersion=Ec,ne.fullBrowserVersion=yc,ne.getSelectorsByUserAgent=Vc,ne.getUA=Sc,ne.isAndroid=Fs,ne.isBrowser=Bs,ne.isChrome=pc,ne.isChromium=uc,ne.isConsole=En,ne.isDesktop=fc,ne.isEdge=xc,ne.isEdgeChromium=Lc,ne.isElectron=Dc,ne.isEmbedded=lc,ne.isFirefox=mc,ne.isIE=Ds,ne.isIOS=Os,ne.isIOS13=Bc,ne.isIPad13=Fc,ne.isIPhone13=Pc,ne.isIPod13=Oc,ne.isLegacyEdge=Uc,ne.isMIUI=Hc,ne.isMacOs=Rc,ne.isMobile=xn,ne.isMobileOnly=Is,ne.isMobileSafari=dc,ne.isOpera=gc,ne.isSafari=hc,ne.isSamsungBrowser=Wc,ne.isSmartTV=Ue,ne.isTablet=Ns,ne.isWearable=Sn,ne.isWinPhone=Ps,ne.isWindows=Mc,ne.isYandex=Ic,ne.mobileModel=Tc,ne.mobileVendor=vc,ne.osName=bc,ne.osVersion=wc,ne.parseUserAgent=k,ne.setUserAgent=Se,ne.useDeviceData=Ls,ne.useDeviceSelectors=nl,ne.useMobileOrientation=tl,ne.withOrientationChange=el,ne}var Ft=sc();const po={model:"gemini-2.5-flash","model2.0":"gemini-2.5-flash",apiKey:"AIzaSyC8G_-cDct8FgyiXaq0vFJVK4BBNwF1jtc,AIzaSyD3bIEPvZb_jPJkAb5lRapTmmHKnNB2Dl8,AIzaSyCb1S1X7rppIWqcBffHLIjOBlSFX8VPK-w",url:"https://generativelanguage.googleapis.com"};class ac extends Vt{enableGoogleSearch=!0;indexApiKey=0;constructor(){super(po.url)}getApiKey(){let t="",n=[];const s=localStorage.getItem("arr_api_key_dev_gemini");s?n=JSON.parse(s):n=po.apiKey.split(",");const o=localStorage.getItem("index_api_key_gemini");return o&&(this.indexApiKey=Number(o),this.indexApiKey++),this.indexApiKey>=n.length&&(this.indexApiKey=0),t=n[this.indexApiKey],localStorage.setItem("index_api_key_gemini",this.indexApiKey.toString()),t}getUrl(t,n){return`/v1beta/models/${n||"gemini-2.5-flash"}:${t}`}async generateContent(t,n){try{const s=`
418
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var F={Mobile:"mobile",Tablet:"tablet",SmartTv:"smarttv",Console:"console",Wearable:"wearable",Embedded:"embedded",Browser:void 0},X={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",EdgeChromium:"Edge Chromium",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},se={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},ue={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},Ce=function(f){switch(f){case F.Mobile:return{isMobile:!0};case F.Tablet:return{isTablet:!0};case F.SmartTv:return{isSmartTV:!0};case F.Console:return{isConsole:!0};case F.Wearable:return{isWearable:!0};case F.Browser:return{isBrowser:!0};case F.Embedded:return{isEmbedded:!0};default:return ue}},Se=function(f){return z(f)},q=function(f){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none";return f||m},ye=function(){return typeof window<"u"&&(window.navigator||navigator)?window.navigator||navigator:!1},Ne=function(f){var m=ye();return m&&m.platform&&(m.platform.indexOf(f)!==-1||m.platform==="MacIntel"&&m.maxTouchPoints>1&&!window.MSStream)},qe=function(f,m,L,Y,Ae){return{isBrowser:f,browserMajorVersion:q(m.major),browserFullVersion:q(m.version),browserName:q(m.name),engineName:q(L.name),engineVersion:q(L.version),osName:q(Y.name),osVersion:q(Y.version),userAgent:q(Ae)}},Qe=function(f,m,L,Y){return S({},f,{vendor:q(m.vendor),model:q(m.model),os:q(L.name),osVersion:q(L.version),ua:q(Y)})},ot=function(f,m,L,Y){return{isSmartTV:f,engineName:q(m.name),engineVersion:q(m.version),osName:q(L.name),osVersion:q(L.version),userAgent:q(Y)}},Ve=function(f,m,L,Y){return{isConsole:f,engineName:q(m.name),engineVersion:q(m.version),osName:q(L.name),osVersion:q(L.version),userAgent:q(Y)}},st=function(f,m,L,Y){return{isWearable:f,engineName:q(m.name),engineVersion:q(m.version),osName:q(L.name),osVersion:q(L.version),userAgent:q(Y)}},Be=function(f,m,L,Y,Ae){return{isEmbedded:f,vendor:q(m.vendor),model:q(m.model),engineName:q(L.name),engineVersion:q(L.version),osName:q(Y.name),osVersion:q(Y.version),userAgent:q(Ae)}};function Oe(T){var f=T?k(T):x,m=f.device,L=f.browser,Y=f.engine,Ae=f.os,Me=f.ua,Ke=Ce(m.type),In=Ke.isBrowser,ol=Ke.isMobile,sl=Ke.isTablet,Us=Ke.isSmartTV,Ms=Ke.isConsole,Rs=Ke.isWearable,Hs=Ke.isEmbedded;if(In)return qe(In,L,Y,Ae,Me);if(Us)return ot(Us,Y,Ae,Me);if(Ms)return Ve(Ms,Y,Ae,Me);if(ol||sl)return Qe(Ke,m,Ae,Me);if(Rs)return st(Rs,Y,Ae,Me);if(Hs)return Be(Hs,m,Y,Ae,Me)}var ke=function(f){var m=f.type;return m===F.Mobile},Gt=function(f){var m=f.type;return m===F.Tablet},gt=function(f){var m=f.type;return m===F.Mobile||m===F.Tablet},lt=function(f){var m=f.type;return m===F.SmartTv},at=function(f){var m=f.type;return m===F.Browser},Yt=function(f){var m=f.type;return m===F.Wearable},R=function(f){var m=f.type;return m===F.Console},K=function(f){var m=f.type;return m===F.Embedded},H=function(f){var m=f.vendor;return q(m)},Z=function(f){var m=f.model;return q(m)},le=function(f){var m=f.type;return q(m,"browser")},W=function(f){var m=f.name;return m===se.Android},M=function(f){var m=f.name;return m===se.Windows},U=function(f){var m=f.name;return m===se.MAC_OS},_=function(f){var m=f.name;return m===se.WindowsPhone},oe=function(f){var m=f.name;return m===se.IOS},V=function(f){var m=f.version;return q(m)},A=function(f){var m=f.name;return q(m)},P=function(f){var m=f.name;return m===X.Chrome},de=function(f){var m=f.name;return m===X.Firefox},ie=function(f){var m=f.name;return m===X.Chromium},ve=function(f){var m=f.name;return m===X.Edge},xe=function(f){var m=f.name;return m===X.Yandex},ae=function(f){var m=f.name;return m===X.Safari||m===X.MobileSafari},j=function(f){var m=f.name;return m===X.MobileSafari},ee=function(f){var m=f.name;return m===X.Opera},G=function(f){var m=f.name;return m===X.InternetExplorer||m===X.Ie},$=function(f){var m=f.name;return m===X.MIUI},fe=function(f){var m=f.name;return m===X.SamsungBrowser},ce=function(f){var m=f.version;return q(m)},Te=function(f){var m=f.major;return q(m)},Fe=function(f){var m=f.name;return q(m)},Ie=function(f){var m=f.name;return q(m)},De=function(f){var m=f.version;return q(m)},_e=function(){var f=ye(),m=f&&f.userAgent&&f.userAgent.toLowerCase();return typeof m=="string"?/electron/.test(m):!1},Ge=function(f){return typeof f=="string"&&f.indexOf("Edg/")!==-1},dt=function(){var f=ye();return f&&(/iPad|iPhone|iPod/.test(f.platform)||f.platform==="MacIntel"&&f.maxTouchPoints>1)&&!window.MSStream},Ye=function(){return Ne("iPad")},Pt=function(){return Ne("iPhone")},an=function(){return Ne("iPod")},rn=function(f){return q(f)};function Jt(T){var f=T||x,m=f.device,L=f.browser,Y=f.os,Ae=f.engine,Me=f.ua;return{isSmartTV:lt(m),isConsole:R(m),isWearable:Yt(m),isEmbedded:K(m),isMobileSafari:j(L)||Ye(),isChromium:ie(L),isMobile:gt(m)||Ye(),isMobileOnly:ke(m),isTablet:Gt(m)||Ye(),isBrowser:at(m),isDesktop:at(m),isAndroid:W(Y),isWinPhone:_(Y),isIOS:oe(Y)||Ye(),isChrome:P(L),isFirefox:de(L),isSafari:ae(L),isOpera:ee(L),isIE:G(L),osVersion:V(Y),osName:A(Y),fullBrowserVersion:ce(L),browserVersion:Te(L),browserName:Fe(L),mobileVendor:H(m),mobileModel:Z(m),engineName:Ie(Ae),engineVersion:De(Ae),getUA:rn(Me),isEdge:ve(L)||Ge(Me),isYandex:xe(L),deviceType:le(m),isIOS13:dt(),isIPad13:Ye(),isIPhone13:Pt(),isIPod13:an(),isElectron:_e(),isEdgeChromium:Ge(Me),isLegacyEdge:ve(L)&&!Ge(Me),isWindows:M(Y),isMacOs:U(Y),isMIUI:$(L),isSamsungBrowser:fe(L)}}var Ue=lt(i),En=R(i),Sn=Yt(i),lc=K(i),dc=j(a)||Ye(),uc=ie(a),xn=gt(i)||Ye(),Is=ke(i),Ns=Gt(i)||Ye(),Bs=at(i),fc=at(i),Fs=W(b),Ps=_(b),Os=oe(b)||Ye(),pc=P(a),mc=de(a),hc=ae(a),gc=ee(a),Ds=G(a),wc=V(b),bc=A(b),yc=ce(a),Ac=Te(a),kc=Fe(a),vc=H(i),Tc=Z(i),Cc=Ie(l),Ec=De(l),Sc=rn(D),xc=ve(a)||Ge(D),Ic=xe(a),Nc=le(i),Bc=dt(),Fc=Ye(),Pc=Pt(),Oc=an(),Dc=_e(),Lc=Ge(D),Uc=ve(a)&&!Ge(D),Mc=M(b),Rc=U(b),Hc=$(a),Wc=fe(a),Vc=function(f){if(!f||typeof f!="string"){console.error("No valid user agent string was provided");return}var m=k(f),L=m.device,Y=m.browser,Ae=m.os,Me=m.engine,Ke=m.ua;return Jt({device:L,browser:Y,os:Ae,engine:Me,ua:Ke})},Gc=function(f){var m=f.renderWithFragment,L=f.children,Y=p(f,["renderWithFragment","children"]);return Fs?m?n.createElement(t.Fragment,null,L):n.createElement("div",Y,L):null},Yc=function(f){var m=f.renderWithFragment,L=f.children,Y=p(f,["renderWithFragment","children"]);return Bs?m?n.createElement(t.Fragment,null,L):n.createElement("div",Y,L):null},Jc=function(f){var m=f.renderWithFragment,L=f.children,Y=p(f,["renderWithFragment","children"]);return Ds?m?n.createElement(t.Fragment,null,L):n.createElement("div",Y,L):null},zc=function(f){var m=f.renderWithFragment,L=f.children,Y=p(f,["renderWithFragment","children"]);return Os?m?n.createElement(t.Fragment,null,L):n.createElement("div",Y,L):null},jc=function(f){var m=f.renderWithFragment,L=f.children,Y=p(f,["renderWithFragment","children"]);return xn?m?n.createElement(t.Fragment,null,L):n.createElement("div",Y,L):null},qc=function(f){var m=f.renderWithFragment,L=f.children,Y=p(f,["renderWithFragment","children"]);return Ns?m?n.createElement(t.Fragment,null,L):n.createElement("div",Y,L):null},Qc=function(f){var m=f.renderWithFragment,L=f.children,Y=p(f,["renderWithFragment","children"]);return Ps?m?n.createElement(t.Fragment,null,L):n.createElement("div",Y,L):null},Kc=function(f){var m=f.renderWithFragment,L=f.children;f.viewClassName,f.style;var Y=p(f,["renderWithFragment","children","viewClassName","style"]);return Is?m?n.createElement(t.Fragment,null,L):n.createElement("div",Y,L):null},Xc=function(f){var m=f.renderWithFragment,L=f.children,Y=p(f,["renderWithFragment","children"]);return Ue?m?n.createElement(t.Fragment,null,L):n.createElement("div",Y,L):null},_c=function(f){var m=f.renderWithFragment,L=f.children,Y=p(f,["renderWithFragment","children"]);return En?m?n.createElement(t.Fragment,null,L):n.createElement("div",Y,L):null},Zc=function(f){var m=f.renderWithFragment,L=f.children,Y=p(f,["renderWithFragment","children"]);return Sn?m?n.createElement(t.Fragment,null,L):n.createElement("div",Y,L):null},$c=function(f){var m=f.renderWithFragment,L=f.children;f.viewClassName,f.style;var Y=f.condition,Ae=p(f,["renderWithFragment","children","viewClassName","style","condition"]);return Y?m?n.createElement(t.Fragment,null,L):n.createElement("div",Ae,L):null};function el(T){return(function(f){we(m,f);function m(L){var Y;return ge(this,m),Y=u(this,Ee(m).call(this,L)),Y.isEventListenerAdded=!1,Y.handleOrientationChange=Y.handleOrientationChange.bind(C(Y)),Y.onOrientationChange=Y.onOrientationChange.bind(C(Y)),Y.onPageLoad=Y.onPageLoad.bind(C(Y)),Y.state={isLandscape:!1,isPortrait:!1},Y}return J(m,[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var Y=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:Y===0,isLandscape:Y===90})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){(typeof window>"u"?"undefined":v(window))!==void 0&&xn&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return n.createElement(T,he({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}]),m})(n.Component)}function tl(){var T=t.useState(function(){var Ae=window.innerWidth>window.innerHeight?90:0;return{isPortrait:Ae===0,isLandscape:Ae===90,orientation:Ae===0?"portrait":"landscape"}}),f=g(T,2),m=f[0],L=f[1],Y=t.useCallback(function(){var Ae=window.innerWidth>window.innerHeight?90:0,Me={isPortrait:Ae===0,isLandscape:Ae===90,orientation:Ae===0?"portrait":"landscape"};m.orientation!==Me.orientation&&L(Me)},[m.orientation]);return t.useEffect(function(){return(typeof window>"u"?"undefined":v(window))!==void 0&&xn&&(Y(),window.addEventListener("load",Y,!1),window.addEventListener("resize",Y,!1)),function(){window.removeEventListener("resize",Y,!1),window.removeEventListener("load",Y,!1)}},[Y]),m}function Ls(T){var f=T||window.navigator.userAgent;return k(f)}function nl(T){var f=T||window.navigator.userAgent,m=Ls(f),L=Jt(m);return[L,m]}return ne.AndroidView=Gc,ne.BrowserTypes=X,ne.BrowserView=Yc,ne.ConsoleView=_c,ne.CustomView=$c,ne.IEView=Jc,ne.IOSView=zc,ne.MobileOnlyView=Kc,ne.MobileView=jc,ne.OsTypes=se,ne.SmartTVView=Xc,ne.TabletView=qc,ne.WearableView=Zc,ne.WinPhoneView=Qc,ne.browserName=kc,ne.browserVersion=Ac,ne.deviceDetect=Oe,ne.deviceType=Nc,ne.engineName=Cc,ne.engineVersion=Ec,ne.fullBrowserVersion=yc,ne.getSelectorsByUserAgent=Vc,ne.getUA=Sc,ne.isAndroid=Fs,ne.isBrowser=Bs,ne.isChrome=pc,ne.isChromium=uc,ne.isConsole=En,ne.isDesktop=fc,ne.isEdge=xc,ne.isEdgeChromium=Lc,ne.isElectron=Dc,ne.isEmbedded=lc,ne.isFirefox=mc,ne.isIE=Ds,ne.isIOS=Os,ne.isIOS13=Bc,ne.isIPad13=Fc,ne.isIPhone13=Pc,ne.isIPod13=Oc,ne.isLegacyEdge=Uc,ne.isMIUI=Hc,ne.isMacOs=Rc,ne.isMobile=xn,ne.isMobileOnly=Is,ne.isMobileSafari=dc,ne.isOpera=gc,ne.isSafari=hc,ne.isSamsungBrowser=Wc,ne.isSmartTV=Ue,ne.isTablet=Ns,ne.isWearable=Sn,ne.isWinPhone=Ps,ne.isWindows=Mc,ne.isYandex=Ic,ne.mobileModel=Tc,ne.mobileVendor=vc,ne.osName=bc,ne.osVersion=wc,ne.parseUserAgent=k,ne.setUserAgent=Se,ne.useDeviceData=Ls,ne.useDeviceSelectors=nl,ne.useMobileOrientation=tl,ne.withOrientationChange=el,ne}var Ft=sc();const po={model:"gemini-2.5-flash","model2.0":"gemini-2.5-flash",apiKey:"QUl6YVN5RGprZEFvMjNtMy00S0U3eWo2aVJQQmowN05lRXgxd0tz",url:"https://generativelanguage.googleapis.com"};class ac extends Vt{enableGoogleSearch=!0;indexApiKey=0;constructor(){super(po.url)}getApiKey(){let t="",n=[];const s=localStorage.getItem("arr_api_key_dev_gemini");s?n=JSON.parse(s):n=po.apiKey.split(",");const o=localStorage.getItem("index_api_key_gemini");return o&&(this.indexApiKey=Number(o),this.indexApiKey++),this.indexApiKey>=n.length&&(this.indexApiKey=0),t=n[this.indexApiKey],t&&(t=atob(t)),localStorage.setItem("index_api_key_gemini",this.indexApiKey.toString()),t}getUrl(t,n){return`/v1beta/models/${n||"gemini-2.5-flash"}:${t}`}async generateContent(t,n){try{const s=`
416
419
  Below is the system context and conversation history. Use it for context but prioritize the instructions at the end.
417
420
 
418
421
  ---
@@ -474,7 +477,7 @@ $${re(M?.price||0).decimalPlaces(4).toFormat()} (${M.price_change_percentage_24h
474
477
  `:"🖼️ ";return`${_+1}. ${P}**${oe}**${V}
475
478
  ${U.symbol||U.contract_type} | Token ID: ${U.token_id}`}).join(`
476
479
 
477
- `);await Xe(500),v(!1),l(`${r("nftCollectionHeader",{count:String(le.length),list:M})}${K&&K>0&&Z.length>K?r("nftMoreItems",{count:String(Z.length-K)}):""}${a("nftSelectBelow")}`,"bot",void 0,W),K&&K>0&&Z.length>K&&l(a("sendOtherNfts"),"bot")}else v(!1),l(a("nftNoCollection"),"bot")}catch(H){console.error("Error fetching NFTs:",H),v(!1),l(a("nftFetchError"),"bot")}},[u?.address,h,l,a,r]),ot=te.useCallback(async()=>{try{v(!0);const R=await je({address:u?.address||"",chain:h});if(R?.success&&R?.data?.result&&R.data.result.length>0){const K=R.data.result,H=K.flatMap(le=>[{id:`send-${le.token_address}`,text:r("buttonSendToken",{symbol:le.symbol}),value:r("buttonSendToken",{symbol:le.symbol}),action:"suggested_action",fullWidth:!!Ft.isMobile},{id:`buy-more-${le.token_address}`,text:r("buttonBuyMoreToken",{symbol:le.symbol}),value:r("buttonBuyMoreToken",{symbol:le.symbol}),action:"suggested_action",fullWidth:!!Ft.isMobile}]),Z=K.map((le,W)=>{const M=le.usd_value!==void 0?` ≈ $${re(le.usd_value).decimalPlaces(2).toFormat()}`:"";return`${W+1}. **${le.name}** (${le.symbol})
480
+ `);await Xe(500),v(!1),l(`${r("nftCollectionHeader",{count:String(le.length),list:M})}${K&&K>0&&Z.length>K?r("nftMoreItems",{count:String(Z.length-K)}):""}${a("nftSelectBelow")}`,"bot",void 0,W),K&&K>0&&Z.length>K&&l(r("sendOtherNfts",{link:"https://nft.keyring.app/"}),"bot")}else v(!1),l(a("nftNoCollection"),"bot")}catch(H){console.error("Error fetching NFTs:",H),v(!1),l(a("nftFetchError"),"bot")}},[u?.address,h,l,a,r]),ot=te.useCallback(async()=>{try{v(!0);const R=await je({address:u?.address||"",chain:h});if(R?.success&&R?.data?.result&&R.data.result.length>0){const K=R.data.result,H=K.flatMap(le=>[{id:`send-${le.token_address}`,text:r("buttonSendToken",{symbol:le.symbol}),value:r("buttonSendToken",{symbol:le.symbol}),action:"suggested_action",fullWidth:!!Ft.isMobile},{id:`buy-more-${le.token_address}`,text:r("buttonBuyMoreToken",{symbol:le.symbol}),value:r("buttonBuyMoreToken",{symbol:le.symbol}),action:"suggested_action",fullWidth:!!Ft.isMobile}]),Z=K.map((le,W)=>{const M=le.usd_value!==void 0?` ≈ $${re(le.usd_value).decimalPlaces(2).toFormat()}`:"";return`${W+1}. **${le.name}** (${le.symbol})
478
481
  Balance: ${le.balance_formatted}${M}`}).join(`
479
482
 
480
483
  `);await Xe(500),v(!1),l(r("viewBalancesHeader",{chain:g?.name||"this chain",list:Z}),"bot",void 0,H)}else v(!1),l(a("viewBalancesEmpty"),"bot")}catch(R){console.error("Error fetching balances:",R),v(!1),l(a("viewBalancesFetchError"),"bot")}},[u?.address,h,l,g?.name,a,r]),Ve=te.useMemo(()=>[{id:"ask",icon:"❓",text:a("suggestionAskText"),action:async()=>{y(!1),v(!0),l(a("suggestionAskUserMessage"),"user"),await Xe(1e3),v(!1),l(a("suggestionAskBotReply"),"bot")}},{id:"buy",icon:"💰",text:a("suggestionBuyText"),action:async()=>{y(!1),l(a("suggestionBuyText"),"user"),Re(u?.address||"")&&I?await qe():(v(!0),await Xe(1e3),Re(u?.address||"")&&!I?l(a("walletConnectedChainUnsupported"),"bot"):l(a("walletNotConnected"),"bot"),v(!1))}}],[l,u?.address,qe,a,I]),st=R=>{if(R===0)return!0;const K=i[R],H=i[R-1],Z=new Date(K.timestamp),le=new Date(H.timestamp);return Z.setHours(0,0,0,0),le.setHours(0,0,0,0),Z.getTime()!==le.getTime()};te.useEffect(()=>{he.current?.scrollIntoView({behavior:"smooth"})},[i]),te.useEffect(()=>{e?(Ee.current&&Ft.isDesktop&&Ee.current.focus(),he.current?.scrollIntoView({behavior:"instant"}),p.current&&d.current?Date.now()-d.current>5e3&&y(!0):y(!0),d.current=null,p.current=!1,setTimeout(()=>{he.current?.scrollIntoView({behavior:"smooth"})},50)):(d.current=Date.now(),p.current=!C.current)},[e]),te.useEffect(()=>{const R=K=>{K.key==="Escape"&&e&&t()};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[e,t]);const Be=te.useCallback(async()=>{if(x?.trim()===""||S)return;const R=J,K=l(x?.trim(),"user",J?.id);B(""),Q(null),v(!0),y(!1),v(!0);try{let H,Z;const le=i.slice(-20);let W="";if(le.length>0){W=`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keyring-chatbot-agent-sdk-test",
3
- "version": "0.1.8",
3
+ "version": "0.2.1",
4
4
  "private": false,
5
5
  "description": "A React chat widget SDK with floating button and modal",
6
6
  "keywords": [