keyring-chatbot-agent 1.0.8 → 1.0.17

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.
@@ -1,2 +1,2 @@
1
- !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode(".chat-button{cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px #00000026;transition:all .3s ease;border-radius:16px}.chat-button:hover{transform:scale(1.1);box-shadow:0 6px 16px #0003}.chat-button:active{transform:scale(.95)}.chat-modal-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:transparent;display:flex;align-items:flex-end;justify-content:flex-end;z-index:9999;pointer-events:all;animation:fadeIn .2s ease}#chat-modal-title{color:#0b3988;font-weight:900;font-style:Regular;font-size:18px}.chat-modal-overlay.chat-modal-overlay--left{justify-content:flex-start}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.chat-modal{width:90%;max-width:480px;height:700px;max-height:calc(100dvh - 64px);background:#f5f5f7;border-radius:12px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 20px 60px #0000004d;margin:20px;pointer-events:all;animation:slideUp .3s ease}@keyframes slideUp{0%{transform:translateY(30px);opacity:0}to{transform:translateY(0);opacity:1}}.chat-modal-header{background:#fff;padding:8px 8px 8px 16px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e5e5e7;flex-flow:column}.chat-modal-header-title{width:100%;display:flex;align-items:center;justify-content:space-between}.chat-modal-header-left{display:flex;align-items:center;gap:6px}.keyring-logo{width:22px;height:30px}.chat-modal-header h3{margin:0;font-size:18px;font-weight:700;color:#1a1a1d}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;border-radius:8px;color:#666;transition:all .2s}.close-button:hover{background:#f5f5f7;color:#000}.chat-user-info{display:flex;align-items:center;gap:6px;width:100%}.user-wallet,.user-wallet a{font-size:14px;font-weight:500;color:#0b3988}.copy-address-btn{display:flex;align-items:center;justify-content:center;background:none;border:none;cursor:pointer;padding:3px;color:#999;border-radius:4px;transition:color .15s,background .15s;line-height:0}@media(min-width:640px){.copy-address-btn:hover{color:#1a1a1d;background:#f0f0f0}}.chat-modal-messages-wrapper{position:relative;flex:1;overflow:hidden;display:flex;flex-direction:column}.chat-modal-messages{flex:1;padding:8px 16px;overflow-y:auto;overscroll-behavior:contain;display:flex;flex-direction:column;gap:8px}.date-separator{text-align:center;font-size:12px;font-weight:600;color:#666;align-self:center;width:fit-content;margin:0 auto 8px}.message{display:flex;animation:messageSlide .3s ease;position:relative}@media(min-width:640px){.message:hover .message-reply-button{opacity:1}}@keyframes messageSlide{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.message-reply-button{position:absolute;top:50%;transform:translateY(-50%);background:#fff;border:1px solid #e5e5e7;border-radius:8px;padding:6px;cursor:pointer;opacity:0;transition:all .2s;box-shadow:0 2px 8px #0000001a;z-index:10}.message-bot .message-reply-button{right:20px}.message-user .message-reply-button{left:20px}.message-reply-button:hover{background:#f5f5f7;transform:translateY(-50%) scale(1.1)}.message-reply-button svg{display:block;width:16px;height:16px;color:#666}.message-bot{justify-content:flex-start}.message-user{justify-content:flex-end}.message-bubble{max-width:85%;padding:8px 16px;border-radius:20px}.message-bot .message-bubble{background:#fff;box-shadow:0 2px 8px #0000000f;border-bottom-left-radius:4px}.message-user .message-bubble{background:#5b7fff;color:#fff;border-bottom-right-radius:4px}.message-user .message-bubble a{color:#fff}.message-reply-to{background:#0000000d;padding:8px 12px;border-radius:6px;margin-bottom:8px;border-left:3px solid #5b7fff}.message-bot .message-reply-to{background:#f5f5f7}.message-user .message-reply-to{background:#ffffff26;border-left-color:#ffffff80}.message-reply-to-label{font-size:11px;font-weight:600;margin-bottom:4px}.message-bot .message-reply-to-label{color:#5b7fff}.message-user .message-reply-to-label{color:#ffffffe6}.message-reply-to-text{font-size:12px;opacity:.8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.message-text{font-size:14px;line-height:1.5;word-wrap:break-word;white-space:pre-line}.message-bot .message-text{color:#1a1a1d}.message-user .message-text{color:#fff}.message-buttons{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;margin-bottom:8px}.message-button{flex:1 1 calc(50% - 4px);min-width:100px;padding:6px 12px;background:#fffffff2;border:1px solid #e0e0e0;border-radius:12px;font-size:13px;font-weight:500;color:#1a1a1d;cursor:pointer;transition:all .2s ease;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.message-button.full-width{flex:1 1 100%;text-align:center;white-space:normal;font-size:14px}@media(min-width:640px){.message-button:hover{background:#fff;border-color:#007aff;color:#007aff;transform:translateY(-1px);box-shadow:0 2px 8px #007aff26}.message-button:active{transform:translateY(0);box-shadow:0 1px 4px #007aff1a}}.message-user .message-button{background:#fff3;border-color:#ffffff4d;color:#fff}.message-user .message-button:hover{background:#ffffff4d;border-color:#ffffff80}.message-timestamp{line-height:1;font-size:11px;color:#999;display:flex;align-items:center;gap:4px;justify-content:flex-end}.message-user .message-timestamp{color:#ffffffb3}.check-icon{width:14px;height:14px}.typing-indicator .message-bubble{padding:12px 18px;display:flex;gap:6px;min-width:60px}.typing-dot{width:8px;height:8px;border-radius:50%;background:#999;animation:typingDot 1.4s infinite ease-in-out}.typing-dot:nth-child(1){animation-delay:0s}.typing-dot:nth-child(2){animation-delay:.2s}.typing-dot:nth-child(3){animation-delay:.4s}@keyframes typingDot{0%,60%,to{transform:translateY(0);opacity:.7}30%{transform:translateY(-8px);opacity:1}}.suggestions-container{display:flex;flex-direction:column;gap:10px;margin-top:8px}.suggestion-button{background:#d4d8f0;border:none;padding:6px 12px;border-radius:12px;display:flex;gap:12px;cursor:pointer;transition:all .2s;font-size:14px;font-weight:500;color:#1a1a1d;width:100%;text-align:center;align-items:center;justify-content:center}.suggestion-button:hover{background:#c5caeb;transform:translateY(-1px)}.suggestion-icon{font-size:18px}.chat-modal-input{padding:8px 16px;background:#fff;border-top:1px solid #e5e5e7;display:flex;flex-direction:column;gap:8px;box-shadow:0 -5px 8px 4px #0000000d;border-radius:12px 12px 0 0}.reply-preview{background:#f5f5f7;padding:6px 6px 6px 12px;border-radius:6px;border-left:3px solid #5b7fff;display:flex;justify-content:space-between;align-items:flex-start;gap:6px}.reply-preview-content{flex:1;min-width:0}.reply-preview-label{font-size:11px;color:#5b7fff;font-weight:600}.reply-preview-text{font-size:13px;color:#666;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.reply-preview-close{background:transparent;border:none;cursor:pointer;padding:2px;color:#999;transition:color .2s;flex-shrink:0}.reply-preview-close:hover{color:#666}.chat-modal-input-row{display:flex;gap:12px;align-items:center}.chat-modal-input input{flex:1;padding:14px 18px;border:1px solid #e5e5e7;border-radius:12px;outline:none;font-size:16px;color:#1a1a1d;transition:all .2s;height:44px}.chat-modal-input input::placeholder{color:#999}.chat-modal-input input:focus{border-color:#5b7fff;box-shadow:0 0 0 3px #5b7fff1a}.chat-modal-input input:disabled{opacity:.6;cursor:not-allowed;background:#f5f5f7}.send-button{width:40px;height:40px;border-radius:50%;background:#5b7fff;border:none;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s}.send-button:hover:not(:disabled){background:#4a6fee;transform:scale(1.05)}.send-button:disabled{opacity:.4;cursor:not-allowed}.chat-modal-messages::-webkit-scrollbar{width:6px}.chat-modal-messages::-webkit-scrollbar-thumb{background:#d1d1d6;border-radius:3px}@media(max-width:640px){.chat-modal{width:100%;height:100dvh;max-height:100dvh;border-radius:12px 12px 0 0;margin:0}}.action-status{margin-top:8px;padding:6px 10px;border-radius:6px;font-size:.8em;font-weight:500}.action-status-submitted{background:#fef3c7;color:#92400e;border:1px solid #fde68a}.action-status-success{background:#d1fae5;color:#065f46;border:1px solid #a7f3d0}.action-status-fail{background:#fee2e2;color:#991b1b;border:1px solid #fca5a5}.action-form{background:#f8f9fb;border:1px solid #e2e6ea;border-radius:10px;padding:12px;margin-top:8px;margin-bottom:8px}.action-form-title{font-weight:600;font-size:.9em;margin-bottom:10px;color:#1a1a2e;display:flex;align-items:center;gap:6px}.action-form-general-error{background:#fef2f2;border:1px solid #fecaca;border-radius:8px;padding:10px 12px;margin-bottom:10px;font-size:.8em;color:#dc2626;font-weight:500;display:flex;align-items:center;gap:6px}.action-form-fields{display:flex;flex-direction:column;gap:8px}.action-form-field{display:flex;flex-direction:column;gap:3px}.action-form-field label{font-size:.75em;font-weight:500;color:#6b7280}.action-form-field input,.action-form-field textarea{padding:8px 10px;border:1px solid #d1d5db;border-radius:6px;font-size:16px;background:#fff;color:#1a1a2e;outline:none;transition:border-color .2s;font-family:inherit}.action-form-field textarea{resize:none;word-break:break-all}.action-form-field input:focus,.action-form-field textarea:focus{border-color:#0b3988;box-shadow:0 0 0 2px #6c5ce726}.action-form-field input.error,.action-form-field textarea.error{border-color:#ef4444}.action-form-field input.readonly,.action-form-field textarea.readonly{background:#f3f4f6;color:#6b7280;cursor:not-allowed;border-color:#e5e7eb}.action-form-field .field-error{font-size:.7em;color:#ef4444;margin-top:1px}.action-form-actions{display:flex;gap:8px;margin-top:10px}.action-form-submit{flex:1;padding:8px 14px;background:#0b3988;color:#fff;border:none;border-radius:6px;font-size:.85em;font-weight:500;cursor:pointer;transition:background .2s}.action-form-submit:hover:not(:disabled){background:#5a4bd1}.action-form-submit:disabled{background:#a5b4fc;cursor:not-allowed}.action-form-cancel{padding:8px 14px;background:transparent;color:#6b7280;border:1px solid #d1d5db;border-radius:6px;font-size:.85em;font-weight:500;cursor:pointer;transition:all .2s}.action-form-cancel:hover{background:#f3f4f6;color:#374151}.action-form-token-info{background:#eef2ff;border:1px solid #c7d2fe;border-radius:8px;padding:8px 10px;margin-bottom:10px}.token-info-row{display:flex;align-items:center;gap:8px}.token-info-logo{border-radius:50%;flex-shrink:0}.token-info-details{display:flex;flex-direction:column;gap:2px;min-width:0}.token-info-name{font-size:.8em;font-weight:600;color:#1a1a2e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.token-info-balance{font-size:.75em;color:#4b5563}.token-info-usd{color:#0b3988;font-weight:500}.action-form-field-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.action-form-field-header .action-form-field-label{margin-bottom:0;font-size:12px}.action-form-pct-btns{display:inline-flex;gap:4px}.action-form-pct-btn{padding:1px 6px;font-size:.7em;font-weight:600;color:#0b3988;background:#eef2ff;border:1px solid #c7d2fe;border-radius:4px;cursor:pointer;transition:all .15s}@media(min-width:640px){.action-form-pct-btn:hover:not(:disabled){background:#0b3988;color:#fff}}.action-form-pct-btn:disabled{opacity:.5;cursor:not-allowed}.action-form-max-btn{font-weight:700}.action-form-nft-info{margin-bottom:10px;text-align:center;display:flex;align-items:center;justify-content:center}.nft-info-image{width:80px;height:80px;border-radius:8px;object-fit:contain;background:#e5e7eb;padding:4px}.scroll-to-bottom-btn{position:absolute;bottom:16px;right:20px;background:#1a1a1dd6;color:#fff;border:1px solid rgba(255,255,255,.12);border-radius:50%;width:36px;height:36px;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px #00000040;z-index:20;transition:background .15s,transform .15s,box-shadow .15s;animation:fadeInUp .18s ease}@keyframes fadeInUp{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@media(min-width:640px){.scroll-to-bottom-btn:hover{background:#2d2d35;box-shadow:0 6px 16px #0000004d;transform:scale(1.08)}}.scroll-to-bottom-btn:active{transform:scale(.96)}.message-content{display:block;word-wrap:break-word;overflow-wrap:break-word;max-width:100%;overflow:hidden;font-size:inherit;line-height:1.5}.mc-line{min-height:1.2em;word-break:break-word}.mc-empty-line{height:.5em}.mc-heading{font-weight:600;margin:.3em 0;word-break:break-word}.mc-h1{font-size:1.4em}.mc-h2{font-size:1.2em}.mc-h3{font-size:1.05em}.mc-inline-code{background:#afb8c133;padding:1px 5px;border-radius:3px;font-family:Monaco,Menlo,Ubuntu Mono,Consolas,monospace;font-size:.88em}.mc-codeblock{background:#f6f8fa;border:1px solid #d0d7de;border-radius:6px;margin:6px 0;overflow:hidden;max-width:100%}.mc-codeblock-lang{background:#e8ecf0;padding:3px 10px;font-size:.75em;font-weight:600;color:#57606a;text-transform:uppercase;font-family:Monaco,Menlo,monospace;border-bottom:1px solid #d0d7de}.mc-codeblock pre{margin:0;padding:10px;overflow-x:auto}.mc-codeblock code{font-family:Monaco,Menlo,Ubuntu Mono,Consolas,monospace;font-size:.85em;line-height:1.5;color:#24292f;white-space:pre}.mc-link{color:#0969da;text-decoration:none;word-break:break-word}.mc-link:hover{text-decoration:underline}.mc-image{max-width:150px;width:150px;height:150px;object-fit:contain;border-radius:8px;margin:8px 0;display:block}.mc-image-inline{width:20px;height:20px;border-radius:50%;margin:0 4px;display:inline-block;vertical-align:middle;object-fit:cover}.mc-blockquote{margin:4px 0;padding:2px 0 2px 12px;color:#57606a;border-left:3px solid #d0d7de}.mc-hr{height:1px;border:0;background:#d0d7de;margin:.4em 0}.message-content strong{font-weight:600}.message-content del{text-decoration:line-through}.mc-link-previews{display:flex;flex-direction:column;gap:6px;margin-top:6px}.link-preview{display:flex;flex-direction:column;border:1px solid #e1e4e8;border-radius:10px;overflow:hidden;margin:8px 0 4px;text-decoration:none;color:inherit;background:#fafbfc;transition:box-shadow .2s ease,border-color .2s ease;max-width:100%;cursor:pointer}.link-preview:hover{border-color:#c8ccd1;box-shadow:0 2px 8px #00000014}.link-preview__image-wrapper{width:100%;max-height:160px;overflow:hidden;background:#f0f2f4;display:flex;align-items:center;justify-content:center}.link-preview__image{width:100%;height:auto;max-height:160px;object-fit:cover;display:block}.link-preview__content{padding:10px 12px;display:flex;flex-direction:column;gap:4px;min-width:0}.link-preview__title{font-weight:600;font-size:.88em;line-height:1.35;color:#1a1a2e;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;word-break:break-word}.link-preview__description{font-size:.8em;line-height:1.4;color:#57606a;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;word-break:break-word}.link-preview__url{display:flex;align-items:center;gap:5px;font-size:.73em;color:#8b949e;margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.link-preview__favicon{width:14px;height:14px;border-radius:2px;flex-shrink:0;object-fit:contain}.link-preview--loading{pointer-events:none}.link-preview__skeleton{padding:10px 12px;display:flex;gap:10px}.link-preview__skeleton-text{flex:1;display:flex;flex-direction:column;gap:8px}.link-preview__skeleton-line{height:10px;background:linear-gradient(90deg,#e8e8e8 25%,#f5f5f5,#e8e8e8 75%);background-size:200% 100%;animation:linkPreviewShimmer 1.5s ease-in-out infinite;border-radius:4px}.link-preview__skeleton-line--title{width:75%;height:12px}.link-preview__skeleton-line--desc{width:90%}.link-preview__skeleton-line--url{width:40%}@keyframes linkPreviewShimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.message-bot .link-preview{background:#ffffff8c;border-color:#00000014}.message-user .link-preview{background:#ffffff26;border-color:#fff3}.message-user .link-preview__title{color:#fff}.message-user .link-preview__description{color:#fffc}.message-user .link-preview__url{color:#fff9}.message-user .link-preview:hover{border-color:#ffffff59;box-shadow:0 2px 8px #00000026}")),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}}();
2
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react/jsx-runtime"),require("react")):"function"==typeof define&&define.amd?define(["exports","react/jsx-runtime","react"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ChatWidgetSDK={},e.jsxRuntime,e.React)}(this,function(e,t,n){"use strict";const r={en:{chatTitle:"Keyring Agent",closeChat:"Close chat",messagePlaceholder:"Message ....",sendMessage:"Send message",botIsTyping:"Bot is typing",canIHelpYou:"Can I help you with anything?",replyToMessage:"Reply to message",replyingTo:"Replying to",replyingToYou:"You",replyingToAgent:"Keyring Agent",cancelReply:"Cancel reply",suggestionAskText:"Ask a question",suggestionAskUserMessage:"I have a question",suggestionAskBotReply:"Ask me anything",suggestionBuyText:"Buy trending token",walletConnectedChainUnsupported:"Your wallet is connected but the chain is not supported for trading. Please switch to a supported chain to see trending tokens.",walletNotConnected:"Please connect your wallet to see trending tokens.",actionProcessing:"⏳ Processing transaction...",actionSuccess:"✅ Transaction completed",actionFail:"❌ Action cancelled or failed",txSubmitted:"⏳ Transaction submitted. Waiting for confirmation...",txConfirmed:"✅ Transaction confirmed!",txReverted:"❌ Transaction reverted on-chain.",txTimeout:"⚠️ Transaction submitted but confirmation timed out. Please check manually.",txSuccessful:"✅ Transaction successful!",txFailed:"❌ Transaction failed. Please try again.",txNoHandler:"⚠️ No transaction handler configured.",txInsufficientGas:"⚠️ **Insufficient {symbol} for gas!** You have {balance} {symbol} but need ~{fee} {symbol} for the transaction fee. Please top up your wallet and try again.",txError:"❌ Error: {message}",swapConfirmButton:"Confirm",swapConfirmValue:"Confirm swap",swapReadyToProceed:"Ready to proceed with the swap?",swapEstimationError:"⚠️ Unable to get swap estimation. Error: {error}",formCancel:"Cancel",formExecute:"Execute",formProcessing:"⏳ Processing...",formBalance:"Balance:",formTokenNotFound:"Token not found in your wallet.",formNoBalance:"You have no {symbol} balance in your wallet.",formInsufficientBalance:"Insufficient balance. Spendable: {balance} {symbol}",formFieldRequired:"{field} is required",formInvalidAddress:"Invalid address (Must contain 0x and 40 hex chars)",formMustBePositive:"Must be a positive number",formMustBeValidNumber:"Must be a valid number",openChat:"Open chat",openChatTitle:"Open chat support",walletBalanceSpendable:"This is the spendable balance of your wallet on {chain} chain. Please choose the coins you want to use for this trade.",walletNoTokensFound:"Sorry, I couldn't find any tokens in your wallet on {chain} chain. Please make sure you have some tokens to trade.",walletFetchFailed:"Sorry, I could not fetch your wallet balance. Please try again.",walletFetchError:"Sorry, I encountered an error fetching your wallet balance.",insufficientFeeToken:"Insufficient fee. Please ensure you have enough {symbol} to cover the transaction fees, or select a different token.",selectAmountOf:"Select the amount of {symbol} to use:\n\nSpendable: {balance} {symbol}",swapFeeWarning:"\n⚠️ **Insufficient {symbol} for fees!**\n You have {balance} {symbol} but need ~{needed} {symbol}.\n",swapNeedApprove:"You need to approve {symbol} first before swapping.",swapApproveButton:"Approve {symbol}",swapApproveValue:"Approve {symbol} for swap",swapNoSourceToken:"⚠️ You don't have the source token in your wallet or balance is 0.",swapSelectAmount:"Swap {from} → {to}\n\nSelect the amount of {from} to swap:\n\nSpendable: {balance} {from}",swapApprovalRequired:"⚠️ Token approval required before swapping.\n\nStep 1: Approve {symbol}\nStep 2: Confirm Swap",swapEstimationFailed:"⚠️ Failed to get swap estimation. Please try again.",swapInsufficientNativeBalance:"⚠️ Insufficient balance! You have {balance} {symbol} but need {amount} {symbol}. Please top up your wallet or reduce the amount.",swapTokenNotInWallet:"⚠️ You don't have {symbol} in your wallet. Please acquire some first before swapping.",swapInsufficientTokenBalance:"⚠️ Insufficient balance! You have {balance} {symbol} but need {amount} {symbol}. Please reduce the amount or add more tokens.",selectAmountToSwap:"Select the amount of {symbol} to swap:\n\nSpendable: {balance} {symbol}",couldNotLoadTokenList:"⚠️ Could not load token list. Please specify the destination token.",trendingTokensForReceive:"📈 Trending tokens on {chain} chain. Pick the token you want to receive or type the token you want to receive:",txProcessing:"⏳ Transaction processing... Please confirm in your wallet.",txConfirmedSwap:"✅ Transaction confirmed! Your swap has been completed.",txRevertedSwap:"❌ Transaction reverted on-chain. Please try again.",txSuccessfulSwap:"✅ Transaction successful! Your swap has been completed.",txSuccessfulSendToken:"✅ Sent successfully **{amount} {symbol}** to {to}",txSuccessfulSendNative:"✅ Sent successfully **{amount} {symbol}** to {to}",txSuccessfulSendNft:"✅ Sent successfully NFT **{name}** (#{tokenId}) to {to}",txSuccessfulWrapNative:"✅ Wrapped successfully **{amount} {from}** → **{to}**",txSuccessfulUnwrapNative:"✅ Unwrapped successfully **{amount} {from}** → **{to}**",txDataNotAvailable:"⚠️ Transaction data not available.",approvalDataNotAvailable:"⚠️ Approval data not available.",approving:"Approving {symbol}... Please confirm in your wallet.",approvalSuccess:"✅ {symbol} approved successfully!",approvalConfirmSwap:"Now you can execute the swap.",confirmSwapButton:"Confirm Swap",approvalFailed:"❌ Approval failed. Please try again.",couldNotFetchBalance:"⚠️ Could not fetch your wallet balance.",couldNotLoadBalance:"⚠️ Could not load balance. Please try again.",couldNotFetchBalanceRetry:"⚠️ Could not fetch your balance. Please try again.",nftSendReview:"📤 Send **{name}** ({standard} #{tokenId})\n\nPlease review and fill in the recipient address below:",nftCollectionHeader:"Your NFTs :\n\n{list}",nftMoreItems:"\n\nAnd {count} more NFTs...",nftSelectBelow:"\n\nSelect an NFT below to send",nftNoCollection:"You don't have any NFTs in your wallet on this chain.",nftMultipleMatchesForTokenId:"I found {count} NFTs with Token ID #{tokenId} in your wallet. Please select the one you want to send:",nftNotFoundInWallet:"I couldn't find \"{name}\" in your NFT collection. You don't own this NFT on this chain.",nftFetchError:"Sorry, I encountered an error fetching your NFTs.",trendingTokensHeader:"📈 Here is the list of tokens that are currently trending upwards on {chain} chain",trendingTokensQuestion:"\nIs there any token you want to buy?",trendingTokensError:"Sorry, I encountered an error fetching trending tokens.",errorProcessingRequest:"Sorry, I encountered an error processing your request.Please try again in a few moments.",buttonBuyWith:"Buy with {symbol}",buttonUsePercent:"Use {percent}% of {symbol}",buttonBuyToken:"Buy {name} ({symbol})",buttonSendNft:"Send {name}",buttonSwapTo:"Swap to {name} ({symbol})",buttonBuySymbol:"Buy {symbol}",viewBalancesLoading:"Fetching your wallet balances...",viewBalancesHeader:"Your token balances on {chain}:\n\n{list}",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}",formMax:"MAX",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!",sendTokenNotInWallet:"You don't have {symbol} in your wallet on this chain. Please acquire some first before sending.",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! 🚀**\nYou’re now connected and ready to explore the world of Blockchain. I can assist you anytime with NFT insights, trading, price tracking, and portfolio analysis.",sendOtherNfts:"\nIf the NFT you want to send is not in the list above, please visit our website to send it.",sendNftViaWebsite:"Please select the NFT you would like to send from the list and proceed via this website.",viewNftViaWebsite:"Please view your NFT collection on this website for more details.",buyingOnChain:"Buying {symbol} on {chain}"},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文字である必要があります)",formMustBePositive:"正の数値を入力してください",formMustBeValidNumber:"有効な数値を入力してください",openChat:"チャットを開く",openChatTitle:"チャットサポートを開く",walletBalanceSpendable:"これは {chain} チェーン上のウォレットの利用可能な残高です。この取引に使用するコインを選択してください。",walletNoTokensFound:"申し訳ありませんが、{chain} チェーン上のウォレットにトークンが見つかりませんでした。取引するためのトークンを保有しているかご確認ください。",walletFetchFailed:"ウォレット残高を取得できませんでした。もう一度お試しください。",walletFetchError:"ウォレット残高の取得中にエラーが発生しました。",insufficientFeeToken:"手数料が不足しています。取引手数料をカバーするのに十分な {symbol} を保有しているか、別のトークンを選択してください。",selectAmountOf:"使用する {symbol} の数量を選択してください:\n\n利用可能: {balance} {symbol}",swapFeeWarning:"\n⚠️ **手数料の {symbol} が不足しています!**\n 保有量は {balance} {symbol} ですが、~{needed} {symbol} 必要です。\n",swapNeedApprove:"スワップを行う前に、まず {symbol} の承認が必要です。",swapApproveButton:"{symbol} を承認する",swapApproveValue:"スワップのために {symbol} を承認",swapNoSourceToken:"⚠️ ウォレットにソーストークンがないか、残高が 0 です。",swapSelectAmount:"スワップ {from} → {to}\n\nスワップする {from} の数量を選択してください:\n\n利用可能: {balance} {from}",swapApprovalRequired:"⚠️ スワップの前にトークンの承認が必要です。\n\nステップ 1: {symbol} を承認\nステップ 2: スワップを確定",swapEstimationFailed:"⚠️ スワップの見積もり取得に失敗しました。もう一度お試しください。",swapInsufficientNativeBalance:"⚠️ 残高不足です! 保有量は {balance} {symbol} ですが、{amount} {symbol} 必要です。ウォレットにチャージするか、数量を減らしてください。",swapTokenNotInWallet:"⚠️ ウォレットに {symbol} がありません。スワップする前にまず入手してください。",swapInsufficientTokenBalance:"⚠️ 残高不足です! 保有量は {balance} {symbol} ですが、{amount} {symbol} 必要です。数量を減らすか、トークンを追加してください。",selectAmountToSwap:"スwaップする {symbol} の数量を選択してください:\n\n利用可能: {balance} {symbol}",couldNotLoadTokenList:"⚠️ トークンリストを読み込めませんでした。受け取り希望のトークンを指定してください。",trendingTokensForReceive:"📈 {chain} チェーンのトレンドトークン。受け取りたいトークンを選択するか、入力してください:",txProcessing:"⏳ トランザクション処理中... ウォレットで承認してください。",txConfirmedSwap:"✅ トランザクションが確認されました!スワップが完了しました。",txRevertedSwap:"❌ オンチェーンでトランザクションがリバートされました。もう一度お試しください。",txSuccessfulSwap:"✅ トランザクションに成功しました!スワップが完了しました。",txSuccessfulSendToken:"✅ **{amount} {symbol}** を {to} に送信しました",txSuccessfulSendNative:"✅ **{amount} {symbol}** を {to} に送信しました",txSuccessfulWrapNative:"✅ **{amount} {from}** を **{to}** にラップしました",txSuccessfulUnwrapNative:"✅ **{amount} {from}** を **{to}** にアンラップしました",txSuccessfulSendNft:"✅ NFT **{name}** (#{tokenId}) を {to} に送信しました",txDataNotAvailable:"⚠️ トランザクションデータが利用できません。",approvalDataNotAvailable:"⚠️ 承認データが利用できません。",approving:"{symbol} を承認中... ウォレットで確認してください。",approvalSuccess:"✅ {symbol} の承認に成功しました!",approvalConfirmSwap:"これでスワップを実行できます。",confirmSwapButton:"スワップを確定する",approvalFailed:"❌ 承認に失敗しました。もう一度お試しください。",couldNotFetchBalance:"⚠️ ウォレット残高を取得できませんでした。",couldNotLoadBalance:"⚠️ 残高を読み込めませんでした。もう一度お試しください。",couldNotFetchBalanceRetry:"⚠️ 残高を取得できませんでした。もう一度お試しください。",nftSendReview:"📤 **{name}** ({standard} #{tokenId}) を送信\n\n内容を確認し、以下に受信者のアドレスを入力してください:",nftCollectionHeader:"您的 NFT 资产:\n\n{list}",nftMoreItems:"\n\n以及其他 {count} 件 NFT...",nftSelectBelow:"\n\n请在下方选择要发送的 NFT",nftNoCollection:"このチェーン上のウォレットにNFTは見つかりませんでした。",nftMultipleMatchesForTokenId:"ウォレット内にToken ID #{tokenId} のNFTが{count}件見つかりました。送信したいNFTを選択してください:",nftNotFoundInWallet:'あなたのNFTコレクションに "{name}" が見つかりませんでした。このチェーンでこのNFTを所有していません。',nftFetchError:"申し訳ありませんが、NFTの取得中にエラーが発生しました。",trendingTokensHeader:"📈 {chain} チェーンで現在価格が上昇中のトレンドトークン一覧です:",trendingTokensQuestion:"\n購入したいトークンはありますか?",trendingTokensError:"トレンドトークンの取得中にエラーが発生しました。",errorProcessingRequest:"リクエストの処理中にエラーが発生しました。しばらく時間を置いてからもう一度お試しください。",buttonBuyWith:"{symbol} で購入",buttonUsePercent:"{symbol}の{percent}%を使用",buttonBuyToken:"{name} ({symbol}) を購入",buttonSendNft:"{name} を送信",buttonSwapTo:"{name} ({symbol}) にスワップ",buttonBuySymbol:"{symbol} を購入",viewBalancesLoading:"ウォレットの残高を取得中...",viewBalancesHeader:"{chain} 上のトークン残高:\n\n{list}",viewBalancesEmpty:"このチェーン上のウォレットにトークンは見つかりませんでした。",viewBalancesFetchError:"残高の取得中にエラーが発生しました。",buttonSendToken:"{symbol} を送信",formMax:"最大",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コレクションを表示します!",sendTokenNotInWallet:"このチェーンのウォレットに {symbol} がありません。送信する前にまず入手してください。",sendTokenChoose:"どのトークンを送信しますか?",sendNftChoose:"どのNFTを送信しますか?",swapChooseToken:"どのトークンをスワップしますか?現在の残高はこちらです:",spendable:"利用可能",welcomeMessage:"**ようこそ! 🚀**\n次世代のブロックチェーンへ。NFT情報、トレード、価格チェック、ポートフォリオ分析など、いつでもお手伝いします。",sendOtherNfts:"\n送信したいNFTが上記のリストにない場合は、当ウェブサイトにアクセスして送信してください。",sendNftViaWebsite:"送信したいNFTをリストから選択し、当ウェブサイトで手続きを進めてください。",viewNftViaWebsite:"NFTコレクションの詳細は、当ウェブサイトでご確認ください。",buyingOnChain:"{chain} チェーンで {symbol} を購入中"},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} 数量:\n\n可用余额: {balance} {symbol}",swapFeeWarning:"\n⚠️ **手续费所需的 {symbol} 不足!**\n 您当前有 {balance} {symbol},但需要 ~{needed} {symbol}。\n",swapNeedApprove:"在兑换之前,您需要先授权 {symbol}。",swapApproveButton:"授权 {symbol}",swapApproveValue:"授权 {symbol} 以进行兑换",swapNoSourceToken:"⚠️ 您的钱包中没有源代币或余额为 0。",swapSelectAmount:"兑换 {from} → {to}\n\n选择要兑换的 {from} 数量:\n\n可用余额: {balance} {from}",swapApprovalRequired:"⚠️ 兑换前需要代币授权。\n\n第 1 步:授权 {symbol}\n第 2 步:确认兑换",swapEstimationFailed:"⚠️ 获取兑换估算失败。请重试。",swapInsufficientNativeBalance:"⚠️ 余额不足!您有 {balance} {symbol} 但需要 {amount} {symbol}。请充值钱包或减少金额。",swapTokenNotInWallet:"⚠️ 您的钱包中没有 {symbol}。请在兑换前先获取一些代币。",swapInsufficientTokenBalance:"⚠️ 余额不足!您有 {balance} {symbol} 但需要 {amount} {symbol}。请减少金额或添加更多代币。",selectAmountToSwap:"选择要兑换的 {symbol} 数量:\n\n可用余额: {balance} {symbol}",couldNotLoadTokenList:"⚠️ 无法加载代币列表。请指定目标代币。",trendingTokensForReceive:"📈 {chain} 链上的热门代币。请选择您想收到的代币或输入代币名称:",txProcessing:"⏳ 交易处理中... 请在钱包中确认。",txConfirmedSwap:"✅ 交易已确认!您的兑换已完成。",txRevertedSwap:"❌ 交易在链上被退回。请重试。",txSuccessfulSwap:"✅ 交易成功!您的兑换已完成。",txSuccessfulSendToken:"✅ 已成功发送 **{amount} {symbol}** 至 {to}",txSuccessfulSendNative:"✅ 已成功发送 **{amount} {symbol}** 至 {to}",txSuccessfulWrapNative:"✅ 成功封装 **{amount} {from}** → **{to}**",txSuccessfulUnwrapNative:"✅ 成功解封装 **{amount} {from}** → **{to}**",txSuccessfulSendNft:"✅ 已成功发送 NFT **{name}** (#{tokenId}) 至 {to}",txDataNotAvailable:"⚠️ 交易数据不可用。",approvalDataNotAvailable:"⚠️ 授权数据不可用。",approving:"正在授权 {symbol}... 请在钱包中确认。",approvalSuccess:"✅ {symbol} 授权成功!",approvalConfirmSwap:"现在您可以执行兑换了。",confirmSwapButton:"确认兑换",approvalFailed:"❌ 授权失败。请重试。",couldNotFetchBalance:"⚠️ 无法获取您的钱包余额。",couldNotLoadBalance:"⚠️ 无法加载余额。请重试。",couldNotFetchBalanceRetry:"⚠️ 无法获取您的余额。请重试。",nftSendReview:"📤 发送 **{name}** ({standard} #{tokenId})\n\n请核对并在下方填写接收者地址:",nftCollectionHeader:"保有中のNFT一覧 :\n\n{list}",nftMoreItems:"\n\n他 {count} 件のNFT...",nftSelectBelow:"\n\n送信するNFTを以下から選択してください",nftNoCollection:"您在该链的钱包中没有任何 NFT。",nftMultipleMatchesForTokenId:"在您的钱包中找到了 {count} 个 Token ID #{tokenId} 的 NFT。请选择您要发送的 NFT:",nftNotFoundInWallet:'我在您的 NFT 收藏中没找到 "{name}"。您在此链上不拥有此 NFT。',nftFetchError:"抱歉,获取您的 NFT 时出错。",trendingTokensHeader:"📈 以下是 {chain} 链上目前呈上升趋势的热门代币列表",trendingTokensQuestion:"\n有您想购买的代币吗?",trendingTokensError:"抱歉,获取热门代币时出错。",errorProcessingRequest:"抱歉,处理您的请求时出错。请稍后再试。",buttonBuyWith:"使用 {symbol} 购买",buttonUsePercent:"使用{percent}%的{symbol}",buttonBuyToken:"购买 {name} ({symbol})",buttonSendNft:"发送 {name}",buttonSwapTo:"兑换为 {name} ({symbol})",buttonBuySymbol:"购买 {symbol}",viewBalancesLoading:"正在获取您的钱包余额...",viewBalancesHeader:"您在 {chain} 上的代币余额:\n\n{list}",viewBalancesEmpty:"您在该链的钱包中没有任何代币。",viewBalancesFetchError:"抱歉,获取您的余额时出错。",buttonSendToken:"发送 {symbol}",formMax:"最多",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 收藏!",sendTokenNotInWallet:"您的钱包中在此链上没有 {symbol}。请在发送前先获取一些代币。",sendTokenChoose:"您想发送哪个代币?",sendNftChoose:"您想发送哪个 NFT?",swapChooseToken:"您想兑换哪个代币?以下是您的当前余额:",spendable:"可用余额",welcomeMessage:"**欢迎您!🚀**\n带你一起探索新一代区块链世界。我可以随时为您提供NFT资讯、交易支持、价格查询以及投资组合分析等服务。",sendOtherNfts:"\n如果您想发送的NFT不在上述列表中,请访问我们的网站进行发送。",sendNftViaWebsite:"请从列表中选择您想发送的NFT,并通过这个网站继续操作。",viewNftViaWebsite:"如需查看更多详情,请在这个网站查看您的NFT收藏。",buyingOnChain:"正在 {chain} 链上购买 {symbol}"}};function i(e,t){return r[t]?.[e]??r.en[e]??e}const o=n.createContext(void 0),s=({children:e,initialLanguage:r="en"})=>{const[s,a]=n.useState(r);n.useEffect(()=>{r&&a(r)},[r]);const c=n.useCallback(e=>i(e,s),[s]),u=n.useCallback((e,t)=>function(e,t){return e.replace(/\{(\w+)\}/g,(e,n)=>t[n]??`{${n}}`)}(i(e,s),t),[s]);return t.jsx(o.Provider,{value:{language:s,setLanguage:a,t:c,ti:u},children:e})},a=()=>{const e=n.useContext(o);if(!e)throw new Error("useLanguage must be used within a LanguageProvider");return e},c=n.memo(({onClick:e,buttonSize:n=56})=>{const{t:r}=a();return t.jsx("button",{className:"chat-button",onClick:e,onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),e())},"aria-label":r("openChat"),title:r("openChatTitle"),type:"button",children:t.jsx("img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5VonVp5kuSF+V+7I0A1gRrqG/oFcwfLCkenHiPjGV5kWbcS38WsbpMoLFq46zArJ4teGkgCxe7TgnIIsXDacEZPGi44yALF59OLEeiNaVbwupruCEBbJ49cPLSZ7DAnoOC+g5LKDnsICeI/VSxBwx3iIFC+gzM9qFqklifGVG5hTdIcZPlJqSQrEFektKTsicTF0mxkuyORqXY+k2JDFjxHiFrh4mtXYzQR0ocmqcGK8QUgzjORBwWcphrgf9Au4Tz4GAcKM6HT1DjCeIEbhPvCq20tgK/SFLNGReFwVkK/QDRWrIWB9YcXuHg5nHE3pjJzHOoT3kzGj61d32thWrETkS77ErdQ9oorU5EN6+QsC8eebSxDiFoNxHtus0lFwPHE1vGxHa1xLjBIh719PbSnbMKt7i6FDm0aAicZKYxIB4o+nXBst9XvUeVT2Zh/2K5M96x1ZiYiOfh+TS8IaV9qvpJmPdmdl2SeqG3rmdmFUHfU4kk6ViXphIf8ubXerqAqvThnLmWgWXGSbaH2OnvDWmVG6QhDhOTFMwwi2THC6sDtVMZAENebea7daJ7AAX/nUzprP98XqEM9QtoI0RUyjRqS2zg/Kxsp2YAFhYfnhMTeo3d5RQOsalLtcrms1//TyUbJOo0HUAAAAASUVORK5CYII=",width:n,height:n,alt:"Ask AI"})})}),u={"keyring-chatbot-agent-sdk-test":{name:"keyring-chatbot-agent-sdk-test-1",webAppUrl:"https://nft-demo.keyring.app",isPackageTest:!0},"keyring-chatbot-agent":{name:"keyring-chatbot-agent-1",webAppUrl:"https://nft.keyring.app"}},l=/^tuple(?<array>(\[(\d*)\])*)$/;function d(e){let t=e.type;if(l.test(e.type)&&"components"in e){t="(";const n=e.components.length;for(let i=0;i<n;i++)t+=d(e.components[i]),i<n-1&&(t+=", ");const r=function(e,t){const n=e.exec(t);return n?.groups}(l,e.type);return t+=`)${r?.array||""}`,d({...e,type:t})}return"indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}function f(e){let t="";const n=e.length;for(let r=0;r<n;r++)t+=d(e[r]),r!==n-1&&(t+=", ");return t}function h(e,{includeName:t=!1}={}){if("function"!==e.type&&"event"!==e.type&&"error"!==e.type)throw new S(e.type);return`${e.name}(${p(e.inputs,{includeName:t})})`}function p(e,{includeName:t=!1}={}){return e?e.map(e=>function(e,{includeName:t}){return e.type.startsWith("tuple")?`(${p(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}(e,{includeName:t})).join(t?", ":","):""}function m(e,{strict:t=!0}={}){return!!e&&"string"==typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x"))}function w(e){return m(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const b="2.46.3";let g=`viem@${b}`;class y extends Error{constructor(e,t={}){const n=t.cause instanceof y?t.cause.details:t.cause?.message?t.cause.message:t.details,r=t.cause instanceof y&&t.cause.docsPath||t.docsPath,i=(({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0)?.({...t,docsPath:r});super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...i?[`Docs: ${i}`]:[],...n?[`Details: ${n}`]:[],...g?[`Version: ${g}`]:[]].join("\n"),t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=n,this.docsPath=r,this.metaMessages=t.metaMessages,this.name=t.name??this.name,this.shortMessage=e,this.version=b}walk(e){return v(this,e)}}function v(e,t){return t?.(e)?e:e&&"object"==typeof e&&"cause"in e&&void 0!==e.cause?v(e.cause,t):t?null:e}class A extends y{constructor({expectedLength:e,givenLength:t,type:n}){super([`ABI encoding array length mismatch for type ${n}.`,`Expected length: ${e}`,`Given length: ${t}`].join("\n"),{name:"AbiEncodingArrayLengthMismatchError"})}}class k extends y{constructor({expectedSize:e,value:t}){super(`Size of bytes "${t}" (bytes${w(t)}) does not match expected size (bytes${e}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class x extends y{constructor({expectedLength:e,givenLength:t}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${e}`,`Given length (values): ${t}`].join("\n"),{name:"AbiEncodingLengthMismatchError"})}}class E extends y{constructor(e,{docsPath:t}={}){super([`Function ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join("\n"),{docsPath:t,name:"AbiFunctionNotFoundError"})}}class T extends y{constructor(e,t){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${e.type}\` in \`${h(e.abiItem)}\`, and`,`\`${t.type}\` in \`${h(t.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}class C extends y{constructor(e,{docsPath:t}){super([`Type "${e}" is not a valid encoding type.`,"Please provide a valid ABI type."].join("\n"),{docsPath:t,name:"InvalidAbiEncodingType"})}}class I extends y{constructor(e){super([`Value "${e}" is not a valid array.`].join("\n"),{name:"InvalidArrayError"})}}class S extends y{constructor(e){super([`"${e}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join("\n"),{name:"InvalidDefinitionTypeError"})}}class N extends y{constructor({offset:e,position:t,size:n}){super(`Slice ${"start"===t?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${n}).`,{name:"SliceOffsetOutOfBoundsError"})}}class B extends y{constructor({size:e,targetSize:t,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`,{name:"SizeExceedsPaddingSizeError"})}}function M(e,{dir:t,size:n=32}={}){return"string"==typeof e?U(e,{dir:t,size:n}):function(e,{dir:t,size:n=32}={}){if(null===n)return e;if(e.length>n)throw new B({size:e.length,targetSize:n,type:"bytes"});const r=new Uint8Array(n);for(let i=0;i<n;i++){const o="right"===t;r[o?i:n-i-1]=e[o?i:e.length-i-1]}return r}(e,{dir:t,size:n})}function U(e,{dir:t,size:n=32}={}){if(null===n)return e;const r=e.replace("0x","");if(r.length>2*n)throw new B({size:Math.ceil(r.length/2),targetSize:n,type:"hex"});return`0x${r["right"===t?"padEnd":"padStart"](2*n,"0")}`}class R extends y{constructor({max:e,min:t,signed:n,size:r,value:i}){super(`Number "${i}" is not in safe ${r?`${8*r}-bit ${n?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`,{name:"IntegerOutOfRangeError"})}}class O extends y{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}function F(e,{dir:t="left"}={}){let n="string"==typeof e?e.replace("0x",""):e,r=0;for(let i=0;i<n.length-1&&"0"===n["left"===t?i:n.length-i-1].toString();i++)r++;return n="left"===t?n.slice(r):n.slice(0,n.length-r),"string"==typeof e?(1===n.length&&"right"===t&&(n=`${n}0`),`0x${n.length%2==1?`0${n}`:n}`):n}function L(e,{size:t}){if(w(e)>t)throw new O({givenSize:w(e),maxSize:t})}function D(e,t={}){const{signed:n}=t;t.size&&L(e,{size:t.size});const r=BigInt(e);if(!n)return r;const i=(e.length-2)/2;return r<=(1n<<8n*BigInt(i)-1n)-1n?r:r-BigInt(`0x${"f".padStart(2*i,"f")}`)-1n}function P(e,t={}){const n=D(e,t),r=Number(n);if(!Number.isSafeInteger(r))throw new R({max:`${Number.MAX_SAFE_INTEGER}`,min:`${Number.MIN_SAFE_INTEGER}`,signed:t.signed,size:t.size,value:`${n}n`});return r}const H=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function j(e,t={}){return"number"==typeof e||"bigint"==typeof e?q(e,t):"string"==typeof e?Y(e,t):"boolean"==typeof e?z(e,t):J(e,t)}function z(e,t={}){const n=`0x${Number(e)}`;return"number"==typeof t.size?(L(n,{size:t.size}),M(n,{size:t.size})):n}function J(e,t={}){let n="";for(let i=0;i<e.length;i++)n+=H[e[i]];const r=`0x${n}`;return"number"==typeof t.size?(L(r,{size:t.size}),M(r,{dir:"right",size:t.size})):r}function q(e,t={}){const{signed:n,size:r}=t,i=BigInt(e);let o;r?o=n?(1n<<8n*BigInt(r)-1n)-1n:2n**(8n*BigInt(r))-1n:"number"==typeof e&&(o=BigInt(Number.MAX_SAFE_INTEGER));const s="bigint"==typeof o&&n?-o-1n:0;if(o&&i>o||i<s){const t="bigint"==typeof e?"n":"";throw new R({max:o?`${o}${t}`:void 0,min:`${s}${t}`,signed:n,size:r,value:`${e}${t}`})}const a=`0x${(n&&i<0?(1n<<BigInt(8*r))+BigInt(i):i).toString(16)}`;return r?M(a,{size:r}):a}const V=new TextEncoder;function Y(e,t={}){return J(V.encode(e),t)}const G=new TextEncoder;function W(e,t={}){return"number"==typeof e||"bigint"==typeof e?function(e,t){return Q(q(e,t))}(e,t):"boolean"==typeof e?function(e,t={}){const n=new Uint8Array(1);return n[0]=Number(e),"number"==typeof t.size?(L(n,{size:t.size}),M(n,{size:t.size})):n}(e,t):m(e)?Q(e,t):Z(e,t)}const X={zero:48,nine:57,A:65,F:70,a:97,f:102};function K(e){return e>=X.zero&&e<=X.nine?e-X.zero:e>=X.A&&e<=X.F?e-(X.A-10):e>=X.a&&e<=X.f?e-(X.a-10):void 0}function Q(e,t={}){let n=e;t.size&&(L(n,{size:t.size}),n=M(n,{dir:"right",size:t.size}));let r=n.slice(2);r.length%2&&(r=`0${r}`);const i=r.length/2,o=new Uint8Array(i);for(let s=0,a=0;s<i;s++){const e=K(r.charCodeAt(a++)),t=K(r.charCodeAt(a++));if(void 0===e||void 0===t)throw new y(`Invalid byte sequence ("${r[a-2]}${r[a-1]}" in "${r}").`);o[s]=16*e+t}return o}function Z(e,t={}){const n=G.encode(e);return"number"==typeof t.size?(L(n,{size:t.size}),M(n,{dir:"right",size:t.size})):n}const _=BigInt(2**32-1),$=BigInt(32);function ee(e,t=!1){return t?{h:Number(e&_),l:Number(e>>$&_)}:{h:0|Number(e>>$&_),l:0|Number(e&_)}}function te(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function ne(e,...t){if(!((n=e)instanceof Uint8Array||ArrayBuffer.isView(n)&&"Uint8Array"===n.constructor.name))throw new Error("Uint8Array expected");var n;if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function re(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 ie(e,t){ne(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function oe(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function se(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function ae(e,t){return e<<32-t|e>>>t}function ce(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}const ue=(()=>68===new Uint8Array(new Uint32Array([287454020]).buffer)[0])()?e=>e:function(e){for(let t=0;t<e.length;t++)e[t]=ce(e[t]);return e};function le(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw new Error("string expected");return new Uint8Array((new TextEncoder).encode(e))}(e)),ne(e),e}let de=class{};function fe(e){const t=t=>e().update(le(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}const he=BigInt(0),pe=BigInt(1),me=BigInt(2),we=BigInt(7),be=BigInt(256),ge=BigInt(113),ye=[],ve=[],Ae=[];for(let Ip=0,Sp=pe,Np=1,Bp=0;Ip<24;Ip++){[Np,Bp]=[Bp,(2*Np+3*Bp)%5],ye.push(2*(5*Bp+Np)),ve.push((Ip+1)*(Ip+2)/2%64);let e=he;for(let t=0;t<7;t++)Sp=(Sp<<pe^(Sp>>we)*ge)%be,Sp&me&&(e^=pe<<(pe<<BigInt(t))-pe);Ae.push(e)}const ke=function(e,t=!1){const n=e.length;let r=new Uint32Array(n),i=new Uint32Array(n);for(let o=0;o<n;o++){const{h:n,l:s}=ee(e[o],t);[r[o],i[o]]=[n,s]}return[r,i]}(Ae,!0),xe=ke[0],Ee=ke[1],Te=(e,t,n)=>n>32?((e,t,n)=>t<<n-32|e>>>64-n)(e,t,n):((e,t,n)=>e<<n|t>>>32-n)(e,t,n),Ce=(e,t,n)=>n>32?((e,t,n)=>e<<n-32|t>>>64-n)(e,t,n):((e,t,n)=>t<<n|e>>>32-n)(e,t,n);class Ie extends de{constructor(e,t,n,r=!1,i=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=r,this.rounds=i,te(n),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");var o;this.state=new Uint8Array(200),this.state32=(o=this.state,new Uint32Array(o.buffer,o.byteOffset,Math.floor(o.byteLength/4)))}clone(){return this.i()}keccak(){ue(this.state32),function(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let r=0;r<10;r++)n[r]=e[r]^e[r+10]^e[r+20]^e[r+30]^e[r+40];for(let r=0;r<10;r+=2){const t=(r+8)%10,i=(r+2)%10,o=n[i],s=n[i+1],a=Te(o,s,1)^n[t],c=Ce(o,s,1)^n[t+1];for(let n=0;n<50;n+=10)e[r+n]^=a,e[r+n+1]^=c}let t=e[2],i=e[3];for(let n=0;n<24;n++){const r=ve[n],o=Te(t,i,r),s=Ce(t,i,r),a=ye[n];t=e[a],i=e[a+1],e[a]=o,e[a+1]=s}for(let r=0;r<50;r+=10){for(let t=0;t<10;t++)n[t]=e[r+t];for(let t=0;t<10;t++)e[r+t]^=~n[(t+2)%10]&n[(t+4)%10]}e[0]^=xe[r],e[1]^=Ee[r]}oe(n)}(this.state32,this.rounds),ue(this.state32),this.posOut=0,this.pos=0}update(e){re(this),ne(e=le(e));const{blockLen:t,state:n}=this,r=e.length;for(let i=0;i<r;){const o=Math.min(t-this.pos,r-i);for(let t=0;t<o;t++)n[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:n,blockLen:r}=this;e[n]^=t,128&t&&n===r-1&&this.keccak(),e[r-1]^=128,this.keccak()}writeInto(e){re(this,!1),ne(e),this.finish();const t=this.state,{blockLen:n}=this;for(let r=0,i=e.length;r<i;){this.posOut>=n&&this.keccak();const o=Math.min(n-this.posOut,i-r);e.set(t.subarray(this.posOut,this.posOut+o),r),this.posOut+=o,r+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return te(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(ie(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,oe(this.state)}i(e){const{blockLen:t,suffix:n,outputLen:r,rounds:i,enableXOF:o}=this;return e||(e=new Ie(t,n,r,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=n,e.outputLen=r,e.enableXOF=o,e.destroyed=this.destroyed,e}}const Se=(()=>fe(()=>new Ie(136,1,32)))();function Ne(e,t){const n=t||"hex",r=Se(m(e,{strict:!1})?W(e):e);return"bytes"===n?r:j(r)}function Be(e){return Ne(W(function(e){let t=!0,n="",r=0,i="",o=!1;for(let s=0;s<e.length;s++){const a=e[s];if(["(",")",","].includes(a)&&(t=!0),"("===a&&r++,")"===a&&r--,t)if(0!==r)" "!==a?(i+=a,n+=a):","!==e[s-1]&&","!==n&&",("!==n&&(n="",t=!1);else if(" "===a&&["event","function",""].includes(i))i="";else if(i+=a,")"===a){o=!0;break}}if(!o)throw new y("Unable to normalize signature.");return i}("string"==typeof(t=e)?t:"function"===(n=t).type?`function ${n.name}(${f(n.inputs)})${n.stateMutability&&"nonpayable"!==n.stateMutability?` ${n.stateMutability}`:""}${n.outputs?.length?` returns (${f(n.outputs)})`:""}`:"event"===n.type?`event ${n.name}(${f(n.inputs)})`:"error"===n.type?`error ${n.name}(${f(n.inputs)})`:"constructor"===n.type?`constructor(${f(n.inputs)})${"payable"===n.stateMutability?" payable":""}`:"fallback"===n.type?"fallback() external"+("payable"===n.stateMutability?" payable":""):"receive() external payable")));var t,n}const Me=Be;class Ue extends y{constructor({address:e}){super(`Address "${e}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}class Re extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){const t=super.get(e);return super.has(e)&&void 0!==t&&(this.delete(e),super.set(e,t)),t}set(e,t){if(super.set(e,t),this.maxSize&&this.size>this.maxSize){const e=this.keys().next().value;e&&this.delete(e)}return this}}const Oe=new Re(8192),Fe=/^0x[a-fA-F0-9]{40}$/,Le=new Re(8192);function De(e,t){const{strict:n=!0}=t??{},r=`${e}.${n}`;if(Le.has(r))return Le.get(r);const i=!(!Fe.test(e)||e.toLowerCase()!==e&&n&&function(e){if(Oe.has(`${e}.undefined`))return Oe.get(`${e}.undefined`);const t=e.substring(2).toLowerCase(),n=Ne(Z(t),"bytes"),r=t.split("");for(let o=0;o<40;o+=2)n[o>>1]>>4>=8&&r[o]&&(r[o]=r[o].toUpperCase()),(15&n[o>>1])>=8&&r[o+1]&&(r[o+1]=r[o+1].toUpperCase());const i=`0x${r.join("")}`;return Oe.set(`${e}.undefined`,i),i}(e)!==e);return Le.set(r,i),i}function Pe(e){return"string"==typeof e[0]?He(e):function(e){let t=0;for(const i of e)t+=i.length;const n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}(e)}function He(e){return`0x${e.reduce((e,t)=>e+t.replace("0x",""),"")}`}function je(e,t,n,{strict:r}={}){return m(e,{strict:!1})?function(e,t,n,{strict:r}={}){ze(e,t);const i=`0x${e.replace("0x","").slice(2*(t??0),2*(n??e.length))}`;return r&&Je(i,t,n),i}(e,t,n,{strict:r}):function(e,t,n,{strict:r}={}){ze(e,t);const i=e.slice(t,n);return r&&Je(i,t,n),i}(e,t,n,{strict:r})}function ze(e,t){if("number"==typeof t&&t>0&&t>w(e)-1)throw new N({offset:t,position:"start",size:w(e)})}function Je(e,t,n){if("number"==typeof t&&"number"==typeof n&&w(e)!==n-t)throw new N({offset:n,position:"end",size:w(e)})}const qe=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function Ve(e,t){if(e.length!==t.length)throw new x({expectedLength:e.length,givenLength:t.length});const n=function({params:e,values:t}){const n=[];for(let r=0;r<e.length;r++)n.push(Ye({param:e[r],value:t[r]}));return n}({params:e,values:t}),r=Ge(n);return 0===r.length?"0x":r}function Ye({param:e,value:t}){const n=function(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}(e.type);if(n){const[r,i]=n;return function(e,{length:t,param:n}){const r=null===t;if(!Array.isArray(e))throw new I(e);if(!r&&e.length!==t)throw new A({expectedLength:t,givenLength:e.length,type:`${n.type}[${t}]`});let i=!1;const o=[];for(let s=0;s<e.length;s++){const t=Ye({param:n,value:e[s]});t.dynamic&&(i=!0),o.push(t)}if(r||i){const e=Ge(o);if(r){const t=q(o.length,{size:32});return{dynamic:!0,encoded:o.length>0?Pe([t,e]):t}}if(i)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:Pe(o.map(({encoded:e})=>e))}}(t,{length:r,param:{...e,type:i}})}if("tuple"===e.type)return function(e,{param:t}){let n=!1;const r=[];for(let i=0;i<t.components.length;i++){const o=t.components[i],s=Ye({param:o,value:e[Array.isArray(e)?i:o.name]});r.push(s),s.dynamic&&(n=!0)}return{dynamic:n,encoded:n?Ge(r):Pe(r.map(({encoded:e})=>e))}}(t,{param:e});if("address"===e.type)return function(e){if(!De(e))throw new Ue({address:e});return{dynamic:!1,encoded:U(e.toLowerCase())}}(t);if("bool"===e.type)return function(e){if("boolean"!=typeof e)throw new y(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:U(z(e))}}(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){const n=e.type.startsWith("int"),[,,r="256"]=qe.exec(e.type)??[];return function(e,{signed:t,size:n=256}){if("number"==typeof n){const r=2n**(BigInt(n)-(t?1n:0n))-1n,i=t?-r-1n:0n;if(e>r||e<i)throw new R({max:r.toString(),min:i.toString(),signed:t,size:n/8,value:e.toString()})}return{dynamic:!1,encoded:q(e,{size:32,signed:t})}}(t,{signed:n,size:Number(r)})}if(e.type.startsWith("bytes"))return function(e,{param:t}){const[,n]=t.type.split("bytes"),r=w(e);if(!n){let t=e;return r%32!=0&&(t=U(t,{dir:"right",size:32*Math.ceil((e.length-2)/2/32)})),{dynamic:!0,encoded:Pe([U(q(r,{size:32})),t])}}if(r!==Number.parseInt(n,10))throw new k({expectedSize:Number.parseInt(n,10),value:e});return{dynamic:!1,encoded:U(e,{dir:"right"})}}(t,{param:e});if("string"===e.type)return function(e){const t=Y(e),n=Math.ceil(w(t)/32),r=[];for(let i=0;i<n;i++)r.push(U(je(t,32*i,32*(i+1)),{dir:"right"}));return{dynamic:!0,encoded:Pe([U(q(w(t),{size:32})),...r])}}(t);throw new C(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function Ge(e){let t=0;for(let o=0;o<e.length;o++){const{dynamic:n,encoded:r}=e[o];t+=n?32:w(r)}const n=[],r=[];let i=0;for(let o=0;o<e.length;o++){const{dynamic:s,encoded:a}=e[o];s?(n.push(q(t+i,{size:32})),r.push(a),i+=w(a)):n.push(a)}return Pe([...n,...r])}const We=e=>je(Be(e),0,4);function Xe(e,t){const n=typeof e,r=t.type;switch(r){case"address":return De(e,{strict:!1});case"bool":return"boolean"===n;case"function":case"string":return"string"===n;default:return"tuple"===r&&"components"in t?Object.values(t.components).every((t,r)=>"object"===n&&Xe(Object.values(e)[r],t)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(r)?"number"===n||"bigint"===n:/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r)?"string"===n||e instanceof Uint8Array:!!/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r)&&Array.isArray(e)&&e.every(e=>Xe(e,{...t,type:r.replace(/(\[[0-9]{0,}\])$/,"")}))}}function Ke(e,t,n){for(const r in e){const i=e[r],o=t[r];if("tuple"===i.type&&"tuple"===o.type&&"components"in i&&"components"in o)return Ke(i.components,o.components,n[r]);const s=[i.type,o.type];if((()=>!(!s.includes("address")||!s.includes("bytes20"))||(s.includes("address")&&s.includes("string")||!(!s.includes("address")||!s.includes("bytes")))&&De(n[r],{strict:!1}))())return s}}function Qe(e){return"string"==typeof e?{address:e,type:"json-rpc"}:e}const Ze="/docs/contract/encodeFunctionData";function _e(e){const{args:t}=e,{abi:n,functionName:r}=1===e.abi.length&&e.functionName?.startsWith("0x")?e:function(e){const{abi:t,args:n,functionName:r}=e;let i=t[0];if(r){const e=function(e){const{abi:t,args:n=[],name:r}=e,i=m(r,{strict:!1}),o=t.filter(e=>i?"function"===e.type?We(e)===r:"event"===e.type&&Me(e)===r:"name"in e&&e.name===r);if(0===o.length)return;if(1===o.length)return o[0];let s;for(const a of o)if("inputs"in a)if(n&&0!==n.length){if(a.inputs&&0!==a.inputs.length&&a.inputs.length===n.length&&n.every((e,t)=>{const n="inputs"in a&&a.inputs[t];return!!n&&Xe(e,n)})){if(s&&"inputs"in s&&s.inputs){const e=Ke(a.inputs,s.inputs,n);if(e)throw new T({abiItem:a,type:e[0]},{abiItem:s,type:e[1]})}s=a}}else if(!a.inputs||0===a.inputs.length)return a;return s||o[0]}({abi:t,args:n,name:r});if(!e)throw new E(r,{docsPath:Ze});i=e}if("function"!==i.type)throw new E(void 0,{docsPath:Ze});return{abi:[i],functionName:We(h(i))}}(e),i=n[0];return He([r,("inputs"in i&&i.inputs?Ve(i.inputs,t??[]):void 0)??"0x"])}class $e extends y{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class et extends y{constructor({length:e,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`,{name:"PositionOutOfBoundsError"})}}class tt extends y{constructor({count:e,limit:t}){super(`Recursive read limit of \`${t}\` exceeded (recursive read count: \`${e}\`).`,{name:"RecursiveReadLimitExceededError"})}}const nt={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 tt({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new et({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new $e({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 $e({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,255&e),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this.o();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this.o();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this.o();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this.o();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this.o();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this.o();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},o(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function rt(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(nt);return n.bytes=e,n.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}const it={gwei:9,wei:18},ot={ether:-9,wei:9};function st(e,t){let n=e.toString();const r=n.startsWith("-");r&&(n=n.slice(1)),n=n.padStart(t,"0");let[i,o]=[n.slice(0,n.length-t),n.slice(n.length-t)];return o=o.replace(/(0+)$/,""),`${r?"-":""}${i||"0"}${o?`.${o}`:""}`}function at(e,t="wei"){return st(e,it[t])}function ct(e,t="wei"){return st(e,ot[t])}function ut(e){return e.reduce((e,{slot:t,value:n})=>`${e} ${t}: ${n}\n`,"")}function lt(e){const t=Object.entries(e).map(([e,t])=>void 0===t||!1===t?null:[e,t]).filter(Boolean),n=t.reduce((e,[t])=>Math.max(e,t.length),0);return t.map(([e,t])=>` ${`${e}:`.padEnd(n+1)} ${t}`).join("\n")}class dt extends y{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class ft extends y{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",lt(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class ht extends y{constructor({storageKey:e}){super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}class pt extends y{constructor(e,{account:t,docsPath:n,chain:r,data:i,gas:o,gasPrice:s,maxFeePerGas:a,maxPriorityFeePerGas:c,nonce:u,to:l,value:d,stateOverride:f}){const h=t?Qe(t):void 0;let p=lt({from:h?.address,to:l,value:void 0!==d&&`${at(d)} ${r?.nativeCurrency?.symbol||"ETH"}`,data:i,gas:o,gasPrice:void 0!==s&&`${ct(s)} gwei`,maxFeePerGas:void 0!==a&&`${ct(a)} gwei`,maxPriorityFeePerGas:void 0!==c&&`${ct(c)} gwei`,nonce:u});f&&(p+=`\n${function(e){return e.reduce((e,{address:t,...n})=>{let r=`${e} ${t}:\n`;return n.nonce&&(r+=` nonce: ${n.nonce}\n`),n.balance&&(r+=` balance: ${n.balance}\n`),n.code&&(r+=` code: ${n.code}\n`),n.state&&(r+=" state:\n",r+=ut(n.state)),n.stateDiff&&(r+=" stateDiff:\n",r+=ut(n.stateDiff)),r}," State Override:\n").slice(0,-1)}(f)}`),super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",p].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}function mt(e,t="hex"){const n=wt(e),r=rt(new Uint8Array(n.length));return n.encode(r),"hex"===t?J(r.bytes):r.bytes}function wt(e){return Array.isArray(e)?function(e){const t=e.reduce((e,t)=>e+t.length,0),n=bt(t);return{length:t<=55?1+t:1+n+t,encode(r){t<=55?r.pushByte(192+t):(r.pushByte(247+n),1===n?r.pushUint8(t):2===n?r.pushUint16(t):3===n?r.pushUint24(t):r.pushUint32(t));for(const{encode:t}of e)t(r)}}}(e.map(e=>wt(e))):function(e){const t="string"==typeof e?Q(e):e,n=bt(t.length);return{length:1===t.length&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(e){1===t.length&&t[0]<128?e.pushBytes(t):t.length<=55?(e.pushByte(128+t.length),e.pushBytes(t)):(e.pushByte(183+n),1===n?e.pushUint8(t.length):2===n?e.pushUint16(t.length):3===n?e.pushUint24(t.length):e.pushUint32(t.length),e.pushBytes(t))}}}(e)}function bt(e){if(e<256)return 1;if(e<65536)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new y("Length is too large.")}class gt extends y{constructor({cause:e,message:t}={}){const n=t?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${n?`with reason: ${n}`:"for an unknown reason"}.`,{cause:e,name:"ExecutionRevertedError"})}}Object.defineProperty(gt,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(gt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted|gas required exceeds allowance/});class yt extends y{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${ct(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e,name:"FeeCapTooHighError"})}}Object.defineProperty(yt,"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 vt extends y{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${ct(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e,name:"FeeCapTooLowError"})}}Object.defineProperty(vt,"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 At extends y{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e,name:"NonceTooHighError"})}}Object.defineProperty(At,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class kt extends y{constructor({cause:e,nonce:t}={}){super([`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join("\n"),{cause:e,name:"NonceTooLowError"})}}Object.defineProperty(kt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class xt extends y{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e,name:"NonceMaxValueError"})}}Object.defineProperty(xt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class Et extends y{constructor({cause:e}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join("\n"),{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(Et,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class Tt extends y{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(Tt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class Ct extends y{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(Ct,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class It extends y{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(It,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class St extends y{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${ct(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${ct(n)} gwei`:""}).`].join("\n"),{cause:e,name:"TipAboveFeeCapError"})}}Object.defineProperty(St,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class Nt extends y{constructor({cause:e}){super(`An error occurred while executing: ${e?.shortMessage}`,{cause:e,name:"UnknownNodeError"})}}function Bt(e,{format:t}){if(!t)return{};const n={};return function t(r){const i=Object.keys(r);for(const o of i)o in e&&(n[o]=e[o]),r[o]&&"object"==typeof r[o]&&!Array.isArray(r[o])&&t(r[o])}(t(e||{})),n}function Mt(e,t){return({exclude:n,format:r})=>({exclude:n,format:(e,i)=>{const o=t(e,i);if(n)for(const t of n)delete o[t];return{...o,...r(e,i)}},type:e})}const Ut={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function Rt(e,t){const n={};return void 0!==e.authorizationList&&(n.authorizationList=e.authorizationList.map(e=>({address:e.address,r:e.r?q(BigInt(e.r)):e.r,s:e.s?q(BigInt(e.s)):e.s,chainId:q(e.chainId),nonce:q(e.nonce),...void 0!==e.yParity?{yParity:q(e.yParity)}:{},...void 0!==e.v&&void 0===e.yParity?{v:q(e.v)}:{}}))),void 0!==e.accessList&&(n.accessList=e.accessList),void 0!==e.blobVersionedHashes&&(n.blobVersionedHashes=e.blobVersionedHashes),void 0!==e.blobs&&("string"!=typeof e.blobs[0]?n.blobs=e.blobs.map(e=>J(e)):n.blobs=e.blobs),void 0!==e.data&&(n.data=e.data),e.account&&(n.from=e.account.address),void 0!==e.from&&(n.from=e.from),void 0!==e.gas&&(n.gas=q(e.gas)),void 0!==e.gasPrice&&(n.gasPrice=q(e.gasPrice)),void 0!==e.maxFeePerBlobGas&&(n.maxFeePerBlobGas=q(e.maxFeePerBlobGas)),void 0!==e.maxFeePerGas&&(n.maxFeePerGas=q(e.maxFeePerGas)),void 0!==e.maxPriorityFeePerGas&&(n.maxPriorityFeePerGas=q(e.maxPriorityFeePerGas)),void 0!==e.nonce&&(n.nonce=q(e.nonce)),void 0!==e.to&&(n.to=e.to),void 0!==e.type&&(n.type=Ut[e.type]),void 0!==e.value&&(n.value=q(e.value)),n}const Ot=2n**256n-1n,Ft={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function Lt(e,t){const n={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?P(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?P(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?Ft[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=e.authorizationList.map(e=>({address:e.address,chainId:Number(e.chainId),nonce:Number(e.nonce),r:e.r,s:e.s,yParity:Number(e.yParity)}))),n.yParity=(()=>{if(e.yParity)return Number(e.yParity);if("bigint"==typeof n.v){if(0n===n.v||27n===n.v)return 0;if(1n===n.v||28n===n.v)return 1;if(n.v>=35n)return n.v%2n==0n?1:0}})(),"legacy"===n.type&&(delete n.accessList,delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.yParity),"eip2930"===n.type&&(delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),"eip1559"===n.type&&delete n.maxFeePerBlobGas,n}const Dt=Mt("transaction",Lt);function Pt(e,t){const n=(e.transactions??[]).map(e=>"string"==typeof e?e:Lt(e));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 Ht=Mt("block",Pt);function jt(e){const{kzg:t}=e,n=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),r="string"==typeof e.blobs[0]?e.blobs.map(e=>Q(e)):e.blobs,i=[];for(const o of r)i.push(Uint8Array.from(t.blobToKzgCommitment(o)));return"bytes"===n?i:i.map(e=>J(e))}function zt(e){const{kzg:t}=e,n=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),r="string"==typeof e.blobs[0]?e.blobs.map(e=>Q(e)):e.blobs,i="string"==typeof e.commitments[0]?e.commitments.map(e=>Q(e)):e.commitments,o=[];for(let s=0;s<r.length;s++){const e=r[s],n=i[s];o.push(Uint8Array.from(t.computeBlobKzgProof(e,n)))}return"bytes"===n?o:o.map(e=>J(e))}function Jt(e,t,n){return e&t^~e&n}function qt(e,t,n){return e&t^e&n^t&n}let Vt=class extends de{constructor(e,t,n,r){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=se(this.buffer)}update(e){re(this),ne(e=le(e));const{view:t,buffer:n,blockLen:r}=this,i=e.length;for(let o=0;o<i;){const s=Math.min(r-this.pos,i-o);if(s===r){const t=se(e);for(;r<=i-o;o+=r)this.process(t,o);continue}n.set(e.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){re(this),ie(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:r,isLE:i}=this;let{pos:o}=this;t[o++]=128,oe(this.buffer.subarray(o)),this.padOffset>r-o&&(this.process(n,0),o=0);for(let l=o;l<r;l++)t[l]=0;!function(e,t,n,r){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,n,r);const i=BigInt(32),o=BigInt(4294967295),s=Number(n>>i&o),a=Number(n&o),c=r?4:0,u=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+u,a,r)}(n,r-8,BigInt(8*this.length),i),this.process(n,0);const s=se(e),a=this.outputLen;if(a%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=a/4,u=this.get();if(c>u.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;l<c;l++)s.setUint32(4*l,u[l],i)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}i(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:r,finished:i,destroyed:o,pos:s}=this;return e.destroyed=o,e.finished=i,e.length=r,e.pos=s,r%t&&e.buffer.set(n),e}clone(){return this.i()}};const Yt=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Gt=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]),Wt=new Uint32Array(64);let Xt=class extends Vt{constructor(e=32){super(64,e,8,!1),this.A=0|Yt[0],this.B=0|Yt[1],this.C=0|Yt[2],this.D=0|Yt[3],this.E=0|Yt[4],this.F=0|Yt[5],this.G=0|Yt[6],this.H=0|Yt[7]}get(){const{A:e,B:t,C:n,D:r,E:i,F:o,G:s,H:a}=this;return[e,t,n,r,i,o,s,a]}set(e,t,n,r,i,o,s,a){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(e,t){for(let l=0;l<16;l++,t+=4)Wt[l]=e.getUint32(t,!1);for(let l=16;l<64;l++){const e=Wt[l-15],t=Wt[l-2],n=ae(e,7)^ae(e,18)^e>>>3,r=ae(t,17)^ae(t,19)^t>>>10;Wt[l]=r+Wt[l-7]+n+Wt[l-16]|0}let{A:n,B:r,C:i,D:o,E:s,F:a,G:c,H:u}=this;for(let l=0;l<64;l++){const e=u+(ae(s,6)^ae(s,11)^ae(s,25))+Jt(s,a,c)+Gt[l]+Wt[l]|0,t=(ae(n,2)^ae(n,13)^ae(n,22))+qt(n,r,i)|0;u=c,c=a,a=s,s=o+e|0,o=i,i=r,r=n,n=e+t|0}n=n+this.A|0,r=r+this.B|0,i=i+this.C|0,o=o+this.D|0,s=s+this.E|0,a=a+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(n,r,i,o,s,a,c,u)}roundClean(){oe(Wt)}destroy(){this.set(0,0,0,0,0,0,0,0),oe(this.buffer)}};const Kt=fe(()=>new Xt);function Qt(e){const{commitment:t,version:n=1}=e,r=e.to??("string"==typeof t?"hex":"bytes"),i=Kt(m(o=t,{strict:!1})?W(o):o);var o;return i.set([n],0),"bytes"===r?i:J(i)}const Zt=761855;class _t extends y{constructor({maxSize:e,size:t}){super("Blob size is too large.",{metaMessages:[`Max: ${e} bytes`,`Given: ${t} bytes`],name:"BlobSizeTooLargeError"})}}class $t extends y{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class en extends y{constructor({hash:e,size:t}){super(`Versioned hash "${e}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${t}`],name:"InvalidVersionedHashSizeError"})}}class tn extends y{constructor({hash:e,version:t}){super(`Versioned hash "${e}" version is invalid.`,{metaMessages:["Expected: 1",`Received: ${t}`],name:"InvalidVersionedHashVersionError"})}}class nn extends y{constructor({chainId:e}){super("number"==typeof e?`Chain ID "${e}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}class rn extends y{constructor({docsPath:e}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join("\n"),{docsPath:e,docsSlug:"account",name:"AccountNotFoundError"})}}const on={"0x0":"reverted","0x1":"success"};function sn(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(e=>function(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):null===e.blockTimestamp?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}:{}}}(e)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?P(e.transactionIndex):null,status:e.status?on[e.status]:null,type:e.type?Ft[e.type]||e.type:null};return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}const an=Mt("transactionReceipt",sn);function cn(e){const{chainId:t,maxPriorityFeePerGas:n,maxFeePerGas:r,to:i}=e;if(t<=0)throw new nn({chainId:t});if(i&&!De(i))throw new Ue({address:i});if(r&&r>Ot)throw new yt({maxFeePerGas:r});if(n&&r&&n>r)throw new St({maxFeePerGas:r,maxPriorityFeePerGas:n})}function un(e){if(!e||0===e.length)return[];const t=[];for(let n=0;n<e.length;n++){const{address:r,storageKeys:i}=e[n];for(let e=0;e<i.length;e++)if(i[e].length-2!=64)throw new ht({storageKey:i[e]});if(!De(r,{strict:!1}))throw new Ue({address:r});t.push([r,i])}return t}function ln(e,t){const n=function(e){if(e.type)return e.type;if(void 0!==e.authorizationList)return"eip7702";if(void 0!==e.blobs||void 0!==e.blobVersionedHashes||void 0!==e.maxFeePerBlobGas||void 0!==e.sidecars)return"eip4844";if(void 0!==e.maxFeePerGas||void 0!==e.maxPriorityFeePerGas)return"eip1559";if(void 0!==e.gasPrice)return void 0!==e.accessList?"eip2930":"legacy";throw new ft({transaction:e})}(e);return"eip1559"===n?function(e,t){const{chainId:n,gas:r,nonce:i,to:o,value:s,maxFeePerGas:a,maxPriorityFeePerGas:c,accessList:u,data:l}=e;cn(e);const d=un(u);return He(["0x02",mt([q(n),i?q(i):"0x",c?q(c):"0x",a?q(a):"0x",r?q(r):"0x",o??"0x",s?q(s):"0x",l??"0x",d,...dn(e,t)])])}(e,t):"eip2930"===n?function(e,t){const{chainId:n,gas:r,data:i,nonce:o,to:s,value:a,accessList:c,gasPrice:u}=e;!function(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:i,to:o}=e;if(t<=0)throw new nn({chainId:t});if(o&&!De(o))throw new Ue({address:o});if(n||i)throw new y("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(r&&r>Ot)throw new yt({maxFeePerGas:r})}(e);const l=un(c);return He(["0x01",mt([q(n),o?q(o):"0x",u?q(u):"0x",r?q(r):"0x",s??"0x",a?q(a):"0x",i??"0x",l,...dn(e,t)])])}(e,t):"eip4844"===n?function(e,t){const{chainId:n,gas:r,nonce:i,to:o,value:s,maxFeePerBlobGas:a,maxFeePerGas:c,maxPriorityFeePerGas:u,accessList:l,data:d}=e;!function(e){const{blobVersionedHashes:t}=e;if(t){if(0===t.length)throw new $t;for(const e of t){const t=w(e),n=P(je(e,0,1));if(32!==t)throw new en({hash:e,size:t});if(1!==n)throw new tn({hash:e,version:n})}}cn(e)}(e);let f=e.blobVersionedHashes,h=e.sidecars;if(e.blobs&&(void 0===f||void 0===h)){const t="string"==typeof e.blobs[0]?e.blobs:e.blobs.map(e=>J(e)),n=e.kzg,r=jt({blobs:t,kzg:n});void 0===f&&(f=function(e){const{commitments:t,version:n}=e,r=e.to??("string"==typeof t[0]?"hex":"bytes"),i=[];for(const o of t)i.push(Qt({commitment:o,to:r,version:n}));return i}({commitments:r})),void 0===h&&(h=function(e){const{data:t,kzg:n,to:r}=e,i=e.blobs??function(e){const t=e.to??("string"==typeof e.data?"hex":"bytes"),n="string"==typeof e.data?Q(e.data):e.data,r=w(n);if(!r)throw new $t;if(r>Zt)throw new _t({maxSize:Zt,size:r});const i=[];let o=!0,s=0;for(;o;){const e=rt(new Uint8Array(131072));let t=0;for(;t<4096;){const r=n.slice(s,s+31);if(e.pushByte(0),e.pushBytes(r),r.length<31){e.pushByte(128),o=!1;break}t++,s+=31}i.push(e)}return"bytes"===t?i.map(e=>e.bytes):i.map(e=>J(e.bytes))}({data:t,to:r}),o=e.commitments??jt({blobs:i,kzg:n,to:r}),s=e.proofs??zt({blobs:i,commitments:o,kzg:n,to:r}),a=[];for(let c=0;c<i.length;c++)a.push({blob:i[c],commitment:o[c],proof:s[c]});return a}({blobs:t,commitments:r,proofs:zt({blobs:t,commitments:r,kzg:n})}))}const p=un(l),m=[q(n),i?q(i):"0x",u?q(u):"0x",c?q(c):"0x",r?q(r):"0x",o??"0x",s?q(s):"0x",d??"0x",p,a?q(a):"0x",f??[],...dn(e,t)],b=[],g=[],y=[];if(h)for(let w=0;w<h.length;w++){const{blob:e,commitment:t,proof:n}=h[w];b.push(e),g.push(t),y.push(n)}return He(["0x03",mt(h?[m,b,g,y]:m)])}(e,t):"eip7702"===n?function(e,t){const{authorizationList:n,chainId:r,gas:i,nonce:o,to:s,value:a,maxFeePerGas:c,maxPriorityFeePerGas:u,accessList:l,data:d}=e;!function(e){const{authorizationList:t}=e;if(t)for(const n of t){const{chainId:e}=n,t=n.address;if(!De(t))throw new Ue({address:t});if(e<0)throw new nn({chainId:e})}cn(e)}(e);const f=un(l),h=function(e){if(!e||0===e.length)return[];const t=[];for(const n of e){const{chainId:e,nonce:r,...i}=n,o=n.address;t.push([e?j(e):"0x",o,r?j(r):"0x",...dn({},i)])}return t}(n);return He(["0x04",mt([q(r),o?q(o):"0x",u?q(u):"0x",c?q(c):"0x",i?q(i):"0x",s??"0x",a?q(a):"0x",d??"0x",f,h,...dn(e,t)])])}(e,t):function(e,t){const{chainId:n=0,gas:r,data:i,nonce:o,to:s,value:a,gasPrice:c}=e;!function(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:i,to:o}=e;if(o&&!De(o))throw new Ue({address:o});if(void 0!==t&&t<=0)throw new nn({chainId:t});if(n||i)throw new y("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(r&&r>Ot)throw new yt({maxFeePerGas:r})}(e);let u=[o?q(o):"0x",c?q(c):"0x",r?q(r):"0x",s??"0x",a?q(a):"0x",i??"0x"];if(t){const e=(()=>{if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(35n===t.v?0n:1n);if(n>0)return BigInt(2*n)+BigInt(35n+t.v-27n);const e=27n+(27n===t.v?0n:1n);if(t.v!==e)throw new dt({v:t.v});return e})(),r=F(t.r),i=F(t.s);u=[...u,q(e),"0x00"===r?"0x":r,"0x00"===i?"0x":i]}else n>0&&(u=[...u,q(n),"0x","0x"]);return mt(u)}(e,t)}function dn(e,t){const n=t??e,{v:r,yParity:i}=n;if(void 0===n.r)return[];if(void 0===n.s)return[];if(void 0===r&&void 0===i)return[];const o=F(n.r),s=F(n.s);return["number"==typeof i?i?q(1):"0x":0n===r?"0x":1n===r?q(1):27n===r?"0x":q(1),"0x00"===o?"0x":o,"0x00"===s?"0x":s]}function fn(e){const t={formatters:void 0,fees:void 0,serializers:void 0,...e};return Object.assign(t,{extend:function e(t){return n=>{const r="function"==typeof n?n(t):n,i={...t,...r};return Object.assign(i,{extend:e(i)})}}(t)})}class hn extends y{constructor({value:e}){super(`Number \`${e}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}function pn(e,t){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(e))throw new hn({value:e});let[n,r="0"]=e.split(".");const i=n.startsWith("-");if(i&&(n=n.slice(1)),r=r.replace(/(0+)$/,""),0===t)1===Math.round(Number(`.${r}`))&&(n=`${BigInt(n)+1n}`),r="";else if(r.length>t){const[e,i,o]=[r.slice(0,t-1),r.slice(t-1,t),r.slice(t)],s=Math.round(Number(`${i}.${o}`));r=s>9?`${BigInt(e)+BigInt(1)}0`.padStart(e.length+1,"0"):`${e}${s}`,r.length>t&&(r=r.slice(1),n=`${BigInt(n)+1n}`),r=r.slice(0,t)}else r=r.padEnd(t,"0");return BigInt(`${i?"-":""}${n}${r}`)}const mn="0x0000000000000000000000000000000000000000",wn={blockTime:2e3,contracts:{gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}},formatters:{block:Ht({format(e){const t=e.transactions?.map(e=>{if("string"==typeof e)return e;const t=Lt(e);return"0x7e"===t.typeHex&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?D(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t});return{transactions:t,stateRoot:e.stateRoot}}}),transaction:Dt({format(e){const t={};return"0x7e"===e.type&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?D(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:an({format:e=>({l1GasPrice:e.l1GasPrice?D(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?D(e.l1GasUsed):null,l1Fee:e.l1Fee?D(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null})})},serializers:{transaction:function(e,t){return function(e){return"deposit"===e.type||void 0!==e.sourceHash}(e)?function(e){!function(e){const{from:t,to:n}=e;if(t&&!De(t))throw new Ue({address:t});if(n&&!De(n))throw new Ue({address:n})}(e);const{sourceHash:t,data:n,from:r,gas:i,isSystemTx:o,mint:s,to:a,value:c}=e;return He(["0x7e",mt([t,r,a??"0x",s?j(s):"0x",c?j(c):"0x",i?j(i):"0x",o?"0x1":"0x",n??"0x"])])}(e):ln(e,t)}}},bn=fn({id:42161,name:"Arbitrum One",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:250,rpcUrls:{default:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://arbiscan.io",apiUrl:"https://api.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7654707}}}),gn=fn({id:43114,name:"Avalanche",blockTime:1700,nativeCurrency:{decimals:18,name:"Avalanche",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax.network/ext/bc/C/rpc"]}},blockExplorers:{default:{name:"SnowTrace",url:"https://snowtrace.io",apiUrl:"https://api.snowtrace.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11907934}}}),yn=1,vn=fn({...wn,id:8453,name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://basescan.org",apiUrl:"https://api.basescan.org/api"}},contracts:{...wn.contracts,disputeGameFactory:{[yn]:{address:"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"}},l2OutputOracle:{[yn]:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{[yn]:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{[yn]:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:1}),An=fn({id:56,name:"BNB Smart Chain",blockTime:750,nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://56.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"BscScan",url:"https://bscscan.com",apiUrl:"https://api.bscscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15921452}}});async function kn(e,t){const{account:n=e.account}=t;if(!n)throw new rn;const r=Qe(n);try{const{accessList:n,blockNumber:i,blockTag:o,data:s,gas:a,gasPrice:c,maxFeePerGas:u,maxPriorityFeePerGas:l,nonce:d,to:f,value:h,...p}=t,m=("bigint"==typeof i?q(i):void 0)||o;!function(e){const{account:t,maxFeePerGas:n,maxPriorityFeePerGas:r,to:i}=e,o=t?Qe(t):void 0;if(o&&!De(o.address))throw new Ue({address:o.address});if(i&&!De(i))throw new Ue({address:i});if(n&&n>Ot)throw new yt({maxFeePerGas:n});if(r&&n&&r>n)throw new St({maxFeePerGas:n,maxPriorityFeePerGas:r})}(t);const w=e.chain?.formatters?.transactionRequest?.format,b=(w||Rt)({...Bt(p,{format:w}),account:r,accessList:n,data:s,gas:a,gasPrice:c,maxFeePerGas:u,maxPriorityFeePerGas:l,nonce:d,to:f,value:h},"estimateGas"),{baseFeePerGas:g,gasLimit:y,priorityFeePerGas:v}=await e.request({method:"linea_estimateGas",params:m?[b,m]:[b]});return{baseFeePerGas:BigInt(g),gasLimit:BigInt(y),priorityFeePerGas:BigInt(v)}}catch(i){throw function(e,{docsPath:t,...n}){const r=(()=>{const t=function(e,t){const n=(e.details||"").toLowerCase(),r=e instanceof y?e.walk(e=>e?.code===gt.code):e;return r instanceof y?new gt({cause:e,message:r.details}):gt.nodeMessage.test(n)?new gt({cause:e,message:e.details}):yt.nodeMessage.test(n)?new yt({cause:e,maxFeePerGas:t?.maxFeePerGas}):vt.nodeMessage.test(n)?new vt({cause:e,maxFeePerGas:t?.maxFeePerGas}):At.nodeMessage.test(n)?new At({cause:e,nonce:t?.nonce}):kt.nodeMessage.test(n)?new kt({cause:e,nonce:t?.nonce}):xt.nodeMessage.test(n)?new xt({cause:e,nonce:t?.nonce}):Et.nodeMessage.test(n)?new Et({cause:e}):Tt.nodeMessage.test(n)?new Tt({cause:e,gas:t?.gas}):Ct.nodeMessage.test(n)?new Ct({cause:e,gas:t?.gas}):It.nodeMessage.test(n)?new It({cause:e}):St.nodeMessage.test(n)?new St({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new Nt({cause:e})}(e,n);return t instanceof Nt?e:t})();return new pt(r,{docsPath:t,...n})}(i,{...t,account:r,chain:e.chain})}}async function xn({client:e,multiply:t,request:n,type:r}){try{const i=await kn(e,{...n,account:n?.account}),{priorityFeePerGas:o}=i,s=t(BigInt(i.baseFeePerGas))+o;return"legacy"===r?{gasPrice:s}:{maxFeePerGas:s,maxPriorityFeePerGas:o}}catch{return null}}const En=fn({fees:{estimateFeesPerGas:xn,async maxPriorityFeePerGas({block:e,client:t,request:n}){const r=await xn({block:e,client:t,multiply:e=>e,request:n,type:"eip1559"});return r?.maxPriorityFeePerGas?r.maxPriorityFeePerGas:null}},id:59144,name:"Linea Mainnet",blockTime:2e3,nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://lineascan.build",apiUrl:"https://api.lineascan.build/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:42},ensRegistry:{address:"0x50130b669B28C339991d8676FA73CF122a121267",blockCreated:6682888},ensUniversalResolver:{address:"0x4D41762915F83c76EcaF6776d9b08076aA32b492",blockCreated:22222151}},ensTlds:[".linea.eth"],testnet:!1}),Tn=1,Cn=1,In={1:{...fn({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:12e3,rpcUrls:{default:{http:["https://eth.merkle.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:23085558},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGgAAABoCAYAAAAdHLWhAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAAJalJREFUeAHVfQl4HNWZ4F/V96Vu3ZItS7IlMLLNEWTAGAwGAjmGhJ1JyHwQIGQ3B2ENhOwm2Xgg6xwfJGQIuwMTNiwTjswZhhyETABD4jiEK8YH2JIPWdjWZVmybqmvqnrz/+9Vtaqrq7pbp81vl6r61Tv///3H+99REry/QTLdmSXc+M3gfQwSnP5AdZTufrwrFpHClwOTGyUJGpmmNYDGGpnEYvg+yhjemaankEGSpBHG1FFZ8hyRXS7QNPUdSfZ0qqmJd4bV4T1/v6llSM//tCbg6UggXqf/9aPjy72uwHVMhvOYplyuqUqDpqVBVdOIUgaaquavPYOs90gwkF0ekGU3vyTJddTl8e5mavo5Na3tvm9T5S5TytMGThcCcS6559HBjZLbcx1TlOtUTWlQlAQgApFR7HEmyy5MiP9kmSiA/2UdvZpIQ89MJe5xxLrb7cXLD5LbfdTl8mzT0qmnv/ulim08k9MATjWBpP/+SHtZhXfJnYqmXqcqyXOVVJwj1AxECBkRiQjkxOCcILkccgRbHtCQUAzzRU7kXKjxS8lOiuW4PT7weINHNU37tsbS2753e817cAq56lQQiJe5+ZGBD2DXvVXStJuTqYmYqqSmIyA3UK8mohDCOGcsADDUWVSumk4i0VLTHQPJgeIPPJ4A3n1PK0r8W6eKUItJIF7W3T/saAqFyh9PpxKXp5FbmIEUJIqOECSODwgX2WaZxEMMBsm9S1lpzA0zxwNLXHO4IFYCFLzQ6ODhxL1ef5g6ytPJxOi3H7hjWSd2oEUj1GIRiIuyqLvqf6uKckcqPs4RQEAI8PiC4PYGdMSBo5i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rnhs+GvtDQMNFwzKJiHsr4+LhQRvpQALIJcsqJ8n4DiT6lrH/zmrjLMDAC1dXV5DcKo3iM4EieTqktsdzphIygflEa4ka3npcYeJ3mcNpXMA9IDmFOHPC+5Iz/BElwM6GmmQapAAAAAElFTkSuQmCC",chainId:1,chainType:"ether",chainTypeMoralis:"eth",customName:"Ethereum",tokenTrendingDefault:["0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","0x2260fac5e5542a773aa44fbcfedf7c193bc2c599"],isSupported:!0},10:{...fn({...wn,id:10,name:"OP Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.optimism.io"]}},blockExplorers:{default:{name:"Optimism Explorer",url:"https://optimistic.etherscan.io",apiUrl:"https://api-optimistic.etherscan.io/api"}},contracts:{...wn.contracts,disputeGameFactory:{[Tn]:{address:"0xe5965Ab5962eDc7477C8520243A95517CD252fA9"}},l2OutputOracle:{[Tn]:{address:"0xdfe97868233d1aa22e815a266982f2cf17685a27"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263},portal:{[Tn]:{address:"0xbEb5Fc579115071764c7423A4f12eDde41f106Ed"}},l1StandardBridge:{[Tn]:{address:"0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1"}}},sourceId:1}),logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAACW5JREFUeAHtnT1sHEUUx9+eD0QF14PwpoQCGwkJqtiRgAYJg5KGgo8EiVT5IIgyiYNLiIiTCqR8GAqaRMSR0gRQLqEhAil3KZKCImsJKhonFSI+L+8/u+es77w7b3dn9tb2/KSzz3t7vr357/uYN7OzHtWckPwWjdE0PxmnBu3gTeP88PnvFv9ukad+J9+wzD+XeXsQb+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/SXI8BG5LkHcKUJcPXIz6A+h5w41IXAksAhlb0QkDS39H/yetI4qBpGqu98iHRwuPnyYImz4uSbAzEx7+faPZG3XNeqoicW0IGBwxhNuyI4gqMNY0oI6W2eQf60cMVwiTpsqX4x1yeqoPuMY6QeLrpa3disExQEgXBtc7GR5TX6EL5KiGHp0Y3DQkCCuGfLhNDrtsYB3ALc80KvIszxTvaLE4tc1JsQ6QtcRfK7YStwCmSTS3tUidKKcyrtXhoOMozWzWUrH6dXub/nVyK5Oaou2tBLuydtBPJV2hveQ6i+UJ1dpYe3W7aQVR5uVcV3kasptSiiZbe6sBSiou6yrOPI93iK7lEy/IFGddiCf21kXZigxUc3WIL0dQWdcKvWtkZHG7EKe4ed5S7JZH0VJOrn+SBYJ4z/Itj4D6AE+p7jKvNCIxCt3TsPht86Ib1SOmOEtJ8liM6m6bt/bZTpT1lBQDuFuvmsLQrVdLX/SpDgCZxPbOvjqmbk5s5CpcHEica2/HzuN8fFu8gAxgfKXesOEfZpmxQvbWjiuIFyiHCHvgUqwsnRz3VbC8wTRtTdooFJqyiiRW17KObyp2fMsEfEtWkcT64uJxFjbLn/QhbW4QK2alt1AtSmWrvW9iYay5p42oTJA+m0KYUN0PfYEfF4reqL4olQvSJxZmmuoVY9D4i5hSa9s1pTEyQZKo+2dE92OaqlycaCULTDK/zOPdbRoxtRAkiaqPrfIgmEcz3FiTxgWCAA2OCz22hidpEXckoBpRO0EGiUcqIdIEFhqm/rK20eKdraE1I6PVjZbjRXUCfizxe++rJUR61B6VK5LyPxFwTRTwwp+SAAAAAElFTkSuQmCC",chainId:10,chainType:"optimism",chainTypeMoralis:"optimism",customName:"Optimism",tokenTrendingDefault:["0x4200000000000000000000000000000000000006","0x68f180fcce6836688e9084f035309e29bf0a2095","0xc47da4cb96ce65a96844a01bfae509f9d5454534"],isSupported:!0},56:{...An,logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAABYlAAAWJ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JMFzhZ69+DVVvd2LIEE5JnD/cuybbLIOd8y8EvvIpoWANOb8w92e1AYCohJA/WxxhAQoAvi3JEYlvQYD0R6HAg3TiFteOecoMqlROyH9wcPj4GCUSwCIwtwHDR+uHinS1cODL/eD5YTGdnuKjOFjB+Gyi9JeTeTu9BJ1RTpMqXLiNpVjp6y9MAAAAASUVORK5CYII=",chainId:56,chainType:"bsc",chainTypeMoralis:"bsc",customName:"BNB Chain",tokenTrendingDefault:["0x2170ed0880ac9a755fd29b2688956bd959f933f8","0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c"],isSupported:!0},137:{...fn({id:137,name:"Polygon",blockTime:2e3,nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{default:{http:["https://polygon.drpc.org"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://polygonscan.com",apiUrl:"https://api.etherscan.io/v2/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}}}),rpcUrls:{default:{http:["https://polygon-bor-rpc.publicnode.com"]}},logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAAC61JREFUeAHtnU9sFNcdx39vdmNMbbATQHZSEOtQieYSO5dYzQHbBzDqAcyhOSUBDimRooSkVLkFL84tbRRHUaqklVpIeuLCn14wqMKOVCoiVVmnJypRrwVN7DYpCzHJ2njn5X3f7phde3bnzcyb2Z1hP9LKa7PGu/N97/f3zXuMGpz03q9SZN7rS7DkdpMKPYwS2znxFCPqJC4eTDzK4ZQTP8txYtniDwrTBiVmCqwwTfnlTHqyJ0cNDKMGAwIkON/PiQaJ88E1F9w/WfGxM4yzswWDptIXHs1SA9EQgqT33hhknEYYGfvFtykKlywn8xw32cn0pa0ZqjN1EyQ9ONNptLQeJ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Bg/52DyLpiir8CkG8H/0akDHWkSQ+h+9CqRPKUYSWXpAweHEOsQAWu7UkaIsLj2FBIgeMPCZ+eKSFjGA9taaLLNwNhp7vyLvzeQnjk9s1XokVCC9Tnm+ummeYTHay7EcVG05SxzWNSvKCXTnsrG9Nw/J2RIXhx/QrCgn8K3kirOlkGaMHaQIU/QVy+lqh3npIrS9/aIqTJDmyY7QN1uMhDBoJjHzFGfJ8bCEsKjb7pcyoaTCYCP5GDEbMsJHnOP55fGgTVM16iZIOVgtieMySic0pChcsrg/A7djlO4AqCsNIUg5qI8lDGOAFxdWBHFqQ1Y8JhmxTIGxc2GbJCcaTpDVyK3QW5N9CZ7oNanQQ6VN68UFTZX2i6xMQIub6eREdzMn8iCM/lmDEjMFvjxLS4XJepkiVX4AbuLqSV+48XkAAAAASUVORK5CYII=",chainId:137,chainType:"matic",chainTypeMoralis:"polygon",tokenTrendingDefault:["0x7ceb23fd6bc0add59e62ac25578270cff1b9f619","0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6"],isSupported:!0},8453:{...vn,logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAACFhJREFUeAHtnT1sHEUUx/+7pCJIuAltzjVIdppQ+lwT5A8kKG3TIYESSwhKn0sQUhwpiDJ2SSRiI5Ha55YmjpTUXrehuQY6e5j/zq19n769eTP7dfuTLne52Lm9/e97b2b2zXsBis6qmtN/NvEe7uIS8wj0s0JDP/P95NFLJ34oRN2/v0aIM1zoZ+AUR0EHBSZA0VhVDX3yV/QJXQSFgD75bolAYQIcxSIdBacoEMUQZFU19ZGs6scK3AswiUg/2tr6DrQ4beRMfoLQFYV4qC2BQiyiGET6WFrack60OBFyIHtBVtWi/tRN/djAsP8vEvvaanazFiY7QRgbAjzTjybKRabC+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AeCCCvK7Sw+QQR82J3ezC5YFwrO1oyb5U8DsrN2IQucsaxLT04e3/qscVsxqeovPaNLgXhJiWF89crhIXCq7acqHQkVX04keQBDYVM9bSQDXwYhW9+BWEGGtpuWgSkysmVrTStlC1xb8gCWUVxqN7GkV2giSUQxiTMKjiZARRvvO0ZC9IgplQNlGkGMP5BPObmVLr2TWNIz9BemH/DLbLMB0aGsiWKN4bw+0YPVnoeVEMQXox62O8CcZ69KKuDWOIwA0y3Fd5oYXIKDakpXiCDGJKoS/iPSzEDbSSsrameOcchiegHZgY0ImLIrB0CBudXcQlRNp5uaK0/A/QqtacrEVArQAAAABJRU5ErkJggg==",chainId:8453,chainType:"base",chainTypeMoralis:"base",tokenTrendingDefault:["0x4200000000000000000000000000000000000006","0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf","0xc47da4cb96ce65a96844a01bfae509f9d5454534"],isSupported:!0},42161:{...bn,logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAAEuFJREFUeAHlXQ1sFOeZfmd2ba+NbWwwBv8QbAjY/BuKayeQsE5Acmp0NiRcepe0IVV71zvpjnA65VRdq8JdTydFOsXRnYh6rZqgUpoqTbDbEJwG4qUtDcZOMBiojQleEv5iSGPw7/7MfP3ez5717O7MzuzszOw6fSKz49lvN+N55n2f932/+d7hIMVR5m7KyxnzuQlxLBJ5sZwHWATAlXFA8gjh8oCDvLAPEBjiODJEgPPiryKQs7zIDwAJnh3JdnV7PS1DkMLgIMVQWVtf5hScjYQnVTwQNz2xZWAiCICXktlNyWwhxH/2Yue73ZBCSAlCVtXWu0XCNzkAGs0mQAtIEH3xcIJw4HxXmweSjKQRgq4oe8y/mx5CEz2KKkgBMHII7BX4tBO9p1q8kATYTsiK6q9UAQ+7eMI9E+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pL3MQvh2X74JN0KMvemCLTkRAK8RVgoFHHlkv8krQcmNqYE/WoVMDZucTmtAp4pGYUQ8FQ+glxn6dkIGSIRKbHgomIdmPzcNuoNjYXyiYds9IAn/3JovYMLFLyjMNEyADMeMfLInAMBl/kvTcQtmBJEYGwoRHr9ov9KkIIwKuhIQXfeIB4IEQi+4PngmgKWq3GWQgzGu0CPYmj6kD8tJI5ther87H4mnB1AfcD16/1EbLLHdphbjWyI0SMwpUL7AcQpO+vUNer2nRg6kWImFqxhGfXeWGLyY8dMbvWTNcVCQsIUTCitqv7KJFye9/YQR/0ir2Xeg40gwWwVSXFYnb1/q75y5c0soRPp+zqQZmHahWZI1t7z/5rgcshKUWIgcLj0XHXkrMMzCzYJl7UoJthEiYEcRggseRAyDCq4kkeUZgOyESkBgeeHeKaQytt3CtI66RZrPC2HiRNELkWFW7zU1Esgs4stlucnChEp3GauU5voWtAEgyUoIQObA+RkONKl7kGwknVplNEBIgAueh39sd5Jyt8Tx83g6kHCGRKHO787InsquoX18rgljOT7W1xeadrF9kZGGT+n/scDTZVIfzipx4lbrGAeoarw5njXiS5Yr04s84I4HsxczfIwAAAABJRU5ErkJggg==",chainId:42161,chainType:"arbitrum",chainTypeMoralis:"arbitrum",customName:"Arbitrum",tokenTrendingDefault:["0x82af49447d8a07e3bd95bd0d56f35241523fbab1","0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f"],isSupported:!0},43114:{...gn,logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGUAAABkCAYAAACfIP5qAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAACQJJREFUeAHtnc9zk0UYx7+7Kdo2VePFghfC4J14xhlecEY8oni2cNUDqDNypOgfABzkautZpN7kYPty8B7uOoYZHQoX6ghtEfI+7vMmb0iTvHl/7e67KfnM0JTkTfI23zz7fHf32X0FJoD7nlc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VT0Ddc//+AO76gPVVd6j+/wi+Dz5i8nRnAUSuHJofX158P5YUboXpdnAFENQa4fo3VHT8bHVLHlyy5T0cC6Jq48YW2KUNbdMScvoXBIxVhSOFjV6fB1TtKK+7CfHPZ5YjPcUbNnMFVa8bASg60kXJEgUJRyoJDqPKRqg1tMR/ZJBUpWtTpsxPXCzlab4MXUt8dv+xkX1skaqXl4Gwj5JyuuoZCrwVkp/NM0v2QnzyIhOYhyZRGGlpRKm6AzlywU10+SRfjIvhXjL95sqv3yBKSmgFrcuWYvoc18oTQ3DnHPlahFuEgqS60JpuRcNqTdbIcK0xz+S/IIwhS++OY2YQYoJwhReXscRIyiYJv8QahYVhNGy5lENrq2p5P/uy2yXCbS6o0EQZnrpcw3ETVblRasoEfe9U8uuXOrDLGH+OD9Y+FAUI6Iw3ajZKGvbKtNwL/3pmImqIhgTJWL/RY2Z6OjH+OYGh/z1ZaLgiPpDMhf5uQS7S+6X8by6SUE672WRvzyvMSPE1UkyAixGQOL6LoJrNvYc6LxnCXQvnKM6neVfFiSOMsR48d4lEl5HEoJzzglnDAGRLyHXnqC9aluMiFJF6edF9JQgkBKCIO4oT7Wio/NXFGdE6adzNerKCeJtxgV5vDEZ9NJSXXAlBO6o5mmtrIiIw0lRBmGR1AdYF6gcfo7gSLiPMqEGIWqq7a8NihY6JYgtFQHqwxZN1af4p7OBQ9Di5emuiTDI/4Da9NgV2sBcAAAAAElFTkSuQmCC",chainId:43114,chainType:"avax",chainTypeMoralis:"avalanche",tokenTrendingDefault:["0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB","0x0555E30da8f98308EdB960aa94C0Db47230d2B9c"],isSupported:!0},59144:{...En,logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGEAAABkCAYAAACWy14QAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAABydJREFUeAHt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s7+APS6IRrSIQOmz0JTiRjONNqcivx3EgHN9DgE8SAqHmXWt2p61sP53vmoRIJMnvIMYYhJhuFjGU6VnAEMT7RjtC6STSDIRJFyPqwreJJQ0kM6arXUsSsWmGsvmzdhb3qIk1F6favSSH2jca9cwOFjx+53bUtb4eiUmIqnJ2s4UMo4BeVSf01kQRh1Xw5XJ5Le6CryaxWWmrEqm/gjDPmURXbjYUzTo9pz7vKOK+A9RyblfG8a1Ckgq9lv8B/ms5OCQW+c4AAAAASUVORK5CYII=",chainId:59144,chainType:"linea",chainTypeMoralis:"linea",customName:"Linea",tokenTrendingDefault:["0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f","0x3aab2285ddcddad8edf438c1bab47e1a9d05a9b4"],isSupported:!0},130:{...fn({...wn,id:130,name:"Unichain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:1e3,rpcUrls:{default:{http:["https://mainnet.unichain.org/"]}},blockExplorers:{default:{name:"Uniscan",url:"https://uniscan.xyz",apiUrl:"https://api.uniscan.xyz/api"}},contracts:{...wn.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},disputeGameFactory:{[Cn]:{address:"0x2F12d621a16e2d3285929C9996f478508951dFe4"}},portal:{[Cn]:{address:"0x0bd48f6B86a26D3a217d0Fa6FfE2B491B956A7a2"}},l1StandardBridge:{[Cn]:{address:"0x81014F44b0a345033bB2b3B21C7a1A308B35fEeA"}}},sourceId:1}),logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABkCAYAAAB5CTUuAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAAN7ZJREFUeAHNfQe8ZVV577fW3vu0e+/0gkMdZACpCoggPiwYDIoJ8YklFoyJkmjy8uRn1GeIEFNMNNEkahJLxIhR84gxGiERCCIi8PBHCyLSuzMw/bbT9l7r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rRHZ0KZiCpQNoD669u7zrS18vL/36e2c+u+mR5vJUE+lnur0KDl36+uKkk0/uHn3iUrfP8RBm9qr4F1LlabPjgHa621G0NOYnmPBTzqF+Rpb0qyL1upmYFtKAKEUUM1mRlv9wdSsyA4hR5XCIpoWeF1FoN3OOl568657yx5d9t7zu/KrjLv2N6U9sgZ/h9jNngG1nw9l+urjx8KP8umNPaZ9wDCL7F7Rje280CG3X6zDsHM9s1VKgh+bvBXCen4jdzSQs7dfPIbVjIv8MBiKqrIB8cqnIb5/x5XDox7ciurzunNF/XL4hrv/+5cONd1wKl5bwDGzPGAOaG/1s7mGwZPffzk9du4dbfsiWYvjcdsz33aNYsbJXdLtYB+jgSNtorilUoh/UbUXCox0veH4UIqYMKGzGgDqO8PshpubHiN2H24fb5+6vtjyIKOmO5ePeTbfGe274RHn+HSOYWP9MEb25/VwwYMftBbDfosWwdPGHDnvX7geu2H/dtmJuHchvpC5Dek9hjXkVeu4J1BVJZaDdwr9Yna+GWBLdgJ77p3mWbVpdLb77e3dfcfOZt/3dfYshm74UfjwLP2fb/wd5ICT31PZzFAAAAABJRU5ErkJggg==",chainId:130,chainType:"unichain",chainTypeMoralis:"unichain",tokenTrendingDefault:["0x4200000000000000000000000000000000000006","0x0555e30da8f98308edb960aa94c0db47230d2b9c"],isSupported:!1},7565164:{id:7565164,name:"Solana",nativeCurrency:{decimals:18,name:"Solana",symbol:"SOL"},rpcUrls:{default:{http:[""]}},logo:"https://ipfs.pantograph.app/ipfs/QmZhKcFZVvw5r3cGLfSLsLcd1GzbQK5Vf7aoVYvgktzUUA?filename=Solana_logo.png",chainId:7565164,isSupported:!1}},Sn=e=>{const t=Object.values(In).find(t=>t.chainTypeMoralis===e);return t?.chainType||null};function Nn(e){return e&&e.u&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Bn(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){var n=!1;try{n=this instanceof e}catch{}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"u",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var Mn,Un,Rn,On={},Fn={},Ln={};function Dn(){return Rn||(Rn=1,function(e){const t=function(){if(Mn)return Fn;Mn=1,Fn.byteLength=function(e){var t=o(e),n=t[0],r=t[1];return 3*(n+r)/4-r},Fn.toByteArray=function(e){var r,i,s=o(e),a=s[0],c=s[1],u=new n(function(e,t,n){return 3*(t+n)/4-n}(0,a,c)),l=0,d=c>0?a-4:a;for(i=0;i<d;i+=4)r=t[e.charCodeAt(i)]<<18|t[e.charCodeAt(i+1)]<<12|t[e.charCodeAt(i+2)]<<6|t[e.charCodeAt(i+3)],u[l++]=r>>16&255,u[l++]=r>>8&255,u[l++]=255&r;return 2===c&&(r=t[e.charCodeAt(i)]<<2|t[e.charCodeAt(i+1)]>>4,u[l++]=255&r),1===c&&(r=t[e.charCodeAt(i)]<<10|t[e.charCodeAt(i+1)]<<4|t[e.charCodeAt(i+2)]>>2,u[l++]=r>>8&255,u[l++]=255&r),u},Fn.fromByteArray=function(t){for(var n,r=t.length,i=r%3,o=[],s=16383,c=0,u=r-i;c<u;c+=s)o.push(a(t,c,c+s>u?u:c+s));return 1===i?(n=t[r-1],o.push(e[n>>2]+e[n<<4&63]+"==")):2===i&&(n=(t[r-2]<<8)+t[r-1],o.push(e[n>>10]+e[n>>4&63]+e[n<<2&63]+"=")),o.join("")};for(var e=[],t=[],n="undefined"!=typeof Uint8Array?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0;i<64;++i)e[i]=r[i],t[r.charCodeAt(i)]=i;function o(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function s(t){return e[t>>18&63]+e[t>>12&63]+e[t>>6&63]+e[63&t]}function a(e,t,n){for(var r,i=[],o=t;o<n;o+=3)r=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),i.push(s(r));return i.join("")}return t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63,Fn}(),n=(Un||(Un=1,Ln.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,c=(1<<a)-1,u=c>>1,l=-7,d=n?i-1:0,f=n?-1:1,h=e[t+d];for(d+=f,o=h&(1<<-l)-1,h>>=-l,l+=a;l>0;o=256*o+e[t+d],d+=f,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=r;l>0;s=256*s+e[t+d],d+=f,l-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,r),o-=u}return(h?-1:1)*s*Math.pow(2,o-r)},Ln.write=function(e,t,n,r,i,o){var s,a,c,u=8*o-i-1,l=(1<<u)-1,d=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+d>=1?f/c:f*Math.pow(2,1-d))*c>=2&&(s++,c/=2),s+d>=l?(a=0,s=l):s+d>=1?(a=(t*c-1)*Math.pow(2,i),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,i),s=0));i>=8;e[n+h]=255&a,h+=p,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;e[n+h]=255&s,h+=p,s/=256,u-=8);e[n+h-p]|=128*m}),Ln),r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=function(e){return+e!=e&&(e=0),s.alloc(+e)},e.INSPECT_MAX_BYTES=50;const i=2147483647;function o(e){if(e>i)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return a(e,t,n)}function a(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!s.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|h(e,t);let r=o(n);const i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(W(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return l(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(W(e,ArrayBuffer)||e&&W(e.buffer,ArrayBuffer))return d(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(W(e,SharedArrayBuffer)||e&&W(e.buffer,SharedArrayBuffer)))return d(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return s.from(r,t,n);const i=function(e){if(s.isBuffer(e)){const t=0|f(e.length),n=o(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||X(e.length)?o(0):l(e):"Buffer"===e.type&&Array.isArray(e.data)?l(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return c(e),o(e<0?0:0|f(e))}function l(e){const t=e.length<0?0:0|f(e.length),n=o(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function d(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,s.prototype),r}function f(e){if(e>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|e}function h(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||W(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Y(e).length;default:if(i)return r?-1:V(e).length;t=(""+t).toLowerCase(),i=!0}}function p(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return S(this,t,n);case"utf8":case"utf-8":return E(this,t,n);case"ascii":return C(this,t,n);case"latin1":case"binary":return I(this,t,n);case"base64":return x(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function w(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),X(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,i){let o,s=1,a=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,c/=2,n/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){let r=-1;for(o=n;o<a;o++)if(u(e,o)===u(t,-1===r?0:o-r)){if(-1===r&&(r=o),o-r+1===c)return r*s}else-1!==r&&(o-=o-r),r=-1}else for(n+c>a&&(n=a-c),o=n;o>=0;o--){let n=!0;for(let r=0;r<c;r++)if(u(e,o+r)!==u(t,r)){n=!1;break}if(n)return o}return-1}function g(e,t,n,r){n=Number(n)||0;const i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;const o=t.length;let s;for(r>o/2&&(r=o/2),s=0;s<r;++s){const r=parseInt(t.substr(2*s,2),16);if(X(r))return s;e[n+s]=r}return s}function y(e,t,n,r){return G(V(t,e.length-n),e,n,r)}function v(e,t,n,r){return G(function(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function A(e,t,n,r){return G(Y(t),e,n,r)}function k(e,t,n,r){return G(function(e,t){let n,r,i;const o=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function x(e,n,r){return 0===n&&r===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(n,r))}function E(e,t,n){n=Math.min(e.length,n);const r=[];let i=t;for(;i<n;){const t=e[i];let o=null,s=t>239?4:t>223?3:t>191?2:1;if(i+s<=n){let n,r,a,c;switch(s){case 1:t<128&&(o=t);break;case 2:n=e[i+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(o=c));break;case 3:n=e[i+1],r=e[i+2],128==(192&n)&&128==(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:n=e[i+1],r=e[i+2],a=e[i+3],128==(192&n)&&128==(192&r)&&128==(192&a)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&a,c>65535&&c<1114112&&(o=c))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=s}return function(e){const t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=T));return n}(r)}e.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),!s.TYPED_ARRAY_SUPPORT&&"undefined"!=typeof console&&console.error,Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(e,t,n){return a(e,t,n)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(e,t,n){return function(e,t,n){return c(e),e<=0?o(e):void 0!==t?"string"==typeof n?o(e).fill(t,n):o(e).fill(t):o(e)}(e,t,n)},s.allocUnsafe=function(e){return u(e)},s.allocUnsafeSlow=function(e){return u(e)},s.isBuffer=function(e){return null!=e&&!0===e.I&&e!==s.prototype},s.compare=function(e,t){if(W(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),W(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,r=t.length;for(let i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);let n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const r=s.allocUnsafe(t);let i=0;for(n=0;n<e.length;++n){let t=e[n];if(W(t,Uint8Array))i+t.length>r.length?(s.isBuffer(t)||(t=s.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else{if(!s.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,i)}i+=t.length}return r},s.byteLength=h,s.prototype.I=!0,s.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)m(this,t,t+1);return this},s.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},s.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},s.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?E(this,0,e):p.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){let t="";const n=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(t+=" ... "),"<Buffer "+t+">"},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(e,t,n,r,i){if(W(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;let o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0);const c=Math.min(o,a),u=this.slice(r,i),l=e.slice(t,n);for(let s=0;s<c;++s)if(u[s]!==l[s]){o=u[s],a=l[s];break}return o<a?-1:a<o?1:0},s.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},s.prototype.indexOf=function(e,t,n){return w(this,e,t,n,!0)},s.prototype.lastIndexOf=function(e,t,n){return w(this,e,t,n,!1)},s.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let o=!1;for(;;)switch(r){case"hex":return g(this,e,t,n);case"utf8":case"utf-8":return y(this,e,t,n);case"ascii":case"latin1":case"binary":return v(this,e,t,n);case"base64":return A(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this.S||this,0)}};const T=4096;function C(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function I(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function S(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let i="";for(let o=t;o<n;++o)i+=K[e[o]];return i}function N(e,t,n){const r=e.slice(t,n);let i="";for(let o=0;o<r.length-1;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function B(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,n,r,i,o){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function U(e,t,n,r,i){j(t,r,i,e,n,7);let o=Number(t&BigInt(4294967295));e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,n}function R(e,t,n,r,i){j(t,r,i,e,n,7);let o=Number(t&BigInt(4294967295));e[n+7]=o,o>>=8,e[n+6]=o,o>>=8,e[n+5]=o,o>>=8,e[n+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=s,s>>=8,e[n+2]=s,s>>=8,e[n+1]=s,s>>=8,e[n]=s,n+8}function O(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function F(e,t,r,i,o){return t=+t,r>>>=0,o||O(e,0,r,4),n.write(e,t,r,i,23,4),r+4}function L(e,t,r,i,o){return t=+t,r>>>=0,o||O(e,0,r,8),n.write(e,t,r,i,52,8),r+8}s.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);const r=this.subarray(e,t);return Object.setPrototypeOf(r,s.prototype),r},s.prototype.readUintLE=s.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||B(e,t,this.length);let r=this[e],i=1,o=0;for(;++o<t&&(i*=256);)r+=this[e+o]*i;return r},s.prototype.readUintBE=s.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||B(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e>>>=0,t||B(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||B(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||B(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||B(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||B(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readBigUInt64LE=Q(function(e){z(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||J(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))}),s.prototype.readBigUInt64BE=Q(function(e){z(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||J(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<<BigInt(32))+BigInt(i)}),s.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||B(e,t,this.length);let r=this[e],i=1,o=0;for(;++o<t&&(i*=256);)r+=this[e+o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||B(e,t,this.length);let r=t,i=1,o=this[e+--r];for(;r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return e>>>=0,t||B(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||B(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){e>>>=0,t||B(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||B(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||B(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readBigInt64LE=Q(function(e){z(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||J(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)}),s.prototype.readBigInt64BE=Q(function(e){z(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||J(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+n)}),s.prototype.readFloatLE=function(e,t){return e>>>=0,t||B(e,4,this.length),n.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||B(e,4,this.length),n.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||B(e,8,this.length),n.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||B(e,8,this.length),n.read(this,e,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||M(this,e,t,n,Math.pow(2,8*n)-1,0);let i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||M(this,e,t,n,Math.pow(2,8*n)-1,0);let i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeBigUInt64LE=Q(function(e,t=0){return U(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=Q(function(e,t=0){return R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);M(this,e,t,n,r-1,-r)}let i=0,o=1,s=0;for(this[t]=255&e;++i<n&&(o*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/o|0)-s&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);M(this,e,t,n,r-1,-r)}let i=n-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o|0)-s&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeBigInt64LE=Q(function(e,t=0){return U(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=Q(function(e,t=0){return R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeFloatLE=function(e,t,n){return F(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return F(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return L(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return L(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(!s.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);const i=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},s.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!s.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){const t=e.charCodeAt(0);("utf8"===r&&t<128||"latin1"===r)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;let i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{const o=s.isBuffer(e)?e:s.from(e,r),a=o.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<n-t;++i)this[i+t]=o[i%a]}return this};const D={};function P(e,t,n){D[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function H(e){let t="",n=e.length;const r="-"===e[0]?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function j(e,t,n,r,i,o){if(e>n||e<t){const n="bigint"==typeof t?"n":"";let r;throw r=0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`,new D.ERR_OUT_OF_RANGE("value",r,e)}!function(e,t,n){z(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||J(t,e.length-(n+1))}(r,i,o)}function z(e,t){if("number"!=typeof e)throw new D.ERR_INVALID_ARG_TYPE(t,"number",e)}function J(e,t,n){if(Math.floor(e)!==e)throw z(e,n),new D.ERR_OUT_OF_RANGE("offset","an integer",e);if(t<0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${t}`,e)}P("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),P("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),P("ERR_OUT_OF_RANGE",function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=H(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=H(i)),i+="n"),r+=` It must be ${t}. Received ${i}`,r},RangeError);const q=/[^+/0-9A-Za-z-_]/g;function V(e,t){let n;t=t||1/0;const r=e.length;let i=null;const o=[];for(let s=0;s<r;++s){if(n=e.charCodeAt(s),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function Y(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(q,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function G(e,t,n,r){let i;for(i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function W(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function X(e){return e!=e}const K=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t}();function Q(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}}(On)),On}var Pn=Dn();const Hn="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0;function jn(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function zn(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Jn(e,...t){if(!jn(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 qn(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.createHasher");zn(e.outputLen),zn(e.blockLen)}function Vn(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 Yn(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Gn(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Wn(e,t){return e<<32-t|e>>>t}const Xn=(()=>"function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex)(),Kn=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Qn(e){if(Jn(e),Xn)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=Kn[e[n]];return t}function Zn(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function _n(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);if(Xn)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let i=0,o=0;i<n;i++,o+=2){const t=Zn(e.charCodeAt(o)),n=Zn(e.charCodeAt(o+1));if(void 0===t||void 0===n){const t=e[o]+e[o+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+o)}r[i]=16*t+n}return r}function $n(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw new Error("string expected");return new Uint8Array((new TextEncoder).encode(e))}(e)),Jn(e),e}function er(...e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];Jn(n),t+=n.length}const n=new Uint8Array(t);for(let r=0,i=0;r<e.length;r++){const t=e[r];n.set(t,i),i+=t.length}return n}let tr=class{};function nr(e){const t=t=>e().update($n(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function rr(e=32){if(Hn&&"function"==typeof Hn.getRandomValues)return Hn.getRandomValues(new Uint8Array(e));if(Hn&&"function"==typeof Hn.randomBytes)return Uint8Array.from(Hn.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}function ir(e,t,n){return e&t^~e&n}function or(e,t,n){return e&t^e&n^t&n}let sr=class extends tr{constructor(e,t,n,r){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=Gn(this.buffer)}update(e){Vn(this),Jn(e=$n(e));const{view:t,buffer:n,blockLen:r}=this,i=e.length;for(let o=0;o<i;){const s=Math.min(r-this.pos,i-o);if(s===r){const t=Gn(e);for(;r<=i-o;o+=r)this.process(t,o);continue}n.set(e.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Vn(this),function(e,t){Jn(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:r,isLE:i}=this;let{pos:o}=this;t[o++]=128,Yn(this.buffer.subarray(o)),this.padOffset>r-o&&(this.process(n,0),o=0);for(let l=o;l<r;l++)t[l]=0;!function(e,t,n,r){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,n,r);const i=BigInt(32),o=BigInt(4294967295),s=Number(n>>i&o),a=Number(n&o),c=r?4:0,u=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+u,a,r)}(n,r-8,BigInt(8*this.length),i),this.process(n,0);const s=Gn(e),a=this.outputLen;if(a%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=a/4,u=this.get();if(c>u.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;l<c;l++)s.setUint32(4*l,u[l],i)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}i(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:r,finished:i,destroyed:o,pos:s}=this;return e.destroyed=o,e.finished=i,e.length=r,e.pos=s,r%t&&e.buffer.set(n),e}clone(){return this.i()}};const ar=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),cr=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),ur=BigInt(2**32-1),lr=BigInt(32);function dr(e,t=!1){return t?{h:Number(e&ur),l:Number(e>>lr&ur)}:{h:0|Number(e>>lr&ur),l:0|Number(e&ur)}}const fr=(e,t,n)=>e>>>n,hr=(e,t,n)=>e<<32-n|t>>>n,pr=(e,t,n)=>e>>>n|t<<32-n,mr=(e,t,n)=>e<<32-n|t>>>n,wr=(e,t,n)=>e<<64-n|t>>>n-32,br=(e,t,n)=>e>>>n-32|t<<64-n;function gr(e,t,n,r){const i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:0|i}}const yr=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),vr=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,Ar=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),kr=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0,xr=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0),Er=(e,t,n,r,i,o)=>t+n+r+i+o+(e/2**32|0)|0,Tr=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]),Cr=new Uint32Array(64);let Ir=class extends sr{constructor(e=32){super(64,e,8,!1),this.A=0|ar[0],this.B=0|ar[1],this.C=0|ar[2],this.D=0|ar[3],this.E=0|ar[4],this.F=0|ar[5],this.G=0|ar[6],this.H=0|ar[7]}get(){const{A:e,B:t,C:n,D:r,E:i,F:o,G:s,H:a}=this;return[e,t,n,r,i,o,s,a]}set(e,t,n,r,i,o,s,a){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(e,t){for(let l=0;l<16;l++,t+=4)Cr[l]=e.getUint32(t,!1);for(let l=16;l<64;l++){const e=Cr[l-15],t=Cr[l-2],n=Wn(e,7)^Wn(e,18)^e>>>3,r=Wn(t,17)^Wn(t,19)^t>>>10;Cr[l]=r+Cr[l-7]+n+Cr[l-16]|0}let{A:n,B:r,C:i,D:o,E:s,F:a,G:c,H:u}=this;for(let l=0;l<64;l++){const e=u+(Wn(s,6)^Wn(s,11)^Wn(s,25))+ir(s,a,c)+Tr[l]+Cr[l]|0,t=(Wn(n,2)^Wn(n,13)^Wn(n,22))+or(n,r,i)|0;u=c,c=a,a=s,s=o+e|0,o=i,i=r,r=n,n=e+t|0}n=n+this.A|0,r=r+this.B|0,i=i+this.C|0,o=o+this.D|0,s=s+this.E|0,a=a+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(n,r,i,o,s,a,c,u)}roundClean(){Yn(Cr)}destroy(){this.set(0,0,0,0,0,0,0,0),Yn(this.buffer)}};const Sr=(()=>function(e,t=!1){const n=e.length;let r=new Uint32Array(n),i=new Uint32Array(n);for(let o=0;o<n;o++){const{h:n,l:s}=dr(e[o],t);[r[o],i[o]]=[n,s]}return[r,i]}(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))))(),Nr=(()=>Sr[0])(),Br=(()=>Sr[1])(),Mr=new Uint32Array(80),Ur=new Uint32Array(80);class Rr extends sr{constructor(e=64){super(128,e,16,!1),this.Ah=0|cr[0],this.Al=0|cr[1],this.Bh=0|cr[2],this.Bl=0|cr[3],this.Ch=0|cr[4],this.Cl=0|cr[5],this.Dh=0|cr[6],this.Dl=0|cr[7],this.Eh=0|cr[8],this.El=0|cr[9],this.Fh=0|cr[10],this.Fl=0|cr[11],this.Gh=0|cr[12],this.Gl=0|cr[13],this.Hh=0|cr[14],this.Hl=0|cr[15]}get(){const{Ah:e,Al:t,Bh:n,Bl:r,Ch:i,Cl:o,Dh:s,Dl:a,Eh:c,El:u,Fh:l,Fl:d,Gh:f,Gl:h,Hh:p,Hl:m}=this;return[e,t,n,r,i,o,s,a,c,u,l,d,f,h,p,m]}set(e,t,n,r,i,o,s,a,c,u,l,d,f,h,p,m){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|r,this.Ch=0|i,this.Cl=0|o,this.Dh=0|s,this.Dl=0|a,this.Eh=0|c,this.El=0|u,this.Fh=0|l,this.Fl=0|d,this.Gh=0|f,this.Gl=0|h,this.Hh=0|p,this.Hl=0|m}process(e,t){for(let g=0;g<16;g++,t+=4)Mr[g]=e.getUint32(t),Ur[g]=e.getUint32(t+=4);for(let g=16;g<80;g++){const e=0|Mr[g-15],t=0|Ur[g-15],n=pr(e,t,1)^pr(e,t,8)^fr(e,0,7),r=mr(e,t,1)^mr(e,t,8)^hr(e,t,7),i=0|Mr[g-2],o=0|Ur[g-2],s=pr(i,o,19)^wr(i,o,61)^fr(i,0,6),a=mr(i,o,19)^br(i,o,61)^hr(i,o,6),c=Ar(r,a,Ur[g-7],Ur[g-16]),u=kr(c,n,s,Mr[g-7],Mr[g-16]);Mr[g]=0|u,Ur[g]=0|c}let{Ah:n,Al:r,Bh:i,Bl:o,Ch:s,Cl:a,Dh:c,Dl:u,Eh:l,El:d,Fh:f,Fl:h,Gh:p,Gl:m,Hh:w,Hl:b}=this;for(let g=0;g<80;g++){const e=pr(l,d,14)^pr(l,d,18)^wr(l,d,41),t=mr(l,d,14)^mr(l,d,18)^br(l,d,41),y=l&f^~l&p,v=xr(b,t,d&h^~d&m,Br[g],Ur[g]),A=Er(v,w,e,y,Nr[g],Mr[g]),k=0|v,x=pr(n,r,28)^wr(n,r,34)^wr(n,r,39),E=mr(n,r,28)^br(n,r,34)^br(n,r,39),T=n&i^n&s^i&s,C=r&o^r&a^o&a;w=0|p,b=0|m,p=0|f,m=0|h,f=0|l,h=0|d,({h:l,l:d}=gr(0|c,0|u,0|A,0|k)),c=0|s,u=0|a,s=0|i,a=0|o,i=0|n,o=0|r;const I=yr(k,E,C);n=vr(I,A,x,T),r=0|I}({h:n,l:r}=gr(0|this.Ah,0|this.Al,0|n,0|r)),({h:i,l:o}=gr(0|this.Bh,0|this.Bl,0|i,0|o)),({h:s,l:a}=gr(0|this.Ch,0|this.Cl,0|s,0|a)),({h:c,l:u}=gr(0|this.Dh,0|this.Dl,0|c,0|u)),({h:l,l:d}=gr(0|this.Eh,0|this.El,0|l,0|d)),({h:f,l:h}=gr(0|this.Fh,0|this.Fl,0|f,0|h)),({h:p,l:m}=gr(0|this.Gh,0|this.Gl,0|p,0|m)),({h:w,l:b}=gr(0|this.Hh,0|this.Hl,0|w,0|b)),this.set(n,r,i,o,s,a,c,u,l,d,f,h,p,m,w,b)}roundClean(){Yn(Mr,Ur)}destroy(){Yn(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const Or=nr(()=>new Ir),Fr=nr(()=>new Rr),Lr=BigInt(0),Dr=BigInt(1);function Pr(e,t=""){if("boolean"!=typeof e)throw new Error((t&&`"${t}"`)+"expected boolean, got type="+typeof e);return e}function Hr(e,t,n=""){const r=jn(e),i=e?.length,o=void 0!==t;if(!r||o&&i!==t)throw new Error((n&&`"${n}" `)+"expected Uint8Array"+(o?` of length ${t}`:"")+", got "+(r?`length=${i}`:"type="+typeof e));return e}function jr(e){const t=e.toString(16);return 1&t.length?"0"+t:t}function zr(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);return""===e?Lr:BigInt("0x"+e)}function Jr(e){return zr(Qn(e))}function qr(e){return Jn(e),zr(Qn(Uint8Array.from(e).reverse()))}function Vr(e,t){return _n(e.toString(16).padStart(2*t,"0"))}function Yr(e,t){return Vr(e,t).reverse()}function Gr(e,t,n){let r;if("string"==typeof t)try{r=_n(t)}catch(o){throw new Error(e+" must be hex string or Uint8Array, cause: "+o)}else{if(!jn(t))throw new Error(e+" must be hex string or Uint8Array");r=Uint8Array.from(t)}const i=r.length;if("number"==typeof n&&i!==n)throw new Error(e+" of length "+n+" expected, got "+i);return r}function Wr(e){return Uint8Array.from(e)}const Xr=e=>"bigint"==typeof e&&Lr<=e;function Kr(e,t,n,r){if(!function(e,t,n){return Xr(e)&&Xr(t)&&Xr(n)&&t<=e&&e<n}(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}function Qr(e){let t;for(t=0;e>Lr;e>>=Dr,t+=1);return t}const Zr=e=>(Dr<<BigInt(e))-Dr;function _r(e,t,n={}){if(!e||"object"!=typeof e)throw new Error("expected valid options object");function r(t,n,r){const i=e[t];if(r&&void 0===i)return;const o=typeof i;if(o!==n||null===i)throw new Error(`param "${t}" is invalid: expected ${n}, got ${o}`)}Object.entries(t).forEach(([e,t])=>r(e,t,!1)),Object.entries(n).forEach(([e,t])=>r(e,t,!0))}function $r(e){const t=new WeakMap;return(n,...r)=>{const i=t.get(n);if(void 0!==i)return i;const o=e(n,...r);return t.set(n,o),o}}const ei=BigInt(0),ti=BigInt(1),ni=BigInt(2),ri=BigInt(3),ii=BigInt(4),oi=BigInt(5),si=BigInt(7),ai=BigInt(8),ci=BigInt(9),ui=BigInt(16);function li(e,t){const n=e%t;return n>=ei?n:t+n}function di(e,t,n){let r=e;for(;t-- >ei;)r*=r,r%=n;return r}function fi(e,t){if(e===ei)throw new Error("invert: expected non-zero number");if(t<=ei)throw new Error("invert: expected positive modulus, got "+t);let n=li(e,t),r=t,i=ei,o=ti;for(;n!==ei;){const e=r%n,t=i-o*(r/n);r=n,n=e,i=o,o=t}if(r!==ti)throw new Error("invert: does not exist");return li(i,t)}function hi(e,t,n){if(!e.eql(e.sqr(t),n))throw new Error("Cannot find square root")}function pi(e,t){const n=(e.ORDER+ti)/ii,r=e.pow(t,n);return hi(e,r,t),r}function mi(e,t){const n=(e.ORDER-oi)/ai,r=e.mul(t,ni),i=e.pow(r,n),o=e.mul(t,i),s=e.mul(e.mul(o,ni),i),a=e.mul(o,e.sub(s,e.ONE));return hi(e,a,t),a}function wi(e){if(e<ri)throw new Error("sqrt is not defined for small field");let t=e-ti,n=0;for(;t%ni===ei;)t/=ni,n++;let r=ni;const i=Ai(e);for(;1===yi(i,r);)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(1===n)return pi;let o=i.pow(r,t);const s=(t+ti)/ni;return function(e,r){if(e.is0(r))return r;if(1!==yi(e,r))throw new Error("Cannot find square root");let i=n,a=e.mul(e.ONE,o),c=e.pow(r,t),u=e.pow(r,s);for(;!e.eql(c,e.ONE);){if(e.is0(c))return e.ZERO;let t=1,n=e.sqr(c);for(;!e.eql(n,e.ONE);)if(t++,n=e.sqr(n),t===i)throw new Error("Cannot find square root");const r=ti<<BigInt(i-t-1),o=e.pow(a,r);i=t,a=e.sqr(o),c=e.mul(c,a),u=e.mul(u,o)}return u}}const bi=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function gi(e,t,n=!1){const r=new Array(t.length).fill(n?e.ZERO:void 0),i=t.reduce((t,n,i)=>e.is0(n)?t:(r[i]=t,e.mul(t,n)),e.ONE),o=e.inv(i);return t.reduceRight((t,n,i)=>e.is0(n)?t:(r[i]=e.mul(t,r[i]),e.mul(t,n)),o),r}function yi(e,t){const n=(e.ORDER-ti)/ni,r=e.pow(t,n),i=e.eql(r,e.ONE),o=e.eql(r,e.ZERO),s=e.eql(r,e.neg(e.ONE));if(!i&&!o&&!s)throw new Error("invalid Legendre symbol result");return i?1:o?0:-1}function vi(e,t){void 0!==t&&zn(t);const n=void 0!==t?t:e.toString(2).length;return{nBitLength:n,nByteLength:Math.ceil(n/8)}}function Ai(e,t,n=!1,r={}){if(e<=ei)throw new Error("invalid field: expected ORDER > 0, got "+e);let i,o,s,a=!1;if("object"==typeof t&&null!=t){if(r.sqrt||n)throw new Error("cannot specify opts in two arguments");const e=t;e.BITS&&(i=e.BITS),e.sqrt&&(o=e.sqrt),"boolean"==typeof e.isLE&&(n=e.isLE),"boolean"==typeof e.modFromBytes&&(a=e.modFromBytes),s=e.allowedLengths}else"number"==typeof t&&(i=t),r.sqrt&&(o=r.sqrt);const{nBitLength:c,nByteLength:u}=vi(e,i);if(u>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let l;const d=Object.freeze({ORDER:e,isLE:n,BITS:c,BYTES:u,MASK:Zr(c),ZERO:ei,ONE:ti,allowedLengths:s,create:t=>li(t,e),isValid:t=>{if("bigint"!=typeof t)throw new Error("invalid field element: expected bigint, got "+typeof t);return ei<=t&&t<e},is0:e=>e===ei,isValidNot0:e=>!d.is0(e)&&d.isValid(e),isOdd:e=>(e&ti)===ti,neg:t=>li(-t,e),eql:(e,t)=>e===t,sqr:t=>li(t*t,e),add:(t,n)=>li(t+n,e),sub:(t,n)=>li(t-n,e),mul:(t,n)=>li(t*n,e),pow:(e,t)=>function(e,t,n){if(n<ei)throw new Error("invalid exponent, negatives unsupported");if(n===ei)return e.ONE;if(n===ti)return t;let r=e.ONE,i=t;for(;n>ei;)n&ti&&(r=e.mul(r,i)),i=e.sqr(i),n>>=ti;return r}(d,e,t),div:(t,n)=>li(t*fi(n,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>fi(t,e),sqrt:o||(t=>{return l||(l=(n=e)%ii===ri?pi:n%ai===oi?mi:n%ui===ci?function(e){const t=Ai(e),n=wi(e),r=n(t,t.neg(t.ONE)),i=n(t,r),o=n(t,t.neg(r)),s=(e+si)/ui;return(e,t)=>{let n=e.pow(t,s),a=e.mul(n,r);const c=e.mul(n,i),u=e.mul(n,o),l=e.eql(e.sqr(a),t),d=e.eql(e.sqr(c),t);n=e.cmov(n,a,l),a=e.cmov(u,c,d);const f=e.eql(e.sqr(a),t),h=e.cmov(n,a,f);return hi(e,h,t),h}}(n):wi(n)),l(d,t);var n}),toBytes:e=>n?Yr(e,u):Vr(e,u),fromBytes:(t,r=!0)=>{if(s){if(!s.includes(t.length)||t.length>u)throw new Error("Field.fromBytes: expected "+s+" bytes, got "+t.length);const e=new Uint8Array(u);e.set(t,n?0:e.length-t.length),t=e}if(t.length!==u)throw new Error("Field.fromBytes: expected "+u+" bytes, got "+t.length);let i=n?qr(t):Jr(t);if(a&&(i=li(i,e)),!r&&!d.isValid(i))throw new Error("invalid field element: outside of range 0..ORDER");return i},invertBatch:e=>gi(d,e),cmov:(e,t,n)=>n?t:e});return Object.freeze(d)}function ki(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function xi(e){const t=ki(e);return t+Math.ceil(t/2)}const Ei=BigInt(0),Ti=BigInt(1);function Ci(e,t){const n=t.negate();return e?n:t}function Ii(e,t){const n=gi(e.Fp,t.map(e=>e.Z));return t.map((t,r)=>e.fromAffine(t.toAffine(n[r])))}function Si(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function Ni(e,t){Si(e,t);const n=2**e;return{windows:Math.ceil(t/e)+1,windowSize:2**(e-1),mask:Zr(e),maxNumber:n,shiftBy:BigInt(e)}}function Bi(e,t,n){const{windowSize:r,mask:i,maxNumber:o,shiftBy:s}=n;let a=Number(e&i),c=e>>s;a>r&&(a-=o,c+=Ti);const u=t*r;return{nextN:c,offset:u+Math.abs(a)-1,isZero:0===a,isNeg:a<0,isNegF:t%2!=0,offsetF:u}}const Mi=new WeakMap,Ui=new WeakMap;function Ri(e){return Ui.get(e)||1}function Oi(e){if(e!==Ei)throw new Error("invalid wNAF")}class Fi{constructor(e,t){this.BASE=e.BASE,this.ZERO=e.ZERO,this.Fn=e.Fn,this.bits=t}N(e,t,n=this.ZERO){let r=e;for(;t>Ei;)t&Ti&&(n=n.add(r)),r=r.double(),t>>=Ti;return n}precomputeWindow(e,t){const{windows:n,windowSize:r}=Ni(t,this.bits),i=[];let o=e,s=o;for(let a=0;a<n;a++){s=o,i.push(s);for(let e=1;e<r;e++)s=s.add(o),i.push(s);o=s.double()}return i}wNAF(e,t,n){if(!this.Fn.isValid(n))throw new Error("invalid scalar");let r=this.ZERO,i=this.BASE;const o=Ni(e,this.bits);for(let s=0;s<o.windows;s++){const{nextN:e,offset:a,isZero:c,isNeg:u,isNegF:l,offsetF:d}=Bi(n,s,o);n=e,c?i=i.add(Ci(l,t[d])):r=r.add(Ci(u,t[a]))}return Oi(n),{p:r,f:i}}wNAFUnsafe(e,t,n,r=this.ZERO){const i=Ni(e,this.bits);for(let o=0;o<i.windows&&n!==Ei;o++){const{nextN:e,offset:s,isZero:a,isNeg:c}=Bi(n,o,i);if(n=e,!a){const e=t[s];r=r.add(c?e.negate():e)}}return Oi(n),r}getPrecomputes(e,t,n){let r=Mi.get(t);return r||(r=this.precomputeWindow(t,e),1!==e&&("function"==typeof n&&(r=n(r)),Mi.set(t,r))),r}cached(e,t,n){const r=Ri(e);return this.wNAF(r,this.getPrecomputes(r,e,n),t)}unsafe(e,t,n,r){const i=Ri(e);return 1===i?this.N(e,t,r):this.wNAFUnsafe(i,this.getPrecomputes(i,e,n),t,r)}createCache(e,t){Si(t,this.bits),Ui.set(e,t),Mi.delete(e)}hasCache(e){return 1!==Ri(e)}}function Li(e,t,n,r){!function(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((e,n)=>{if(!(e instanceof t))throw new Error("invalid point at index "+n)})}(n,e),function(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((e,n)=>{if(!t.isValid(e))throw new Error("invalid scalar at index "+n)})}(r,t);const i=n.length,o=r.length;if(i!==o)throw new Error("arrays of points and scalars must have equal length");const s=e.ZERO,a=Qr(BigInt(i));let c=1;a>12?c=a-3:a>4?c=a-2:a>0&&(c=2);const u=Zr(c),l=new Array(Number(u)+1).fill(s);let d=s;for(let f=Math.floor((t.BITS-1)/c)*c;f>=0;f-=c){l.fill(s);for(let t=0;t<o;t++){const e=r[t],i=Number(e>>BigInt(f)&u);l[i]=l[i].add(n[t])}let e=s;for(let t=l.length-1,n=s;t>0;t--)n=n.add(l[t]),e=e.add(n);if(d=d.add(e),0!==f)for(let t=0;t<c;t++)d=d.double()}return d}function Di(e,t,n){if(t){if(t.ORDER!==e)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return function(e){_r(e,bi.reduce((e,t)=>(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"}))}(t),t}return Ai(e,{isLE:n})}function Pi(e,t,n={},r){if(void 0===r&&(r="edwards"===e),!t||"object"!=typeof t)throw new Error(`expected valid ${e} CURVE object`);for(const a of["p","n","h"]){const e=t[a];if(!("bigint"==typeof e&&e>Ei))throw new Error(`CURVE.${a} must be positive bigint`)}const i=Di(t.p,n.Fp,r),o=Di(t.n,n.Fn,r),s=["Gx","Gy","a","weierstrass"===e?"b":"d"];for(const a of s)if(!i.isValid(t[a]))throw new Error(`CURVE.${a} must be valid field element of CURVE.Fp`);return{CURVE:t=Object.freeze(Object.assign({},t)),Fp:i,Fn:o}}const Hi=BigInt(0),ji=BigInt(1),zi=BigInt(2),Ji=BigInt(8);function qi(e){const{CURVE:t,curveOpts:n,hash:r,eddsaOpts:i}=function(e){const t={a:e.a,d:e.d,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},n={Fp:e.Fp,Fn:Ai(t.n,e.nBitLength,!0),uvRatio:e.uvRatio},r={randomBytes:e.randomBytes,adjustScalarBytes:e.adjustScalarBytes,domain:e.domain,prehash:e.prehash,mapToCurve:e.mapToCurve};return{CURVE:t,curveOpts:n,hash:e.hash,eddsaOpts:r}}(e),o=function(e,t={}){const n=Pi("edwards",e,t,t.FpFnLE),{Fp:r,Fn:i}=n;let o=n.CURVE;const{h:s}=o;_r(t,{},{uvRatio:"function"});const a=zi<<BigInt(8*i.BYTES)-ji,c=e=>r.create(e),u=t.uvRatio||((e,t)=>{try{return{isValid:!0,value:r.sqrt(r.div(e,t))}}catch(n){return{isValid:!1,value:Hi}}});if(!function(e,t,n,r){const i=e.sqr(n),o=e.sqr(r),s=e.add(e.mul(t.a,i),o),a=e.add(e.ONE,e.mul(t.d,e.mul(i,o)));return e.eql(s,a)}(r,o,o.Gx,o.Gy))throw new Error("bad curve params: generator point");function l(e,t,n=!1){return Kr("coordinate "+e,t,n?ji:Hi,a),t}function d(e){if(!(e instanceof p))throw new Error("ExtendedPoint expected")}const f=$r((e,t)=>{const{X:n,Y:i,Z:o}=e,s=e.is0();null==t&&(t=s?Ji:r.inv(o));const a=c(n*t),u=c(i*t),l=r.mul(o,t);if(s)return{x:Hi,y:ji};if(l!==ji)throw new Error("invZ was invalid");return{x:a,y:u}}),h=$r(e=>{const{a:t,d:n}=o;if(e.is0())throw new Error("bad point: ZERO");const{X:r,Y:i,Z:s,T:a}=e,u=c(r*r),l=c(i*i),d=c(s*s),f=c(d*d),h=c(u*t);if(c(d*c(h+l))!==c(f+c(n*c(u*l))))throw new Error("bad point: equation left != right (1)");if(c(r*i)!==c(s*a))throw new Error("bad point: equation left != right (2)");return!0});class p{constructor(e,t,n,r){this.X=l("x",e),this.Y=l("y",t),this.Z=l("z",n,!0),this.T=l("t",r),Object.freeze(this)}static CURVE(){return o}static fromAffine(e){if(e instanceof p)throw new Error("extended point not allowed");const{x:t,y:n}=e||{};return l("x",t),l("y",n),new p(t,n,ji,c(t*n))}static fromBytes(e,t=!1){const n=r.BYTES,{a:i,d:s}=o;e=Wr(Hr(e,n,"point")),Pr(t,"zip215");const l=Wr(e),d=e[n-1];l[n-1]=-129&d;const f=qr(l),h=t?a:r.ORDER;Kr("point.y",f,Hi,h);const m=c(f*f),w=c(m-ji),b=c(s*m-i);let{isValid:g,value:y}=u(w,b);if(!g)throw new Error("bad point: invalid y coordinate");const v=(y&ji)===ji,A=!!(128&d);if(!t&&y===Hi&&A)throw new Error("bad point: x=0 and x_0=1");return A!==v&&(y=c(-y)),p.fromAffine({x:y,y:f})}static fromHex(e,t=!1){return p.fromBytes(Gr("point",e),t)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(e=8,t=!0){return m.createCache(this,e),t||this.multiply(zi),this}assertValidity(){h(this)}equals(e){d(e);const{X:t,Y:n,Z:r}=this,{X:i,Y:o,Z:s}=e,a=c(t*s),u=c(i*r),l=c(n*s),f=c(o*r);return a===u&&l===f}is0(){return this.equals(p.ZERO)}negate(){return new p(c(-this.X),this.Y,this.Z,c(-this.T))}double(){const{a:e}=o,{X:t,Y:n,Z:r}=this,i=c(t*t),s=c(n*n),a=c(zi*c(r*r)),u=c(e*i),l=t+n,d=c(c(l*l)-i-s),f=u+s,h=f-a,m=u-s,w=c(d*h),b=c(f*m),g=c(d*m),y=c(h*f);return new p(w,b,y,g)}add(e){d(e);const{a:t,d:n}=o,{X:r,Y:i,Z:s,T:a}=this,{X:u,Y:l,Z:f,T:h}=e,m=c(r*u),w=c(i*l),b=c(a*n*h),g=c(s*f),y=c((r+i)*(u+l)-m-w),v=g-b,A=g+b,k=c(w-t*m),x=c(y*v),E=c(A*k),T=c(y*k),C=c(v*A);return new p(x,E,C,T)}subtract(e){return this.add(e.negate())}multiply(e){if(!i.isValidNot0(e))throw new Error("invalid scalar: expected 1 <= sc < curve.n");const{p:t,f:n}=m.cached(this,e,e=>Ii(p,e));return Ii(p,[t,n])[0]}multiplyUnsafe(e,t=p.ZERO){if(!i.isValid(e))throw new Error("invalid scalar: expected 0 <= sc < curve.n");return e===Hi?p.ZERO:this.is0()||e===ji?this:m.unsafe(this,e,e=>Ii(p,e),t)}isSmallOrder(){return this.multiplyUnsafe(s).is0()}isTorsionFree(){return m.unsafe(this,o.n).is0()}toAffine(e){return f(this,e)}clearCofactor(){return s===ji?this:this.multiplyUnsafe(s)}toBytes(){const{x:e,y:t}=this.toAffine(),n=r.toBytes(t);return n[n.length-1]|=e&ji?128:0,n}toHex(){return Qn(this.toBytes())}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}get ex(){return this.X}get ey(){return this.Y}get ez(){return this.Z}get et(){return this.T}static normalizeZ(e){return Ii(p,e)}static msm(e,t){return Li(p,i,e,t)}M(e){this.precompute(e)}toRawBytes(){return this.toBytes()}}p.BASE=new p(o.Gx,o.Gy,ji,c(o.Gx*o.Gy)),p.ZERO=new p(Hi,ji,ji,Hi),p.Fp=r,p.Fn=i;const m=new Fi(p,i.BITS);return p.BASE.precompute(8),p}(t,n);return function(e,t){const n=t.Point;return Object.assign({},t,{ExtendedPoint:n,CURVE:e,nBitLength:n.Fn.BITS,nByteLength:n.Fn.BYTES})}(e,function(e,t,n={}){if("function"!=typeof t)throw new Error('"hash" function param is required');_r(n,{},{adjustScalarBytes:"function",randomBytes:"function",domain:"function",prehash:"function",mapToCurve:"function"});const{prehash:r}=n,{BASE:i,Fp:o,Fn:s}=e,a=n.randomBytes||rr,c=n.adjustScalarBytes||(e=>e),u=n.domain||((e,t,n)=>{if(Pr(n,"phflag"),t.length||n)throw new Error("Contexts/pre-hash are not supported");return e});function l(e){return s.create(qr(e))}function d(e){const{head:n,prefix:r,scalar:o}=function(e){const n=w.secretKey;e=Gr("private key",e,n);const r=Gr("hashed private key",t(e),2*n),i=c(r.slice(0,n));return{head:i,prefix:r.slice(n,2*n),scalar:l(i)}}(e),s=i.multiply(o),a=s.toBytes();return{head:n,prefix:r,scalar:o,point:s,pointBytes:a}}function f(e){return d(e).pointBytes}function h(e=Uint8Array.of(),...n){const i=er(...n);return l(t(u(i,Gr("context",e),!!r)))}const p={zip215:!0},m=o.BYTES,w={secretKey:m,publicKey:m,signature:2*m,seed:m};function b(e=a(w.seed)){return Hr(e,w.seed,"seed")}const g={getExtendedPublicKey:d,randomSecretKey:b,isValidSecretKey:function(e){return jn(e)&&e.length===s.BYTES},isValidPublicKey:function(t,n){try{return!!e.fromBytes(t,n)}catch(r){return!1}},toMontgomery(t){const{y:n}=e.fromBytes(t),r=w.publicKey,i=32===r;if(!i&&57!==r)throw new Error("only defined for 25519 and 448");const s=i?o.div(ji+n,ji-n):o.div(n-ji,n+ji);return o.toBytes(s)},toMontgomerySecret(e){const n=w.secretKey;Hr(e,n);const r=t(e.subarray(0,n));return c(r).subarray(0,n)},randomPrivateKey:b,precompute:(t=8,n=e.BASE)=>n.precompute(t,!1)};return Object.freeze({keygen:function(e){const t=g.randomSecretKey(e);return{secretKey:t,publicKey:f(t)}},getPublicKey:f,sign:function(e,t,n={}){e=Gr("message",e),r&&(e=r(e));const{prefix:o,scalar:a,pointBytes:c}=d(t),u=h(n.context,o,e),l=i.multiply(u).toBytes(),f=h(n.context,l,c,e),p=s.create(u+f*a);if(!s.isValid(p))throw new Error("sign failed: invalid s");return Hr(er(l,s.toBytes(p)),w.signature,"result")},verify:function(t,n,o,s=p){const{context:a,zip215:c}=s,u=w.signature;t=Gr("signature",t,u),n=Gr("message",n),o=Gr("publicKey",o,w.publicKey),void 0!==c&&Pr(c,"zip215"),r&&(n=r(n));const l=u/2,d=t.subarray(0,l),f=qr(t.subarray(l,u));let m,b,g;try{m=e.fromBytes(o,c),b=e.fromBytes(d,c),g=i.multiplyUnsafe(f)}catch(v){return!1}if(!c&&m.isSmallOrder())return!1;const y=h(a,b.toBytes(),m.toBytes(),n);return b.add(m.multiplyUnsafe(y)).subtract(g).clearCofactor().is0()},utils:g,Point:e,lengths:w})}(o,r,i))}const Vi=BigInt(1),Yi=BigInt(2);BigInt(3);const Gi=BigInt(5),Wi=BigInt(8),Xi=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),Ki=(()=>({p:Xi,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:Wi,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")}))();function Qi(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}const Zi=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function _i(e,t){const n=Xi,r=li(t*t*t,n),i=function(e){const t=BigInt(10),n=BigInt(20),r=BigInt(40),i=BigInt(80),o=Xi,s=e*e%o*e%o,a=di(s,Yi,o)*s%o,c=di(a,Vi,o)*e%o,u=di(c,Gi,o)*c%o,l=di(u,t,o)*u%o,d=di(l,n,o)*l%o,f=di(d,r,o)*d%o,h=di(f,i,o)*f%o,p=di(h,i,o)*f%o,m=di(p,t,o)*u%o;return{pow_p_5_8:di(m,Yi,o)*e%o,b2:s}}(e*li(r*r*t,n)).pow_p_5_8;let o=li(e*r*i,n);const s=li(t*o*o,n),a=o,c=li(o*Zi,n),u=s===e,l=s===li(-e,n),d=s===li(-e*Zi,n);return u&&(o=a),(l||d)&&(o=c),(li(o,n)&ti)===ti&&(o=li(-o,n)),{isValid:u||l,value:o}}const $i=(()=>Ai(Ki.p,{isLE:!0}))(),eo=(()=>({...Ki,Fp:$i,hash:Fr,adjustScalarBytes:Qi,uvRatio:_i}))(),to=(()=>qi(eo))();var no={exports:{}};const ro=Bn(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var io,oo=no.exports;function so(){return io||(io=1,function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this.U(e||0,t||10,n||"be"))}var o;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:ro.Buffer}catch(C){}function s(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function a(e,t,n){var r=s(e,n);return n-1>=t&&(r|=s(e,n-1)<<4),r}function c(e,t,r,i){for(var o=0,s=0,a=Math.min(e.length,r),c=t;c<a;c++){var u=e.charCodeAt(c)-48;o*=i,s=u>=49?u-49+10:u>=17?u-17+10:u,n(u>=0&&s<i,"Invalid character"),o+=s}return o}function u(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype.U=function(e,t,r){if("number"==typeof e)return this.R(e,t,r);if("object"==typeof e)return this.O(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this.L(e,i,r):(this.P(e,t,i),"le"===r&&this.O(this.toArray(),t,r)))},i.prototype.R=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this.O(this.toArray(),t,r)},i.prototype.O=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.j()},i.prototype.L=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,o=0,s=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=a(e,t,r)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=a(e,t,r)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this.j()},i.prototype.P=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,s=o%r,a=Math.min(o,o-s)+n,u=0,l=n;l<a;l+=r)u=c(e,l,l+r,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this.J(u);if(0!==s){var d=1;for(u=c(e,l,e.length,t),l=0;l<s;l++)d*=t;this.imuln(d),this.words[0]+u<67108864?this.words[0]+=u:this.J(u)}this.j()},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},i.prototype.q=function(e){u(e,this)},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype.V=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype.j=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this.W()},i.prototype.W=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(C){i.prototype.inspect=l}else i.prototype.inspect=l;function l(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,c=s/67108864|0;n.words[0]=a;for(var u=1;u<r;u++){for(var l=c>>>26,d=67108863&c,f=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=f;h++){var p=u-h|0;l+=(s=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&s}n.words[u]=0|d,c=0|l}return 0!==c?n.words[u]=0|c:n.length--,n.j()}i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],c=(16777215&(a<<i|o)).toString(16);o=a>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==o||s!==this.length-1?d[6-c.length]+c+r:c+r}for(0!==o&&(r=o.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=f[e],l=h[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modrn(l).toString(e);r=(p=p.idivn(l)).isZero()?m+r:d[u-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(o,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){this.j();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,i),s},i.prototype.K=function(e,t){for(var n=0,r=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|r;e[n++]=255&s,n<e.length&&(e[n++]=s>>8&255),n<e.length&&(e[n++]=s>>16&255),6===o?(n<e.length&&(e[n++]=s>>24&255),r=0,o=0):(r=s>>>24,o+=2)}if(n<e.length)for(e[n++]=r;n<e.length;)e[n++]=0},i.prototype._=function(e,t){for(var n=e.length-1,r=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|r;e[n--]=255&s,n>=0&&(e[n--]=s>>8&255),n>=0&&(e[n--]=s>>16&255),6===o?(n>=0&&(e[n--]=s>>24&255),r=0,o=0):(r=s>>>24,o+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?i.prototype.$=function(e){return 32-Math.clz32(e)}:i.prototype.$=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype.ee=function(e){if(0===e)return 26;var t=e,n=0;return 8191&t||(n+=13,t>>>=13),127&t||(n+=7,t>>>=7),15&t||(n+=4,t>>>=4),3&t||(n+=2,t>>>=2),1&t||n++,n},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this.$(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this.ee(this.words[t]);if(e+=n,26!==n)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.j()},i.prototype.ior=function(e){return n(0===(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.j()},i.prototype.iand=function(e){return n(0===(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.j()},i.prototype.ixor=function(e){return n(0===(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this.V(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.j()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this.V(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.j()},i.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this.W();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t.W();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o<r.length;o++)t=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<n.length;o++)t=(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},i.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t.W()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this.W();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var o=0,s=0;s<r.length;s++)o=(t=(0|n.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<n.length;s++)o=(t=(0|n.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this.j()},i.prototype.sub=function(e){return this.clone().isub(e)};var m=function(e,t,n){var r,i,o,s=e.words,a=t.words,c=n.words,u=0,l=0|s[0],d=8191&l,f=l>>>13,h=0|s[1],p=8191&h,m=h>>>13,w=0|s[2],b=8191&w,g=w>>>13,y=0|s[3],v=8191&y,A=y>>>13,k=0|s[4],x=8191&k,E=k>>>13,T=0|s[5],C=8191&T,I=T>>>13,S=0|s[6],N=8191&S,B=S>>>13,M=0|s[7],U=8191&M,R=M>>>13,O=0|s[8],F=8191&O,L=O>>>13,D=0|s[9],P=8191&D,H=D>>>13,j=0|a[0],z=8191&j,J=j>>>13,q=0|a[1],V=8191&q,Y=q>>>13,G=0|a[2],W=8191&G,X=G>>>13,K=0|a[3],Q=8191&K,Z=K>>>13,_=0|a[4],$=8191&_,ee=_>>>13,te=0|a[5],ne=8191&te,re=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],ce=8191&ae,ue=ae>>>13,le=0|a[8],de=8191&le,fe=le>>>13,he=0|a[9],pe=8191&he,me=he>>>13;n.negative=e.negative^t.negative,n.length=19;var we=(u+(r=Math.imul(d,z))|0)+((8191&(i=(i=Math.imul(d,J))+Math.imul(f,z)|0))<<13)|0;u=((o=Math.imul(f,J))+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(p,z),i=(i=Math.imul(p,J))+Math.imul(m,z)|0,o=Math.imul(m,J);var be=(u+(r=r+Math.imul(d,V)|0)|0)+((8191&(i=(i=i+Math.imul(d,Y)|0)+Math.imul(f,V)|0))<<13)|0;u=((o=o+Math.imul(f,Y)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(b,z),i=(i=Math.imul(b,J))+Math.imul(g,z)|0,o=Math.imul(g,J),r=r+Math.imul(p,V)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Y)|0;var ge=(u+(r=r+Math.imul(d,W)|0)|0)+((8191&(i=(i=i+Math.imul(d,X)|0)+Math.imul(f,W)|0))<<13)|0;u=((o=o+Math.imul(f,X)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(v,z),i=(i=Math.imul(v,J))+Math.imul(A,z)|0,o=Math.imul(A,J),r=r+Math.imul(b,V)|0,i=(i=i+Math.imul(b,Y)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,Y)|0,r=r+Math.imul(p,W)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,X)|0;var ye=(u+(r=r+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,Z)|0)+Math.imul(f,Q)|0))<<13)|0;u=((o=o+Math.imul(f,Z)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(x,z),i=(i=Math.imul(x,J))+Math.imul(E,z)|0,o=Math.imul(E,J),r=r+Math.imul(v,V)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,Y)|0,r=r+Math.imul(b,W)|0,i=(i=i+Math.imul(b,X)|0)+Math.imul(g,W)|0,o=o+Math.imul(g,X)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,Z)|0;var ve=(u+(r=r+Math.imul(d,$)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(f,$)|0))<<13)|0;u=((o=o+Math.imul(f,ee)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(C,z),i=(i=Math.imul(C,J))+Math.imul(I,z)|0,o=Math.imul(I,J),r=r+Math.imul(x,V)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Y)|0,r=r+Math.imul(v,W)|0,i=(i=i+Math.imul(v,X)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,X)|0,r=r+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,Z)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,Z)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,ee)|0;var Ae=(u+(r=r+Math.imul(d,ne)|0)|0)+((8191&(i=(i=i+Math.imul(d,re)|0)+Math.imul(f,ne)|0))<<13)|0;u=((o=o+Math.imul(f,re)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(N,z),i=(i=Math.imul(N,J))+Math.imul(B,z)|0,o=Math.imul(B,J),r=r+Math.imul(C,V)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,Y)|0,r=r+Math.imul(x,W)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(E,W)|0,o=o+Math.imul(E,X)|0,r=r+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,Z)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,Z)|0,r=r+Math.imul(b,$)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(m,ne)|0,o=o+Math.imul(m,re)|0;var ke=(u+(r=r+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,se)|0)+Math.imul(f,oe)|0))<<13)|0;u=((o=o+Math.imul(f,se)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(U,z),i=(i=Math.imul(U,J))+Math.imul(R,z)|0,o=Math.imul(R,J),r=r+Math.imul(N,V)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,Y)|0,r=r+Math.imul(C,W)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(I,W)|0,o=o+Math.imul(I,X)|0,r=r+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(v,$)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,ee)|0,r=r+Math.imul(b,ne)|0,i=(i=i+Math.imul(b,re)|0)+Math.imul(g,ne)|0,o=o+Math.imul(g,re)|0,r=r+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var xe=(u+(r=r+Math.imul(d,ce)|0)|0)+((8191&(i=(i=i+Math.imul(d,ue)|0)+Math.imul(f,ce)|0))<<13)|0;u=((o=o+Math.imul(f,ue)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(F,z),i=(i=Math.imul(F,J))+Math.imul(L,z)|0,o=Math.imul(L,J),r=r+Math.imul(U,V)|0,i=(i=i+Math.imul(U,Y)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,Y)|0,r=r+Math.imul(N,W)|0,i=(i=i+Math.imul(N,X)|0)+Math.imul(B,W)|0,o=o+Math.imul(B,X)|0,r=r+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,Z)|0,r=r+Math.imul(x,$)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,ee)|0,r=r+Math.imul(v,ne)|0,i=(i=i+Math.imul(v,re)|0)+Math.imul(A,ne)|0,o=o+Math.imul(A,re)|0,r=r+Math.imul(b,oe)|0,i=(i=i+Math.imul(b,se)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,se)|0,r=r+Math.imul(p,ce)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(m,ce)|0,o=o+Math.imul(m,ue)|0;var Ee=(u+(r=r+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;u=((o=o+Math.imul(f,fe)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(P,z),i=(i=Math.imul(P,J))+Math.imul(H,z)|0,o=Math.imul(H,J),r=r+Math.imul(F,V)|0,i=(i=i+Math.imul(F,Y)|0)+Math.imul(L,V)|0,o=o+Math.imul(L,Y)|0,r=r+Math.imul(U,W)|0,i=(i=i+Math.imul(U,X)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,X)|0,r=r+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,Z)|0,r=r+Math.imul(C,$)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,ee)|0,r=r+Math.imul(x,ne)|0,i=(i=i+Math.imul(x,re)|0)+Math.imul(E,ne)|0,o=o+Math.imul(E,re)|0,r=r+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,r=r+Math.imul(b,ce)|0,i=(i=i+Math.imul(b,ue)|0)+Math.imul(g,ce)|0,o=o+Math.imul(g,ue)|0,r=r+Math.imul(p,de)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(m,de)|0,o=o+Math.imul(m,fe)|0;var Te=(u+(r=r+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,me)|0)+Math.imul(f,pe)|0))<<13)|0;u=((o=o+Math.imul(f,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(P,V),i=(i=Math.imul(P,Y))+Math.imul(H,V)|0,o=Math.imul(H,Y),r=r+Math.imul(F,W)|0,i=(i=i+Math.imul(F,X)|0)+Math.imul(L,W)|0,o=o+Math.imul(L,X)|0,r=r+Math.imul(U,Q)|0,i=(i=i+Math.imul(U,Z)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(N,$)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,ee)|0,r=r+Math.imul(C,ne)|0,i=(i=i+Math.imul(C,re)|0)+Math.imul(I,ne)|0,o=o+Math.imul(I,re)|0,r=r+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,se)|0)+Math.imul(E,oe)|0,o=o+Math.imul(E,se)|0,r=r+Math.imul(v,ce)|0,i=(i=i+Math.imul(v,ue)|0)+Math.imul(A,ce)|0,o=o+Math.imul(A,ue)|0,r=r+Math.imul(b,de)|0,i=(i=i+Math.imul(b,fe)|0)+Math.imul(g,de)|0,o=o+Math.imul(g,fe)|0;var Ce=(u+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;u=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(P,W),i=(i=Math.imul(P,X))+Math.imul(H,W)|0,o=Math.imul(H,X),r=r+Math.imul(F,Q)|0,i=(i=i+Math.imul(F,Z)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,Z)|0,r=r+Math.imul(U,$)|0,i=(i=i+Math.imul(U,ee)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,ee)|0,r=r+Math.imul(N,ne)|0,i=(i=i+Math.imul(N,re)|0)+Math.imul(B,ne)|0,o=o+Math.imul(B,re)|0,r=r+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,se)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,se)|0,r=r+Math.imul(x,ce)|0,i=(i=i+Math.imul(x,ue)|0)+Math.imul(E,ce)|0,o=o+Math.imul(E,ue)|0,r=r+Math.imul(v,de)|0,i=(i=i+Math.imul(v,fe)|0)+Math.imul(A,de)|0,o=o+Math.imul(A,fe)|0;var Ie=(u+(r=r+Math.imul(b,pe)|0)|0)+((8191&(i=(i=i+Math.imul(b,me)|0)+Math.imul(g,pe)|0))<<13)|0;u=((o=o+Math.imul(g,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(P,Q),i=(i=Math.imul(P,Z))+Math.imul(H,Q)|0,o=Math.imul(H,Z),r=r+Math.imul(F,$)|0,i=(i=i+Math.imul(F,ee)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,ee)|0,r=r+Math.imul(U,ne)|0,i=(i=i+Math.imul(U,re)|0)+Math.imul(R,ne)|0,o=o+Math.imul(R,re)|0,r=r+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,se)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,se)|0,r=r+Math.imul(C,ce)|0,i=(i=i+Math.imul(C,ue)|0)+Math.imul(I,ce)|0,o=o+Math.imul(I,ue)|0,r=r+Math.imul(x,de)|0,i=(i=i+Math.imul(x,fe)|0)+Math.imul(E,de)|0,o=o+Math.imul(E,fe)|0;var Se=(u+(r=r+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,me)|0)+Math.imul(A,pe)|0))<<13)|0;u=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(P,$),i=(i=Math.imul(P,ee))+Math.imul(H,$)|0,o=Math.imul(H,ee),r=r+Math.imul(F,ne)|0,i=(i=i+Math.imul(F,re)|0)+Math.imul(L,ne)|0,o=o+Math.imul(L,re)|0,r=r+Math.imul(U,oe)|0,i=(i=i+Math.imul(U,se)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,se)|0,r=r+Math.imul(N,ce)|0,i=(i=i+Math.imul(N,ue)|0)+Math.imul(B,ce)|0,o=o+Math.imul(B,ue)|0,r=r+Math.imul(C,de)|0,i=(i=i+Math.imul(C,fe)|0)+Math.imul(I,de)|0,o=o+Math.imul(I,fe)|0;var Ne=(u+(r=r+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,me)|0)+Math.imul(E,pe)|0))<<13)|0;u=((o=o+Math.imul(E,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(P,ne),i=(i=Math.imul(P,re))+Math.imul(H,ne)|0,o=Math.imul(H,re),r=r+Math.imul(F,oe)|0,i=(i=i+Math.imul(F,se)|0)+Math.imul(L,oe)|0,o=o+Math.imul(L,se)|0,r=r+Math.imul(U,ce)|0,i=(i=i+Math.imul(U,ue)|0)+Math.imul(R,ce)|0,o=o+Math.imul(R,ue)|0,r=r+Math.imul(N,de)|0,i=(i=i+Math.imul(N,fe)|0)+Math.imul(B,de)|0,o=o+Math.imul(B,fe)|0;var Be=(u+(r=r+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,me)|0)+Math.imul(I,pe)|0))<<13)|0;u=((o=o+Math.imul(I,me)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,r=Math.imul(P,oe),i=(i=Math.imul(P,se))+Math.imul(H,oe)|0,o=Math.imul(H,se),r=r+Math.imul(F,ce)|0,i=(i=i+Math.imul(F,ue)|0)+Math.imul(L,ce)|0,o=o+Math.imul(L,ue)|0,r=r+Math.imul(U,de)|0,i=(i=i+Math.imul(U,fe)|0)+Math.imul(R,de)|0,o=o+Math.imul(R,fe)|0;var Me=(u+(r=r+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,me)|0)+Math.imul(B,pe)|0))<<13)|0;u=((o=o+Math.imul(B,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(P,ce),i=(i=Math.imul(P,ue))+Math.imul(H,ce)|0,o=Math.imul(H,ue),r=r+Math.imul(F,de)|0,i=(i=i+Math.imul(F,fe)|0)+Math.imul(L,de)|0,o=o+Math.imul(L,fe)|0;var Ue=(u+(r=r+Math.imul(U,pe)|0)|0)+((8191&(i=(i=i+Math.imul(U,me)|0)+Math.imul(R,pe)|0))<<13)|0;u=((o=o+Math.imul(R,me)|0)+(i>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,r=Math.imul(P,de),i=(i=Math.imul(P,fe))+Math.imul(H,de)|0,o=Math.imul(H,fe);var Re=(u+(r=r+Math.imul(F,pe)|0)|0)+((8191&(i=(i=i+Math.imul(F,me)|0)+Math.imul(L,pe)|0))<<13)|0;u=((o=o+Math.imul(L,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Oe=(u+(r=Math.imul(P,pe))|0)+((8191&(i=(i=Math.imul(P,me))+Math.imul(H,pe)|0))<<13)|0;return u=((o=Math.imul(H,me))+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,c[0]=we,c[1]=be,c[2]=ge,c[3]=ye,c[4]=ve,c[5]=Ae,c[6]=ke,c[7]=xe,c[8]=Ee,c[9]=Te,c[10]=Ce,c[11]=Ie,c[12]=Se,c[13]=Ne,c[14]=Be,c[15]=Me,c[16]=Ue,c[17]=Re,c[18]=Oe,0!==u&&(c[19]=u,n.length++),n};function w(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var s=i;i=0;for(var a=67108863&r,c=Math.min(o,t.length-1),u=Math.max(0,o-e.length+1);u<=c;u++){var l=o-u,d=(0|e.words[l])*(0|t.words[u]),f=67108863&d;a=67108863&(f=f+a|0),i+=(s=(s=s+(d/67108864|0)|0)+(f>>>26)|0)>>>26,s&=67108863}n.words[o]=a,r=s,s=i}return 0!==r?n.words[o]=r:n.length--,n.j()}function b(e,t,n){return w(e,t,n)}Math.imul||(m=p),i.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):n<63?p(this,e,t):n<1024?w(this,e,t):b(this,e,t)},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),b(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*e,s=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),this.length=0===e?1:this.length,t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=e.words[r]>>>i&1}return t}(e);if(0===t.length)return new i(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var o=n.sqr();r<t.length;r++,o=o.sqr())0!==t[r]&&(n=n.mul(o));return n},i.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,c=(0|this.words[t])-a<<r;this.words[t]=c|s,s=a>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.j()},i.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,c=r;if(i-=s,i=Math.max(0,i),c){for(var u=0;u<s;u++)c.words[u]=this.words[u];c.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var l=0;for(u=this.length-1;u>=0&&(0!==l||u>=i);u--){var d=0|this.words[u];this.words[u]=l<<26-o|d>>>o,l=d&a}return c&&0!==l&&(c.words[c.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.j()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},i.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return 0===this.length&&(this.words[0]=0,this.length=1),this.j()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this.J(e)},i.prototype.J=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.j()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype.te=function(e,t,r){var i,o,s=e.length+r;this.V(s);var a=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+a;var c=(0|e.words[i])*t;a=((o-=67108863&c)>>26)-(c/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.j();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this.j()},i.prototype.ne=function(e,t){var n=(this.length,e.length),r=this.clone(),o=e,s=0|o.words[o.length-1];0!=(n=26-this.$(s))&&(o=o.ushln(n),r.iushln(n),s=0|o.words[o.length-1]);var a,c=r.length-o.length;if("mod"!==t){(a=new i(null)).length=c+1,a.words=new Array(a.length);for(var u=0;u<a.length;u++)a.words[u]=0}var l=r.clone().te(o,1,c);0===l.negative&&(r=l,a&&(a.words[c]=1));for(var d=c-1;d>=0;d--){var f=67108864*(0|r.words[o.length+d])+(0|r.words[o.length+d-1]);for(f=Math.min(f/s|0,67108863),r.te(o,f,d);0!==r.negative;)f--,r.negative=0,r.te(o,1,d),r.isZero()||(r.negative^=1);a&&(a.words[d]=f)}return a&&a.j(),r.j(),"div"!==t&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(o=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:o,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(o=a.div.neg()),{div:o,mod:a.mod}):0!==(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this.ne(e,t);var o,s,a},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this.j(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new i(1),s=new i(0),a=new i(0),c=new i(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var l=r.clone(),d=t.clone();!t.isZero();){for(var f=0,h=1;0===(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(l),s.isub(d)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||c.isOdd())&&(a.iadd(l),c.isub(d)),a.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(a),s.isub(c)):(r.isub(t),a.isub(o),c.isub(s))}return{a:a,b:c,gcd:r.iushln(u)}},i.prototype.re=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,s=new i(1),a=new i(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,l=1;0===(t.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(t.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);for(var d=0,f=1;0===(r.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(r.iushrn(d);d-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(o=0===t.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(e),o},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return!(1&this.words[0])},i.prototype.isOdd=function(){return!(1&~this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this.V(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.j(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},i.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new E(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this).ie(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype.ie=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this.ie(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red.oe(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red.oe(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red.se(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red.se(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red.se(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red.se(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red.se(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red.se(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this.ae()}function v(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=i.ce(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function T(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r.re(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype.ae=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n.j(),n},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},r(v,y),v.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&n,i=10;i<e.length;i++){var s=0|e.words[i];e.words[i-10]=(s&n)<<4|o>>>22,o=s}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(A,y),r(k,y),r(x,y),x.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},i.ce=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new A;else if("p192"===e)t=new k;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new x}return g[e]=t,t},E.prototype.se=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},E.prototype.oe=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e).ie(this):(u(e,e.umod(this.m).ie(this)),e)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e).ie(this)},E.prototype.add=function(e,t){this.oe(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n.ie(this)},E.prototype.iadd=function(e,t){this.oe(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},E.prototype.sub=function(e,t){this.oe(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n.ie(this)},E.prototype.isub=function(e,t){this.oe(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},E.prototype.shl=function(e,t){return this.se(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this.oe(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this.oe(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);n(!o.isZero());var a=new i(1).toRed(this),c=a.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new i(2*l*l).toRed(this);0!==this.pow(l,u).cmp(c);)l.redIAdd(c);for(var d=this.pow(l,o),f=this.pow(e,o.addn(1).iushrn(1)),h=this.pow(e,o),p=s;0!==h.cmp(a);){for(var m=h,w=0;0!==m.cmp(a);w++)m=m.redSqr();n(w<p);var b=this.pow(d,new i(1).iushln(p-w-1));f=f.redMul(b),d=b.redSqr(),h=h.redMul(d),p=w}return f},E.prototype.invm=function(e){var t=e.re(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},E.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new i(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var o=n[0],s=0,a=0,c=t.bitLength()%26;for(0===c&&(c=26),r=t.length-1;r>=0;r--){for(var u=t.words[r],l=c-1;l>=0;l--){var d=u>>l&1;o!==n[0]&&(o=this.sqr(o)),0!==d||0!==s?(s<<=1,s|=d,(4===++a||0===r&&0===l)&&(o=this.mul(o,n[s]),a=0,s=0)):a=0}c=26}return o},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new T(e)},r(T,E),T.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},T.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},T.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o.ie(this)},T.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0).ie(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s.ie(this)},T.prototype.invm=function(e){return this.imod(e.re(this.m).mul(this.r2)).ie(this)}}(no,oo)),no.exports}const ao=Nn(so());var co,uo,lo,fo,ho,po={exports:{}};function mo(){if(ho)return fo;ho=1;var e=function(){if(lo)return uo;lo=1;var e=(co||(co=1,function(e,t){var n=Dn(),r=n.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n){return r(e,t,n)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=o),o.prototype=Object.create(r.prototype),i(r,o),o.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return r(e,t,n)},o.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=r(e);return void 0!==t?"string"==typeof n?i.fill(t,n):i.fill(t):i.fill(0),i},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}}(po,po.exports)),po.exports).Buffer;return uo=function(t){if(t.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r<n.length;r++)n[r]=255;for(var i=0;i<t.length;i++){var o=t.charAt(i),s=o.charCodeAt(0);if(255!==n[s])throw new TypeError(o+" is ambiguous");n[s]=i}var a=t.length,c=t.charAt(0),u=Math.log(a)/Math.log(256),l=Math.log(256)/Math.log(a);function d(t){if("string"!=typeof t)throw new TypeError("Expected String");if(0===t.length)return e.alloc(0);for(var r=0,i=0,o=0;t[r]===c;)i++,r++;for(var s=(t.length-r)*u+1>>>0,l=new Uint8Array(s);r<t.length;){var d=t.charCodeAt(r);if(d>255)return;var f=n[d];if(255===f)return;for(var h=0,p=s-1;(0!==f||h<o)&&-1!==p;p--,h++)f+=a*l[p]>>>0,l[p]=f%256>>>0,f=f/256>>>0;if(0!==f)throw new Error("Non-zero carry");o=h,r++}for(var m=s-o;m!==s&&0===l[m];)m++;var w=e.allocUnsafe(i+(s-m));w.fill(0,0,i);for(var b=i;m!==s;)w[b++]=l[m++];return w}return{encode:function(n){if((Array.isArray(n)||n instanceof Uint8Array)&&(n=e.from(n)),!e.isBuffer(n))throw new TypeError("Expected Buffer");if(0===n.length)return"";for(var r=0,i=0,o=0,s=n.length;o!==s&&0===n[o];)o++,r++;for(var u=(s-o)*l+1>>>0,d=new Uint8Array(u);o!==s;){for(var f=n[o],h=0,p=u-1;(0!==f||h<i)&&-1!==p;p--,h++)f+=256*d[p]>>>0,d[p]=f%a>>>0,f=f/a>>>0;if(0!==f)throw new Error("Non-zero carry");i=h,o++}for(var m=u-i;m!==u&&0===d[m];)m++;for(var w=c.repeat(r);m<u;++m)w+=t.charAt(d[m]);return w},decodeUnsafe:d,decode:function(e){var t=d(e);if(t)return t;throw new Error("Non-base"+a+" character")}}}}();return fo=e("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")}const wo=Nn(mo());function bo(e,...t){if(!((n=e)instanceof Uint8Array||null!=n&&"object"==typeof n&&"Uint8Array"===n.constructor.name))throw new Error("Uint8Array expected");var n;if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function go(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")}const yo=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),vo=(e,t)=>e<<32-t|e>>>t;function Ao(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}(e)),bo(e),e}new Uint8Array(new Uint32Array([287454020]).buffer)[0];class ko{clone(){return this.i()}}function xo(e){const t=t=>e().update(Ao(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}const Eo=(e,t,n)=>e&t^~e&n,To=(e,t,n)=>e&t^e&n^t&n;class Co extends ko{constructor(e,t,n,r){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=yo(this.buffer)}update(e){go(this);const{view:t,buffer:n,blockLen:r}=this,i=(e=Ao(e)).length;for(let o=0;o<i;){const s=Math.min(r-this.pos,i-o);if(s===r){const t=yo(e);for(;r<=i-o;o+=r)this.process(t,o);continue}n.set(e.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){go(this),function(e,t){bo(e);const n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:r,isLE:i}=this;let{pos:o}=this;t[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>r-o&&(this.process(n,0),o=0);for(let l=o;l<r;l++)t[l]=0;!function(e,t,n,r){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,n,r);const i=BigInt(32),o=BigInt(4294967295),s=Number(n>>i&o),a=Number(n&o),c=r?4:0,u=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+u,a,r)}(n,r-8,BigInt(8*this.length),i),this.process(n,0);const s=yo(e),a=this.outputLen;if(a%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=a/4,u=this.get();if(c>u.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;l<c;l++)s.setUint32(4*l,u[l],i)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}i(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:r,finished:i,destroyed:o,pos:s}=this;return e.length=r,e.pos=s,e.finished=i,e.destroyed=o,r%t&&e.buffer.set(n),e}}const Io=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),So=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),No=new Uint32Array(64);class Bo extends Co{constructor(){super(64,32,8,!1),this.A=0|So[0],this.B=0|So[1],this.C=0|So[2],this.D=0|So[3],this.E=0|So[4],this.F=0|So[5],this.G=0|So[6],this.H=0|So[7]}get(){const{A:e,B:t,C:n,D:r,E:i,F:o,G:s,H:a}=this;return[e,t,n,r,i,o,s,a]}set(e,t,n,r,i,o,s,a){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(e,t){for(let l=0;l<16;l++,t+=4)No[l]=e.getUint32(t,!1);for(let l=16;l<64;l++){const e=No[l-15],t=No[l-2],n=vo(e,7)^vo(e,18)^e>>>3,r=vo(t,17)^vo(t,19)^t>>>10;No[l]=r+No[l-7]+n+No[l-16]|0}let{A:n,B:r,C:i,D:o,E:s,F:a,G:c,H:u}=this;for(let l=0;l<64;l++){const e=u+(vo(s,6)^vo(s,11)^vo(s,25))+Eo(s,a,c)+Io[l]+No[l]|0,t=(vo(n,2)^vo(n,13)^vo(n,22))+To(n,r,i)|0;u=c,c=a,a=s,s=o+e|0,o=i,i=r,r=n,n=e+t|0}n=n+this.A|0,r=r+this.B|0,i=i+this.C|0,o=o+this.D|0,s=s+this.E|0,a=a+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(n,r,i,o,s,a,c,u)}roundClean(){No.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const Mo=xo(()=>new Bo);var Uo={};function Ro(e,t,n){return t<=e&&e<=n}function Oo(e){if(void 0===e)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function Fo(e){this.tokens=[].slice.call(e)}Fo.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():-1},prepend:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.unshift(t.pop());else this.tokens.unshift(e)},push:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.push(t.shift());else this.tokens.push(e)}};var Lo=-1;function Do(e,t){if(e)throw TypeError("Decoder error");return t||65533}var Po="utf-8";function Ho(e,t){if(!(this instanceof Ho))return new Ho(e,t);if((e=void 0!==e?String(e).toLowerCase():Po)!==Po)throw new Error("Encoding not supported. Only utf-8 is supported");t=Oo(t),this.ue=!1,this.le=!1,this.de=null,this.fe=Boolean(t.fatal),this.he=Boolean(t.ignoreBOM),Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this.fe}),Object.defineProperty(this,"ignoreBOM",{value:this.he})}function jo(e,t){if(!(this instanceof jo))return new jo(e,t);if((e=void 0!==e?String(e).toLowerCase():Po)!==Po)throw new Error("Encoding not supported. Only utf-8 is supported");t=Oo(t),this.ue=!1,this.pe=null,this.me={fatal:Boolean(t.fatal)},Object.defineProperty(this,"encoding",{value:"utf-8"})}function zo(e){var t=e.fatal,n=0,r=0,i=0,o=128,s=191;this.handler=function(e,a){if(-1===a&&0!==i)return i=0,Do(t);if(-1===a)return Lo;if(0===i){if(Ro(a,0,127))return a;if(Ro(a,194,223))i=1,n=a-192;else if(Ro(a,224,239))224===a&&(o=160),237===a&&(s=159),i=2,n=a-224;else{if(!Ro(a,240,244))return Do(t);240===a&&(o=144),244===a&&(s=143),i=3,n=a-240}return n<<=6*i,null}if(!Ro(a,o,s))return n=i=r=0,o=128,s=191,e.prepend(a),Do(t);if(o=128,s=191,n+=a-128<<6*(i-(r+=1)),r!==i)return null;var c=n;return n=i=r=0,c}}function Jo(e){e.fatal,this.handler=function(e,t){if(-1===t)return Lo;if(Ro(t,0,127))return t;var n,r;Ro(t,128,2047)?(n=1,r=192):Ro(t,2048,65535)?(n=2,r=224):Ro(t,65536,1114111)&&(n=3,r=240);for(var i=[(t>>6*n)+r];n>0;){var o=t>>6*(n-1);i.push(128|63&o),n-=1}return i}}Ho.prototype={decode:function(e,t){var n;n="object"==typeof e&&e instanceof ArrayBuffer?new Uint8Array(e):"object"==typeof e&&"buffer"in e&&e.buffer instanceof ArrayBuffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(0),t=Oo(t),this.ue||(this.de=new zo({fatal:this.fe}),this.le=!1),this.ue=Boolean(t.stream);for(var r,i=new Fo(n),o=[];!i.endOfStream()&&(r=this.de.handler(i,i.read()))!==Lo;)null!==r&&(Array.isArray(r)?o.push.apply(o,r):o.push(r));if(!this.ue){do{if((r=this.de.handler(i,i.read()))===Lo)break;null!==r&&(Array.isArray(r)?o.push.apply(o,r):o.push(r))}while(!i.endOfStream());this.de=null}return o.length&&(-1===["utf-8"].indexOf(this.encoding)||this.he||this.le||(65279===o[0]?(this.le=!0,o.shift()):this.le=!0)),function(e){for(var t="",n=0;n<e.length;++n){var r=e[n];r<=65535?t+=String.fromCharCode(r):(r-=65536,t+=String.fromCharCode(55296+(r>>10),56320+(1023&r)))}return t}(o)}},jo.prototype={encode:function(e,t){e=e?String(e):"",t=Oo(t),this.ue||(this.pe=new Jo(this.me)),this.ue=Boolean(t.stream);for(var n,r=[],i=new Fo(function(e){for(var t=String(e),n=t.length,r=0,i=[];r<n;){var o=t.charCodeAt(r);if(o<55296||o>57343)i.push(o);else if(56320<=o&&o<=57343)i.push(65533);else if(55296<=o&&o<=56319)if(r===n-1)i.push(65533);else{var s=e.charCodeAt(r+1);if(56320<=s&&s<=57343){var a=1023&o,c=1023&s;i.push(65536+(a<<10)+c),r+=1}else i.push(65533)}r+=1}return i}(e));!i.endOfStream()&&(n=this.pe.handler(i,i.read()))!==Lo;)Array.isArray(n)?r.push.apply(r,n):r.push(n);if(!this.ue){for(;(n=this.pe.handler(i,i.read()))!==Lo;)Array.isArray(n)?r.push.apply(r,n):r.push(n);this.pe=null}return new Uint8Array(r)}};const qo=Bn(Object.freeze(Object.defineProperty({__proto__:null,TextDecoder:Ho,TextEncoder:jo},Symbol.toStringTag,{value:"Module"})));var Vo,Yo,Go=function(){if(Vo)return Uo;Vo=1;var e=Uo&&Uo.we||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),t=Uo&&Uo.be||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=Uo&&Uo.ge||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},r=Uo&&Uo.ye||function(n){if(n&&n.u)return n;var r={};if(null!=n)for(var i in n)"default"!==i&&Object.hasOwnProperty.call(n,i)&&e(r,n,i);return t(r,n),r},i=Uo&&Uo.ve||function(e){return e&&e.u?e:{default:e}};Object.defineProperty(Uo,"u",{value:!0}),Uo.deserializeUnchecked=Uo.deserialize=Uo.serialize=Uo.BinaryReader=Uo.BinaryWriter=Uo.BorshError=Uo.baseDecode=Uo.baseEncode=void 0;const o=i(so()),s=i(mo()),a=r(qo),c=new("function"!=typeof TextDecoder?a.TextDecoder:TextDecoder)("utf-8",{fatal:!0});Uo.baseEncode=function(e){return"string"==typeof e&&(e=Buffer.from(e,"utf8")),s.default.encode(Buffer.from(e))},Uo.baseDecode=function(e){return Buffer.from(s.default.decode(e))};const u=1024;class l extends Error{constructor(e){super(e),this.fieldPath=[],this.originalMessage=e}addToFieldPath(e){this.fieldPath.splice(0,0,e),this.message=this.originalMessage+": "+this.fieldPath.join(".")}}Uo.BorshError=l;class d{constructor(){this.buf=Buffer.alloc(u),this.length=0}maybeResize(){this.buf.length<16+this.length&&(this.buf=Buffer.concat([this.buf,Buffer.alloc(u)]))}writeU8(e){this.maybeResize(),this.buf.writeUInt8(e,this.length),this.length+=1}writeU16(e){this.maybeResize(),this.buf.writeUInt16LE(e,this.length),this.length+=2}writeU32(e){this.maybeResize(),this.buf.writeUInt32LE(e,this.length),this.length+=4}writeU64(e){this.maybeResize(),this.writeBuffer(Buffer.from(new o.default(e).toArray("le",8)))}writeU128(e){this.maybeResize(),this.writeBuffer(Buffer.from(new o.default(e).toArray("le",16)))}writeU256(e){this.maybeResize(),this.writeBuffer(Buffer.from(new o.default(e).toArray("le",32)))}writeU512(e){this.maybeResize(),this.writeBuffer(Buffer.from(new o.default(e).toArray("le",64)))}writeBuffer(e){this.buf=Buffer.concat([Buffer.from(this.buf.subarray(0,this.length)),e,Buffer.alloc(u)]),this.length+=e.length}writeString(e){this.maybeResize();const t=Buffer.from(e,"utf8");this.writeU32(t.length),this.writeBuffer(t)}writeFixedArray(e){this.writeBuffer(Buffer.from(e))}writeArray(e,t){this.maybeResize(),this.writeU32(e.length);for(const n of e)this.maybeResize(),t(n)}toArray(){return this.buf.subarray(0,this.length)}}function f(e,t,n){const r=n.value;n.value=function(...e){try{return r.apply(this,e)}catch(t){if(t instanceof RangeError){const e=t.code;if(["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(e)>=0)throw new l("Reached the end of buffer when deserializing")}throw t}}}Uo.BinaryWriter=d;class h{constructor(e){this.buf=e,this.offset=0}readU8(){const e=this.buf.readUInt8(this.offset);return this.offset+=1,e}readU16(){const e=this.buf.readUInt16LE(this.offset);return this.offset+=2,e}readU32(){const e=this.buf.readUInt32LE(this.offset);return this.offset+=4,e}readU64(){const e=this.readBuffer(8);return new o.default(e,"le")}readU128(){const e=this.readBuffer(16);return new o.default(e,"le")}readU256(){const e=this.readBuffer(32);return new o.default(e,"le")}readU512(){const e=this.readBuffer(64);return new o.default(e,"le")}readBuffer(e){if(this.offset+e>this.buf.length)throw new l(`Expected buffer length ${e} isn't within bounds`);const t=this.buf.slice(this.offset,this.offset+e);return this.offset+=e,t}readString(){const e=this.readU32(),t=this.readBuffer(e);try{return c.decode(t)}catch(n){throw new l(`Error decoding UTF-8 string: ${n}`)}}readFixedArray(e){return new Uint8Array(this.readBuffer(e))}readArray(e){const t=this.readU32(),n=Array();for(let r=0;r<t;++r)n.push(e());return n}}function p(e){return e.charAt(0).toUpperCase()+e.slice(1)}function m(e,t,n,r,i){try{if("string"==typeof r)i[`write${p(r)}`](n);else if(r instanceof Array)if("number"==typeof r[0]){if(n.length!==r[0])throw new l(`Expecting byte array of length ${r[0]}, but got ${n.length} bytes`);i.writeFixedArray(n)}else if(2===r.length&&"number"==typeof r[1]){if(n.length!==r[1])throw new l(`Expecting byte array of length ${r[1]}, but got ${n.length} bytes`);for(let t=0;t<r[1];t++)m(e,null,n[t],r[0],i)}else i.writeArray(n,n=>{m(e,t,n,r[0],i)});else if(void 0!==r.kind)switch(r.kind){case"option":null==n?i.writeU8(0):(i.writeU8(1),m(e,t,n,r.type,i));break;case"map":i.writeU32(n.size),n.forEach((n,o)=>{m(e,t,o,r.key,i),m(e,t,n,r.value,i)});break;default:throw new l(`FieldType ${r} unrecognized`)}else w(e,n,i)}catch(o){throw o instanceof l&&o.addToFieldPath(t),o}}function w(e,t,n){if("function"==typeof t.borshSerialize)return void t.borshSerialize(n);const r=e.get(t.constructor);if(!r)throw new l(`Class ${t.constructor.name} is missing in schema`);if("struct"===r.kind)r.fields.map(([r,i])=>{m(e,r,t[r],i,n)});else{if("enum"!==r.kind)throw new l(`Unexpected schema kind: ${r.kind} for ${t.constructor.name}`);{const i=t[r.field];for(let o=0;o<r.values.length;++o){const[s,a]=r.values[o];if(s===i){n.writeU8(o),m(e,s,t[s],a,n);break}}}}}function b(e,t,n,r){try{if("string"==typeof n)return r[`read${p(n)}`]();if(n instanceof Array){if("number"==typeof n[0])return r.readFixedArray(n[0]);if("number"==typeof n[1]){const t=[];for(let i=0;i<n[1];i++)t.push(b(e,null,n[0],r));return t}return r.readArray(()=>b(e,t,n[0],r))}if("option"===n.kind)return r.readU8()?b(e,t,n.type,r):void 0;if("map"===n.kind){let i=new Map;const o=r.readU32();for(let s=0;s<o;s++){const o=b(e,t,n.key,r),s=b(e,t,n.value,r);i.set(o,s)}return i}return g(e,n,r)}catch(i){throw i instanceof l&&i.addToFieldPath(t),i}}function g(e,t,n){if("function"==typeof t.borshDeserialize)return t.borshDeserialize(n);const r=e.get(t);if(!r)throw new l(`Class ${t.name} is missing in schema`);if("struct"===r.kind){const r={};for(const[i,o]of e.get(t).fields)r[i]=b(e,i,o,n);return new t(r)}if("enum"===r.kind){const i=n.readU8();if(i>=r.values.length)throw new l(`Enum index: ${i} is out of range`);const[o,s]=r.values[i],a=b(e,o,s,n);return new t({[o]:a})}throw new l(`Unexpected schema kind: ${r.kind} for ${t.constructor.name}`)}return n([f],h.prototype,"readU8",null),n([f],h.prototype,"readU16",null),n([f],h.prototype,"readU32",null),n([f],h.prototype,"readU64",null),n([f],h.prototype,"readU128",null),n([f],h.prototype,"readU256",null),n([f],h.prototype,"readU512",null),n([f],h.prototype,"readString",null),n([f],h.prototype,"readFixedArray",null),n([f],h.prototype,"readArray",null),Uo.BinaryReader=h,Uo.serialize=function(e,t,n=d){const r=new n;return w(e,t,r),r.toArray()},Uo.deserialize=function(e,t,n,r=h){const i=new r(n),o=g(e,t,i);if(i.offset<n.length)throw new l(`Unexpected ${n.length-i.offset} bytes after deserialized data`);return o},Uo.deserializeUnchecked=function(e,t,n,r=h){return g(e,t,new r(n))},Uo}(),Wo={},Xo=function(){if(Yo)return Wo;Yo=1,Object.defineProperty(Wo,"u",{value:!0}),Wo.s16=Wo.s8=Wo.nu64be=Wo.u48be=Wo.u40be=Wo.u32be=Wo.u24be=Wo.u16be=Wo.nu64=Wo.u48=Wo.u40=Wo.u32=Wo.u24=Wo.u16=Wo.u8=Wo.offset=Wo.greedy=Wo.Constant=Wo.UTF8=Wo.CString=Wo.Blob=Wo.Boolean=Wo.BitField=Wo.BitStructure=Wo.VariantLayout=Wo.Union=Wo.UnionLayoutDiscriminator=Wo.UnionDiscriminator=Wo.Structure=Wo.Sequence=Wo.DoubleBE=Wo.Double=Wo.FloatBE=Wo.Float=Wo.NearInt64BE=Wo.NearInt64=Wo.NearUInt64BE=Wo.NearUInt64=Wo.IntBE=Wo.Int=Wo.UIntBE=Wo.UInt=Wo.OffsetLayout=Wo.GreedyCount=Wo.ExternalLayout=Wo.bindConstructorLayout=Wo.nameWithProperty=Wo.Layout=Wo.uint8ArrayToBuffer=Wo.checkUint8Array=void 0,Wo.constant=Wo.utf8=Wo.cstr=Wo.blob=Wo.unionLayoutDiscriminator=Wo.union=Wo.seq=Wo.bits=Wo.struct=Wo.f64be=Wo.f64=Wo.f32be=Wo.f32=Wo.ns64be=Wo.s48be=Wo.s40be=Wo.s32be=Wo.s24be=Wo.s16be=Wo.ns64=Wo.s48=Wo.s40=Wo.s32=Wo.s24=void 0;const e=Dn();function t(e){if(!(e instanceof Uint8Array))throw new TypeError("b must be a Uint8Array")}function n(n){return t(n),e.Buffer.from(n.buffer,n.byteOffset,n.length)}Wo.checkUint8Array=t,Wo.uint8ArrayToBuffer=n;let r=class{constructor(e,t){if(!Number.isInteger(e))throw new TypeError("span must be an integer");this.span=e,this.property=t}makeDestinationObject(){return{}}getSpan(e,t){if(0>this.span)throw new RangeError("indeterminate span");return this.span}replicate(e){const t=Object.create(this.constructor.prototype);return Object.assign(t,this),t.property=e,t}fromArray(e){}};function i(e,t){return t.property?e+"["+t.property+"]":e}Wo.Layout=r,Wo.nameWithProperty=i,Wo.bindConstructorLayout=function(e,t){if("function"!=typeof e)throw new TypeError("Class must be constructor");if(Object.prototype.hasOwnProperty.call(e,"layout_"))throw new Error("Class is already bound to a layout");if(!(t&&t instanceof r))throw new TypeError("layout must be a Layout");if(Object.prototype.hasOwnProperty.call(t,"boundConstructor_"))throw new Error("layout is already bound to a constructor");e.layout_=t,t.boundConstructor_=e,t.makeDestinationObject=()=>new e,Object.defineProperty(e.prototype,"encode",{value(e,n){return t.encode(this,e,n)},writable:!0}),Object.defineProperty(e,"decode",{value:(e,n)=>t.decode(e,n),writable:!0})};class o extends r{isCount(){throw new Error("ExternalLayout is abstract")}}Wo.ExternalLayout=o;class s extends o{constructor(e=1,t){if(!Number.isInteger(e)||0>=e)throw new TypeError("elementSpan must be a (positive) integer");super(-1,t),this.elementSpan=e}isCount(){return!0}decode(e,n=0){t(e);const r=e.length-n;return Math.floor(r/this.elementSpan)}encode(e,t,n){return 0}}Wo.GreedyCount=s;class a extends o{constructor(e,t=0,n){if(!(e instanceof r))throw new TypeError("layout must be a Layout");if(!Number.isInteger(t))throw new TypeError("offset must be integer or undefined");super(e.span,n||e.property),this.layout=e,this.offset=t}isCount(){return this.layout instanceof c||this.layout instanceof u}decode(e,t=0){return this.layout.decode(e,t+this.offset)}encode(e,t,n=0){return this.layout.encode(e,t,n+this.offset)}}Wo.OffsetLayout=a;class c extends r{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return n(e).readUIntLE(t,this.span)}encode(e,t,r=0){return n(t).writeUIntLE(e,r,this.span),this.span}}Wo.UInt=c;class u extends r{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return n(e).readUIntBE(t,this.span)}encode(e,t,r=0){return n(t).writeUIntBE(e,r,this.span),this.span}}Wo.UIntBE=u;class l extends r{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return n(e).readIntLE(t,this.span)}encode(e,t,r=0){return n(t).writeIntLE(e,r,this.span),this.span}}Wo.Int=l;class d extends r{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return n(e).readIntBE(t,this.span)}encode(e,t,r=0){return n(t).writeIntBE(e,r,this.span),this.span}}Wo.IntBE=d;const f=Math.pow(2,32);function h(e){const t=Math.floor(e/f);return{hi32:t,lo32:e-t*f}}function p(e,t){return e*f+t}class m extends r{constructor(e){super(8,e)}decode(e,t=0){const r=n(e),i=r.readUInt32LE(t);return p(r.readUInt32LE(t+4),i)}encode(e,t,r=0){const i=h(e),o=n(t);return o.writeUInt32LE(i.lo32,r),o.writeUInt32LE(i.hi32,r+4),8}}Wo.NearUInt64=m;class w extends r{constructor(e){super(8,e)}decode(e,t=0){const r=n(e);return p(r.readUInt32BE(t),r.readUInt32BE(t+4))}encode(e,t,r=0){const i=h(e),o=n(t);return o.writeUInt32BE(i.hi32,r),o.writeUInt32BE(i.lo32,r+4),8}}Wo.NearUInt64BE=w;class b extends r{constructor(e){super(8,e)}decode(e,t=0){const r=n(e),i=r.readUInt32LE(t);return p(r.readInt32LE(t+4),i)}encode(e,t,r=0){const i=h(e),o=n(t);return o.writeUInt32LE(i.lo32,r),o.writeInt32LE(i.hi32,r+4),8}}Wo.NearInt64=b;class g extends r{constructor(e){super(8,e)}decode(e,t=0){const r=n(e);return p(r.readInt32BE(t),r.readUInt32BE(t+4))}encode(e,t,r=0){const i=h(e),o=n(t);return o.writeInt32BE(i.hi32,r),o.writeUInt32BE(i.lo32,r+4),8}}Wo.NearInt64BE=g;class y extends r{constructor(e){super(4,e)}decode(e,t=0){return n(e).readFloatLE(t)}encode(e,t,r=0){return n(t).writeFloatLE(e,r),4}}Wo.Float=y;class v extends r{constructor(e){super(4,e)}decode(e,t=0){return n(e).readFloatBE(t)}encode(e,t,r=0){return n(t).writeFloatBE(e,r),4}}Wo.FloatBE=v;class A extends r{constructor(e){super(8,e)}decode(e,t=0){return n(e).readDoubleLE(t)}encode(e,t,r=0){return n(t).writeDoubleLE(e,r),8}}Wo.Double=A;class k extends r{constructor(e){super(8,e)}decode(e,t=0){return n(e).readDoubleBE(t)}encode(e,t,r=0){return n(t).writeDoubleBE(e,r),8}}Wo.DoubleBE=k;class x extends r{constructor(e,t,n){if(!(e instanceof r))throw new TypeError("elementLayout must be a Layout");if(!(t instanceof o&&t.isCount()||Number.isInteger(t)&&0<=t))throw new TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let i=-1;!(t instanceof o)&&0<e.span&&(i=t*e.span),super(i,n),this.elementLayout=e,this.count=t}getSpan(e,t=0){if(0<=this.span)return this.span;let n=0,r=this.count;if(r instanceof o&&(r=r.decode(e,t)),0<this.elementLayout.span)n=r*this.elementLayout.span;else{let i=0;for(;i<r;)n+=this.elementLayout.getSpan(e,t+n),++i}return n}decode(e,t=0){const n=[];let r=0,i=this.count;for(i instanceof o&&(i=i.decode(e,t));r<i;)n.push(this.elementLayout.decode(e,t)),t+=this.elementLayout.getSpan(e,t),r+=1;return n}encode(e,t,n=0){const r=this.elementLayout,i=e.reduce((e,i)=>e+r.encode(i,t,n+e),0);return this.count instanceof o&&this.count.encode(e.length,t,n),i}}Wo.Sequence=x;class E extends r{constructor(e,t,n){if(!Array.isArray(e)||!e.reduce((e,t)=>e&&t instanceof r,!0))throw new TypeError("fields must be array of Layout instances");"boolean"==typeof t&&void 0===n&&(n=t,t=void 0);for(const r of e)if(0>r.span&&void 0===r.property)throw new Error("fields cannot contain unnamed variable-length layout");let i=-1;try{i=e.reduce((e,t)=>e+t.getSpan(),0)}catch(o){}super(i,t),this.fields=e,this.decodePrefixes=!!n}getSpan(e,t=0){if(0<=this.span)return this.span;let n=0;try{n=this.fields.reduce((n,r)=>{const i=r.getSpan(e,t);return t+=i,n+i},0)}catch(r){throw new RangeError("indeterminate span")}return n}decode(e,n=0){t(e);const r=this.makeDestinationObject();for(const t of this.fields)if(void 0!==t.property&&(r[t.property]=t.decode(e,n)),n+=t.getSpan(e,n),this.decodePrefixes&&e.length===n)break;return r}encode(e,t,n=0){const r=n;let i=0,o=0;for(const s of this.fields){let r=s.span;if(o=0<r?r:0,void 0!==s.property){const i=e[s.property];void 0!==i&&(o=s.encode(i,t,n),0>r&&(r=s.getSpan(t,n)))}i=n,n+=r}return i+o-r}fromArray(e){const t=this.makeDestinationObject();for(const n of this.fields)void 0!==n.property&&0<e.length&&(t[n.property]=e.shift());return t}layoutFor(e){if("string"!=typeof e)throw new TypeError("property must be string");for(const t of this.fields)if(t.property===e)return t}offsetOf(e){if("string"!=typeof e)throw new TypeError("property must be string");let t=0;for(const n of this.fields){if(n.property===e)return t;0>n.span?t=-1:0<=t&&(t+=n.span)}}}Wo.Structure=E;class T{constructor(e){this.property=e}decode(e,t){throw new Error("UnionDiscriminator is abstract")}encode(e,t,n){throw new Error("UnionDiscriminator is abstract")}}Wo.UnionDiscriminator=T;class C extends T{constructor(e,t){if(!(e instanceof o&&e.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");super(t||e.property||"variant"),this.layout=e}decode(e,t){return this.layout.decode(e,t)}encode(e,t,n){return this.layout.encode(e,t,n)}}Wo.UnionLayoutDiscriminator=C;class I extends r{constructor(e,t,n){let i;if(e instanceof c||e instanceof u)i=new C(new a(e));else if(e instanceof o&&e.isCount())i=new C(e);else{if(!(e instanceof T))throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");i=e}if(void 0===t&&(t=null),!(null===t||t instanceof r))throw new TypeError("defaultLayout must be null or a Layout");if(null!==t){if(0>t.span)throw new Error("defaultLayout must have constant span");void 0===t.property&&(t=t.replicate("content"))}let s=-1;t&&(s=t.span,0<=s&&(e instanceof c||e instanceof u)&&(s+=i.layout.span)),super(s,n),this.discriminator=i,this.usesPrefixDiscriminator=e instanceof c||e instanceof u,this.defaultLayout=t,this.registry={};let l=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(e){return l(e)},this.configGetSourceVariant=function(e){l=e.bind(this)}}getSpan(e,t=0){if(0<=this.span)return this.span;const n=this.getVariant(e,t);if(!n)throw new Error("unable to determine span for unrecognized variant");return n.getSpan(e,t)}defaultGetSourceVariant(e){if(Object.prototype.hasOwnProperty.call(e,this.discriminator.property)){if(this.defaultLayout&&this.defaultLayout.property&&Object.prototype.hasOwnProperty.call(e,this.defaultLayout.property))return;const t=this.registry[e[this.discriminator.property]];if(t&&(!t.layout||t.property&&Object.prototype.hasOwnProperty.call(e,t.property)))return t}else for(const t in this.registry){const n=this.registry[t];if(n.property&&Object.prototype.hasOwnProperty.call(e,n.property))return n}throw new Error("unable to infer src variant")}decode(e,t=0){let n;const r=this.discriminator,i=r.decode(e,t),o=this.registry[i];if(void 0===o){const o=this.defaultLayout;let s=0;this.usesPrefixDiscriminator&&(s=r.layout.span),n=this.makeDestinationObject(),n[r.property]=i,n[o.property]=o.decode(e,t+s)}else n=o.decode(e,t);return n}encode(e,t,n=0){const r=this.getSourceVariant(e);if(void 0===r){const r=this.discriminator,i=this.defaultLayout;let o=0;return this.usesPrefixDiscriminator&&(o=r.layout.span),r.encode(e[r.property],t,n),o+i.encode(e[i.property],t,n+o)}return r.encode(e,t,n)}addVariant(e,t,n){const r=new S(this,e,t,n);return this.registry[e]=r,r}getVariant(e,t=0){let n;return n=e instanceof Uint8Array?this.discriminator.decode(e,t):e,this.registry[n]}}Wo.Union=I;class S extends r{constructor(e,t,n,i){if(!(e instanceof I))throw new TypeError("union must be a Union");if(!Number.isInteger(t)||0>t)throw new TypeError("variant must be a (non-negative) integer");if("string"==typeof n&&void 0===i&&(i=n,n=null),n){if(!(n instanceof r))throw new TypeError("layout must be a Layout");if(null!==e.defaultLayout&&0<=n.span&&n.span>e.defaultLayout.span)throw new Error("variant span exceeds span of containing union");if("string"!=typeof i)throw new TypeError("variant must have a String property")}let o=e.span;0>e.span&&(o=n?n.span:0,0<=o&&e.usesPrefixDiscriminator&&(o+=e.discriminator.layout.span)),super(o,i),this.union=e,this.variant=t,this.layout=n||null}getSpan(e,t=0){if(0<=this.span)return this.span;let n=0;this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span);let r=0;return this.layout&&(r=this.layout.getSpan(e,t+n)),n+r}decode(e,t=0){const n=this.makeDestinationObject();if(this!==this.union.getVariant(e,t))throw new Error("variant mismatch");let r=0;return this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span),this.layout?n[this.property]=this.layout.decode(e,t+r):this.property?n[this.property]=!0:this.union.usesPrefixDiscriminator&&(n[this.union.discriminator.property]=this.variant),n}encode(e,t,n=0){let r=0;if(this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span),this.layout&&!Object.prototype.hasOwnProperty.call(e,this.property))throw new TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,t,n);let i=r;if(this.layout&&(this.layout.encode(e[this.property],t,n+r),i+=this.layout.getSpan(t,n+r),0<=this.union.span&&i>this.union.span))throw new Error("encoded variant overruns containing union");return i}fromArray(e){if(this.layout)return this.layout.fromArray(e)}}function N(e){return 0>e&&(e+=4294967296),e}Wo.VariantLayout=S;class B extends r{constructor(e,t,n){if(!(e instanceof c||e instanceof u))throw new TypeError("word must be a UInt or UIntBE layout");if("string"==typeof t&&void 0===n&&(n=t,t=!1),4<e.span)throw new RangeError("word cannot exceed 32 bits");super(e.span,n),this.word=e,this.msb=!!t,this.fields=[];let r=0;this.Ae=function(e){return r=N(e),this},this.ke=function(){return r}}decode(e,t=0){const n=this.makeDestinationObject(),r=this.word.decode(e,t);this.Ae(r);for(const i of this.fields)void 0!==i.property&&(n[i.property]=i.decode(e));return n}encode(e,t,n=0){const r=this.word.decode(t,n);this.Ae(r);for(const i of this.fields)if(void 0!==i.property){const t=e[i.property];void 0!==t&&i.encode(t)}return this.word.encode(this.ke(),t,n)}addField(e,t){const n=new M(this,e,t);return this.fields.push(n),n}addBoolean(e){const t=new U(this,e);return this.fields.push(t),t}fieldFor(e){if("string"!=typeof e)throw new TypeError("property must be string");for(const t of this.fields)if(t.property===e)return t}}Wo.BitStructure=B;class M{constructor(e,t,n){if(!(e instanceof B))throw new TypeError("container must be a BitStructure");if(!Number.isInteger(t)||0>=t)throw new TypeError("bits must be positive integer");const r=8*e.span,i=e.fields.reduce((e,t)=>e+t.bits,0);if(t+i>r)throw new Error("bits too long for span remainder ("+(r-i)+" of "+r+" remain)");this.container=e,this.bits=t,this.valueMask=(1<<t)-1,32===t&&(this.valueMask=4294967295),this.start=i,this.container.msb&&(this.start=r-i-t),this.wordMask=N(this.valueMask<<this.start),this.property=n}decode(e,t){return N(this.container.ke()&this.wordMask)>>>this.start}encode(e){if("number"!=typeof e||!Number.isInteger(e)||e!==N(e&this.valueMask))throw new TypeError(i("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);const t=this.container.ke(),n=N(e<<this.start);this.container.Ae(N(t&~this.wordMask)|n)}}Wo.BitField=M;class U extends M{constructor(e,t){super(e,1,t)}decode(e,t){return!!super.decode(e,t)}encode(e){"boolean"==typeof e&&(e=+e),super.encode(e)}}Wo.Boolean=U;class R extends r{constructor(e,t){if(!(e instanceof o&&e.isCount()||Number.isInteger(e)&&0<=e))throw new TypeError("length must be positive integer or an unsigned integer ExternalLayout");let n=-1;e instanceof o||(n=e),super(n,t),this.length=e}getSpan(e,t){let n=this.span;return 0>n&&(n=this.length.decode(e,t)),n}decode(e,t=0){let r=this.span;return 0>r&&(r=this.length.decode(e,t)),n(e).slice(t,t+r)}encode(e,t,r){let s=this.length;if(this.length instanceof o&&(s=e.length),!(e instanceof Uint8Array&&s===e.length))throw new TypeError(i("Blob.encode",this)+" requires (length "+s+") Uint8Array as src");if(r+s>t.length)throw new RangeError("encoding overruns Uint8Array");const a=n(e);return n(t).write(a.toString("hex"),r,s,"hex"),this.length instanceof o&&this.length.encode(s,t,r),s}}Wo.Blob=R;class O extends r{constructor(e){super(-1,e)}getSpan(e,n=0){t(e);let r=n;for(;r<e.length&&0!==e[r];)r+=1;return 1+r-n}decode(e,t=0){const r=this.getSpan(e,t);return n(e).slice(t,t+r-1).toString("utf-8")}encode(t,r,i=0){"string"!=typeof t&&(t=String(t));const o=e.Buffer.from(t,"utf8"),s=o.length;if(i+s>r.length)throw new RangeError("encoding overruns Buffer");const a=n(r);return o.copy(a,i),a[i+s]=0,s+1}}Wo.CString=O;class F extends r{constructor(e,t){if("string"==typeof e&&void 0===t&&(t=e,e=void 0),void 0===e)e=-1;else if(!Number.isInteger(e))throw new TypeError("maxSpan must be an integer");super(-1,t),this.maxSpan=e}getSpan(e,n=0){return t(e),e.length-n}decode(e,t=0){const r=this.getSpan(e,t);if(0<=this.maxSpan&&this.maxSpan<r)throw new RangeError("text length exceeds maxSpan");return n(e).slice(t,t+r).toString("utf-8")}encode(t,r,i=0){"string"!=typeof t&&(t=String(t));const o=e.Buffer.from(t,"utf8"),s=o.length;if(0<=this.maxSpan&&this.maxSpan<s)throw new RangeError("text length exceeds maxSpan");if(i+s>r.length)throw new RangeError("encoding overruns Buffer");return o.copy(n(r),i),s}}Wo.UTF8=F;class L extends r{constructor(e,t){super(0,t),this.value=e}decode(e,t){return this.value}encode(e,t,n){return 0}}return Wo.Constant=L,Wo.greedy=(e,t)=>new s(e,t),Wo.offset=(e,t,n)=>new a(e,t,n),Wo.u8=e=>new c(1,e),Wo.u16=e=>new c(2,e),Wo.u24=e=>new c(3,e),Wo.u32=e=>new c(4,e),Wo.u40=e=>new c(5,e),Wo.u48=e=>new c(6,e),Wo.nu64=e=>new m(e),Wo.u16be=e=>new u(2,e),Wo.u24be=e=>new u(3,e),Wo.u32be=e=>new u(4,e),Wo.u40be=e=>new u(5,e),Wo.u48be=e=>new u(6,e),Wo.nu64be=e=>new w(e),Wo.s8=e=>new l(1,e),Wo.s16=e=>new l(2,e),Wo.s24=e=>new l(3,e),Wo.s32=e=>new l(4,e),Wo.s40=e=>new l(5,e),Wo.s48=e=>new l(6,e),Wo.ns64=e=>new b(e),Wo.s16be=e=>new d(2,e),Wo.s24be=e=>new d(3,e),Wo.s32be=e=>new d(4,e),Wo.s40be=e=>new d(5,e),Wo.s48be=e=>new d(6,e),Wo.ns64be=e=>new g(e),Wo.f32=e=>new y(e),Wo.f32be=e=>new v(e),Wo.f64=e=>new A(e),Wo.f64be=e=>new k(e),Wo.struct=(e,t,n)=>new E(e,t,n),Wo.bits=(e,t,n)=>new B(e,t,n),Wo.seq=(e,t,n)=>new x(e,t,n),Wo.union=(e,t,n)=>new I(e,t,n),Wo.unionLayoutDiscriminator=(e,t)=>new C(e,t),Wo.blob=(e,t)=>new R(e,t),Wo.cstr=e=>new O(e),Wo.utf8=(e,t)=>new F(e,t),Wo.constant=(e,t)=>new L(e,t),Wo}(),Ko=1,Qo=2,Zo=3,_o=4,$o=5,es=6,ts=7,ns=8,rs=9,is=10,os=-32700,ss=-32603,as=-32602,cs=-32601,us=-32600,ls=-32016,ds=-32015,fs=-32014,hs=-32013,ps=-32012,ms=-32011,ws=-32010,bs=-32009,gs=-32008,ys=-32007,vs=-32006,As=-32005,ks=-32004,xs=-32003,Es=-32002,Ts=-32001,Cs=28e5,Is=2800001,Ss=2800002,Ns=2800003,Bs=2800004,Ms=2800005,Us=2800006,Rs=2800007,Os=2800008,Fs=2800009,Ls=2800010,Ds=2800011,Ps=323e4,Hs=32300001,js=3230002,zs=3230003,Js=3230004,qs=361e4,Vs=3610001,Ys=3610002,Gs=3610003,Ws=3610004,Xs=3610005,Ks=3610006,Qs=3610007,Zs=3611e3,_s=3704e3,$s=3704001,ea=3704002,ta=3704003,na=3704004,ra=4128e3,ia=4128001,oa=4128002,sa=4615e3,aa=4615001,ca=4615002,ua=4615003,la=4615004,da=4615005,fa=4615006,ha=4615007,pa=4615008,ma=4615009,wa=4615010,ba=4615011,ga=4615012,ya=4615013,va=4615014,Aa=4615015,ka=4615016,xa=4615017,Ea=4615018,Ta=4615019,Ca=4615020,Ia=4615021,Sa=4615022,Na=4615023,Ba=4615024,Ma=4615025,Ua=4615026,Ra=4615027,Oa=4615028,Fa=4615029,La=4615030,Da=4615031,Pa=4615032,Ha=4615033,ja=4615034,za=4615035,Ja=4615036,qa=4615037,Va=4615038,Ya=4615039,Ga=4615040,Wa=4615041,Xa=4615042,Ka=4615043,Qa=4615044,Za=4615045,_a=4615046,$a=4615047,ec=4615048,tc=4615049,nc=4615050,rc=4615051,ic=4615052,oc=4615053,sc=4615054,ac=5508e3,cc=5508001,uc=5508002,lc=5508003,dc=5508004,fc=5508005,hc=5508006,pc=5508007,mc=5508008,wc=5508009,bc=5508010,gc=5508011,yc=5663e3,vc=5663001,Ac=5663002,kc=5663003,xc=5663004,Ec=5663005,Tc=5663006,Cc=5663007,Ic=5663008,Sc=5663009,Nc=5663010,Bc=5663011,Mc=5663012,Uc=5663013,Rc=5663014,Oc=5663015,Fc=5663016,Lc=5663017,Dc=5663018,Pc=5663019,Hc=5663020,jc=705e4,zc=7050001,Jc=7050002,qc=7050003,Vc=7050004,Yc=7050005,Gc=7050006,Wc=7050007,Xc=7050008,Kc=7050009,Qc=7050010,Zc=7050011,_c=7050012,$c=7050013,eu=7050014,tu=7050015,nu=7050016,ru=7050017,iu=7050018,ou=7050019,su=7050020,au=7050021,cu=7050022,uu=7050023,lu=7050024,du=7050025,fu=7050026,hu=7050027,pu=7050028,mu=7050029,wu=7050030,bu=7050031,gu=7050032,yu=7050033,vu=7050034,Au=7050035,ku=7050036,xu=8078e3,Eu=8078001,Tu=8078002,Cu=8078003,Iu=8078004,Su=8078005,Nu=8078006,Bu=8078007,Mu=8078008,Uu=8078009,Ru=8078010,Ou=8078011,Fu=8078012,Lu=8078013,Du=8078014,Pu=8078015,Hu=8078016,ju=8078017,zu=8078018,Ju=8078019,qu=8078020,Vu=8078021,Yu=8078022,Gu=81e5,Wu=8100001,Xu=8100002,Ku=8100003,Qu=819e4,Zu=8190001,_u=8190002,$u=8190003,el=8190004,tl=99e5,nl=9900001,rl=9900002,il=9900003,ol=9900004;function sl(e){return Array.isArray(e)?"%5B"+e.map(sl).join("%2C%20")+"%5D":"bigint"==typeof e?`${e}n`:encodeURIComponent(String(null!=e&&null===Object.getPrototypeOf(e)?{...e}:e))}function al([e,t]){return`${e}=${sl(t)}`}var cl={[Ps]:"Account not found at address: $address",[Js]:"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",[zs]:"Expected decoded account at address: $address",[js]:"Failed to decode account data at address: $address",[Hs]:"Accounts not found at addresses: $addresses",[Fs]:"Unable to find a viable program address bump seed.",[Ss]:"$putativeAddress is not a base58-encoded address.",[Cs]:"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",[Ns]:"The `CryptoKey` must be an `Ed25519` public key.",[Ds]:"$putativeOffCurveAddress is not a base58-encoded off-curve address.",[Os]:"Invalid seeds; point must fall off the Ed25519 curve.",[Bs]:"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",[Us]:"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",[Rs]:"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",[Ms]:"Expected program derived address bump to be in the range [0, 255], got: $bump.",[Ls]:"Program address cannot end with PDA marker.",[Is]:"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",[_o]:"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.",[Ko]:"The network has progressed past the last block for which this transaction could have been committed.",[xu]:"Codec [$codecDescription] cannot decode empty byte arrays.",[Yu]:"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",[qu]:"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",[Su]:"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",[Nu]:"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",[Iu]:"Encoder and decoder must either both be fixed-size or variable-size.",[Mu]:"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",[Tu]:"Expected a fixed-size codec, got a variable-size one.",[Lu]:"Codec [$codecDescription] expected a positive byte length, got $bytesLength.",[Cu]:"Expected a variable-size codec, got a fixed-size one.",[Ju]:"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].",[Eu]:"Codec [$codecDescription] expected $expected bytes, got $bytesLength.",[zu]:"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",[Uu]:"Invalid discriminated union variant. Expected one of [$variants], got $value.",[Ru]:"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",[Pu]:"Invalid literal union variant. Expected one of [$variants], got $value.",[Bu]:"Expected [$codecDescription] to have $expected items, got $actual.",[Fu]:"Invalid value $value for base $base with alphabet $alphabet.",[Hu]:"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",[Ou]:"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",[Du]:"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",[Vu]:"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",[ju]:"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",[Zs]:"No random values implementation could be found.",[ma]:"instruction requires an uninitialized account",[Na]:"instruction tries to borrow reference for an account which is already borrowed",[Ba]:"instruction left account with an outstanding borrowed reference",[Ia]:"program other than the account's owner changed the size of the account data",[da]:"account data too small for instruction",[Sa]:"instruction expected an executable account",[_a]:"An account does not have enough lamports to be rent-exempt",[ec]:"Program arithmetic overflowed",[Za]:"Failed to serialize or deserialize account data: $encodedData",[sc]:"Builtin programs must consume compute units",[Pa]:"Cross-program invocation call depth too deep",[Va]:"Computational budget exceeded",[Ua]:"custom program error: #$code",[xa]:"instruction contains duplicate accounts",[Ma]:"instruction modifications of multiply-passed account differ",[La]:"executable accounts must be rent exempt",[Oa]:"instruction changed executable accounts data",[Fa]:"instruction changed the balance of an executable account",[Ea]:"instruction changed executable bit of an account",[va]:"instruction modified data of an account it does not own",[ya]:"instruction spent from the balance of an account it does not own",[aa]:"generic instruction error",[nc]:"Provided owner is not allowed",[Ka]:"Account is immutable",[Qa]:"Incorrect authority provided",[ha]:"incorrect program id for instruction",[fa]:"insufficient funds for instruction",[la]:"invalid account data for instruction",[$a]:"Invalid account owner",[ca]:"invalid program argument",[Ra]:"program returned invalid error code",[ua]:"invalid instruction data",[qa]:"Failed to reallocate account data",[Ja]:"Provided seeds do not result in a valid address",[rc]:"Accounts data allocations exceeded the maximum allowed per transaction",[ic]:"Max accounts exceeded",[oc]:"Max instruction trace length exceeded",[za]:"Length of the seed is too long for address generation",[Ha]:"An account required by the instruction is missing",[pa]:"missing required signature for instruction",[ga]:"instruction illegally modified the program id of an account",[Ca]:"insufficient account keys for instruction",[Ya]:"Cross-program invocation with unauthorized signer or writable account",[Ga]:"Failed to create program execution environment",[Xa]:"Program failed to compile",[Wa]:"Program failed to complete",[ka]:"instruction modified data of a read-only account",[Aa]:"instruction changed the balance of a read-only account",[ja]:"Cross-program invocation reentrancy not allowed for this instruction",[Ta]:"instruction modified rent epoch of an account",[ba]:"sum of account balances before and after instruction do not match",[wa]:"instruction requires an initialized account",[sa]:"",[Da]:"Unsupported program id",[tc]:"Unsupported sysvar",[ra]:"The instruction does not have any accounts.",[ia]:"The instruction does not have any data.",[oa]:"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",[$o]:"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",[Qo]:"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",[rl]:"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[ol]:"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",[nl]:"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[tl]:"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[il]:"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[ss]:"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",[as]:"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",[us]:"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",[cs]:"JSON-RPC error: The method does not exist / is not available ($__serverMessage)",[os]:"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",[ps]:"$__serverMessage",[Ts]:"$__serverMessage",[ks]:"$__serverMessage",[fs]:"$__serverMessage",[ws]:"$__serverMessage",[bs]:"$__serverMessage",[ls]:"Minimum context slot has not been reached",[As]:"Node is unhealthy; behind by $numSlotsBehind slots",[gs]:"No snapshot",[Es]:"Transaction simulation failed",[ys]:"$__serverMessage",[ms]:"Transaction history is not available from this node",[vs]:"$__serverMessage",[hs]:"Transaction signature length mismatch",[xs]:"Transaction signature verification failure",[ds]:"$__serverMessage",[_s]:"Key pair bytes must be of length 64, got $byteLength.",[$s]:"Expected private key bytes with length 32. Actual length: $actualLength.",[ea]:"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",[na]:"The provided private key does not match the provided public key.",[ta]:"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",[es]:"Lamports value must be in the range [0, 2e64-1]",[ts]:"`$value` cannot be parsed as a `BigInt`",[is]:"$message",[ns]:"`$value` cannot be parsed as a `Number`",[Zo]:"No nonce account could be found at address `$nonceAccountAddress`",[Qu]:"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.",[_u]:"WebSocket was closed before payload could be added to the send buffer",[$u]:"WebSocket connection closed",[el]:"WebSocket failed to connect",[Zu]:"Failed to obtain a subscription id from the server",[Ku]:"Could not find an API plan for RPC method: `$method`",[Gu]:"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",[Xu]:"HTTP error ($statusCode): $message",[Wu]:"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.",[ac]:"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.",[cc]:"The provided value does not implement the `KeyPairSigner` interface",[lc]:"The provided value does not implement the `MessageModifyingSigner` interface",[dc]:"The provided value does not implement the `MessagePartialSigner` interface",[uc]:"The provided value does not implement any of the `MessageSigner` interfaces",[hc]:"The provided value does not implement the `TransactionModifyingSigner` interface",[pc]:"The provided value does not implement the `TransactionPartialSigner` interface",[mc]:"The provided value does not implement the `TransactionSendingSigner` interface",[fc]:"The provided value does not implement any of the `TransactionSigner` interfaces",[wc]:"More than one `TransactionSendingSigner` was identified.",[bc]:"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",[gc]:"Wallet account signers do not support signing multiple messages/transactions in a single operation",[Qs]:"Cannot export a non-extractable key.",[Vs]:"No digest implementation could be found.",[qs]:"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",[Ys]:"This runtime does not support the generation of Ed25519 key pairs.\n\nInstall @solana/webcrypto-ed25519-polyfill and call its `install` function before generating keys in environments that do not support Ed25519.\n\nFor a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.",[Gs]:"No signature verification implementation could be found.",[Ws]:"No key generation implementation could be found.",[Xs]:"No signing implementation could be found.",[Ks]:"No key export implementation could be found.",[rs]:"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given",[nu]:"Transaction processing left an account with an outstanding borrowed reference",[zc]:"Account in use",[Jc]:"Account loaded twice",[qc]:"Attempt to debit an account but found no record of a prior credit.",[uu]:"Transaction loads an address table account that doesn't exist",[Wc]:"This transaction has already been processed",[Xc]:"Blockhash not found",[Kc]:"Loader call chain is too deep",[tu]:"Transactions are currently disabled due to cluster maintenance",[wu]:"Transaction contains a duplicate instruction ($index) that is not allowed",[Yc]:"Insufficient funds for fee",[bu]:"Transaction results in an account ($accountIndex) with insufficient funds for rent",[Gc]:"This account may not be used to pay transaction fees",[Zc]:"Transaction contains an invalid account reference",[du]:"Transaction loads an address table account with invalid data",[fu]:"Transaction address table lookup uses an invalid index",[lu]:"Transaction loads an address table account with an invalid owner",[yu]:"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",[$c]:"This program may not be used for executing instructions",[hu]:"Transaction leaves an account with a lower balance than rent-exempt minimum",[ou]:"Transaction loads a writable account that cannot be written",[gu]:"Transaction exceeded max loaded accounts data size cap",[Qc]:"Transaction requires a fee but has no signature present",[Vc]:"Attempt to load a program that does not exist",[Au]:"Execution of the program referenced by account at index $accountIndex is temporarily restricted.",[vu]:"ResanitizationNeeded",[eu]:"Transaction failed to sanitize accounts offsets correctly",[_c]:"Transaction did not pass signature verification",[cu]:"Transaction locked too many accounts",[ku]:"Sum of account balances before and after transaction do not match",[jc]:"The transaction failed with the error `$errorName`",[iu]:"Transaction version is unsupported",[au]:"Transaction would exceed account data limit within the block",[mu]:"Transaction would exceed total account data limit",[su]:"Transaction would exceed max account limit within the block",[ru]:"Transaction would exceed max Block Cost Limit",[pu]:"Transaction would exceed max Vote Cost Limit",[Oc]:"Attempted to sign a transaction with an address that is not a signer for it",[Nc]:"Transaction is missing an address at index: $index.",[Fc]:"Transaction has no expected signers therefore it cannot be encoded",[Hc]:"Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes",[Ac]:"Transaction does not have a blockhash lifetime",[kc]:"Transaction is not a durable nonce transaction",[Ec]:"Contents of these address lookup tables unknown: $lookupTableAddresses",[Tc]:"Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved",[Ic]:"No fee payer set in CompiledTransaction",[Cc]:"Could not find program address at index $index",[Dc]:"Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more",[Pc]:"Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more",[Bc]:"Transaction is missing a fee payer.",[Mc]:"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.",[Rc]:"Transaction first instruction is not advance nonce account instruction.",[Uc]:"Transaction with no instructions cannot be durable nonce transaction.",[yc]:"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees",[vc]:"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable",[Lc]:"The transaction message expected the transaction to have $signerAddressesLength signatures, got $signaturesLength.",[Sc]:"Transaction is missing signatures for addresses: $addresses.",[xc]:"Transaction version must be in the range [0, 127]. `$actualVersion` given"},ul="i",ll="t";var dl=class extends Error{cause=this.cause;context;constructor(...[e,t]){let n,r;if(t){const{cause:e,...i}=t;e&&(r={cause:e}),Object.keys(i).length>0&&(n=i)}super(function(e,t={}){if("production"!==process.env.NODE_ENV)return function(e,t={}){const n=cl[e];if(0===n.length)return"";let r;function i(e){if(2===r[ll]){const i=n.slice(r[ul]+1,e);o.push(i in t?`${t[i]}`:`$${i}`)}else 1===r[ll]&&o.push(n.slice(r[ul],e))}const o=[];return n.split("").forEach((e,t)=>{if(0===t)return void(r={[ul]:0,[ll]:"\\"===n[0]?0:"$"===n[0]?2:1});let o;switch(r[ll]){case 0:o={[ul]:t,[ll]:1};break;case 1:"\\"===e?o={[ul]:t,[ll]:0}:"$"===e&&(o={[ul]:t,[ll]:2});break;case 2:"\\"===e?o={[ul]:t,[ll]:0}:"$"===e?o={[ul]:t,[ll]:2}:e.match(/\w/)||(o={[ul]:t,[ll]:1})}o&&(r!==o&&i(t),r=o)}),i(),o.join("")}(e,t);{let n=`Solana error #${e}; Decode this error by running \`npx @solana/errors decode -- ${e}`;return Object.keys(t).length&&(n+=` '${function(e){const t=Object.entries(e).map(al).join("&");return btoa(t)}(t)}'`),`${n}\``}}(e,n),r),this.context={xe:e,...n},this.name="SolanaError"}};function fl(e){return"fixedSize"in e&&"number"==typeof e.fixedSize}function hl(e){return 1!==e?.endian}var pl=(e={})=>function(e,t){if(fl(e)!==fl(t))throw new dl(Iu);if(fl(e)&&fl(t)&&e.fixedSize!==t.fixedSize)throw new dl(Su,{decoderFixedSize:t.fixedSize,encoderFixedSize:e.fixedSize});if(!fl(e)&&!fl(t)&&e.maxSize!==t.maxSize)throw new dl(Nu,{decoderMaxSize:t.maxSize,encoderMaxSize:e.maxSize});return{...t,...e,decode:t.decode,encode:e.encode,read:t.read,write:e.write}}(((e={})=>{return t={config:e,name:"u64",range:[0n,BigInt("0xffffffffffffffff")],set:(e,t,n)=>e.setBigUint64(0,BigInt(t),n),size:8},n={fixedSize:t.size,write(e,n,r){t.range&&function(e,t,n,r){if(r<t||r>n)throw new dl(Ou,{codecDescription:e,max:n,min:t,value:r})}(t.name,t.range[0],t.range[1],e);const i=new ArrayBuffer(t.size);return t.set(new DataView(i),e,hl(t.config)),n.set(new Uint8Array(i),r),r+t.size}},Object.freeze({...n,encode:e=>{const t=new Uint8Array(function(e,t){return"fixedSize"in t?t.fixedSize:t.getSizeFromValue(e)}(e,n));return n.write(e,t,0),t}});var t,n})(e),((e={})=>{return n={fixedSize:(t={config:e,get:(e,t)=>e.getBigUint64(0,t),name:"u64",size:8}).size,read(e,n=0){!function(e,t,n=0){if(t.length-n<=0)throw new dl(xu,{codecDescription:e})}(t.name,e,n),function(e,t,n,r=0){const i=n.length-r;if(i<t)throw new dl(Eu,{bytesLength:i,codecDescription:e,expected:t})}(t.name,t.size,e,n);const r=new DataView(function(e,t,n){const r=e.byteOffset+(t??0),i=n??e.byteLength;return e.buffer.slice(r,r+i)}(e,n,t.size));return[t.get(r,hl(t.config)),n+t.size]}},Object.freeze({...n,decode:(e,t=0)=>n.read(e,t)[0]});var t,n})(e));class ml extends TypeError{constructor(e,t){let n;const{message:r,explanation:i,...o}=e,{path:s}=e,a=0===s.length?r:`At path: ${s.join(".")} -- ${r}`;super(i??a),null!=i&&(this.cause=a),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>n??(n=[e,...t()])}}function wl(e){return"object"==typeof e&&null!=e}function bl(e){return wl(e)&&!Array.isArray(e)}function gl(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function yl(e,t,n,r){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:i,branch:o}=t,{type:s}=n,{refinement:a,message:c=`Expected a value of type \`${s}\`${a?` with refinement \`${a}\``:""}, but received: \`${gl(r)}\``}=e;return{value:r,type:s,refinement:a,key:i[i.length-1],path:i,branch:o,...e,message:c}}function*vl(e,t,n,r){var i;wl(i=e)&&"function"==typeof i[Symbol.iterator]||(e=[e]);for(const o of e){const e=yl(o,t,n,r);e&&(yield e)}}function*Al(e,t,n={}){const{path:r=[],branch:i=[e],coerce:o=!1,mask:s=!1}=n,a={path:r,branch:i,mask:s};o&&(e=t.coercer(e,a));let c="valid";for(const u of t.validator(e,a))u.explanation=n.message,c="not_valid",yield[u,void 0];for(let[u,l,d]of t.entries(e,a)){const t=Al(l,d,{path:void 0===u?r:[...r,u],branch:void 0===u?i:[...i,l],coerce:o,mask:s,message:n.message});for(const n of t)n[0]?(c=null!=n[0].refinement?"not_refined":"not_valid",yield[n[0],void 0]):o&&(l=n[1],void 0===u?e=l:e instanceof Map?e.set(u,l):e instanceof Set?e.add(l):wl(e)&&(void 0!==l||u in e)&&(e[u]=l))}if("not_valid"!==c)for(const u of t.refiner(e,a))u.explanation=n.message,c="not_refined",yield[u,void 0];"valid"===c&&(yield[void 0,e])}let kl=class{constructor(e){const{type:t,schema:n,validator:r,refiner:i,coercer:o=e=>e,entries:s=function*(){}}=e;this.type=t,this.schema=n,this.entries=s,this.coercer=o,this.validator=r?(e,t)=>vl(r(e,t),t,this,e):()=>[],this.refiner=i?(e,t)=>vl(i(e,t),t,this,e):()=>[]}assert(e,t){return function(e,t,n){const r=Tl(e,t,{message:n});if(r[0])throw r[0]}(e,this,t)}create(e,t){return xl(e,this,t)}is(e){return El(e,this)}mask(e,t){return function(e,t,n){const r=Tl(e,t,{coerce:!0,mask:!0,message:n});if(r[0])throw r[0];return r[1]}(e,this,t)}validate(e,t={}){return Tl(e,this,t)}};function xl(e,t,n){const r=Tl(e,t,{coerce:!0,message:n});if(r[0])throw r[0];return r[1]}function El(e,t){return!Tl(e,t)[0]}function Tl(e,t,n={}){const r=Al(e,t,n),i=function(e){const{done:t,value:n}=e.next();return t?void 0:n}(r);return i[0]?[new ml(i[0],function*(){for(const e of r)e[0]&&(yield e[0])}),void 0]:[void 0,i[1]]}function Cl(e,t){return new kl({type:e,schema:null,validator:t})}function Il(e){return new kl({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[n,r]of t.entries())yield[n,r,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${gl(e)}`})}function Sl(){return Cl("boolean",e=>"boolean"==typeof e)}function Nl(e){return Cl("instance",t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${gl(t)}`)}function Bl(e){const t=gl(e),n=typeof e;return new kl({type:"literal",schema:"string"===n||"number"===n||"boolean"===n?e:null,validator:n=>n===e||`Expected the literal \`${t}\`, but received: ${gl(n)}`})}function Ml(e){return new kl({...e,validator:(t,n)=>null===t||e.validator(t,n),refiner:(t,n)=>null===t||e.refiner(t,n)})}function Ul(){return Cl("number",e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${gl(e)}`)}function Rl(e){return new kl({...e,validator:(t,n)=>void 0===t||e.validator(t,n),refiner:(t,n)=>void 0===t||e.refiner(t,n)})}function Ol(e,t){return new kl({type:"record",schema:null,*entries(n){if(wl(n))for(const r in n){const i=n[r];yield[r,r,e],yield[r,i,t]}},validator:e=>bl(e)||`Expected an object, but received: ${gl(e)}`,coercer:e=>bl(e)?{...e}:e})}function Fl(){return Cl("string",e=>"string"==typeof e||`Expected a string, but received: ${gl(e)}`)}function Ll(e){const t=Cl("never",()=>!1);return new kl({type:"tuple",schema:null,*entries(n){if(Array.isArray(n)){const r=Math.max(e.length,n.length);for(let i=0;i<r;i++)yield[i,n[i],e[i]||t]}},validator:e=>Array.isArray(e)||`Expected an array, but received: ${gl(e)}`,coercer:e=>Array.isArray(e)?e.slice():e})}function Dl(e){const t=Object.keys(e);return new kl({type:"type",schema:e,*entries(n){if(wl(n))for(const r of t)yield[r,n[r],e[r]]},validator:e=>bl(e)||`Expected an object, but received: ${gl(e)}`,coercer:e=>bl(e)?{...e}:e})}function Pl(e){const t=e.map(e=>e.type).join(" | ");return new kl({type:"union",schema:null,coercer(t,n){for(const r of e){const[e,i]=r.validate(t,{coerce:!0,mask:n.mask});if(!e)return i}return t},validator(n,r){const i=[];for(const t of e){const[...e]=Al(n,t,r),[o]=e;if(!o[0])return[];for(const[t]of e)t&&i.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${gl(n)}`,...i]}})}function Hl(){return Cl("unknown",()=>!0)}function jl(e,t,n){return new kl({...e,coercer:(r,i)=>El(r,t)?e.coercer(n(r,i),i):e.coercer(r,i)})}var zl,Jl=new Uint8Array(16);function ql(){if(!zl&&!(zl="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return zl(Jl)}const Vl=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Yl(e){return"string"==typeof e&&Vl.test(e)}for(var Gl,Wl,Xl=[],Kl=0;Kl<256;++Kl)Xl.push((Kl+256).toString(16).substr(1));function Ql(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Xl[e[t+0]]+Xl[e[t+1]]+Xl[e[t+2]]+Xl[e[t+3]]+"-"+Xl[e[t+4]]+Xl[e[t+5]]+"-"+Xl[e[t+6]]+Xl[e[t+7]]+"-"+Xl[e[t+8]]+Xl[e[t+9]]+"-"+Xl[e[t+10]]+Xl[e[t+11]]+Xl[e[t+12]]+Xl[e[t+13]]+Xl[e[t+14]]+Xl[e[t+15]]).toLowerCase();if(!Yl(n))throw TypeError("Stringified UUID is invalid");return n}var Zl=0,_l=0;function $l(e){if(!Yl(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}function ed(e,t,n){function r(e,r,i,o){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"==typeof r&&(r=$l(r)),16!==r.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var s=new Uint8Array(16+e.length);if(s.set(r),s.set(e,r.length),(s=n(s))[6]=15&s[6]|t,s[8]=63&s[8]|128,i){o=o||0;for(var a=0;a<16;++a)i[o+a]=s[a];return i}return Ql(s)}try{r.name=e}catch(i){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r}function td(e){return 14+(e+64>>>9<<4)+1}function nd(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function rd(e,t,n,r,i,o){return nd((s=nd(nd(t,e),nd(r,o)))<<(a=i)|s>>>32-a,n);var s,a}function id(e,t,n,r,i,o,s){return rd(t&n|~t&r,e,t,i,o,s)}function od(e,t,n,r,i,o,s){return rd(t&r|n&~r,e,t,i,o,s)}function sd(e,t,n,r,i,o,s){return rd(t^n^r,e,t,i,o,s)}function ad(e,t,n,r,i,o,s){return rd(n^(t|~r),e,t,i,o,s)}var cd=ed("v3",48,function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(e){for(var t=[],n=32*e.length,r="0123456789abcdef",i=0;i<n;i+=8){var o=e[i>>5]>>>i%32&255,s=parseInt(r.charAt(o>>>4&15)+r.charAt(15&o),16);t.push(s)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[td(t)-1]=t;for(var n=1732584193,r=-271733879,i=-1732584194,o=271733878,s=0;s<e.length;s+=16){var a=n,c=r,u=i,l=o;n=id(n,r,i,o,e[s],7,-680876936),o=id(o,n,r,i,e[s+1],12,-389564586),i=id(i,o,n,r,e[s+2],17,606105819),r=id(r,i,o,n,e[s+3],22,-1044525330),n=id(n,r,i,o,e[s+4],7,-176418897),o=id(o,n,r,i,e[s+5],12,1200080426),i=id(i,o,n,r,e[s+6],17,-1473231341),r=id(r,i,o,n,e[s+7],22,-45705983),n=id(n,r,i,o,e[s+8],7,1770035416),o=id(o,n,r,i,e[s+9],12,-1958414417),i=id(i,o,n,r,e[s+10],17,-42063),r=id(r,i,o,n,e[s+11],22,-1990404162),n=id(n,r,i,o,e[s+12],7,1804603682),o=id(o,n,r,i,e[s+13],12,-40341101),i=id(i,o,n,r,e[s+14],17,-1502002290),n=od(n,r=id(r,i,o,n,e[s+15],22,1236535329),i,o,e[s+1],5,-165796510),o=od(o,n,r,i,e[s+6],9,-1069501632),i=od(i,o,n,r,e[s+11],14,643717713),r=od(r,i,o,n,e[s],20,-373897302),n=od(n,r,i,o,e[s+5],5,-701558691),o=od(o,n,r,i,e[s+10],9,38016083),i=od(i,o,n,r,e[s+15],14,-660478335),r=od(r,i,o,n,e[s+4],20,-405537848),n=od(n,r,i,o,e[s+9],5,568446438),o=od(o,n,r,i,e[s+14],9,-1019803690),i=od(i,o,n,r,e[s+3],14,-187363961),r=od(r,i,o,n,e[s+8],20,1163531501),n=od(n,r,i,o,e[s+13],5,-1444681467),o=od(o,n,r,i,e[s+2],9,-51403784),i=od(i,o,n,r,e[s+7],14,1735328473),n=sd(n,r=od(r,i,o,n,e[s+12],20,-1926607734),i,o,e[s+5],4,-378558),o=sd(o,n,r,i,e[s+8],11,-2022574463),i=sd(i,o,n,r,e[s+11],16,1839030562),r=sd(r,i,o,n,e[s+14],23,-35309556),n=sd(n,r,i,o,e[s+1],4,-1530992060),o=sd(o,n,r,i,e[s+4],11,1272893353),i=sd(i,o,n,r,e[s+7],16,-155497632),r=sd(r,i,o,n,e[s+10],23,-1094730640),n=sd(n,r,i,o,e[s+13],4,681279174),o=sd(o,n,r,i,e[s],11,-358537222),i=sd(i,o,n,r,e[s+3],16,-722521979),r=sd(r,i,o,n,e[s+6],23,76029189),n=sd(n,r,i,o,e[s+9],4,-640364487),o=sd(o,n,r,i,e[s+12],11,-421815835),i=sd(i,o,n,r,e[s+15],16,530742520),n=ad(n,r=sd(r,i,o,n,e[s+2],23,-995338651),i,o,e[s],6,-198630844),o=ad(o,n,r,i,e[s+7],10,1126891415),i=ad(i,o,n,r,e[s+14],15,-1416354905),r=ad(r,i,o,n,e[s+5],21,-57434055),n=ad(n,r,i,o,e[s+12],6,1700485571),o=ad(o,n,r,i,e[s+3],10,-1894986606),i=ad(i,o,n,r,e[s+10],15,-1051523),r=ad(r,i,o,n,e[s+1],21,-2054922799),n=ad(n,r,i,o,e[s+8],6,1873313359),o=ad(o,n,r,i,e[s+15],10,-30611744),i=ad(i,o,n,r,e[s+6],15,-1560198380),r=ad(r,i,o,n,e[s+13],21,1309151649),n=ad(n,r,i,o,e[s+4],6,-145523070),o=ad(o,n,r,i,e[s+11],10,-1120210379),i=ad(i,o,n,r,e[s+2],15,718787259),r=ad(r,i,o,n,e[s+9],21,-343485551),n=nd(n,a),r=nd(r,c),i=nd(i,u),o=nd(o,l)}return[n,r,i,o]}(function(e){if(0===e.length)return[];for(var t=8*e.length,n=new Uint32Array(td(t)),r=0;r<t;r+=8)n[r>>5]|=(255&e[r/8])<<r%32;return n}(e),8*e.length))});function ud(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function ld(e,t){return e<<t|e>>>32-t}var dd=ed("v5",80,function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var r=unescape(encodeURIComponent(e));e=[];for(var i=0;i<r.length;++i)e.push(r.charCodeAt(i))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var o=e.length/4+2,s=Math.ceil(o/16),a=new Array(s),c=0;c<s;++c){for(var u=new Uint32Array(16),l=0;l<16;++l)u[l]=e[64*c+4*l]<<24|e[64*c+4*l+1]<<16|e[64*c+4*l+2]<<8|e[64*c+4*l+3];a[c]=u}a[s-1][14]=8*(e.length-1)/Math.pow(2,32),a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=8*(e.length-1)&4294967295;for(var d=0;d<s;++d){for(var f=new Uint32Array(80),h=0;h<16;++h)f[h]=a[d][h];for(var p=16;p<80;++p)f[p]=ld(f[p-3]^f[p-8]^f[p-14]^f[p-16],1);for(var m=n[0],w=n[1],b=n[2],g=n[3],y=n[4],v=0;v<80;++v){var A=Math.floor(v/20),k=ld(m,5)+ud(A,w,b,g)+y+t[A]+f[v]>>>0;y=g,g=b,b=ld(w,30)>>>0,w=m,m=k}n[0]=n[0]+m>>>0,n[1]=n[1]+w>>>0,n[2]=n[2]+b>>>0,n[3]=n[3]+g>>>0,n[4]=n[4]+y>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]});const fd=Bn(Object.freeze(Object.defineProperty({__proto__:null,NIL:"00000000-0000-0000-0000-000000000000",parse:$l,stringify:Ql,v1:function(e,t,n){var r=t&&n||0,i=t||new Array(16),o=(e=e||{}).node||Gl,s=void 0!==e.clockseq?e.clockseq:Wl;if(null==o||null==s){var a=e.random||(e.rng||ql)();null==o&&(o=Gl=[1|a[0],a[1],a[2],a[3],a[4],a[5]]),null==s&&(s=Wl=16383&(a[6]<<8|a[7]))}var c=void 0!==e.msecs?e.msecs:Date.now(),u=void 0!==e.nsecs?e.nsecs:_l+1,l=c-Zl+(u-_l)/1e4;if(l<0&&void 0===e.clockseq&&(s=s+1&16383),(l<0||c>Zl)&&void 0===e.nsecs&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Zl=c,_l=u,Wl=s;var d=(1e4*(268435455&(c+=122192928e5))+u)%4294967296;i[r++]=d>>>24&255,i[r++]=d>>>16&255,i[r++]=d>>>8&255,i[r++]=255&d;var f=c/4294967296*1e4&268435455;i[r++]=f>>>8&255,i[r++]=255&f,i[r++]=f>>>24&15|16,i[r++]=f>>>16&255,i[r++]=s>>>8|128,i[r++]=255&s;for(var h=0;h<6;++h)i[r+h]=o[h];return t||Ql(i)},v3:cd,v4:function(e,t,n){var r=(e=e||{}).random||(e.rng||ql)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return Ql(r)},v5:dd,validate:Yl,version:function(e){if(!Yl(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},Symbol.toStringTag,{value:"Module"})));var hd,pd,md,wd;!function(){if(wd)return md;wd=1;const e=fd.v4,t=function(){if(pd)return hd;pd=1;const e=fd.v4;return hd=function(t,n,r,i){if("string"!=typeof t)throw new TypeError(t+" must be a string");const o="number"==typeof(i=i||{}).version?i.version:2;if(1!==o&&2!==o)throw new TypeError(o+" must be 1 or 2");const s={method:t};if(2===o&&(s.jsonrpc="2.0"),n){if("object"!=typeof n&&!Array.isArray(n))throw new TypeError(n+" must be an object, array or omitted");s.params=n}if(void 0===r){const t="function"==typeof i.generator?i.generator:function(){return e()};s.id=t(s,i)}else 2===o&&null===r?i.notificationIdNull&&(s.id=null):s.id=r;return s}}(),n=function(t,r){if(!(this instanceof n))return new n(t,r);r||(r={}),this.options={reviver:void 0!==r.reviver?r.reviver:null,replacer:void 0!==r.replacer?r.replacer:null,generator:void 0!==r.generator?r.generator:function(){return e()},version:void 0!==r.version?r.version:2,notificationIdNull:"boolean"==typeof r.notificationIdNull&&r.notificationIdNull},this.callServer=t};md=n,n.prototype.request=function(e,n,r,i){const o=this;let s=null;const a=Array.isArray(e)&&"function"==typeof n;if(1===this.options.version&&a)throw new TypeError("JSON-RPC 1.0 does not support batching");if(a||!a&&e&&"object"==typeof e&&"function"==typeof n)i=n,s=e;else{"function"==typeof r&&(i=r,r=void 0);const o="function"==typeof i;try{s=t(e,n,r,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull})}catch(u){if(o)return void i(u);throw u}if(!o)return s}let c;try{c=JSON.stringify(s,this.options.replacer)}catch(u){return void i(u)}return this.callServer(c,function(e,t){o.Ee(e,t,i)}),s},n.prototype.Ee=function(e,t,n){if(e)return void n(e);if(!t)return void n();let r;try{r=JSON.parse(t,this.options.reviver)}catch(i){return void n(i)}if(3!==n.length)n(null,r);else{if(Array.isArray(r)){const e=function(e){return void 0!==e.error},t=function(t){return!e(t)};return void n(null,r.filter(e),r.filter(t))}n(null,r.error,r.result)}}}();var bd;bd||(bd=1,function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,s){if("function"!=typeof r)throw new TypeError("The listener must be a function");var a=new i(r,o||e,s),c=n?n+t:t;return e.Te[c]?e.Te[c].fn?e.Te[c]=[e.Te[c],a]:e.Te[c].push(a):(e.Te[c]=a,e.Ce++),e}function s(e,t){0===--e.Ce?e.Te=new r:delete e.Te[t]}function a(){this.Te=new r,this.Ce=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),a.prototype.eventNames=function(){var e,r,i=[];if(0===this.Ce)return i;for(r in e=this.Te)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},a.prototype.listeners=function(e){var t=n?n+e:e,r=this.Te[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,s=new Array(o);i<o;i++)s[i]=r[i].fn;return s},a.prototype.listenerCount=function(e){var t=n?n+e:e,r=this.Te[t];return r?r.fn?1:r.length:0},a.prototype.emit=function(e,t,r,i,o,s){var a=n?n+e:e;if(!this.Te[a])return!1;var c,u,l=this.Te[a],d=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),d){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,r),!0;case 4:return l.fn.call(l.context,t,r,i),!0;case 5:return l.fn.call(l.context,t,r,i,o),!0;case 6:return l.fn.call(l.context,t,r,i,o,s),!0}for(u=1,c=new Array(d-1);u<d;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var f,h=l.length;for(u=0;u<h;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),d){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,r);break;case 4:l[u].fn.call(l[u].context,t,r,i);break;default:if(!c)for(f=1,c=new Array(d-1);f<d;f++)c[f-1]=arguments[f];l[u].fn.apply(l[u].context,c)}}return!0},a.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},a.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},a.prototype.removeListener=function(e,t,r,i){var o=n?n+e:e;if(!this.Te[o])return this;if(!t)return s(this,o),this;var a=this.Te[o];if(a.fn)a.fn!==t||i&&!a.once||r&&a.context!==r||s(this,o);else{for(var c=0,u=[],l=a.length;c<l;c++)(a[c].fn!==t||i&&!a[c].once||r&&a[c].context!==r)&&u.push(a[c]);u.length?this.Te[o]=1===u.length?u[0]:u:s(this,o)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this.Te[t]&&s(this,t)):(this.Te=new r,this.Ce=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,e.exports=a}({exports:{}}));class gd extends tr{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,qn(e);const n=$n(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const r=this.blockLen,i=new Uint8Array(r);i.set(n.length>r?e.create().update(n).digest():n);for(let o=0;o<i.length;o++)i[o]^=54;this.iHash.update(i),this.oHash=e.create();for(let o=0;o<i.length;o++)i[o]^=106;this.oHash.update(i),Yn(i)}update(e){return Vn(this),this.iHash.update(e),this}digestInto(e){Vn(this),Jn(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}i(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:n,finished:r,destroyed:i,blockLen:o,outputLen:s}=this;return e.finished=r,e.destroyed=i,e.blockLen=o,e.outputLen=s,e.oHash=t.i(e.oHash),e.iHash=n.i(e.iHash),e}clone(){return this.i()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const yd=(e,t,n)=>new gd(e,t).update(n).digest();yd.create=(e,t)=>new gd(e,t);const vd=(e,t)=>(e+(e>=0?t:-t)/Id)/t;function Ad(e){if(!["compact","recovered","der"].includes(e))throw new Error('Signature format must be "compact", "recovered", or "der"');return e}function kd(e,t){const n={};for(let r of Object.keys(t))n[r]=void 0===e[r]?t[r]:e[r];return Pr(n.lowS,"lowS"),Pr(n.prehash,"prehash"),void 0!==n.format&&Ad(n.format),n}class xd extends Error{constructor(e=""){super(e)}}const Ed={Err:xd,Se:{encode:(e,t)=>{const{Err:n}=Ed;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(1&t.length)throw new n("tlv.encode: unpadded data");const r=t.length/2,i=jr(r);if(i.length/2&128)throw new n("tlv.encode: long form length too big");const o=r>127?jr(i.length/2|128):"";return jr(e)+o+i+t},decode(e,t){const{Err:n}=Ed;let r=0;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length<2||t[r++]!==e)throw new n("tlv.decode: wrong tlv");const i=t[r++];let o=0;if(128&i){const e=127&i;if(!e)throw new n("tlv.decode(long): indefinite length not supported");if(e>4)throw new n("tlv.decode(long): byte length is too big");const s=t.subarray(r,r+e);if(s.length!==e)throw new n("tlv.decode: length bytes not complete");if(0===s[0])throw new n("tlv.decode(long): zero leftmost byte");for(const t of s)o=o<<8|t;if(r+=e,o<128)throw new n("tlv.decode(long): not minimal encoding")}else o=i;const s=t.subarray(r,r+o);if(s.length!==o)throw new n("tlv.decode: wrong value length");return{v:s,l:t.subarray(r+o)}}},Ne:{encode(e){const{Err:t}=Ed;if(e<Td)throw new t("integer: negative integers are not allowed");let n=jr(e);if(8&Number.parseInt(n[0],16)&&(n="00"+n),1&n.length)throw new t("unexpected DER parsing assertion: unpadded hex");return n},decode(e){const{Err:t}=Ed;if(128&e[0])throw new t("invalid signature integer: negative");if(0===e[0]&&!(128&e[1]))throw new t("invalid signature integer: unnecessary leading zero");return Jr(e)}},toSig(e){const{Err:t,Ne:n,Se:r}=Ed,i=Gr("signature",e),{v:o,l:s}=r.decode(48,i);if(s.length)throw new t("invalid signature: left bytes after parsing");const{v:a,l:c}=r.decode(2,o),{v:u,l:l}=r.decode(2,c);if(l.length)throw new t("invalid signature: left bytes after parsing");return{r:n.decode(a),s:n.decode(u)}},hexFromSig(e){const{Se:t,Ne:n}=Ed,r=t.encode(2,n.encode(e.r))+t.encode(2,n.encode(e.s));return t.encode(48,r)}},Td=BigInt(0),Cd=BigInt(1),Id=BigInt(2),Sd=BigInt(3),Nd=BigInt(4);function Bd(e,t){const{BYTES:n}=e;let r;if("bigint"==typeof t)r=t;else{let o=Gr("private key",t);try{r=e.fromBytes(o)}catch(i){throw new Error(`invalid private key: expected ui8a of size ${n}, got ${typeof t}`)}}if(!e.isValidNot0(r))throw new Error("invalid private key: out of range [1..N-1]");return r}function Md(e){return Uint8Array.of(e?2:3)}function Ud(e,t){return{secretKey:t.BYTES,publicKey:1+e.BYTES,publicKeyUncompressed:1+2*e.BYTES,publicKeyHasPrefix:!0,signature:2*t.BYTES}}function Rd(e,t,n={}){qn(t),_r(n,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});const r=n.randomBytes||rr,i=n.hmac||((e,...n)=>yd(t,e,er(...n))),{Fp:o,Fn:s}=e,{ORDER:a,BITS:c}=s,{keygen:u,getPublicKey:l,getSharedSecret:d,utils:f,lengths:h}=function(e,t={}){const{Fn:n}=e,r=t.randomBytes||rr,i=Object.assign(Ud(e.Fp,n),{seed:xi(n.ORDER)});function o(e){try{return!!Bd(n,e)}catch(t){return!1}}function s(e=r(i.seed)){return function(e,t,n=!1){const r=e.length,i=ki(t),o=xi(t);if(r<16||r<o||r>1024)throw new Error("expected "+o+"-1024 bytes of input, got "+r);const s=li(n?qr(e):Jr(e),t-ti)+ti;return n?Yr(s,i):Vr(s,i)}(Hr(e,i.seed,"seed"),n.ORDER)}function a(t,r=!0){return e.BASE.multiply(Bd(n,t)).toBytes(r)}function c(t){if("bigint"==typeof t)return!1;if(t instanceof e)return!0;const{secretKey:r,publicKey:o,publicKeyUncompressed:s}=i;if(n.allowedLengths||r===o)return;const a=Gr("key",t).length;return a===o||a===s}const u={isValidSecretKey:o,isValidPublicKey:function(t,n){const{publicKey:r,publicKeyUncompressed:o}=i;try{const i=t.length;return!(!0===n&&i!==r||!1===n&&i!==o||!e.fromBytes(t))}catch(s){return!1}},randomSecretKey:s,isValidPrivateKey:o,randomPrivateKey:s,normPrivateKeyToScalar:e=>Bd(n,e),precompute:(t=8,n=e.BASE)=>n.precompute(t,!1)};return Object.freeze({getPublicKey:a,getSharedSecret:function(t,r,i=!0){if(!0===c(t))throw new Error("first arg must be private key");if(!1===c(r))throw new Error("second arg must be public key");const o=Bd(n,t);return e.fromHex(r).multiply(o).toBytes(i)},keygen:function(e){const t=s(e);return{secretKey:t,publicKey:a(t)}},Point:e,utils:u,lengths:i})}(e,n),p={prehash:!1,lowS:"boolean"==typeof n.lowS&&n.lowS,format:void 0,extraEntropy:!1},m="compact";function w(e){return e>a>>Cd}function b(e,t){if(!s.isValidNot0(t))throw new Error(`invalid signature ${e}: out of range 1..Point.Fn.ORDER`);return t}class g{constructor(e,t,n){this.r=b("r",e),this.s=b("s",t),null!=n&&(this.recovery=n),Object.freeze(this)}static fromBytes(e,t=m){let n;if(function(e,t){Ad(t);const n=h.signature;Hr(e,"compact"===t?n:"recovered"===t?n+1:void 0,`${t} signature`)}(e,t),"der"===t){const{r:t,s:n}=Ed.toSig(Hr(e));return new g(t,n)}"recovered"===t&&(n=e[0],t="compact",e=e.subarray(1));const r=s.BYTES,i=e.subarray(0,r),o=e.subarray(r,2*r);return new g(s.fromBytes(i),s.fromBytes(o),n)}static fromHex(e,t){return this.fromBytes(_n(e),t)}addRecoveryBit(e){return new g(this.r,this.s,e)}recoverPublicKey(t){const n=o.ORDER,{r:r,s:i,recovery:c}=this;if(null==c||![0,1,2,3].includes(c))throw new Error("recovery id invalid");if(a*Id<n&&c>1)throw new Error("recovery id is ambiguous for h>1 curve");const u=2===c||3===c?r+a:r;if(!o.isValid(u))throw new Error("recovery id 2 or 3 invalid");const l=o.toBytes(u),d=e.fromBytes(er(Md(!(1&c)),l)),f=s.inv(u),h=v(Gr("msgHash",t)),p=s.create(-h*f),m=s.create(i*f),w=e.BASE.multiplyUnsafe(p).add(d.multiplyUnsafe(m));if(w.is0())throw new Error("point at infinify");return w.assertValidity(),w}hasHighS(){return w(this.s)}toBytes(e=m){if(Ad(e),"der"===e)return _n(Ed.hexFromSig(this));const t=s.toBytes(this.r),n=s.toBytes(this.s);if("recovered"===e){if(null==this.recovery)throw new Error("recovery bit must be present");return er(Uint8Array.of(this.recovery),t,n)}return er(t,n)}toHex(e){return Qn(this.toBytes(e))}assertValidity(){}static fromCompact(e){return g.fromBytes(Gr("sig",e),"compact")}static fromDER(e){return g.fromBytes(Gr("sig",e),"der")}normalizeS(){return this.hasHighS()?new g(this.r,s.neg(this.s),this.recovery):this}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return Qn(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return Qn(this.toBytes("compact"))}}const y=n.bits2int||function(e){if(e.length>8192)throw new Error("input is too large");const t=Jr(e),n=8*e.length-c;return n>0?t>>BigInt(n):t},v=n.bits2int_modN||function(e){return s.create(y(e))},A=Zr(c);function k(e){return Kr("num < 2^"+c,e,Td,A),s.toBytes(e)}function x(e,n){return Hr(e,void 0,"message"),n?Hr(t(e),void 0,"prehashed message"):e}return Object.freeze({keygen:u,getPublicKey:l,getSharedSecret:d,utils:f,lengths:h,Point:e,sign:function(n,o,a={}){n=Gr("message",n);const{seed:c,k2sig:u}=function(t,n,i){if(["recovered","canonical"].some(e=>e in i))throw new Error("sign() legacy options not supported");const{lowS:o,prehash:a,extraEntropy:c}=kd(i,p);t=x(t,a);const u=v(t),l=Bd(s,n),d=[k(l),k(u)];if(null!=c&&!1!==c){const e=!0===c?r(h.secretKey):c;d.push(Gr("extraEntropy",e))}const f=er(...d),m=u;return{seed:f,k2sig:function(t){const n=y(t);if(!s.isValidNot0(n))return;const r=s.inv(n),i=e.BASE.multiply(n).toAffine(),a=s.create(i.x);if(a===Td)return;const c=s.create(r*s.create(m+a*l));if(c===Td)return;let u=(i.x===a?0:2)|Number(i.y&Cd),d=c;return o&&w(c)&&(d=s.neg(c),u^=1),new g(a,d,u)}}}(n,o,a);return function(e,t,n){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof n)throw new Error("hmacFn must be a function");const r=e=>new Uint8Array(e),i=e=>Uint8Array.of(e);let o=r(e),s=r(e),a=0;const c=()=>{o.fill(1),s.fill(0),a=0},u=(...e)=>n(s,o,...e),l=(e=r(0))=>{s=u(i(0),e),o=u(),0!==e.length&&(s=u(i(1),e),o=u())},d=()=>{if(a++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const n=[];for(;e<t;){o=u();const t=o.slice();n.push(t),e+=o.length}return er(...n)};return(e,t)=>{let n;for(c(),l(e);!(n=t(d()));)l();return c(),n}}(t.outputLen,s.BYTES,i)(c,u)},verify:function(t,n,r,i={}){const{lowS:o,prehash:a,format:c}=kd(i,p);if(r=Gr("publicKey",r),n=x(Gr("message",n),a),"strict"in i)throw new Error("options.strict was renamed to lowS");const u=void 0===c?function(e){let t;const n="string"==typeof e||jn(e),r=!n&&null!==e&&"object"==typeof e&&"bigint"==typeof e.r&&"bigint"==typeof e.s;if(!n&&!r)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");if(r)t=new g(e.r,e.s);else if(n){try{t=g.fromBytes(Gr("sig",e),"der")}catch(i){if(!(i instanceof Ed.Err))throw i}if(!t)try{t=g.fromBytes(Gr("sig",e),"compact")}catch(o){return!1}}return t||!1}(t):g.fromBytes(Gr("sig",t),c);if(!1===u)return!1;try{const t=e.fromBytes(r);if(o&&u.hasHighS())return!1;const{r:i,s:a}=u,c=v(n),l=s.inv(a),d=s.create(c*l),f=s.create(i*l),h=e.BASE.multiplyUnsafe(d).add(t.multiplyUnsafe(f));return!h.is0()&&s.create(h.x)===i}catch(l){return!1}},recoverPublicKey:function(e,t,n={}){const{prehash:r}=kd(n,p);return t=x(t,r),g.fromBytes(e,"recovered").recoverPublicKey(t).toBytes()},Signature:g,hash:t})}function Od(e){const{CURVE:t,curveOpts:n,hash:r,ecdsaOpts:i}=function(e){const{CURVE:t,curveOpts:n}=function(e){const t={a:e.a,b:e.b,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},n=e.Fp;let r=e.allowedPrivateKeyLengths?Array.from(new Set(e.allowedPrivateKeyLengths.map(e=>Math.ceil(e/2)))):void 0;return{CURVE:t,curveOpts:{Fp:n,Fn:Ai(t.n,{BITS:e.nBitLength,allowedLengths:r,modFromBytes:e.wrapPrivateKey}),allowInfinityPoint:e.allowInfinityPoint,endo:e.endo,isTorsionFree:e.isTorsionFree,clearCofactor:e.clearCofactor,fromBytes:e.fromBytes,toBytes:e.toBytes}}}(e),r={hmac:e.hmac,randomBytes:e.randomBytes,lowS:e.lowS,bits2int:e.bits2int,bits2int_modN:e.bits2int_modN};return{CURVE:t,curveOpts:n,hash:e.hash,ecdsaOpts:r}}(e);return function(e,t){const n=t.Point;return Object.assign({},t,{ProjectivePoint:n,CURVE:Object.assign({},e,vi(n.Fn.ORDER,n.Fn.BITS))})}(e,Rd(function(e,t={}){const n=Pi("weierstrass",e,t),{Fp:r,Fn:i}=n;let o=n.CURVE;const{h:s,n:a}=o;_r(t,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});const{endo:c}=t;if(c&&(!r.is0(o.a)||"bigint"!=typeof c.beta||!Array.isArray(c.basises)))throw new Error('invalid endo: expected "beta": bigint and "basises": array');const u=Ud(r,i);function l(){if(!r.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}const d=t.toBytes||function(e,t,n){const{x:i,y:o}=t.toAffine(),s=r.toBytes(i);return Pr(n,"isCompressed"),n?(l(),er(Md(!r.isOdd(o)),s)):er(Uint8Array.of(4),s,r.toBytes(o))},f=t.fromBytes||function(e){Hr(e,void 0,"Point");const{publicKey:t,publicKeyUncompressed:n}=u,i=e.length,o=e[0],s=e.subarray(1);if(i!==t||2!==o&&3!==o){if(i===n&&4===o){const e=r.BYTES,t=r.fromBytes(s.subarray(0,e)),n=r.fromBytes(s.subarray(e,2*e));if(!p(t,n))throw new Error("bad point: is not on curve");return{x:t,y:n}}throw new Error(`bad point: got length ${i}, expected compressed=${t} or uncompressed=${n}`)}{const e=r.fromBytes(s);if(!r.isValid(e))throw new Error("bad point: is not on curve, wrong x");const t=h(e);let n;try{n=r.sqrt(t)}catch(a){const e=a instanceof Error?": "+a.message:"";throw new Error("bad point: is not on curve, sqrt error"+e)}return l(),!(1&~o)!==r.isOdd(n)&&(n=r.neg(n)),{x:e,y:n}}};function h(e){const t=r.sqr(e),n=r.mul(t,e);return r.add(r.add(n,r.mul(e,o.a)),o.b)}function p(e,t){const n=r.sqr(t),i=h(e);return r.eql(n,i)}if(!p(o.Gx,o.Gy))throw new Error("bad curve params: generator point");const m=r.mul(r.pow(o.a,Sd),Nd),w=r.mul(r.sqr(o.b),BigInt(27));if(r.is0(r.add(m,w)))throw new Error("bad curve params: a or b");function b(e,t,n=!1){if(!r.isValid(t)||n&&r.is0(t))throw new Error(`bad point coordinate ${e}`);return t}function g(e){if(!(e instanceof x))throw new Error("ProjectivePoint expected")}function y(e){if(!c||!c.basises)throw new Error("no endo");return function(e,t,n){const[[r,i],[o,s]]=t,a=vd(s*e,n),c=vd(-i*e,n);let u=e-a*r-c*o,l=-a*i-c*s;const d=u<Td,f=l<Td;d&&(u=-u),f&&(l=-l);const h=Zr(Math.ceil(Qr(n)/2))+Cd;if(u<Td||u>=h||l<Td||l>=h)throw new Error("splitScalar (endomorphism): failed, k="+e);return{k1neg:d,k1:u,k2neg:f,k2:l}}(e,c.basises,i.ORDER)}const v=$r((e,t)=>{const{X:n,Y:i,Z:o}=e;if(r.eql(o,r.ONE))return{x:n,y:i};const s=e.is0();null==t&&(t=s?r.ONE:r.inv(o));const a=r.mul(n,t),c=r.mul(i,t),u=r.mul(o,t);if(s)return{x:r.ZERO,y:r.ZERO};if(!r.eql(u,r.ONE))throw new Error("invZ was invalid");return{x:a,y:c}}),A=$r(e=>{if(e.is0()){if(t.allowInfinityPoint&&!r.is0(e.Y))return;throw new Error("bad point: ZERO")}const{x:n,y:i}=e.toAffine();if(!r.isValid(n)||!r.isValid(i))throw new Error("bad point: x or y not field elements");if(!p(n,i))throw new Error("bad point: equation left != right");if(!e.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});function k(e,t,n,i,o){return n=new x(r.mul(n.X,e),n.Y,n.Z),t=Ci(i,t),n=Ci(o,n),t.add(n)}class x{constructor(e,t,n){this.X=b("x",e),this.Y=b("y",t,!0),this.Z=b("z",n),Object.freeze(this)}static CURVE(){return o}static fromAffine(e){const{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw new Error("invalid affine point");if(e instanceof x)throw new Error("projective point not allowed");return r.is0(t)&&r.is0(n)?x.ZERO:new x(t,n,r.ONE)}static fromBytes(e){const t=x.fromAffine(f(Hr(e,void 0,"point")));return t.assertValidity(),t}static fromHex(e){return x.fromBytes(Gr("pointHex",e))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(e=8,t=!0){return T.createCache(this,e),t||this.multiply(Sd),this}assertValidity(){A(this)}hasEvenY(){const{y:e}=this.toAffine();if(!r.isOdd)throw new Error("Field doesn't support isOdd");return!r.isOdd(e)}equals(e){g(e);const{X:t,Y:n,Z:i}=this,{X:o,Y:s,Z:a}=e,c=r.eql(r.mul(t,a),r.mul(o,i)),u=r.eql(r.mul(n,a),r.mul(s,i));return c&&u}negate(){return new x(this.X,r.neg(this.Y),this.Z)}double(){const{a:e,b:t}=o,n=r.mul(t,Sd),{X:i,Y:s,Z:a}=this;let c=r.ZERO,u=r.ZERO,l=r.ZERO,d=r.mul(i,i),f=r.mul(s,s),h=r.mul(a,a),p=r.mul(i,s);return p=r.add(p,p),l=r.mul(i,a),l=r.add(l,l),c=r.mul(e,l),u=r.mul(n,h),u=r.add(c,u),c=r.sub(f,u),u=r.add(f,u),u=r.mul(c,u),c=r.mul(p,c),l=r.mul(n,l),h=r.mul(e,h),p=r.sub(d,h),p=r.mul(e,p),p=r.add(p,l),l=r.add(d,d),d=r.add(l,d),d=r.add(d,h),d=r.mul(d,p),u=r.add(u,d),h=r.mul(s,a),h=r.add(h,h),d=r.mul(h,p),c=r.sub(c,d),l=r.mul(h,f),l=r.add(l,l),l=r.add(l,l),new x(c,u,l)}add(e){g(e);const{X:t,Y:n,Z:i}=this,{X:s,Y:a,Z:c}=e;let u=r.ZERO,l=r.ZERO,d=r.ZERO;const f=o.a,h=r.mul(o.b,Sd);let p=r.mul(t,s),m=r.mul(n,a),w=r.mul(i,c),b=r.add(t,n),y=r.add(s,a);b=r.mul(b,y),y=r.add(p,m),b=r.sub(b,y),y=r.add(t,i);let v=r.add(s,c);return y=r.mul(y,v),v=r.add(p,w),y=r.sub(y,v),v=r.add(n,i),u=r.add(a,c),v=r.mul(v,u),u=r.add(m,w),v=r.sub(v,u),d=r.mul(f,y),u=r.mul(h,w),d=r.add(u,d),u=r.sub(m,d),d=r.add(m,d),l=r.mul(u,d),m=r.add(p,p),m=r.add(m,p),w=r.mul(f,w),y=r.mul(h,y),m=r.add(m,w),w=r.sub(p,w),w=r.mul(f,w),y=r.add(y,w),p=r.mul(m,y),l=r.add(l,p),p=r.mul(v,y),u=r.mul(b,u),u=r.sub(u,p),p=r.mul(b,m),d=r.mul(v,d),d=r.add(d,p),new x(u,l,d)}subtract(e){return this.add(e.negate())}is0(){return this.equals(x.ZERO)}multiply(e){const{endo:n}=t;if(!i.isValidNot0(e))throw new Error("invalid scalar: out of range");let r,o;const s=e=>T.cached(this,e,e=>Ii(x,e));if(n){const{k1neg:t,k1:i,k2neg:a,k2:c}=y(e),{p:u,f:l}=s(i),{p:d,f:f}=s(c);o=l.add(f),r=k(n.beta,u,d,t,a)}else{const{p:t,f:n}=s(e);r=t,o=n}return Ii(x,[r,o])[0]}multiplyUnsafe(e){const{endo:n}=t,r=this;if(!i.isValid(e))throw new Error("invalid scalar: out of range");if(e===Td||r.is0())return x.ZERO;if(e===Cd)return r;if(T.hasCache(this))return this.multiply(e);if(n){const{k1neg:t,k1:i,k2neg:o,k2:s}=y(e),{p1:a,p2:c}=function(e,t,n,r){let i=t,o=e.ZERO,s=e.ZERO;for(;n>Ei||r>Ei;)n&Ti&&(o=o.add(i)),r&Ti&&(s=s.add(i)),i=i.double(),n>>=Ti,r>>=Ti;return{p1:o,p2:s}}(x,r,i,s);return k(n.beta,a,c,t,o)}return T.unsafe(r,e)}multiplyAndAddUnsafe(e,t,n){const r=this.multiplyUnsafe(t).add(e.multiplyUnsafe(n));return r.is0()?void 0:r}toAffine(e){return v(this,e)}isTorsionFree(){const{isTorsionFree:e}=t;return s===Cd||(e?e(x,this):T.unsafe(this,a).is0())}clearCofactor(){const{clearCofactor:e}=t;return s===Cd?this:e?e(x,this):this.multiplyUnsafe(s)}isSmallOrder(){return this.multiplyUnsafe(s).is0()}toBytes(e=!0){return Pr(e,"isCompressed"),this.assertValidity(),d(x,this,e)}toHex(e=!0){return Qn(this.toBytes(e))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}get px(){return this.X}get py(){return this.X}get pz(){return this.Z}toRawBytes(e=!0){return this.toBytes(e)}M(e){this.precompute(e)}static normalizeZ(e){return Ii(x,e)}static msm(e,t){return Li(x,i,e,t)}static fromPrivateKey(e){return x.BASE.multiply(Bd(i,e))}}x.BASE=new x(o.Gx,o.Gy,r.ONE),x.ZERO=new x(r.ZERO,r.ONE,r.ZERO),x.Fp=r,x.Fn=i;const E=i.BITS,T=new Fi(x,t.endo?Math.ceil(E/2):E);return x.BASE.precompute(8),x}(t,n),r,i))}const Fd={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},Ld={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]},Dd=BigInt(2),Pd=Ai(Fd.p,{sqrt:function(e){const t=Fd.p,n=BigInt(3),r=BigInt(6),i=BigInt(11),o=BigInt(22),s=BigInt(23),a=BigInt(44),c=BigInt(88),u=e*e*e%t,l=u*u*e%t,d=di(l,n,t)*l%t,f=di(d,n,t)*l%t,h=di(f,Dd,t)*u%t,p=di(h,i,t)*h%t,m=di(p,o,t)*p%t,w=di(m,a,t)*m%t,b=di(w,c,t)*w%t,g=di(b,a,t)*m%t,y=di(g,n,t)*l%t,v=di(y,s,t)*p%t,A=di(v,r,t)*u%t,k=di(A,Dd,t);if(!Pd.eql(Pd.sqr(k),e))throw new Error("Cannot find square root");return k}}),Hd=function(e,t){const n=t=>Od({...e,hash:t});return{...n(t),create:n}}({...Fd,Fp:Pd,lowS:!0,endo:Ld},Or);function jd(e){try{return to.ExtendedPoint.fromHex(e),!0}catch{return!1}}to.utils.randomPrivateKey,to.getPublicKey,to.verify;class zd{constructor(e){Object.assign(this,e)}encode(){return Pn.Buffer.from(Go.serialize(Jd,this))}static decode(e){return Go.deserialize(Jd,this,e)}static decodeUnchecked(e){return Go.deserializeUnchecked(Jd,this,e)}}const Jd=new Map;var qd;let Vd=1;class Yd extends zd{constructor(e){if(super({}),this.Be=void 0,function(e){return void 0!==e.Be}(e))this.Be=e.Be;else{if("string"==typeof e){const t=wo.decode(e);if(32!=t.length)throw new Error("Invalid public key input");this.Be=new ao(t)}else this.Be=new ao(e);if(this.Be.byteLength()>32)throw new Error("Invalid public key input")}}static unique(){const e=new Yd(Vd);return Vd+=1,new Yd(e.toBuffer())}equals(e){return this.Be.eq(e.Be)}toBase58(){return wo.encode(this.toBytes())}toJSON(){return this.toBase58()}toBytes(){const e=this.toBuffer();return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}toBuffer(){const e=this.Be.toArrayLike(Pn.Buffer);if(32===e.length)return e;const t=Pn.Buffer.alloc(32);return e.copy(t,32-e.length),t}get[Symbol.toStringTag](){return`PublicKey(${this.toString()})`}toString(){return this.toBase58()}static async createWithSeed(e,t,n){const r=Pn.Buffer.concat([e.toBuffer(),Pn.Buffer.from(t),n.toBuffer()]),i=Mo(r);return new Yd(i)}static createProgramAddressSync(e,t){let n=Pn.Buffer.alloc(0);e.forEach(function(e){if(e.length>32)throw new TypeError("Max seed length exceeded");var t;n=Pn.Buffer.concat([n,(t=e,Pn.Buffer.isBuffer(t)?t:t instanceof Uint8Array?Pn.Buffer.from(t.buffer,t.byteOffset,t.byteLength):Pn.Buffer.from(t))])}),n=Pn.Buffer.concat([n,t.toBuffer(),Pn.Buffer.from("ProgramDerivedAddress")]);const r=Mo(n);if(jd(r))throw new Error("Invalid seeds, address must fall off the curve");return new Yd(r)}static async createProgramAddress(e,t){return this.createProgramAddressSync(e,t)}static findProgramAddressSync(e,t){let n,r=255;for(;0!=r;){try{const i=e.concat(Pn.Buffer.from([r]));n=this.createProgramAddressSync(i,t)}catch(i){if(i instanceof TypeError)throw i;r--;continue}return[n,r]}throw new Error("Unable to find a viable program address nonce")}static async findProgramAddress(e,t){return this.findProgramAddressSync(e,t)}static isOnCurve(e){return jd(new Yd(e).toBytes())}}qd=Yd,Yd.default=new qd("11111111111111111111111111111111"),Jd.set(Yd,{kind:"struct",fields:[["_bn","u256"]]}),new Yd("BPFLoader1111111111111111111111111111111111");const Gd=(e="publicKey")=>Xo.blob(32,e),Wd=(e="string")=>{const t=Xo.struct([Xo.u32("length"),Xo.u32("lengthPadding"),Xo.blob(Xo.offset(Xo.u32(),-8),"chars")],e),n=t.decode.bind(t),r=t.encode.bind(t),i=t;return i.decode=(e,t)=>n(e,t).chars.toString(),i.encode=(e,t,n)=>{const i={chars:Pn.Buffer.from(e,"utf8")};return r(i,t,n)},i.alloc=e=>Xo.u32().span+Xo.u32().span+Pn.Buffer.from(e,"utf8").length,i};Pn.Buffer.alloc(64).fill(0),new Yd("SysvarC1ock11111111111111111111111111111111"),new Yd("SysvarEpochSchedu1e111111111111111111111111"),new Yd("Sysvar1nstructions1111111111111111111111111"),new Yd("SysvarRecentB1ockHashes11111111111111111111"),new Yd("SysvarRent111111111111111111111111111111111"),new Yd("SysvarRewards111111111111111111111111111111"),new Yd("SysvarS1otHashes111111111111111111111111111"),new Yd("SysvarS1otHistory11111111111111111111111111"),new Yd("SysvarStakeHistory1111111111111111111111111");const Xd=Xo.nu64("lamportsPerSignature");function Kd(e){const t=Xo.blob(8,e),n=t.decode.bind(t),r=t.encode.bind(t),i=t,o=pl();return i.decode=(e,t)=>{const r=n(e,t);return o.decode(r)},i.encode=(e,t,n)=>{const i=o.encode(e);return r(i,t,n)},i}Xo.struct([Xo.u32("version"),Xo.u32("state"),Gd("authorizedPubkey"),Gd("nonce"),Xo.struct([Xd],"feeCalculator")]).span,Object.freeze({Create:{index:0,layout:Xo.struct([Xo.u32("instruction"),Xo.ns64("lamports"),Xo.ns64("space"),Gd("programId")])},Assign:{index:1,layout:Xo.struct([Xo.u32("instruction"),Gd("programId")])},Transfer:{index:2,layout:Xo.struct([Xo.u32("instruction"),Kd("lamports")])},CreateWithSeed:{index:3,layout:Xo.struct([Xo.u32("instruction"),Gd("base"),Wd("seed"),Xo.ns64("lamports"),Xo.ns64("space"),Gd("programId")])},AdvanceNonceAccount:{index:4,layout:Xo.struct([Xo.u32("instruction")])},WithdrawNonceAccount:{index:5,layout:Xo.struct([Xo.u32("instruction"),Xo.ns64("lamports")])},InitializeNonceAccount:{index:6,layout:Xo.struct([Xo.u32("instruction"),Gd("authorized")])},AuthorizeNonceAccount:{index:7,layout:Xo.struct([Xo.u32("instruction"),Gd("authorized")])},Allocate:{index:8,layout:Xo.struct([Xo.u32("instruction"),Xo.ns64("space")])},AllocateWithSeed:{index:9,layout:Xo.struct([Xo.u32("instruction"),Gd("base"),Wd("seed"),Xo.ns64("space"),Gd("programId")])},AssignWithSeed:{index:10,layout:Xo.struct([Xo.u32("instruction"),Gd("base"),Wd("seed"),Gd("programId")])},TransferWithSeed:{index:11,layout:Xo.struct([Xo.u32("instruction"),Kd("lamports"),Wd("seed"),Gd("programId")])},UpgradeNonceAccount:{index:12,layout:Xo.struct([Xo.u32("instruction")])}}),new Yd("11111111111111111111111111111111"),new Yd("BPFLoader2111111111111111111111111111111111"),Xo.struct([Xo.u32("typeIndex"),Kd("deactivationSlot"),Xo.nu64("lastExtendedSlot"),Xo.u8("lastExtendedStartIndex"),Xo.u8(),Xo.seq(Gd(),Xo.offset(Xo.u8(),-1),"authority")]);const Qd=jl(Nl(Yd),Fl(),e=>new Yd(e)),Zd=Ll([Fl(),Bl("base64")]),_d=jl(Nl(Pn.Buffer),Zd,e=>Pn.Buffer.from(e[0],"base64"));function $d(e){return Pl([Dl({jsonrpc:Bl("2.0"),id:Fl(),result:e}),Dl({jsonrpc:Bl("2.0"),id:Fl(),error:Dl({code:Hl(),message:Fl(),data:Rl(Cl("any",()=>!0))})})])}const ef=$d(Hl());function tf(e){return jl($d(e),ef,t=>"error"in t?t:{...t,result:xl(t.result,e)})}function nf(e){return tf(Dl({context:Dl({slot:Ul()}),value:e}))}function rf(e){return Dl({context:Dl({slot:Ul()}),value:e})}const of=Dl({foundation:Ul(),foundationTerm:Ul(),initial:Ul(),taper:Ul(),terminal:Ul()});tf(Il(Ml(Dl({epoch:Ul(),effectiveSlot:Ul(),amount:Ul(),postBalance:Ul(),commission:Rl(Ml(Ul()))}))));const sf=Il(Dl({slot:Ul(),prioritizationFee:Ul()})),af=Dl({total:Ul(),validator:Ul(),foundation:Ul(),epoch:Ul()}),cf=Dl({epoch:Ul(),slotIndex:Ul(),slotsInEpoch:Ul(),absoluteSlot:Ul(),blockHeight:Rl(Ul()),transactionCount:Rl(Ul())}),uf=Dl({slotsPerEpoch:Ul(),leaderScheduleSlotOffset:Ul(),warmup:Sl(),firstNormalEpoch:Ul(),firstNormalSlot:Ul()}),lf=Ol(Fl(),Il(Ul())),df=Ml(Pl([Dl({}),Fl()])),ff=Dl({err:df}),hf=Bl("receivedSignature");Dl({"solana-core":Fl(),"feature-set":Rl(Ul())});const pf=Dl({program:Fl(),programId:Qd,parsed:Hl()}),mf=Dl({programId:Qd,accounts:Il(Qd),data:Fl()});nf(Dl({err:Ml(Pl([Dl({}),Fl()])),logs:Ml(Il(Fl())),accounts:Rl(Ml(Il(Ml(Dl({executable:Sl(),owner:Fl(),lamports:Ul(),data:Il(Fl()),rentEpoch:Rl(Ul())}))))),unitsConsumed:Rl(Ul()),returnData:Rl(Ml(Dl({programId:Fl(),data:Ll([Fl(),Bl("base64")])}))),innerInstructions:Rl(Ml(Il(Dl({index:Ul(),instructions:Il(Pl([pf,mf]))}))))})),nf(Dl({byIdentity:Ol(Fl(),Il(Ul())),range:Dl({firstSlot:Ul(),lastSlot:Ul()})})),tf(of),tf(af),tf(sf),tf(cf),tf(uf),tf(lf),tf(Ul()),nf(Dl({total:Ul(),circulating:Ul(),nonCirculating:Ul(),nonCirculatingAccounts:Il(Qd)}));const wf=Dl({amount:Fl(),uiAmount:Ml(Ul()),decimals:Ul(),uiAmountString:Rl(Fl())});nf(Il(Dl({address:Qd,amount:Fl(),uiAmount:Ml(Ul()),decimals:Ul(),uiAmountString:Rl(Fl())}))),nf(Il(Dl({pubkey:Qd,account:Dl({executable:Sl(),owner:Qd,lamports:Ul(),data:_d,rentEpoch:Ul()})})));const bf=Dl({program:Fl(),parsed:Hl(),space:Ul()});nf(Il(Dl({pubkey:Qd,account:Dl({executable:Sl(),owner:Qd,lamports:Ul(),data:bf,rentEpoch:Ul()})}))),nf(Il(Dl({lamports:Ul(),address:Qd})));const gf=Dl({executable:Sl(),owner:Qd,lamports:Ul(),data:_d,rentEpoch:Ul()});Dl({pubkey:Qd,account:gf});const yf=jl(Pl([Nl(Pn.Buffer),bf]),Pl([Zd,bf]),e=>Array.isArray(e)?xl(e,_d):e),vf=Dl({executable:Sl(),owner:Qd,lamports:Ul(),data:yf,rentEpoch:Ul()});Dl({pubkey:Qd,account:vf}),Dl({state:Pl([Bl("active"),Bl("inactive"),Bl("activating"),Bl("deactivating")]),active:Ul(),inactive:Ul()}),tf(Il(Dl({signature:Fl(),slot:Ul(),err:df,memo:Ml(Fl()),blockTime:Rl(Ml(Ul()))}))),tf(Il(Dl({signature:Fl(),slot:Ul(),err:df,memo:Ml(Fl()),blockTime:Rl(Ml(Ul()))}))),Dl({subscription:Ul(),result:rf(gf)});const Af=Dl({pubkey:Qd,account:gf});Dl({subscription:Ul(),result:rf(Af)});const kf=Dl({parent:Ul(),slot:Ul(),root:Ul()});Dl({subscription:Ul(),result:kf});const xf=Pl([Dl({type:Pl([Bl("firstShredReceived"),Bl("completed"),Bl("optimisticConfirmation"),Bl("root")]),slot:Ul(),timestamp:Ul()}),Dl({type:Bl("createdBank"),parent:Ul(),slot:Ul(),timestamp:Ul()}),Dl({type:Bl("frozen"),slot:Ul(),timestamp:Ul(),stats:Dl({numTransactionEntries:Ul(),numSuccessfulTransactions:Ul(),numFailedTransactions:Ul(),maxTransactionsPerEntry:Ul()})}),Dl({type:Bl("dead"),slot:Ul(),timestamp:Ul(),err:Fl()})]);Dl({subscription:Ul(),result:xf}),Dl({subscription:Ul(),result:rf(Pl([ff,hf]))}),Dl({subscription:Ul(),result:Ul()}),Dl({pubkey:Fl(),gossip:Ml(Fl()),tpu:Ml(Fl()),rpc:Ml(Fl()),version:Ml(Fl())});const Ef=Dl({votePubkey:Fl(),nodePubkey:Fl(),activatedStake:Ul(),epochVoteAccount:Sl(),epochCredits:Il(Ll([Ul(),Ul(),Ul()])),commission:Ul(),lastVote:Ul(),rootSlot:Ml(Ul())});tf(Dl({current:Il(Ef),delinquent:Il(Ef)}));const Tf=Pl([Bl("processed"),Bl("confirmed"),Bl("finalized")]),Cf=Dl({slot:Ul(),confirmations:Ml(Ul()),err:df,confirmationStatus:Rl(Tf)});nf(Il(Ml(Cf))),tf(Ul());const If=Dl({accountKey:Qd,writableIndexes:Il(Ul()),readonlyIndexes:Il(Ul())}),Sf=Dl({signatures:Il(Fl()),message:Dl({accountKeys:Il(Fl()),header:Dl({numRequiredSignatures:Ul(),numReadonlySignedAccounts:Ul(),numReadonlyUnsignedAccounts:Ul()}),instructions:Il(Dl({accounts:Il(Ul()),data:Fl(),programIdIndex:Ul()})),recentBlockhash:Fl(),addressTableLookups:Rl(Il(If))})}),Nf=Dl({pubkey:Qd,signer:Sl(),writable:Sl(),source:Rl(Pl([Bl("transaction"),Bl("lookupTable")]))}),Bf=Dl({accountKeys:Il(Nf),signatures:Il(Fl())}),Mf=Dl({parsed:Hl(),program:Fl(),programId:Qd}),Uf=Dl({accounts:Il(Qd),data:Fl(),programId:Qd}),Rf=jl(Pl([Uf,Mf]),Pl([Dl({parsed:Hl(),program:Fl(),programId:Fl()}),Dl({accounts:Il(Fl()),data:Fl(),programId:Fl()})]),e=>xl(e,"accounts"in e?Uf:Mf)),Of=Dl({signatures:Il(Fl()),message:Dl({accountKeys:Il(Nf),instructions:Il(Rf),recentBlockhash:Fl(),addressTableLookups:Rl(Ml(Il(If)))})}),Ff=Dl({accountIndex:Ul(),mint:Fl(),owner:Rl(Fl()),programId:Rl(Fl()),uiTokenAmount:wf}),Lf=Dl({writable:Il(Qd),readonly:Il(Qd)}),Df=Dl({err:df,fee:Ul(),innerInstructions:Rl(Ml(Il(Dl({index:Ul(),instructions:Il(Dl({accounts:Il(Ul()),data:Fl(),programIdIndex:Ul()}))})))),preBalances:Il(Ul()),postBalances:Il(Ul()),logMessages:Rl(Ml(Il(Fl()))),preTokenBalances:Rl(Ml(Il(Ff))),postTokenBalances:Rl(Ml(Il(Ff))),loadedAddresses:Rl(Lf),computeUnitsConsumed:Rl(Ul()),costUnits:Rl(Ul())}),Pf=Dl({err:df,fee:Ul(),innerInstructions:Rl(Ml(Il(Dl({index:Ul(),instructions:Il(Rf)})))),preBalances:Il(Ul()),postBalances:Il(Ul()),logMessages:Rl(Ml(Il(Fl()))),preTokenBalances:Rl(Ml(Il(Ff))),postTokenBalances:Rl(Ml(Il(Ff))),loadedAddresses:Rl(Lf),computeUnitsConsumed:Rl(Ul()),costUnits:Rl(Ul())}),Hf=Pl([Bl(0),Bl("legacy")]),jf=Dl({pubkey:Fl(),lamports:Ul(),postBalance:Ml(Ul()),rewardType:Ml(Fl()),commission:Rl(Ml(Ul()))});tf(Ml(Dl({blockhash:Fl(),previousBlockhash:Fl(),parentSlot:Ul(),transactions:Il(Dl({transaction:Sf,meta:Ml(Df),version:Rl(Hf)})),rewards:Rl(Il(jf)),blockTime:Ml(Ul()),blockHeight:Ml(Ul())}))),tf(Ml(Dl({blockhash:Fl(),previousBlockhash:Fl(),parentSlot:Ul(),rewards:Rl(Il(jf)),blockTime:Ml(Ul()),blockHeight:Ml(Ul())}))),tf(Ml(Dl({blockhash:Fl(),previousBlockhash:Fl(),parentSlot:Ul(),transactions:Il(Dl({transaction:Bf,meta:Ml(Df),version:Rl(Hf)})),rewards:Rl(Il(jf)),blockTime:Ml(Ul()),blockHeight:Ml(Ul())}))),tf(Ml(Dl({blockhash:Fl(),previousBlockhash:Fl(),parentSlot:Ul(),transactions:Il(Dl({transaction:Of,meta:Ml(Pf),version:Rl(Hf)})),rewards:Rl(Il(jf)),blockTime:Ml(Ul()),blockHeight:Ml(Ul())}))),tf(Ml(Dl({blockhash:Fl(),previousBlockhash:Fl(),parentSlot:Ul(),transactions:Il(Dl({transaction:Bf,meta:Ml(Pf),version:Rl(Hf)})),rewards:Rl(Il(jf)),blockTime:Ml(Ul()),blockHeight:Ml(Ul())}))),tf(Ml(Dl({blockhash:Fl(),previousBlockhash:Fl(),parentSlot:Ul(),rewards:Rl(Il(jf)),blockTime:Ml(Ul()),blockHeight:Ml(Ul())}))),tf(Ml(Dl({blockhash:Fl(),previousBlockhash:Fl(),parentSlot:Ul(),transactions:Il(Dl({transaction:Sf,meta:Ml(Df)})),rewards:Rl(Il(jf)),blockTime:Ml(Ul())}))),tf(Ml(Dl({blockhash:Fl(),previousBlockhash:Fl(),parentSlot:Ul(),signatures:Il(Fl()),blockTime:Ml(Ul())}))),tf(Ml(Dl({slot:Ul(),meta:Ml(Df),blockTime:Rl(Ml(Ul())),transaction:Sf,version:Rl(Hf)}))),tf(Ml(Dl({slot:Ul(),transaction:Of,meta:Ml(Pf),blockTime:Rl(Ml(Ul())),version:Rl(Hf)}))),nf(Dl({blockhash:Fl(),lastValidBlockHeight:Ul()})),nf(Sl()),tf(Il(Dl({slot:Ul(),numTransactions:Ul(),numSlots:Ul(),samplePeriodSecs:Ul()}))),nf(Ml(Dl({feeCalculator:Dl({lamportsPerSignature:Ul()})}))),tf(Fl()),tf(Fl());const zf=Dl({err:df,logs:Il(Fl()),signature:Fl()});var Jf;Dl({result:rf(zf),subscription:Ul()}),Object.freeze({CreateLookupTable:{index:0,layout:Xo.struct([Xo.u32("instruction"),Kd("recentSlot"),Xo.u8("bumpSeed")])},FreezeLookupTable:{index:1,layout:Xo.struct([Xo.u32("instruction")])},ExtendLookupTable:{index:2,layout:Xo.struct([Xo.u32("instruction"),Kd(),Xo.seq(Gd(),Xo.offset(Xo.u32(),-8),"addresses")])},DeactivateLookupTable:{index:3,layout:Xo.struct([Xo.u32("instruction")])},CloseLookupTable:{index:4,layout:Xo.struct([Xo.u32("instruction")])}}),new Yd("AddressLookupTab1e1111111111111111111111111"),Object.freeze({RequestUnits:{index:0,layout:Xo.struct([Xo.u8("instruction"),Xo.u32("units"),Xo.u32("additionalFee")])},RequestHeapFrame:{index:1,layout:Xo.struct([Xo.u8("instruction"),Xo.u32("bytes")])},SetComputeUnitLimit:{index:2,layout:Xo.struct([Xo.u8("instruction"),Xo.u32("units")])},SetComputeUnitPrice:{index:3,layout:Xo.struct([Xo.u8("instruction"),Kd("microLamports")])}}),new Yd("ComputeBudget111111111111111111111111111111"),Xo.struct([Xo.u8("numSignatures"),Xo.u8("padding"),Xo.u16("signatureOffset"),Xo.u16("signatureInstructionIndex"),Xo.u16("publicKeyOffset"),Xo.u16("publicKeyInstructionIndex"),Xo.u16("messageDataOffset"),Xo.u16("messageDataSize"),Xo.u16("messageInstructionIndex")]),new Yd("Ed25519SigVerify111111111111111111111111111"),Hd.utils.isValidPrivateKey,Xo.struct([Xo.u8("numSignatures"),Xo.u16("signatureOffset"),Xo.u8("signatureInstructionIndex"),Xo.u16("ethAddressOffset"),Xo.u8("ethAddressInstructionIndex"),Xo.u16("messageDataOffset"),Xo.u16("messageDataSize"),Xo.u8("messageInstructionIndex"),Xo.blob(20,"ethAddress"),Xo.blob(64,"signature"),Xo.u8("recoveryId")]),new Yd("KeccakSecp256k11111111111111111111111111111"),new Yd("StakeConfig11111111111111111111111111111111");class qf{constructor(e,t,n){this.unixTimestamp=void 0,this.epoch=void 0,this.custodian=void 0,this.unixTimestamp=e,this.epoch=t,this.custodian=n}}Jf=qf,qf.default=new Jf(0,0,Yd.default),Object.freeze({Initialize:{index:0,layout:Xo.struct([Xo.u32("instruction"),((e="authorized")=>Xo.struct([Gd("staker"),Gd("withdrawer")],e))(),((e="lockup")=>Xo.struct([Xo.ns64("unixTimestamp"),Xo.ns64("epoch"),Gd("custodian")],e))()])},Authorize:{index:1,layout:Xo.struct([Xo.u32("instruction"),Gd("newAuthorized"),Xo.u32("stakeAuthorizationType")])},Delegate:{index:2,layout:Xo.struct([Xo.u32("instruction")])},Split:{index:3,layout:Xo.struct([Xo.u32("instruction"),Xo.ns64("lamports")])},Withdraw:{index:4,layout:Xo.struct([Xo.u32("instruction"),Xo.ns64("lamports")])},Deactivate:{index:5,layout:Xo.struct([Xo.u32("instruction")])},Merge:{index:7,layout:Xo.struct([Xo.u32("instruction")])},AuthorizeWithSeed:{index:8,layout:Xo.struct([Xo.u32("instruction"),Gd("newAuthorized"),Xo.u32("stakeAuthorizationType"),Wd("authoritySeed"),Gd("authorityOwner")])}}),new Yd("Stake11111111111111111111111111111111111111"),Object.freeze({InitializeAccount:{index:0,layout:Xo.struct([Xo.u32("instruction"),((e="voteInit")=>Xo.struct([Gd("nodePubkey"),Gd("authorizedVoter"),Gd("authorizedWithdrawer"),Xo.u8("commission")],e))()])},Authorize:{index:1,layout:Xo.struct([Xo.u32("instruction"),Gd("newAuthorized"),Xo.u32("voteAuthorizationType")])},Withdraw:{index:3,layout:Xo.struct([Xo.u32("instruction"),Xo.ns64("lamports")])},UpdateValidatorIdentity:{index:4,layout:Xo.struct([Xo.u32("instruction")])},AuthorizeWithSeed:{index:10,layout:Xo.struct([Xo.u32("instruction"),((e="voteAuthorizeWithSeedArgs")=>Xo.struct([Xo.u32("voteAuthorizationType"),Gd("currentAuthorityDerivedKeyOwnerPubkey"),Wd("currentAuthorityDerivedKeySeed"),Gd("newAuthorized")],e))()])}}),new Yd("Vote111111111111111111111111111111111111111"),new Yd("Va1idator1nfo111111111111111111111111111111"),Dl({name:Fl(),website:Rl(Fl()),details:Rl(Fl()),iconUrl:Rl(Fl()),keybaseUsername:Rl(Fl())}),new Yd("Vote111111111111111111111111111111111111111"),Xo.struct([Gd("nodePubkey"),Gd("authorizedWithdrawer"),Xo.u8("commission"),Xo.nu64(),Xo.seq(Xo.struct([Xo.nu64("slot"),Xo.u32("confirmationCount")]),Xo.offset(Xo.u32(),-8),"votes"),Xo.u8("rootSlotValid"),Xo.nu64("rootSlot"),Xo.nu64(),Xo.seq(Xo.struct([Xo.nu64("epoch"),Gd("authorizedVoter")]),Xo.offset(Xo.u32(),-8),"authorizedVoters"),Xo.struct([Xo.seq(Xo.struct([Gd("authorizedPubkey"),Xo.nu64("epochOfLastAuthorizedSwitch"),Xo.nu64("targetEpoch")]),32,"buf"),Xo.nu64("idx"),Xo.u8("isEmpty")],"priorVoters"),Xo.nu64(),Xo.seq(Xo.struct([Xo.nu64("epoch"),Xo.nu64("credits"),Xo.nu64("prevCredits")]),Xo.offset(Xo.u32(),-8),"epochCredits"),Xo.struct([Xo.nu64("slot"),Xo.nu64("timestamp")],"lastTimestamp")]);const Vf=e=>{const t=new Date,n=new Date(t);n.setDate(n.getDate()-1);const r=new Date(e);return r.setHours(0,0,0,0),t.setHours(0,0,0,0),n.setHours(0,0,0,0),r.getTime()===t.getTime()?"Today":r.getTime()===n.getTime()?"Yesterday":r.toLocaleDateString("en-US",{month:"short",day:"numeric",year:r.getFullYear()!==t.getFullYear()?"numeric":void 0})},Yf=e=>new Promise(t=>setTimeout(t,e||0)),Gf=(e,t=5,n=5)=>(e=e||"",e?.length<=t+n?e:`${e.substr(0,t)}...${e.substr(e.length-n,n)}`),Wf=e=>{if(!e)return"";const t=In[e];return t?t.chainTypeMoralis:""},Xf=e=>{if(!e)return"";const t=In[e];return t?t.chainType:""},Kf={getItem(e){if("undefined"==typeof window)return null;try{return window.localStorage.getItem(e)}catch{return null}},setItem(e,t){if("undefined"!=typeof window)try{window.localStorage.setItem(e,t)}catch{}},removeItem(e){if("undefined"!=typeof window)try{window.localStorage.removeItem(e)}catch{}},get length(){if("undefined"==typeof window)return 0;try{return window.localStorage.length}catch{return 0}},key(e){if("undefined"==typeof window)return null;try{return window.localStorage.key(e)}catch{return null}}};function Qf(e){if(De(e))return!0;try{return new Yd(e),!0}catch{return!1}}function Zf(){return u["'keyring-chatbot-agent';"]}const _f=n.createContext(void 0),$f=()=>{const e=n.useContext(_f);if(!e)throw new Error("useConnect must be used within ConnectProvider");return{...e,chainData:In[e?.account?.chainId]||void 0,chainId:e.account?.chainId||void 0,chainType:Xf(e.account?.chainId||void 0),chainTypeMoralis:Wf(e.account?.chainId||void 0),isChainSupported:!!In[e?.account?.chainId]?.isSupported||!1}},eh=({children:e,initialAccount:n})=>t.jsx(_f.Provider,{value:{account:n||null},children:e}),th=({address:e,chainId:r})=>{const[i,o]=n.useState(!1),{isChainSupported:s}=$f(),a=n.useCallback(()=>{if(!e)return;const t=e,n=()=>{o(!0),setTimeout(()=>o(!1),2e3)};try{navigator.clipboard.writeText(t).then(n).catch(()=>{const e=document.createElement("input");e.value=t,document.body.appendChild(e),e.select(),document.execCommand("copy"),e.remove(),n()})}catch{const e=document.createElement("input");e.value=t,document.body.appendChild(e),e.select(),document.execCommand("copy"),e.remove(),n()}},[e]);return t.jsx(t.Fragment,{children:Qf(e||"")&&t.jsxs("div",{className:"chat-user-info",children:[t.jsxs("span",{className:"user-wallet",children:[t.jsxs("span",{className:"mr-2",children:[In[r]?.customName||In[r]?.name||`Chain ${r}`,":"]}),t.jsx("a",{style:{pointerEvents:s?"auto":"none"},href:In[r]?.blockExplorers?.default?.url+"/address/"+e,target:"_blank",rel:"noopener noreferrer",children:Gf(e)||"Not connected"})]}),t.jsx("button",{className:"copy-address-btn",onClick:a,"aria-label":"Copy wallet address",type:"button",title:i?"Copied!":"Copy address",children:i?t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",children:t.jsx("path",{d:"M13.3333 4L6 11.3333L2.66667 8",stroke:"#0B3988",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M8.1 15.75H13.23C12.9638 16.4152 12.5041 16.9852 11.9105 17.3863C11.3168 17.7874 10.6165 18.0012 9.9 18H3.6C2.64522 18 1.72955 17.6207 1.05442 16.9456C0.379285 16.2704 0 15.3548 0 14.4V7.2C0.00104929 6.32332 0.321408 5.47704 0.901163 4.81944C1.48092 4.16183 2.28037 3.73792 3.15 3.627V10.8C3.15238 12.1121 3.67466 13.3698 4.60245 14.2975C5.53024 15.2253 6.78791 15.7476 8.1 15.75ZM15.75 3.825H17.658C17.6027 3.74389 17.5393 3.66852 17.469 3.6L14.4 0.531C14.3337 0.460854 14.258 0.400274 14.175 0.351V2.25C14.1769 2.66713 14.3434 3.06664 14.6384 3.3616C14.9334 3.65656 15.3329 3.8231 15.75 3.825ZM15.75 5.175C14.9747 5.17357 14.2315 4.86494 13.6833 4.31671C13.1351 3.76847 12.8264 3.02532 12.825 2.25V0H8.1C7.14522 0 6.22955 0.379285 5.55442 1.05442C4.87928 1.72955 4.5 2.64522 4.5 3.6V10.8C4.5 11.7548 4.87928 12.6704 5.55442 13.3456C6.22955 14.0207 7.14522 14.4 8.1 14.4H14.4C15.3548 14.4 16.2705 14.0207 16.9456 13.3456C17.6207 12.6704 18 11.7548 18 10.8V5.175H15.75Z",fill:"#0B3988"})})})]})})},nh="chat_widget_messages",rh=200,ih="welcome-message";function oh(e){return[{id:ih,text:e,sender:"bot",timestamp:new Date}]}function sh(e){return e.map(e=>({...e,timestamp:new Date(e.timestamp)}))}function ah(){const e=Kf.getItem(nh);if(!e)return null;try{const t=JSON.parse(e);if(t&&void 0!==t.owner&&Array.isArray(t.messages))return{owner:t.owner,messages:sh(t.messages)};if(Array.isArray(t))return{owner:"",messages:sh(t)}}catch{}return null}function ch(e,t){Kf.setItem(nh,JSON.stringify({owner:e,messages:t}))}const uh=n.createContext(void 0),lh=({children:e,initialConfig:n})=>t.jsx(uh.Provider,{value:{config:n||null},children:e});var dh=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,fh=Math.ceil,hh=Math.floor,ph="[BigNumber Error] ",mh=ph+"Number primitive has more than 15 significant digits: ",wh=1e14,bh=14,gh=9007199254740991,yh=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],vh=1e7,Ah=1e9;function kh(e){var t=0|e;return e>0||e===t?t:t-1}function xh(e){for(var t,n,r=1,i=e.length,o=e[0]+"";r<i;){for(t=e[r++]+"",n=bh-t.length;n--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function Eh(e,t){var n,r,i=e.c,o=t.c,s=e.s,a=t.s,c=e.e,u=t.e;if(!s||!a)return null;if(n=i&&!i[0],r=o&&!o[0],n||r)return n?r?0:-a:s;if(s!=a)return s;if(n=s<0,r=c==u,!i||!o)return r?0:!i^n?1:-1;if(!r)return c>u^n?1:-1;for(a=(c=i.length)<(u=o.length)?c:u,s=0;s<a;s++)if(i[s]!=o[s])return i[s]>o[s]^n?1:-1;return c==u?0:c>u^n?1:-1}function Th(e,t,n,r){if(e<t||e>n||e!==hh(e))throw Error(ph+(r||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function Ch(e){var t=e.c.length-1;return kh(e.e/bh)==t&&e.c[t]%2!=0}function Ih(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function Sh(e,t,n){var r,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(++t>(r=e.length)){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}var Nh=function e(t){var n,r,i,o,s,a=A.prototype={constructor:A,toString:null,valueOf:null},c=new A(1),u=20,l=4,d=-7,f=21,h=-1e7,p=1e7,m=!1,w=1,b=0,g={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},y="0123456789abcdefghijklmnopqrstuvwxyz",v=!0;function A(e,t){var n,o,s,a,c,d,f,m,w=this;if(!(w instanceof A))return new A(e,t);if(null==t){if(e&&!0===e.Me)return w.s=e.s,void(!e.c||e.e>p?w.c=w.e=null:e.e<h?w.c=[w.e=0]:(w.e=e.e,w.c=e.c.slice()));if((d="number"==typeof e)&&0*e==0){if(w.s=1/e<0?(e=-e,-1):1,e===~~e){for(a=0,c=e;c>=10;c/=10,a++);return void(a>p?w.c=w.e=null:(w.e=a,w.c=[e]))}m=String(e)}else{if(!dh.test(m=String(e)))return i(w,m,d);w.s=45==m.charCodeAt(0)?(m=m.slice(1),-1):1}(a=m.indexOf("."))>-1&&(m=m.replace(".","")),(c=m.search(/e/i))>0?(a<0&&(a=c),a+=+m.slice(c+1),m=m.substring(0,c)):a<0&&(a=m.length)}else{if(Th(t,2,y.length,"Base"),10==t&&v)return T(w=new A(e),u+w.e+1,l);if(m=String(e),d="number"==typeof e){if(0*e!=0)return i(w,m,d,t);if(w.s=1/e<0?(m=m.slice(1),-1):1,A.DEBUG&&m.replace(/^0\.0*|\./,"").length>15)throw Error(mh+e)}else w.s=45===m.charCodeAt(0)?(m=m.slice(1),-1):1;for(n=y.slice(0,t),a=c=0,f=m.length;c<f;c++)if(n.indexOf(o=m.charAt(c))<0){if("."==o){if(c>a){a=f;continue}}else if(!s&&(m==m.toUpperCase()&&(m=m.toLowerCase())||m==m.toLowerCase()&&(m=m.toUpperCase()))){s=!0,c=-1,a=0;continue}return i(w,String(e),d,t)}d=!1,(a=(m=r(m,t,10,w.s)).indexOf("."))>-1?m=m.replace(".",""):a=m.length}for(c=0;48===m.charCodeAt(c);c++);for(f=m.length;48===m.charCodeAt(--f););if(m=m.slice(c,++f)){if(f-=c,d&&A.DEBUG&&f>15&&(e>gh||e!==hh(e)))throw Error(mh+w.s*e);if((a=a-c-1)>p)w.c=w.e=null;else if(a<h)w.c=[w.e=0];else{if(w.e=a,w.c=[],c=(a+1)%bh,a<0&&(c+=bh),c<f){for(c&&w.c.push(+m.slice(0,c)),f-=bh;c<f;)w.c.push(+m.slice(c,c+=bh));c=bh-(m=m.slice(c)).length}else c-=f;for(;c--;m+="0");w.c.push(+m)}}else w.c=[w.e=0]}function k(e,t,n,r){var i,o,s,a,c;if(null==n?n=l:Th(n,0,8),!e.c)return e.toString();if(i=e.c[0],s=e.e,null==t)c=xh(e.c),c=1==r||2==r&&(s<=d||s>=f)?Ih(c,s):Sh(c,s,"0");else if(o=(e=T(new A(e),t,n)).e,a=(c=xh(e.c)).length,1==r||2==r&&(t<=o||o<=d)){for(;a<t;c+="0",a++);c=Ih(c,o)}else if(t-=s+(2===r&&o>s),c=Sh(c,o,"0"),o+1>a){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=o-a)>0)for(o+1==a&&(c+=".");t--;c+="0");return e.s<0&&i?"-"+c:c}function x(e,t){for(var n,r,i=1,o=new A(e[0]);i<e.length;i++)(!(r=new A(e[i])).s||(n=Eh(o,r))===t||0===n&&o.s===t)&&(o=r);return o}function E(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+n*bh-1)>p?e.c=e.e=null:n<h?e.c=[e.e=0]:(e.e=n,e.c=t),e}function T(e,t,n,r){var i,o,s,a,c,u,l,d=e.c,f=yh;if(d){e:{for(i=1,a=d[0];a>=10;a/=10,i++);if((o=t-i)<0)o+=bh,s=t,c=d[u=0],l=hh(c/f[i-s-1]%10);else if((u=fh((o+1)/bh))>=d.length){if(!r)break e;for(;d.length<=u;d.push(0));c=l=0,i=1,s=(o%=bh)-bh+1}else{for(c=a=d[u],i=1;a>=10;a/=10,i++);l=(s=(o%=bh)-bh+i)<0?0:hh(c/f[i-s-1]%10)}if(r=r||t<0||null!=d[u+1]||(s<0?c:c%f[i-s-1]),r=n<4?(l||r)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||r||6==n&&(o>0?s>0?c/f[i-s]:0:d[u-1])%10&1||n==(e.s<0?8:7)),t<1||!d[0])return d.length=0,r?(t-=e.e+1,d[0]=f[(bh-t%bh)%bh],e.e=-t||0):d[0]=e.e=0,e;if(0==o?(d.length=u,a=1,u--):(d.length=u+1,a=f[bh-o],d[u]=s>0?hh(c/f[i-s]%f[s])*a:0),r)for(;;){if(0==u){for(o=1,s=d[0];s>=10;s/=10,o++);for(s=d[0]+=a,a=1;s>=10;s/=10,a++);o!=a&&(e.e++,d[0]==wh&&(d[0]=1));break}if(d[u]+=a,d[u]!=wh)break;d[u--]=0,a=1}for(o=d.length;0===d[--o];d.pop());}e.e>p?e.c=e.e=null:e.e<h&&(e.c=[e.e=0])}return e}function C(e){var t,n=e.e;return null===n?e.toString():(t=xh(e.c),t=n<=d||n>=f?Ih(t,n):Sh(t,n,"0"),e.s<0?"-"+t:t)}return A.clone=e,A.ROUND_UP=0,A.ROUND_DOWN=1,A.ROUND_CEIL=2,A.ROUND_FLOOR=3,A.ROUND_HALF_UP=4,A.ROUND_HALF_DOWN=5,A.ROUND_HALF_EVEN=6,A.ROUND_HALF_CEIL=7,A.ROUND_HALF_FLOOR=8,A.EUCLID=9,A.config=A.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(ph+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(Th(n=e[t],0,Ah,t),u=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(Th(n=e[t],0,8,t),l=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(Th(n[0],-Ah,0,t),Th(n[1],0,Ah,t),d=n[0],f=n[1]):(Th(n,-Ah,Ah,t),d=-(f=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)Th(n[0],-Ah,-1,t),Th(n[1],1,Ah,t),h=n[0],p=n[1];else{if(Th(n,-Ah,Ah,t),!n)throw Error(ph+t+" cannot be zero: "+n);h=-(p=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(ph+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw m=!n,Error(ph+"crypto unavailable");m=n}else m=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(Th(n=e[t],0,9,t),w=n),e.hasOwnProperty(t="POW_PRECISION")&&(Th(n=e[t],0,Ah,t),b=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(ph+t+" not an object: "+n);g=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(ph+t+" invalid: "+n);v="0123456789"==n.slice(0,10),y=n}}return{DECIMAL_PLACES:u,ROUNDING_MODE:l,EXPONENTIAL_AT:[d,f],RANGE:[h,p],CRYPTO:m,MODULO_MODE:w,POW_PRECISION:b,FORMAT:g,ALPHABET:y}},A.isBigNumber=function(e){if(!e||!0!==e.Me)return!1;if(!A.DEBUG)return!0;var t,n,r=e.c,i=e.e,o=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===o||-1===o)&&i>=-Ah&&i<=Ah&&i===hh(i)){if(0===r[0]){if(0===i&&1===r.length)return!0;break e}if((t=(i+1)%bh)<1&&(t+=bh),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=wh||n!==hh(n))break e;if(0!==n)return!0}}}else if(null===r&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(ph+"Invalid BigNumber: "+e)},A.maximum=A.max=function(){return x(arguments,-1)},A.minimum=A.min=function(){return x(arguments,1)},A.random=(o=9007199254740992,s=Math.random()*o&2097151?function(){return hh(Math.random()*o)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,i,o,a=0,l=[],d=new A(c);if(null==e?e=u:Th(e,0,Ah),i=fh(e/bh),m)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));a<i;)(o=131072*t[a]+(t[a+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[a]=n[0],t[a+1]=n[1]):(l.push(o%1e14),a+=2);a=i/2}else{if(!crypto.randomBytes)throw m=!1,Error(ph+"crypto unavailable");for(t=crypto.randomBytes(i*=7);a<i;)(o=281474976710656*(31&t[a])+1099511627776*t[a+1]+4294967296*t[a+2]+16777216*t[a+3]+(t[a+4]<<16)+(t[a+5]<<8)+t[a+6])>=9e15?crypto.randomBytes(7).copy(t,a):(l.push(o%1e14),a+=7);a=i/7}if(!m)for(;a<i;)(o=s())<9e15&&(l[a++]=o%1e14);for(i=l[--a],e%=bh,i&&e&&(o=yh[bh-e],l[a]=hh(i/o)*o);0===l[a];l.pop(),a--);if(a<0)l=[r=0];else{for(r=-1;0===l[0];l.splice(0,1),r-=bh);for(a=1,o=l[0];o>=10;o/=10,a++);a<bh&&(r-=bh-a)}return d.e=r,d.c=l,d}),A.sum=function(){for(var e=1,t=arguments,n=new A(t[0]);e<t.length;)n=n.plus(t[e++]);return n},r=function(){var e="0123456789";function t(e,t,n,r){for(var i,o,s=[0],a=0,c=e.length;a<c;){for(o=s.length;o--;s[o]*=t);for(s[0]+=r.indexOf(e.charAt(a++)),i=0;i<s.length;i++)s[i]>n-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/n|0,s[i]%=n)}return s.reverse()}return function(r,i,o,s,a){var c,d,f,h,p,m,w,g,v=r.indexOf("."),k=u,x=l;for(v>=0&&(h=b,b=0,r=r.replace(".",""),m=(g=new A(i)).pow(r.length-v),b=h,g.c=t(Sh(xh(m.c),m.e,"0"),10,o,e),g.e=g.c.length),f=h=(w=t(r,i,o,a?(c=y,e):(c=e,y))).length;0==w[--h];w.pop());if(!w[0])return c.charAt(0);if(v<0?--f:(m.c=w,m.e=f,m.s=s,w=(m=n(m,g,k,x,o)).c,p=m.r,f=m.e),v=w[d=f+k+1],h=o/2,p=p||d<0||null!=w[d+1],p=x<4?(null!=v||p)&&(0==x||x==(m.s<0?3:2)):v>h||v==h&&(4==x||p||6==x&&1&w[d-1]||x==(m.s<0?8:7)),d<1||!w[0])r=p?Sh(c.charAt(1),-k,c.charAt(0)):c.charAt(0);else{if(w.length=d,p)for(--o;++w[--d]>o;)w[d]=0,d||(++f,w=[1].concat(w));for(h=w.length;!w[--h];);for(v=0,r="";v<=h;r+=c.charAt(w[v++]));r=Sh(r,f,c.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,i,o,s,a=0,c=e.length,u=t%vh,l=t/vh|0;for(e=e.slice();c--;)a=((i=u*(o=e[c]%vh)+(r=l*o+(s=e[c]/vh|0)*u)%vh*vh+a)/n|0)+(r/vh|0)+l*s,e[c]=i%n;return a&&(e=[a].concat(e)),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,i,o,s,a){var c,u,l,d,f,h,p,m,w,b,g,y,v,k,x,E,C,I=r.s==i.s?1:-1,S=r.c,N=i.c;if(!(S&&S[0]&&N&&N[0]))return new A(r.s&&i.s&&(S?!N||S[0]!=N[0]:N)?S&&0==S[0]||!N?0*I:I/0:NaN);for(w=(m=new A(I)).c=[],I=o+(u=r.e-i.e)+1,a||(a=wh,u=kh(r.e/bh)-kh(i.e/bh),I=I/bh|0),l=0;N[l]==(S[l]||0);l++);if(N[l]>(S[l]||0)&&u--,I<0)w.push(1),d=!0;else{for(k=S.length,E=N.length,l=0,I+=2,(f=hh(a/(N[0]+1)))>1&&(N=e(N,f,a),S=e(S,f,a),E=N.length,k=S.length),v=E,g=(b=S.slice(0,E)).length;g<E;b[g++]=0);C=N.slice(),C=[0].concat(C),x=N[0],N[1]>=a/2&&x++;do{if(f=0,(c=t(N,b,E,g))<0){if(y=b[0],E!=g&&(y=y*a+(b[1]||0)),(f=hh(y/x))>1)for(f>=a&&(f=a-1),p=(h=e(N,f,a)).length,g=b.length;1==t(h,b,p,g);)f--,n(h,E<p?C:N,p,a),p=h.length,c=1;else 0==f&&(c=f=1),p=(h=N.slice()).length;if(p<g&&(h=[0].concat(h)),n(b,h,g,a),g=b.length,-1==c)for(;t(N,b,E,g)<1;)f++,n(b,E<g?C:N,g,a),g=b.length}else 0===c&&(f++,b=[0]);w[l++]=f,b[0]?b[g++]=S[v]||0:(b=[S[v]],g=1)}while((v++<k||null!=b[0])&&I--);d=null!=b[0],w[0]||w.splice(0,1)}if(a==wh){for(l=1,I=w[0];I>=10;I/=10,l++);T(m,o+(m.e=l+u*bh-1)+1,s,d)}else m.e=u,m.r=+d;return m}}(),i=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,n=/^\.([^.]+)$/,r=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,s,a,c){var u,l=a?s:s.replace(i,"");if(r.test(l))o.s=isNaN(l)?null:l<0?-1:1;else{if(!a&&(l=l.replace(e,function(e,t,n){return u="x"==(n=n.toLowerCase())?16:"b"==n?2:8,c&&c!=u?e:t}),c&&(u=c,l=l.replace(t,"$1").replace(n,"0.$1")),s!=l))return new A(l,u);if(A.DEBUG)throw Error(ph+"Not a"+(c?" base "+c:"")+" number: "+s);o.s=null}o.c=o.e=null}}(),a.absoluteValue=a.abs=function(){var e=new A(this);return e.s<0&&(e.s=1),e},a.comparedTo=function(e,t){return Eh(this,new A(e,t))},a.decimalPlaces=a.dp=function(e,t){var n,r,i,o=this;if(null!=e)return Th(e,0,Ah),null==t?t=l:Th(t,0,8),T(new A(o),e+o.e+1,t);if(!(n=o.c))return null;if(r=((i=n.length-1)-kh(this.e/bh))*bh,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},a.dividedBy=a.div=function(e,t){return n(this,new A(e,t),u,l)},a.dividedToIntegerBy=a.idiv=function(e,t){return n(this,new A(e,t),0,1)},a.exponentiatedBy=a.pow=function(e,t){var n,r,i,o,s,a,u,d,f=this;if((e=new A(e)).c&&!e.isInteger())throw Error(ph+"Exponent not an integer: "+C(e));if(null!=t&&(t=new A(t)),s=e.e>14,!f.c||!f.c[0]||1==f.c[0]&&!f.e&&1==f.c.length||!e.c||!e.c[0])return d=new A(Math.pow(+C(f),s?e.s*(2-Ch(e)):+C(e))),t?d.mod(t):d;if(a=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new A(NaN);(r=!a&&f.isInteger()&&t.isInteger())&&(f=f.mod(t))}else{if(e.e>9&&(f.e>0||f.e<-1||(0==f.e?f.c[0]>1||s&&f.c[1]>=24e7:f.c[0]<8e13||s&&f.c[0]<=9999975e7)))return o=f.s<0&&Ch(e)?-0:0,f.e>-1&&(o=1/o),new A(a?1/o:o);b&&(o=fh(b/bh+2))}for(s?(n=new A(.5),a&&(e.s=1),u=Ch(e)):u=(i=Math.abs(+C(e)))%2,d=new A(c);;){if(u){if(!(d=d.times(f)).c)break;o?d.c.length>o&&(d.c.length=o):r&&(d=d.mod(t))}if(i){if(0===(i=hh(i/2)))break;u=i%2}else if(T(e=e.times(n),e.e+1,1),e.e>14)u=Ch(e);else{if(0===(i=+C(e)))break;u=i%2}f=f.times(f),o?f.c&&f.c.length>o&&(f.c.length=o):r&&(f=f.mod(t))}return r?d:(a&&(d=c.div(d)),t?d.mod(t):o?T(d,b,l,void 0):d)},a.integerValue=function(e){var t=new A(this);return null==e?e=l:Th(e,0,8),T(t,t.e+1,e)},a.isEqualTo=a.eq=function(e,t){return 0===Eh(this,new A(e,t))},a.isFinite=function(){return!!this.c},a.isGreaterThan=a.gt=function(e,t){return Eh(this,new A(e,t))>0},a.isGreaterThanOrEqualTo=a.gte=function(e,t){return 1===(t=Eh(this,new A(e,t)))||0===t},a.isInteger=function(){return!!this.c&&kh(this.e/bh)>this.c.length-2},a.isLessThan=a.lt=function(e,t){return Eh(this,new A(e,t))<0},a.isLessThanOrEqualTo=a.lte=function(e,t){return-1===(t=Eh(this,new A(e,t)))||0===t},a.isNaN=function(){return!this.s},a.isNegative=function(){return this.s<0},a.isPositive=function(){return this.s>0},a.isZero=function(){return!!this.c&&0==this.c[0]},a.minus=function(e,t){var n,r,i,o,s=this,a=s.s;if(t=(e=new A(e,t)).s,!a||!t)return new A(NaN);if(a!=t)return e.s=-t,s.plus(e);var c=s.e/bh,u=e.e/bh,d=s.c,f=e.c;if(!c||!u){if(!d||!f)return d?(e.s=-t,e):new A(f?s:NaN);if(!d[0]||!f[0])return f[0]?(e.s=-t,e):new A(d[0]?s:3==l?-0:0)}if(c=kh(c),u=kh(u),d=d.slice(),a=c-u){for((o=a<0)?(a=-a,i=d):(u=c,i=f),i.reverse(),t=a;t--;i.push(0));i.reverse()}else for(r=(o=(a=d.length)<(t=f.length))?a:t,a=t=0;t<r;t++)if(d[t]!=f[t]){o=d[t]<f[t];break}if(o&&(i=d,d=f,f=i,e.s=-e.s),(t=(r=f.length)-(n=d.length))>0)for(;t--;d[n++]=0);for(t=wh-1;r>a;){if(d[--r]<f[r]){for(n=r;n&&!d[--n];d[n]=t);--d[n],d[r]+=wh}d[r]-=f[r]}for(;0==d[0];d.splice(0,1),--u);return d[0]?E(e,d,u):(e.s=3==l?-1:1,e.c=[e.e=0],e)},a.modulo=a.mod=function(e,t){var r,i,o=this;return e=new A(e,t),!o.c||!e.s||e.c&&!e.c[0]?new A(NaN):!e.c||o.c&&!o.c[0]?new A(o):(9==w?(i=e.s,e.s=1,r=n(o,e,0,3),e.s=i,r.s*=i):r=n(o,e,0,w),(e=o.minus(r.times(e))).c[0]||1!=w||(e.s=o.s),e)},a.multipliedBy=a.times=function(e,t){var n,r,i,o,s,a,c,u,l,d,f,h,p,m,w,b=this,g=b.c,y=(e=new A(e,t)).c;if(!(g&&y&&g[0]&&y[0]))return!b.s||!e.s||g&&!g[0]&&!y||y&&!y[0]&&!g?e.c=e.e=e.s=null:(e.s*=b.s,g&&y?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=kh(b.e/bh)+kh(e.e/bh),e.s*=b.s,(c=g.length)<(d=y.length)&&(p=g,g=y,y=p,i=c,c=d,d=i),i=c+d,p=[];i--;p.push(0));for(m=wh,w=vh,i=d;--i>=0;){for(n=0,f=y[i]%w,h=y[i]/w|0,o=i+(s=c);o>i;)n=((u=f*(u=g[--s]%w)+(a=h*u+(l=g[s]/w|0)*f)%w*w+p[o]+n)/m|0)+(a/w|0)+h*l,p[o--]=u%m;p[o]=n}return n?++r:p.splice(0,1),E(e,p,r)},a.negated=function(){var e=new A(this);return e.s=-e.s||null,e},a.plus=function(e,t){var n,r=this,i=r.s;if(t=(e=new A(e,t)).s,!i||!t)return new A(NaN);if(i!=t)return e.s=-t,r.minus(e);var o=r.e/bh,s=e.e/bh,a=r.c,c=e.c;if(!o||!s){if(!a||!c)return new A(i/0);if(!a[0]||!c[0])return c[0]?e:new A(a[0]?r:0*i)}if(o=kh(o),s=kh(s),a=a.slice(),i=o-s){for(i>0?(s=o,n=c):(i=-i,n=a),n.reverse();i--;n.push(0));n.reverse()}for((i=a.length)-(t=c.length)<0&&(n=c,c=a,a=n,t=i),i=0;t;)i=(a[--t]=a[t]+c[t]+i)/wh|0,a[t]=wh===a[t]?0:a[t]%wh;return i&&(a=[i].concat(a),++s),E(e,a,s)},a.precision=a.sd=function(e,t){var n,r,i,o=this;if(null!=e&&e!==!!e)return Th(e,1,Ah),null==t?t=l:Th(t,0,8),T(new A(o),e,t);if(!(n=o.c))return null;if(r=(i=n.length-1)*bh+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&o.e+1>r&&(r=o.e+1),r},a.shiftedBy=function(e){return Th(e,-9007199254740991,gh),this.times("1e"+e)},a.squareRoot=a.sqrt=function(){var e,t,r,i,o,s=this,a=s.c,c=s.s,d=s.e,f=u+4,h=new A("0.5");if(1!==c||!a||!a[0])return new A(!c||c<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(c=Math.sqrt(+C(s)))||c==1/0?(((t=xh(a)).length+d)%2==0&&(t+="0"),c=Math.sqrt(+t),d=kh((d+1)/2)-(d<0||d%2),r=new A(t=c==1/0?"5e"+d:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+d)):r=new A(c+""),r.c[0])for((c=(d=r.e)+f)<3&&(c=0);;)if(o=r,r=h.times(o.plus(n(s,o,f,1))),xh(o.c).slice(0,c)===(t=xh(r.c)).slice(0,c)){if(r.e<d&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(T(r,r.e+u+2,1),e=!r.times(r).eq(s));break}if(!i&&(T(o,o.e+u+2,0),o.times(o).eq(s))){r=o;break}f+=4,c+=4,i=1}return T(r,r.e+u+1,l,e)},a.toExponential=function(e,t){return null!=e&&(Th(e,0,Ah),e++),k(this,e,t,1)},a.toFixed=function(e,t){return null!=e&&(Th(e,0,Ah),e=e+this.e+1),k(this,e,t)},a.toFormat=function(e,t,n){var r,i=this;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=g;else if("object"!=typeof n)throw Error(ph+"Argument not an object: "+n);if(r=i.toFixed(e,t),i.c){var o,s=r.split("."),a=+n.groupSize,c=+n.secondaryGroupSize,u=n.groupSeparator||"",l=s[0],d=s[1],f=i.s<0,h=f?l.slice(1):l,p=h.length;if(c&&(o=a,a=c,c=o,p-=o),a>0&&p>0){for(o=p%a||a,l=h.substr(0,o);o<p;o+=a)l+=u+h.substr(o,a);c>0&&(l+=u+h.slice(o)),f&&(l="-"+l)}r=d?l+(n.decimalSeparator||"")+((c=+n.fractionGroupSize)?d.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):d):l}return(n.prefix||"")+r+(n.suffix||"")},a.toFraction=function(e){var t,r,i,o,s,a,u,d,f,h,m,w,b=this,g=b.c;if(null!=e&&(!(u=new A(e)).isInteger()&&(u.c||1!==u.s)||u.lt(c)))throw Error(ph+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+C(u));if(!g)return new A(b);for(t=new A(c),f=r=new A(c),i=d=new A(c),w=xh(g),s=t.e=w.length-b.e-1,t.c[0]=yh[(a=s%bh)<0?bh+a:a],e=!e||u.comparedTo(t)>0?s>0?t:f:u,a=p,p=1/0,u=new A(w),d.c[0]=0;h=n(u,t,0,1),1!=(o=r.plus(h.times(i))).comparedTo(e);)r=i,i=o,f=d.plus(h.times(o=f)),d=o,t=u.minus(h.times(o=t)),u=o;return o=n(e.minus(r),i,0,1),d=d.plus(o.times(f)),r=r.plus(o.times(i)),d.s=f.s=b.s,m=n(f,i,s*=2,l).minus(b).abs().comparedTo(n(d,r,s,l).minus(b).abs())<1?[f,i]:[d,r],p=a,m},a.toNumber=function(){return+C(this)},a.toPrecision=function(e,t){return null!=e&&Th(e,1,Ah),k(this,e,t,2)},a.toString=function(e){var t,n=this,i=n.s,o=n.e;return null===o?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=o<=d||o>=f?Ih(xh(n.c),o):Sh(xh(n.c),o,"0"):10===e&&v?t=Sh(xh((n=T(new A(n),u+o+1,l)).c),n.e,"0"):(Th(e,2,y.length,"Base"),t=r(Sh(xh(n.c),o,"0"),10,e,i,!0)),i<0&&n.c[0]&&(t="-"+t)),t},a.valueOf=a.toJSON=function(){return C(this)},a.Me=!0,a[Symbol.toStringTag]="BigNumber",a[Symbol.for("nodejs.util.inspect.custom")]=a.valueOf,null!=t&&A.set(t),A}();class Bh{baseUrl;constructor(e){this.baseUrl=e}buildUrl(e,t){const n=new URL(e,this.baseUrl);return t&&Object.entries(t).forEach(([e,t])=>{null!=t&&n.searchParams.append(e,String(t))}),n.toString()}async get(e,t={}){const n=this.buildUrl(e,t.query),r=await fetch(n,{method:"GET",headers:t.headers||{},signal:t.signal});if(!r.ok){let e=null;try{e=await r.json()}catch{try{const t=await r.text();t&&(e={message:t})}catch{}}const t=new Error(e?.message||e?.errorMessage||`HTTP ${r.status}: ${r.statusText}`);throw t.status=r.status,t.statusText=r.statusText,e&&(t.data=e),t}return{data:await r.json(),status:r.status}}async post(e,t,n={}){const r=this.buildUrl(e,n.query),i=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",...n.headers},body:JSON.stringify(t),signal:n.signal});if(!i.ok){let e=null;try{e=await i.json()}catch{try{const t=await i.text();t&&(e={message:t})}catch{}}const t=new Error(e?.message||e?.errorMessage||`HTTP ${i.status}: ${i.statusText}`);throw t.status=i.status,t.statusText=i.statusText,e&&(t.data=e),t}return{data:await i.json(),status:i.status}}}function Mh(e,t){return new Promise(n=>{const r=setTimeout(n,e);t?.addEventListener("abort",()=>{clearTimeout(r),n()},{once:!0})})}const Uh=Zf()?.webAppUrl||"https://nft.keyring.app",Rh=new Bh("https://wallet-api.pantograph.app"),Oh=Uh,Fh=new Bh(Oh);async function Lh(e){const{address:t,chain:n="base",token_addresses:r,exclude_spam:i,exclude_unverified_contracts:o}=e;if(!t)throw new Error("Address is required");let s="Unknown error";for(let u=1;u<=5;u++)try{const e={chain:n,exclude_spam:i??!1,exclude_unverified_contracts:o??!1};r&&(e.token_addresses=r);const s=(await Fh.get(`api/moralis/proxy/wallets/${encodeURIComponent(t)}/tokens`,{query:e})).data;if(s?.result?.length>0){s.result=s.result.filter(e=>new Nh(e?.balance||0).gt(0)),s.result=s.result.map(e=>({...e,token_address:"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"===e.token_address?mn:e.token_address}));try{if(s.result.length>0){const e=Sn(n)??n,t=s.result.map(e=>e.token_address),r=await Rh.get(`/keyrings/tokens/${e}/v2`,{query:{addresses:t.join(",")}});if(Array.isArray(r.data)){const e=new Map;for(const t of r.data)t.address&&e.set(t.address.toLowerCase(),{price:null!=t.price?parseFloat(String(t.price)):NaN,icon_image:t.icon_image});s.result=s.result.map(t=>{const n=e.get(t.token_address.toLowerCase());if(!n)return t;const r={...t};return n.icon_image&&(r.logo=n.icon_image,r.thumbnail=n.icon_image),isNaN(n.price)||(r.usd_price=n.price,r.usd_value=Nh(t.balance_formatted||"0").multipliedBy(n.price).toNumber()),r}),s.result=s.result.filter(e=>null==e.usd_value||new Nh(e.usd_value).gte(.01))}}}catch(a){}}return{success:!0,data:s}}catch(c){s=c instanceof Error?c.message:"Unknown error",u<5&&await Mh(1e3)}return{success:!1,error:s}}async function Dh(e){const{address:t,chain:n="base",signal:r}=e;if(!t)throw new Error("Token address is required");let i="Unknown error";for(let s=1;s<=5;s++){if(r?.aborted)return{success:!1,error:"Request cancelled"};try{const e=Sn(n)??n,o=await Rh.get(`/keyrings/tokens/${e}/v2`,{query:{addresses:t},signal:r}),a=t===mn,c=(Array.isArray(o.data)?o.data:[]).find(e=>e.address?.toLowerCase()===t.toLowerCase()||a&&""===e.address)??null;if(c)return{success:!0,data:{token_address:c.address??t,name:c.name??"",symbol:c.symbol??"",decimals:null!=c.decimals?Number(c.decimals):18,logo:c.icon_image||c.logo,thumbnail:c.icon_image||c.logo,usd_price:null!=c.price?parseFloat(c.price):void 0,usd_price_24hr_percent_change:c.price_change_percentage_24h??void 0,usd_price_24hr_usd_change:c.price_change_24h??void 0}};const[u,l]=await Promise.allSettled([Fh.get("api/moralis/proxy/erc20/metadata",{query:{chain:n,addresses:[t]},signal:r}),Fh.get(`api/moralis/proxy/erc20/${encodeURIComponent(t)}/price`,{query:{chain:n,include:"percent_change"},signal:r})]),d="fulfilled"===u.status?u.value.data:[];if(!d||0===d.length){if(i="Token metadata not found",s<5&&await Mh(1e3,r),r?.aborted)return{success:!1,error:"Request cancelled"};continue}const f=d[0],h="fulfilled"===l.status?l.value.data:void 0;return{success:!0,data:{token_address:f.token_address,name:f.name,symbol:f.symbol,decimals:f.decimals,logo:f.logo||f.thumbnail,thumbnail:f.thumbnail,usd_price:h?.usdPrice??void 0,usd_price_24hr_percent_change:h?.["24hrPercentChange"]?parseFloat(h["24hrPercentChange"]):void 0,usd_price_24hr_usd_change:h?.usdPriceChange24hr??void 0}}}catch(o){if(r?.aborted)return{success:!1,error:"Request cancelled"};if(i=o instanceof Error?o.message:"Unknown error",s<5&&await Mh(1e3,r),r?.aborted)return{success:!1,error:"Request cancelled"}}}return{success:!1,error:i}}async function Ph(e){const{address:t,chain:n="base",limit:r=100,exclude_spam:i=!0,cursor:o,signal:s}=e;if(!t)throw new Error("Address is required");let a="Unknown error";for(let u=1;u<=5;u++){if(s?.aborted)return{success:!1,error:"Request cancelled"};try{const e={chain:n,format:"decimal",limit:r,exclude_spam:i,media_items:!0,normalizeMetadata:!0};o&&(e.cursor=o);return{success:!0,data:(await Fh.get(`api/moralis/proxy/${encodeURIComponent(t)}/nft`,{query:e,signal:s})).data}}catch(c){if(s?.aborted)return{success:!1,error:"Request cancelled"};if(a=c instanceof Error?c.message:"Unknown error",u<5&&await Mh(1e3,s),s?.aborted)return{success:!1,error:"Request cancelled"}}}return{success:!1,error:a}}const Hh=new class extends Bh{constructor(){super("https://wallet-api.pantograph.app")}async getTokensDetails(e,t="base"){try{if(!e||!Array.isArray(e)||0===e.length)throw new Error("Addresses must be a non-empty array");const n=e.join(","),r=await this.get(`/keyrings/tokens/${t}/v2`,{query:{addresses:n}});return Array.isArray(r.data)&&(r.data=r.data.filter((e,t,n)=>t===n.findIndex(t=>t.address.toLowerCase()===e.address.toLowerCase())),Array.isArray(e)&&e.length>0&&(r.data=r.data.filter(t=>e.some(e=>e.toLowerCase()===t.address.toLowerCase())),r.data.sort((t,n)=>e.findIndex(e=>e.toLowerCase()===t.address.toLowerCase())-e.findIndex(e=>e.toLowerCase()===n.address.toLowerCase())))),r}catch(n){throw n}}async getTokenDetail(e,t="base"){try{if(!e)throw new Error("Address is required");const n=await this.getTokensDetails([e],t);return{data:n.data[0]||null,status:n.status}}catch(n){throw n}}async getTopGainers(e="base",t="24h",n=3){try{return await this.get(`/token-list/top-gainers/${e}`,{query:{duration:t,limit:n}})}catch(r){throw r}}async searchTokensByKey(e,t){try{if(!e)throw new Error("key is required");const n=await this.get("/token-list",{query:{chainId:t,key:e}});let r=n.data;return r=Object.values(r).flat(),Array.isArray(r)&&(r=r.map(e=>({...e,decimals:null!=e.decimals?Number(e.decimals):18,price:null!=e.price?Number(e.price):void 0}))),n.data=r,n}catch(n){throw n}}},jh=new Bh("https://dln.debridge.finance");async function zh(e){const{chainId:t,tokenIn:n,tokenInAmount:r,tokenOut:i,accesstoken:o,slippage:s="auto",tokenOutRecipient:a}=e;if(!(t&&n&&r&&i))throw new Error("Missing required parameters: chainId, tokenIn, tokenInAmount, tokenOut");try{const e=await fetch("https://exchange-api.keyring.app/admin/setting?configs=others",{method:"GET"}),c=await e.json(),u=c?.others||{},l=u?.AFFILIATE_FEE_PERENT,d=u?.AFFILIATE_FEE_RECIPIENT,f=await jh.get("/v1.0/chain/transaction",{query:{chainId:String(t),tokenIn:n,tokenInAmount:r,tokenOut:i,slippage:String(s),tokenOutRecipient:a,accesstoken:o,affiliateFeePercent:l,affiliateFeeRecipient:d}});if(f.data?.error)throw new Error(`DeBridge API Error: ${f.data.error}`);return{success:!0,data:f.data}}catch(c){let e=c instanceof Error?c.message:"Unknown error";const t=c;t.data?.errorMessage?e=t.data.errorMessage:t.response?.data?.errorMessage?e=t.response.data.errorMessage:t.data?.message?e=t.data.message:t.response?.data?.message&&(e=t.response.data.message);const n=t.status||t.response?.status||t.statusCode||t.data?.status;return{success:!1,error:c instanceof Error?c.message:"Unknown error",status:n,errorMessage:e,errorCode:t.data?.errorCode,errorId:t.data?.errorId}}}const Jh={send_native:{label:"actionSendNativeLabel",description:"actionSendNativeDesc",fields:[{key:"to_address",label:"fieldToAddress",type:"address",placeholder:"0x...",required:!0,validation:"address"},{key:"amount",label:"fieldAmount",type:"amount",placeholder:"0.0",required:!0,validation:"amount"}]},send_token:{label:"actionSendTokenLabel",description:"actionSendTokenDesc",fields:[{key:"contract_address",label:"fieldTokenContract",type:"address",placeholder:"0x... token contract",required:!0,validation:"address",editable:!1},{key:"token_symbol",label:"fieldTokenSymbol",type:"text",placeholder:"e.g. USDC",required:!1,editable:!1},{key:"decimals",label:"fieldDecimals",type:"number",placeholder:"18",required:!1,editable:!1},{key:"to_address",label:"fieldToAddress",type:"address",placeholder:"0x...",required:!0,validation:"address"},{key:"amount",label:"fieldAmount",type:"amount",placeholder:"0.0",required:!0,validation:"amount"}]},swap_token:{label:"actionSwapTokenLabel",description:"actionSwapTokenDesc",fields:[{key:"token_in",label:"fieldTokenIn",type:"address",placeholder:"0x... or native",required:!0,editable:!1},{key:"token_in_symbol",label:"fieldTokenInSymbol",type:"text",placeholder:"e.g. ETH",required:!1,editable:!1},{key:"token_out",label:"fieldTokenOut",type:"address",placeholder:"0x...",required:!0,editable:!1},{key:"token_out_symbol",label:"fieldTokenOutSymbol",type:"text",placeholder:"e.g. USDC",required:!1,editable:!1},{key:"token_in_decimals",label:"fieldTokenInDecimals",type:"number",placeholder:"18",required:!1,editable:!1},{key:"token_out_decimals",label:"fieldTokenOutDecimals",type:"number",placeholder:"18",required:!1,editable:!1},{key:"amount",label:"fieldAmount",type:"amount",placeholder:"0.0",required:!0,validation:"amount"}]},approve_token:{label:"actionApproveTokenLabel",description:"actionApproveTokenDesc",fields:[{key:"contract_address",label:"fieldTokenContract",type:"address",placeholder:"0x... token contract",required:!0,validation:"address",editable:!1},{key:"token_symbol",label:"fieldTokenSymbol",type:"text",placeholder:"e.g. USDC",required:!1,editable:!1},{key:"spender_address",label:"fieldSpenderAddress",type:"address",placeholder:"0x... spender contract",required:!0,validation:"address",editable:!1},{key:"amount",label:"fieldAmountUnlimited",type:"amount",placeholder:"0.0 or leave empty for max",required:!1,validation:"amount"},{key:"decimals",label:"fieldDecimals",type:"number",placeholder:"18",required:!1,editable:!1}]},wrap_native:{label:"actionWrapNativeLabel",description:"actionWrapNativeDesc",fields:[{key:"amount",label:"fieldAmount",type:"amount",placeholder:"0.0",required:!0,validation:"amount"}]},unwrap_native:{label:"actionUnwrapNativeLabel",description:"actionUnwrapNativeDesc",fields:[{key:"amount",label:"fieldAmount",type:"amount",placeholder:"0.0",required:!0,validation:"amount"}]},send_nft:{label:"actionSendNftLabel",description:"actionSendNftDesc",fields:[{key:"contract_address",label:"fieldNftContract",type:"address",placeholder:"0x... NFT contract",required:!0,validation:"address",editable:!1},{key:"token_id",label:"fieldTokenId",type:"text",placeholder:"e.g. 1234",required:!0,editable:!1},{key:"to_address",label:"fieldToAddress",type:"address",placeholder:"0x...",required:!0,validation:"address"},{key:"token_standard",label:"fieldTokenStandard",type:"text",placeholder:"ERC721 or ERC1155",required:!0,editable:!1},{key:"amount",label:"fieldAmount",type:"text",placeholder:"1",required:!0},{key:"maxAmount",label:"fieldMaxAmount",type:"text",placeholder:"",required:!1,editable:!1,hidden:!0},{key:"nft_name",label:"fieldNftName",type:"text",placeholder:"e.g. Bored Ape #1234",required:!1,editable:!1}]}};function qh(e){if(!e||""===e?.trim())return!1;const t=parseFloat(e);return!isNaN(t)&&t>0}const Vh=({action:e,initialValues:r,onSubmit:i,onCancel:o,isSubmitting:s=!1,tokenInfo:c,nftInfo:u,disabled:l=!1})=>{const{t:d,ti:f}=a(),h=Jh[e],[p,m]=n.useState(()=>{if(!h)return{};const e={};return h.fields.forEach(t=>{e[t.key]=r[t.key]||""}),e}),[w]=n.useState(()=>["send_native","send_token","swap_token"].includes(e)&&!c&&p.contract_address?d("formTokenNotFound"):null),[b,g]=n.useState(()=>{const t={};if(["send_native","send_token","swap_token"].includes(e)&&c){const e=parseFloat(c.balanceFormatted||"0");if(e<=0)t.amount=f("formNoBalance",{symbol:c.symbol??""});else{const n=r.amount?.trim();n&&qh(n)&&parseFloat(n)>e&&(t.amount=f("formInsufficientBalance",{balance:c.balanceFormatted,symbol:c.symbol??""}))}}return t}),y=n.useCallback((e,t)=>{m(n=>({...n,[e]:t})),b[e]&&g(t=>{const n={...t};return delete n[e],n})},[b]),v=n.useCallback(()=>{if(!h)return!1;const t={};if(h.fields.forEach(n=>{const r=p[n.key]?.trim()||"";!n.required||r||"send_nft"===e&&"amount"===n.key?r&&("address"!==n.validation||De(r)||(t[n.key]=d("formInvalidAddress")),"amount"!==n.validation||qh(r)||(t[n.key]=d("formMustBePositive")),"amount"===n.key&&r&&qh(r)&&c?.balanceFormatted&&parseFloat(r)>parseFloat(c.balanceFormatted)&&(t[n.key]=f("formInsufficientBalance",{balance:c.balanceFormatted,symbol:c.symbol??""})),"positive_number"===n.validation&&(isNaN(Number(r))||Number(r)<0)&&(t[n.key]=d("formMustBeValidNumber"))):t[n.key]=f("formFieldRequired",{field:d(n.label)})}),"send_nft"===e&&"ERC1155"===p.token_standard?.toUpperCase()){const e=p.amount?.trim();if(e)if(!/^\d+$/.test(e)||parseInt(e,10)<1)t.amount=d("formMustBePositiveInteger");else{const n=parseInt(r.maxAmount||"0",10);n>0&&parseInt(e,10)>n&&(t.amount=f("formAmountExceedsNft",{max:String(n)}))}else t.amount=f("formFieldRequired",{field:d("fieldAmount")})}return g(t),0===Object.keys(t).length},[h,p,c,e,r,d,f]),A=n.useCallback(()=>{v()&&i(e,p)},[v,i,e,p]);return h?t.jsxs("div",{className:"action-form",children:[t.jsx("div",{className:"action-form-title",children:t.jsx("span",{children:d(h.label)})}),w&&t.jsxs("div",{className:"action-form-general-error",children:["⚠️ ",w]}),c&&t.jsx("div",{className:"action-form-token-info",children:t.jsxs("div",{className:"token-info-row",children:[c.logo&&t.jsx("img",{src:c.logo,alt:c.symbol,className:"token-info-logo",width:20,height:20}),t.jsxs("div",{className:"token-info-details",children:[t.jsxs("span",{className:"token-info-name",children:[c.name," (",c.symbol,")"]}),t.jsxs("span",{className:"token-info-balance",children:[d("spendable"),": ",Nh(c.balanceFormatted).decimalPlaces(8,Nh.ROUND_DOWN).toFormat()," ",c.symbol,void 0!==c.usdValue&&t.jsxs("span",{className:"token-info-usd",children:[" ","≈ $",c.usdValue.toFixed(2)]})]})]})]})}),u?.image&&t.jsx("div",{className:"action-form-nft-info",children:t.jsx("img",{src:u.image,alt:u.name,className:"nft-info-image",onError:e=>{e.target.style.display="none"}})}),t.jsx("div",{className:"action-form-fields",children:h.fields.map(n=>n.hidden||"amount"===n.key&&"send_nft"===e&&"ERC1155"!==p.token_standard?.toUpperCase()||["decimals"].includes(n.key)&&"send_token"===e&&r.decimals?null:t.jsxs("div",{className:"action-form-field",children:[t.jsxs("div",{className:"action-form-field-header",children:[t.jsxs("div",{className:"action-form-field-label",children:[d(n.label),n.required&&" *"]}),"amount"===n.key&&c&&"send_nft"!==e&&t.jsxs("div",{className:"action-form-pct-btns",children:[[25,50,75].map(e=>t.jsxs("button",{type:"button",className:"action-form-pct-btn",onClick:()=>y("amount",Nh(c.balanceFormatted).multipliedBy(e).dividedBy(100).decimalPlaces(c.decimals,Nh.ROUND_DOWN).toFixed()),disabled:s||l,children:[e,"%"]},e)),t.jsx("button",{type:"button",className:"action-form-pct-btn action-form-max-btn",onClick:()=>y("amount",c.balanceFormatted),disabled:s||l,children:d("formMax")})]}),"amount"===n.key&&"send_nft"===e&&u&&t.jsx("div",{className:"action-form-pct-btns",children:t.jsx("button",{type:"button",className:"action-form-pct-btn action-form-max-btn",onClick:()=>y("amount",r.maxAmount||""),disabled:s||l,children:d("formMax")})})]}),(()=>{const e=!1===n.editable&&!!r[n.key]||l,i=s||e,o=[b[n.key]?"error":"",e?"readonly":""].filter(Boolean).join(" ");return"address"===n.type?t.jsx("textarea",{rows:2,placeholder:n.placeholder,value:p[n.key]||"",onChange:e=>y(n.key,e.target.value),className:o,disabled:i||l}):t.jsx("input",{type:"number"===n.type?"number":"text",placeholder:n.placeholder,value:p[n.key]||"",onChange:e=>y(n.key,e.target.value),className:o,disabled:i||l})})(),b[n.key]&&t.jsx("span",{className:"field-error",children:b[n.key]})]},n.key))}),!l&&t.jsxs("div",{className:"action-form-actions",children:[t.jsx("button",{className:"message-button",onClick:o,type:"button",disabled:s,children:d("formCancel")}),t.jsx("button",{className:"message-button",onClick:A,type:"button",disabled:s,children:d(s?"formProcessing":"formExecute")})]})]}):null},Yh=({scrollContainerRef:e,threshold:r=200})=>{const[i,o]=n.useState(!1);return n.useEffect(()=>{const t=e.current;if(!t)return;const n=()=>{const{scrollTop:e,scrollHeight:n,clientHeight:i}=t;o(n-e-i>r)};return t.addEventListener("scroll",n,{passive:!0}),n(),()=>{t.removeEventListener("scroll",n)}},[e,r]),i?t.jsx("button",{className:"scroll-to-bottom-btn",onClick:()=>{e.current?.scrollTo({top:e.current.scrollHeight,behavior:"smooth"})},"aria-label":"Scroll to bottom",type:"button",children:t.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:t.jsx("path",{d:"M9 3V15M9 15L4 10M9 15L14 10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}):null},Gh=e=>e?`**CRITICAL - LANGUAGE**: Respond in the specified language: "${e||"detect from current question"}". Do NOT follow language from conversation history.`:"**CRITICAL - LANGUAGE**: You MUST detect the language of the user's CURRENT question and respond ONLY in that exact language. Ignore the language of previous messages in conversation history — only the current question matters. If the current question is in English, respond in English. If in Vietnamese, respond in Vietnamese. NEVER default to Chinese or any other language.",Wh={1:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",10:"0x4200000000000000000000000000000000000006",56:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",137:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",8453:"0x4200000000000000000000000000000000000006",42161:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"},Xh=[{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"}]}],Kh=[{name:"deposit",type:"function",stateMutability:"payable",inputs:[],outputs:[]},{name:"withdraw",type:"function",stateMutability:"nonpayable",inputs:[{name:"wad",type:"uint256"}],outputs:[]}],Qh=[{name:"safeTransferFrom",type:"function",stateMutability:"nonpayable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]}],Zh=[{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 _h(e,t){if(t)return t;const n=In[e];return n?.rpcUrls?.default?.http?.[0]}async function $h(e){const{transactionHash:t,chainId:n,pollingInterval:r=3e3,timeout:i=12e4,rpcUrl:o}=e,s=_h(n,o);if(!s)throw new Error(`No RPC endpoint for chain ${n}`);const a=Date.now();for(;Date.now()-a<i;){try{const e=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_getTransactionReceipt",params:[t]})}),n=await e.json();if(n.result){const e=n.result;return{status:"0x1"===e.status?"success":"fail",blockNumber:e.blockNumber,gasUsed:e.gasUsed,effectiveGasPrice:e.effectiveGasPrice}}}catch(c){}await new Promise(e=>setTimeout(e,r))}throw new Error(`Transaction ${t} was not mined within ${i/1e3}s`)}async function ep(e){const{tokenAddress:t,ownerAddress:n,spenderAddress:r,chainId:i,rpcUrl:o}=e,s=_h(i,o);if(!s)return BigInt(0);try{const e=_e({abi:Xh,functionName:"allowance",args:[n,r]}),i=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_call",params:[{to:t,data:e},"latest"]})}),o=await i.json();return o.result&&"0x"!==o.result?BigInt(o.result):BigInt(0)}catch(a){return BigInt(0)}}function tp(e){const{tokenAddress:t,spenderAddress:n,fromAddress:r,chainId:i,tokenSymbol:o,amount:s}=e,a=s&&BigInt(s)>0n?BigInt(s):Ot;return{from:r,to:t,data:_e({abi:Xh,functionName:"approve",args:[n,a]}),value:"0",chainId:i,description:`Approve ${o||"token"} for swap`}}async function np(e){const{address:t,chainId:n,rpcUrl:r}=e,i=_h(n,r);if(!i)return new Nh(0);try{const e=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_getBalance",params:[t,"latest"]})}),n=await e.json();return n.result&&"0x"!==n.result?new Nh(BigInt(n.result).toString()):new Nh(0)}catch(o){return new Nh(0)}}async function rp(e){const{from:t,to:n,data:r,value:i,chainId:o,rpcUrl:s}=e,a=_h(o,s);if(!a)return new Nh(0);try{const[e,o]=await Promise.all([fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_estimateGas",params:[{from:t,to:n,data:r,...i&&"0"!==i?{value:i}:{}}]})}),fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:2,method:"eth_gasPrice",params:[]})})]),[s,c]=await Promise.all([e.json(),o.json()]),u=s.result?new Nh(BigInt(s.result).toString()):new Nh(0),l=c.result?new Nh(BigInt(c.result).toString()):new Nh(0);return u.times(l).times(1.1)}catch(c){return new Nh(0)}}async function ip(e){const{chainId:t,rpcUrl:n}=e,r=_h(t,n);if(!r)return new Nh(0);try{const e=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_gasPrice",params:[]})}),t=await e.json();return t.result&&"0x"!==t.result?new Nh(BigInt(t.result).toString()):new Nh(0)}catch(i){return new Nh(0)}}var op,sp,ap={},cp={exports:{}},up=cp.exports;var lp=function(){if(sp)return ap;sp=1,Object.defineProperty(ap,"u",{value:!0});var e,t,r,i=n,o=(e=i)&&"object"==typeof e&&"default"in e?e.default:e,s=(op||(op=1,t=cp,r=cp.exports,function(e,n){var i="function",o="undefined",s="object",a="string",c="major",u="model",l="name",d="type",f="vendor",h="version",p="architecture",m="console",w="mobile",b="tablet",g="smarttv",y="wearable",v="embedded",A="Amazon",k="Apple",x="ASUS",E="BlackBerry",T="Browser",C="Chrome",I="Firefox",S="Google",N="Huawei",B="LG",M="Microsoft",U="Motorola",R="Opera",O="Samsung",F="Sharp",L="Sony",D="Xiaomi",P="Zebra",H="Facebook",j="Chromium OS",z="Mac OS",J=" Browser",q=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},V=function(e,t){return typeof e===a&&-1!==Y(t).indexOf(Y(e))},Y=function(e){return e.toLowerCase()},G=function(e,t){if(typeof e===a)return e=e.replace(/^\s\s*/,""),typeof t===o?e:e.substring(0,500)},W=function(e,t){for(var r,o,a,c,u,l,d=0;d<t.length&&!u;){var f=t[d],h=t[d+1];for(r=o=0;r<f.length&&!u&&f[r];)if(u=f[r++].exec(e))for(a=0;a<h.length;a++)l=u[++o],typeof(c=h[a])===s&&c.length>0?2===c.length?typeof c[1]==i?this[c[0]]=c[1].call(this,l):this[c[0]]=c[1]:3===c.length?typeof c[1]!==i||c[1].exec&&c[1].test?this[c[0]]=l?l.replace(c[1],c[2]):n:this[c[0]]=l?c[1].call(this,l,c[2]):n:4===c.length&&(this[c[0]]=l?c[3].call(this,l.replace(c[1],c[2])):n):this[c]=l||n;d+=2}},X=function(e,t){for(var r in t)if(typeof t[r]===s&&t[r].length>0){for(var i=0;i<t[r].length;i++)if(V(t[r][i],e))return"?"===r?n:r}else if(V(t[r],e))return"?"===r?n:r;return t.hasOwnProperty("*")?t["*"]:e},K={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"},Q={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[h,[l,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[h,[l,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[l,h],[/opios[\/ ]+([\w\.]+)/i],[h,[l,R+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[h,[l,R+" GX"]],[/\bopr\/([\w\.]+)/i],[h,[l,R]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[h,[l,"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],[l,h],[/quark(?:pc)?\/([-\w\.]+)/i],[h,[l,"Quark"]],[/\bddg\/([\w\.]+)/i],[h,[l,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[h,[l,"UC"+T]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[h,[l,"WeChat"]],[/konqueror\/([\w\.]+)/i],[h,[l,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[h,[l,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[h,[l,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[h,[l,"Smart Lenovo "+T]],[/(avast|avg)\/([\w\.]+)/i],[[l,/(.+)/,"$1 Secure "+T],h],[/\bfocus\/([\w\.]+)/i],[h,[l,I+" Focus"]],[/\bopt\/([\w\.]+)/i],[h,[l,R+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[h,[l,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[h,[l,"Dolphin"]],[/coast\/([\w\.]+)/i],[h,[l,R+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[h,[l,"MIUI "+T]],[/fxios\/([-\w\.]+)/i],[h,[l,I]],[/\bqihu|(qi?ho?o?|360)browser/i],[[l,"360"+J]],[/\b(qq)\/([\w\.]+)/i],[[l,/(.+)/,"$1Browser"],h],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[l,/(.+)/,"$1"+J],h],[/samsungbrowser\/([\w\.]+)/i],[h,[l,O+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[l,/_/g," "],h],[/metasr[\/ ]?([\d\.]+)/i],[h,[l,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[l,"Sogou Mobile"],h],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[l,h],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[l],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[l,H],h],[/(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],[l,h],[/\bgsa\/([\w\.]+) .*safari\//i],[h,[l,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[h,[l,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[h,[l,C+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[l,C+" WebView"],h],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[h,[l,"Android "+T]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[l,h],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[h,[l,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[h,l],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[l,[h,X,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[l,h],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[l,"Netscape"],h],[/(wolvic)\/([\w\.]+)/i],[l,h],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[h,[l,I+" 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],[l,[h,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[l,[h,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[p,"amd64"]],[/(ia32(?=;))/i],[[p,Y]],[/((?:i[346]|x)86)[;\)]/i],[[p,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[p,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[p,"armhf"]],[/windows (ce|mobile); ppc;/i],[[p,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[p,/ower/,"",Y]],[/(sun4\w)[;\)]/i],[[p,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[p,Y]]],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],[u,[f,O],[d,b]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[u,[f,O],[d,w]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[u,[f,k],[d,w]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[f,k],[d,b]],[/(macintosh);/i],[u,[f,k]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[f,F],[d,w]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[f,N],[d,b]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[f,N],[d,w]],[/\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],[[u,/_/g," "],[f,D],[d,w]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[f,D],[d,b]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[u,[f,"OPPO"],[d,w]],[/\b(opd2\d{3}a?) bui/i],[u,[f,"OPPO"],[d,b]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[f,"Vivo"],[d,w]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[u,[f,"Realme"],[d,w]],[/\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],[u,[f,U],[d,w]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[f,U],[d,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[f,B],[d,b]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[f,B],[d,w]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[f,"Lenovo"],[d,b]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[f,"Nokia"],[d,w]],[/(pixel c)\b/i],[u,[f,S],[d,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[f,S],[d,w]],[/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],[u,[f,L],[d,w]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[f,L],[d,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[f,"OnePlus"],[d,w]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[f,A],[d,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[f,A],[d,w]],[/(playbook);[-\w\),; ]+(rim)/i],[u,f,[d,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[f,E],[d,w]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[f,x],[d,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[f,x],[d,w]],[/(nexus 9)/i],[u,[f,"HTC"],[d,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[f,[u,/_/g," "],[d,w]],[/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],[u,[f,"TCL"],[d,b]],[/(itel) ((\w+))/i],[[f,Y],u,[d,X,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[f,"Acer"],[d,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[f,"Meizu"],[d,w]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[u,[f,"Ulefone"],[d,w]],[/droid.+; (a(?:015|06[35]|142p?))/i],[u,[f,"Nothing"],[d,w]],[/(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],[f,u,[d,w]],[/(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],[f,u,[d,b]],[/(surface duo)/i],[u,[f,M],[d,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[f,"Fairphone"],[d,w]],[/(u304aa)/i],[u,[f,"AT&T"],[d,w]],[/\bsie-(\w*)/i],[u,[f,"Siemens"],[d,w]],[/\b(rct\w+) b/i],[u,[f,"RCA"],[d,b]],[/\b(venue[\d ]{2,7}) b/i],[u,[f,"Dell"],[d,b]],[/\b(q(?:mv|ta)\w+) b/i],[u,[f,"Verizon"],[d,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[f,"Barnes & Noble"],[d,b]],[/\b(tm\d{3}\w+) b/i],[u,[f,"NuVision"],[d,b]],[/\b(k88) b/i],[u,[f,"ZTE"],[d,b]],[/\b(nx\d{3}j) b/i],[u,[f,"ZTE"],[d,w]],[/\b(gen\d{3}) b.+49h/i],[u,[f,"Swiss"],[d,w]],[/\b(zur\d{3}) b/i],[u,[f,"Swiss"],[d,b]],[/\b((zeki)?tb.*\b) b/i],[u,[f,"Zeki"],[d,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[f,"Dragon Touch"],u,[d,b]],[/\b(ns-?\w{0,9}) b/i],[u,[f,"Insignia"],[d,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[f,"NextBook"],[d,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[f,"Voice"],u,[d,w]],[/\b(lvtel\-)?(v1[12]) b/i],[[f,"LvTel"],u,[d,w]],[/\b(ph-1) /i],[u,[f,"Essential"],[d,w]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[f,"Envizen"],[d,b]],[/\b(trio[-\w\. ]+) b/i],[u,[f,"MachSpeed"],[d,b]],[/\btu_(1491) b/i],[u,[f,"Rotor"],[d,b]],[/(shield[\w ]+) b/i],[u,[f,"Nvidia"],[d,b]],[/(sprint) (\w+)/i],[f,u,[d,w]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[f,M],[d,w]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[f,P],[d,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[f,P],[d,w]],[/smart-tv.+(samsung)/i],[f,[d,g]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[f,O],[d,g]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[f,B],[d,g]],[/(apple) ?tv/i],[f,[u,k+" TV"],[d,g]],[/crkey/i],[[u,C+"cast"],[f,S],[d,g]],[/droid.+aft(\w+)( bui|\))/i],[u,[f,A],[d,g]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[u,[f,F],[d,g]],[/(bravia[\w ]+)( bui|\))/i],[u,[f,L],[d,g]],[/(mitv-\w{5}) bui/i],[u,[f,D],[d,g]],[/Hbbtv.*(technisat) (.*);/i],[f,u,[d,g]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[f,G],[u,G],[d,g]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,g]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[f,u,[d,m]],[/droid.+; (shield) bui/i],[u,[f,"Nvidia"],[d,m]],[/(playstation [345portablevi]+)/i],[u,[f,L],[d,m]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[f,M],[d,m]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[u,[f,O],[d,y]],[/((pebble))app/i],[f,u,[d,y]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[u,[f,k],[d,y]],[/droid.+; (glass) \d/i],[u,[f,S],[d,y]],[/droid.+; (wt63?0{2,3})\)/i],[u,[f,P],[d,y]],[/(quest( \d| pro)?)/i],[u,[f,H],[d,y]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[f,[d,v]],[/(aeobc)\b/i],[u,[f,A],[d,v]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[u,[d,w]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[d,b]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,b]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,w]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[f,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[h,[l,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[h,[l,"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],[l,h],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[h,l]],os:[[/microsoft (windows) (vista|xp)/i],[l,h],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[l,[h,X,K]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[h,X,K],[l,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[h,/_/g,"."],[l,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[l,z],[h,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[h,l],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[l,h],[/\(bb(10);/i],[h,[l,E]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[h,[l,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[h,[l,I+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[h,[l,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[h,[l,"watchOS"]],[/crkey\/([\d\.]+)/i],[h,[l,C+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[l,j],h],[/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],[l,h],[/(sunos) ?([\w\.\d]*)/i],[[l,"Solaris"],h],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[l,h]]},Z=function(t,r){if(typeof t===s&&(r=t,t=n),!(this instanceof Z))return new Z(t,r).getResult();var m=typeof e!==o&&e.navigator?e.navigator:n,g=t||(m&&m.userAgent?m.userAgent:""),y=m&&m.userAgentData?m.userAgentData:n,v=r?function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}(Q,r):Q,A=m&&m.userAgent==g;return this.getBrowser=function(){var e,t={};return t[l]=n,t[h]=n,W.call(t,g,v.browser),t[c]=typeof(e=t[h])===a?e.replace(/[^\d\.]/g,"").split(".")[0]:n,A&&m&&m.brave&&typeof m.brave.isBrave==i&&(t[l]="Brave"),t},this.getCPU=function(){var e={};return e[p]=n,W.call(e,g,v.cpu),e},this.getDevice=function(){var e={};return e[f]=n,e[u]=n,e[d]=n,W.call(e,g,v.device),A&&!e[d]&&y&&y.mobile&&(e[d]=w),A&&"Macintosh"==e[u]&&m&&typeof m.standalone!==o&&m.maxTouchPoints&&m.maxTouchPoints>2&&(e[u]="iPad",e[d]=b),e},this.getEngine=function(){var e={};return e[l]=n,e[h]=n,W.call(e,g,v.engine),e},this.getOS=function(){var e={};return e[l]=n,e[h]=n,W.call(e,g,v.os),A&&!e[l]&&y&&y.platform&&"Unknown"!=y.platform&&(e[l]=y.platform.replace(/chrome os/i,j).replace(/macos/i,z)),e},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 g},this.setUA=function(e){return g=typeof e===a&&e.length>500?G(e,500):e,this},this.setUA(g),this};Z.VERSION="1.0.39",Z.BROWSER=q([l,h,c]),Z.CPU=q([p]),Z.DEVICE=q([u,f,d,m,w,g,b,y,v]),Z.ENGINE=Z.OS=q([l,h]),t.exports&&(r=t.exports=Z),r.UAParser=Z;var _=typeof e!==o&&(e.jQuery||e.Zepto);if(_&&!_.ua){var $=new Z;_.ua=$.getResult(),_.ua.get=function(){return $.getUA()},_.ua.set=function(e){$.setUA(e);var t=$.getResult();for(var n in t)_.ua[n]=t[n]}}}("object"==typeof window?window:up)),cp.exports),a=new s,c=a.getBrowser(),u=a.getCPU(),l=a.getDevice(),d=a.getEngine(),f=a.getOS(),h=a.getUA(),p=function(e){return a.setUA(e)},m=function(e){if(e){var t=new s(e);return{UA:t,browser:t.getBrowser(),cpu:t.getCPU(),device:t.getDevice(),engine:t.getEngine(),os:t.getOS(),ua:t.getUA(),setUserAgent:function(e){return t.setUA(e)}}}},w=Object.freeze({ClientUAInstance:a,browser:c,cpu:u,device:l,engine:d,os:f,ua:h,setUa:p,parseUserAgent:m});function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(){return v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v.apply(this,arguments)}function A(e){return(A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function k(e,t){return(k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function x(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function E(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var C="mobile",I="tablet",S="smarttv",N="console",B="wearable",M="embedded",U=void 0,R={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"},O={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},F={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},L=function(e){return e||(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none")},D=function(){return!("undefined"==typeof window||!window.navigator&&!navigator)&&(window.navigator||navigator)},P=function(e){var t=D();return t&&t.platform&&(-1!==t.platform.indexOf(e)||"MacIntel"===t.platform&&t.maxTouchPoints>1&&!window.MSStream)},H=function(e){return e.type===C},j=function(e){return e.type===I},z=function(e){var t=e.type;return t===C||t===I},J=function(e){return e.type===S},q=function(e){return e.type===U},V=function(e){return e.type===B},Y=function(e){return e.type===N},G=function(e){return e.type===M},W=function(e){var t=e.vendor;return L(t)},X=function(e){var t=e.model;return L(t)},K=function(e){var t=e.type;return L(t,"browser")},Q=function(e){return e.name===O.Android},Z=function(e){return e.name===O.Windows},_=function(e){return e.name===O.MAC_OS},$=function(e){return e.name===O.WindowsPhone},ee=function(e){return e.name===O.IOS},te=function(e){var t=e.version;return L(t)},ne=function(e){var t=e.name;return L(t)},re=function(e){return e.name===R.Chrome},ie=function(e){return e.name===R.Firefox},oe=function(e){return e.name===R.Chromium},se=function(e){return e.name===R.Edge},ae=function(e){return e.name===R.Yandex},ce=function(e){var t=e.name;return t===R.Safari||t===R.MobileSafari},ue=function(e){return e.name===R.MobileSafari},le=function(e){return e.name===R.Opera},de=function(e){var t=e.name;return t===R.InternetExplorer||t===R.Ie},fe=function(e){return e.name===R.MIUI},he=function(e){return e.name===R.SamsungBrowser},pe=function(e){var t=e.version;return L(t)},me=function(e){var t=e.major;return L(t)},we=function(e){var t=e.name;return L(t)},be=function(e){var t=e.name;return L(t)},ge=function(e){var t=e.version;return L(t)},ye=function(){var e=D(),t=e&&e.userAgent&&e.userAgent.toLowerCase();return"string"==typeof t&&/electron/.test(t)},ve=function(e){return"string"==typeof e&&-1!==e.indexOf("Edg/")},Ae=function(){var e=D();return e&&(/iPad|iPhone|iPod/.test(e.platform)||"MacIntel"===e.platform&&e.maxTouchPoints>1)&&!window.MSStream},ke=function(){return P("iPad")},xe=function(){return P("iPhone")},Ee=function(){return P("iPod")},Te=function(e){return L(e)};function Ce(e){var t=e||w,n=t.device,r=t.browser,i=t.os,o=t.engine,s=t.ua;return{isSmartTV:J(n),isConsole:Y(n),isWearable:V(n),isEmbedded:G(n),isMobileSafari:ue(r)||ke(),isChromium:oe(r),isMobile:z(n)||ke(),isMobileOnly:H(n),isTablet:j(n)||ke(),isBrowser:q(n),isDesktop:q(n),isAndroid:Q(i),isWinPhone:$(i),isIOS:ee(i)||ke(),isChrome:re(r),isFirefox:ie(r),isSafari:ce(r),isOpera:le(r),isIE:de(r),osVersion:te(i),osName:ne(i),fullBrowserVersion:pe(r),browserVersion:me(r),browserName:we(r),mobileVendor:W(n),mobileModel:X(n),engineName:be(o),engineVersion:ge(o),getUA:Te(s),isEdge:se(r)||ve(s),isYandex:ae(r),deviceType:K(n),isIOS13:Ae(),isIPad13:ke(),isIPhone13:xe(),isIPod13:Ee(),isElectron:ye(),isEdgeChromium:ve(s),isLegacyEdge:se(r)&&!ve(s),isWindows:Z(i),isMacOs:_(i),isMIUI:fe(r),isSamsungBrowser:he(r)}}var Ie=J(l),Se=Y(l),Ne=V(l),Be=G(l),Me=ue(c)||ke(),Ue=oe(c),Re=z(l)||ke(),Oe=H(l),Fe=j(l)||ke(),Le=q(l),De=q(l),Pe=Q(f),He=$(f),je=ee(f)||ke(),ze=re(c),Je=ie(c),qe=ce(c),Ve=le(c),Ye=de(c),Ge=te(f),We=ne(f),Xe=pe(c),Ke=me(c),Qe=we(c),Ze=W(l),_e=X(l),$e=be(d),et=ge(d),tt=Te(h),nt=se(c)||ve(h),rt=ae(c),it=K(l),ot=Ae(),st=ke(),at=xe(),ct=Ee(),ut=ye(),lt=ve(h),dt=se(c)&&!ve(h),ft=Z(f),ht=_(f),pt=fe(c),mt=he(c);function wt(e){var t=e||window.navigator.userAgent;return m(t)}return ap.AndroidView=function(e){var t=e.renderWithFragment,n=e.children,r=x(e,["renderWithFragment","children"]);return Pe?t?o.createElement(i.Fragment,null,n):o.createElement("div",r,n):null},ap.BrowserTypes=R,ap.BrowserView=function(e){var t=e.renderWithFragment,n=e.children,r=x(e,["renderWithFragment","children"]);return Le?t?o.createElement(i.Fragment,null,n):o.createElement("div",r,n):null},ap.ConsoleView=function(e){var t=e.renderWithFragment,n=e.children,r=x(e,["renderWithFragment","children"]);return Se?t?o.createElement(i.Fragment,null,n):o.createElement("div",r,n):null},ap.CustomView=function(e){var t=e.renderWithFragment,n=e.children;e.viewClassName,e.style;var r=e.condition,s=x(e,["renderWithFragment","children","viewClassName","style","condition"]);return r?t?o.createElement(i.Fragment,null,n):o.createElement("div",s,n):null},ap.IEView=function(e){var t=e.renderWithFragment,n=e.children,r=x(e,["renderWithFragment","children"]);return Ye?t?o.createElement(i.Fragment,null,n):o.createElement("div",r,n):null},ap.IOSView=function(e){var t=e.renderWithFragment,n=e.children,r=x(e,["renderWithFragment","children"]);return je?t?o.createElement(i.Fragment,null,n):o.createElement("div",r,n):null},ap.MobileOnlyView=function(e){var t=e.renderWithFragment,n=e.children;e.viewClassName,e.style;var r=x(e,["renderWithFragment","children","viewClassName","style"]);return Oe?t?o.createElement(i.Fragment,null,n):o.createElement("div",r,n):null},ap.MobileView=function(e){var t=e.renderWithFragment,n=e.children,r=x(e,["renderWithFragment","children"]);return Re?t?o.createElement(i.Fragment,null,n):o.createElement("div",r,n):null},ap.OsTypes=O,ap.SmartTVView=function(e){var t=e.renderWithFragment,n=e.children,r=x(e,["renderWithFragment","children"]);return Ie?t?o.createElement(i.Fragment,null,n):o.createElement("div",r,n):null},ap.TabletView=function(e){var t=e.renderWithFragment,n=e.children,r=x(e,["renderWithFragment","children"]);return Fe?t?o.createElement(i.Fragment,null,n):o.createElement("div",r,n):null},ap.WearableView=function(e){var t=e.renderWithFragment,n=e.children,r=x(e,["renderWithFragment","children"]);return Ne?t?o.createElement(i.Fragment,null,n):o.createElement("div",r,n):null},ap.WinPhoneView=function(e){var t=e.renderWithFragment,n=e.children,r=x(e,["renderWithFragment","children"]);return He?t?o.createElement(i.Fragment,null,n):o.createElement("div",r,n):null},ap.browserName=Qe,ap.browserVersion=Ke,ap.deviceDetect=function(e){var t=e?m(e):w,n=t.device,r=t.browser,i=t.engine,o=t.os,s=t.ua,a=function(e){switch(e){case C:return{isMobile:!0};case I:return{isTablet:!0};case S:return{isSmartTV:!0};case N:return{isConsole:!0};case B:return{isWearable:!0};case U:return{isBrowser:!0};case M:return{isEmbedded:!0};default:return F}}(n.type),c=a.isBrowser,u=a.isMobile,l=a.isTablet,d=a.isSmartTV,f=a.isConsole,h=a.isWearable,p=a.isEmbedded;return c?function(e,t,n,r,i){return{isBrowser:e,browserMajorVersion:L(t.major),browserFullVersion:L(t.version),browserName:L(t.name),engineName:L(n.name),engineVersion:L(n.version),osName:L(r.name),osVersion:L(r.version),userAgent:L(i)}}(c,r,i,o,s):d?function(e,t,n,r){return{isSmartTV:e,engineName:L(t.name),engineVersion:L(t.version),osName:L(n.name),osVersion:L(n.version),userAgent:L(r)}}(d,i,o,s):f?function(e,t,n,r){return{isConsole:e,engineName:L(t.name),engineVersion:L(t.version),osName:L(n.name),osVersion:L(n.version),userAgent:L(r)}}(f,i,o,s):u||l?function(e,t,n,r){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach(function(t){y(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e,{vendor:L(t.vendor),model:L(t.model),os:L(n.name),osVersion:L(n.version),ua:L(r)})}(a,n,o,s):h?function(e,t,n,r){return{isWearable:e,engineName:L(t.name),engineVersion:L(t.version),osName:L(n.name),osVersion:L(n.version),userAgent:L(r)}}(h,i,o,s):p?function(e,t,n,r,i){return{isEmbedded:e,vendor:L(t.vendor),model:L(t.model),engineName:L(n.name),engineVersion:L(n.version),osName:L(r.name),osVersion:L(r.version),userAgent:L(i)}}(p,n,i,o,s):void 0},ap.deviceType=it,ap.engineName=$e,ap.engineVersion=et,ap.fullBrowserVersion=Xe,ap.getSelectorsByUserAgent=function(e){if(e&&"string"==typeof e){var t=m(e);return Ce({device:t.device,browser:t.browser,os:t.os,engine:t.engine,ua:t.ua})}},ap.getUA=tt,ap.isAndroid=Pe,ap.isBrowser=Le,ap.isChrome=ze,ap.isChromium=Ue,ap.isConsole=Se,ap.isDesktop=De,ap.isEdge=nt,ap.isEdgeChromium=lt,ap.isElectron=ut,ap.isEmbedded=Be,ap.isFirefox=Je,ap.isIE=Ye,ap.isIOS=je,ap.isIOS13=ot,ap.isIPad13=st,ap.isIPhone13=at,ap.isIPod13=ct,ap.isLegacyEdge=dt,ap.isMIUI=pt,ap.isMacOs=ht,ap.isMobile=Re,ap.isMobileOnly=Oe,ap.isMobileSafari=Me,ap.isOpera=Ve,ap.isSafari=qe,ap.isSamsungBrowser=mt,ap.isSmartTV=Ie,ap.isTablet=Fe,ap.isWearable=Ne,ap.isWinPhone=He,ap.isWindows=ft,ap.isYandex=rt,ap.mobileModel=_e,ap.mobileVendor=Ze,ap.osName=We,ap.osVersion=Ge,ap.parseUserAgent=m,ap.setUserAgent=function(e){return p(e)},ap.useDeviceData=wt,ap.useDeviceSelectors=function(e){var t=wt(e||window.navigator.userAgent);return[Ce(t),t]},ap.useMobileOrientation=function(){var e,t,n=(e=i.useState(function(){var e=window.innerWidth>window.innerHeight?90:0;return{isPortrait:0===e,isLandscape:90===e,orientation:0===e?"portrait":"landscape"}}),t=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(c){a=!0,i=c}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return T(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=n[0],o=n[1],s=i.useCallback(function(){var e=window.innerWidth>window.innerHeight?90:0,t={isPortrait:0===e,isLandscape:90===e,orientation:0===e?"portrait":"landscape"};r.orientation!==t.orientation&&o(t)},[r.orientation]);return i.useEffect(function(){return void 0!==("undefined"==typeof window?"undefined":g(window))&&Re&&(s(),window.addEventListener("load",s,!1),window.addEventListener("resize",s,!1)),function(){window.removeEventListener("resize",s,!1),window.removeEventListener("load",s,!1)}},[s]),r},ap.withOrientationChange=function(e){return function(t){function n(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(t=function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return E(e)}(this,A(n).call(this,e))).isEventListenerAdded=!1,t.handleOrientationChange=t.handleOrientationChange.bind(E(t)),t.onOrientationChange=t.onOrientationChange.bind(E(t)),t.onPageLoad=t.onPageLoad.bind(E(t)),t.state={isLandscape:!1,isPortrait:!1},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&k(e,t)}(n,t),r=n,(i=[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var e=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:0===e,isLandscape:90===e})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){void 0!==("undefined"==typeof window?"undefined":g(window))&&Re&&(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 o.createElement(e,v({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(r.prototype,i),n;var r,i}(o.Component)},ap}();const dp=Zf()?.webAppUrl||"https://nft.keyring.app",fp="gemini-2.5-flash-lite",hp=new class extends Bh{enableGoogleSearch=!0;constructor(){super(dp)}getRuleLanguage(e){return e?`**LANGUAGE ADHERENCE**: You MUST respond ONLY in the language specified as: "${e||"the language of the user's current question"}". Ignore any language bias from context or history. If no language is explicitly provided, detect and follow the current question's language.`:'\n **LANGUAGE ADHERENCE**:\n - **DETECT** the language of the section labeled "CURRENT USER QUESTION" below.\n - **RESPOND ONLY** in that same language.\n - **IGNORE** any language bias from the context or history.\n '}async generateContent(e,t,n){try{const r=`\nBelow is the system context and conversation history. Use it for context but prioritize the instructions at the end.\n---\nSYSTEM CONTEXT & HISTORY:\n${t}\n---\n\n---\nCURRENT USER QUESTION:\n${e}\n---\n\n---\n### MANDATORY RULES:\n1. ${this.getRuleLanguage(n)}\n2. **HISTORY CLEANING**:\n - If any assistant response in the conversation history says it **"doesn't know"**, **"doesn't have data"**, **"cannot find info"**, or similar, you MUST **IGNORE that specific history segment**. \n - Do not let previous data failures prevent you from answering the CURRENT USER QUESTION if the information is available now or in your core knowledge.\n3. **BREVITY**: Keep your answer extremely concise (under 3000 characters).\n4. **DATA INTEGRITY**: Do not mention data gaps or historical missing info; just answer based on available info.\n---\n`,i="/api/gemini-cortex/proxy",o={model:fp,data:{contents:[{parts:[{text:r}]}],tools:[{googleSearch:{}}]}};this.enableGoogleSearch||delete o.data.tools;const s=await this.post(i,o);return s?.data?.data?.candidates?.[0]?.content?.parts?.[0]?.text||s?.data?.candidates?.[0]?.content?.parts?.[0]?.text}catch(r){if((r?.message?.includes("search_grounding_request_per_project_per_day")||r?.data?.error?.message?.includes("search_grounding_request_per_project_per_day"))&&this.enableGoogleSearch)return this.enableGoogleSearch=!1,await this.generateContent(e,t,n);throw r}}async checkInfoQuestion(e,t){try{const r=t+`---\nCURRENT USER QUESTION:\n${e}\n---\n\nAnalyze this question and determine its category.\nIMPORTANT: The following topics should ALWAYS be classified as "yes" (crypto-related):\n- Greetings (in ANY language): hello, hi, xin chào, bonjour, etc.\n- Cryptocurrency, blockchain, crypto trading, DeFi, NFT, etc.\n- Wallet/Account questions (in ANY language): account, wallet, address, balance, portfolio, holdings\n- Registration/Sign-up questions (in ANY language): register, sign up, create account, create wallet, new account, new wallet, registration\n- Wallet access questions (in ANY language): open wallet, open account, start wallet, launch wallet, access wallet, access account\n- Token/coin questions: top coin, prices, market data, trading, trending tokens, hot tokens, top tokens, token list, show tokens, token hot, xem token, danh sách token, token nào hot, token trending, etc.\n- Chain questions: ETH, Base, Optimism, BSC, Polygon, Arbitrum, etc.\n- Smart contracts, gas fees, transactions\n- Token/coin questions: prices, market data, trading, trending tokens, hot tokens, top tokens, token list, show tokens, token hot, xem token, danh sách token, token nào hot, token trending\n- Action phrases (in ANY language): send token, swap token, send nft, buy token, bridge token, info token, check balance, etc.\n\nCRITICAL: Detect these concepts in ANY language (English, Japanese, Chinese, Vietnamese, Korean, Spanish, etc.)\nThe user may ask in their native language, so recognize the MEANING, not just specific words.\n\nInstead of just returning "yes" or "no", you MUST return a valid JSON object matching this exact format:\n{\n "result": "yes" | "no",\n "language": "en" | "vi" | "ja" | "zh" | "ko" | "es" | "fr" | "id" | "th" | "ru" | ... // etc.\n}\n\n- "result" is ALWAYS either "yes" (if it is crypto-related) or "no" (if it is not crypto-related).\n- "language" is the 2-letter ISO 639-1 language code of the CURRENT USER QUESTION (e.g. "en" for English, "vi" for Vietnamese, "ja" for Japanese, "zh" for Chinese, etc.). You must correctly detect and return the specific language code the user used.\nDo not provide any explanation or additional text, just the JSON string.`,i="/api/gemini-cortex/proxy",o={model:fp,data:{contents:[{parts:[{text:r}]}]}},s=await this.post(i,o),a=s?.data?.data?.candidates?.[0]?.content?.parts?.[0]?.text||s?.data?.candidates?.[0]?.content?.parts?.[0]?.text;let c={result:"yes",language:"en"};try{let e=a?.trim()||"";e.startsWith("```json")?e=e.replace(/^```json\s*/,"").replace(/\s*```$/,""):e.startsWith("```")&&(e=e.replace(/^```\s*/,"").replace(/\s*```$/,""));const t=e.match(/\{[\s\S]*?\}/);t&&(c=JSON.parse(t[0]))}catch(n){}return c}catch(r){throw r}}async checkIsQuestionActionWeb3(e,t){try{const n=t+`---\nCURRENT USER QUESTION:\n${e}\n---\n\n #### Analyze this question and determine its category.\nIMPORTANT: The following topics should ALWAYS be classified as "yes" (action-oriented):\n- Greetings (in ANY language): hello, hi, xin chào, bonjour, etc.\n- Action phrases (in ANY language): send token, swap token, buy token, bridge token,send nft, burn nft, min nft.\n- Wallet/Account questions (in ANY language): account, wallet, address, balance, portfolio, holdings\n- Registration/Sign-up questions (in ANY language): register, sign up, create account, create wallet, new account, new wallet, registration\n- Wallet access questions (in ANY language): open wallet, open account, start wallet, launch wallet, access wallet, access account\n\nIMPORTANT: The user may ask in their native language, so recognize the MEANING, not just specific words.\n\nOtherwise, respond with ONLY the word "no" (lowercase, nothing else).\nDo not provide any explanation or additional text.`,r="/api/gemini-cortex/proxy",i={model:fp,data:{contents:[{parts:[{text:n}]}]}},o=await this.post(r,i),s=o?.data?.data?.candidates?.[0]?.content?.parts?.[0]?.text||o?.data?.candidates?.[0]?.content?.parts?.[0]?.text;return s?.toLowerCase()?.startsWith("yes")}catch(n){throw n}}},pp="keyring_link_preview_cache",mp=function(){const e=new Map,t=Kf.getItem(pp);if(!t)return e;try{const n=JSON.parse(t);if(Array.isArray(n))for(const[t,r]of n)e.set(t,r)}catch{}return e}();function wp(e){if(e)return function(e){const t={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&apos;":"'","&nbsp;":" "};return e.replace(/&(?:amp|lt|gt|quot|apos|nbsp|#39);/gi,e=>t[e.toLowerCase()]??e).replace(/&#(\d+);/g,(e,t)=>String.fromCharCode(Number(t))).replace(/&#x([0-9a-f]+);/gi,(e,t)=>String.fromCharCode(parseInt(t,16)))}(e.replace(/<[^>]*>/g,"")).trim()||void 0}const bp=[e=>`https://api.codetabs.com/v1/proxy?quest=${encodeURIComponent(e)}`,e=>`https://api.allorigins.win/raw?url=${encodeURIComponent(e)}`];const gp=({url:e})=>{const[r,i]=n.useState(null),[o,s]=n.useState(!0),[a,c]=n.useState(!1);if(n.useEffect(()=>{let t=!1;return async function(e){if(mp.has(e))return mp.get(e)??null;try{const t=await async function(e){for(const t of bp)try{const n=t(e),r=await fetch(n,{signal:AbortSignal.timeout(6e3)});if(r.ok)return await r.text()}catch{}return null}(e);if(!t)return mp.set(e,null),null;const n=(e,t)=>{const n=[new RegExp(`<meta[^>]*property=["']${e}["'][^>]*content=["']([^"']*)["']`,"i"),new RegExp(`<meta[^>]*content=["']([^"']*)["'][^>]*property=["']${e}["']`,"i"),new RegExp(`<meta[^>]*name=["']${e}["'][^>]*content=["']([^"']*)["']`,"i"),new RegExp(`<meta[^>]*content=["']([^"']*)["'][^>]*name=["']${e}["']`,"i")];for(const r of n){const e=t.match(r);if(e?.[1])return e[1]}},r=n("og:title",t)??n("twitter:title",t)??t.match(/<title[^>]*>([^<]*)<\/title>/i)?.[1],i=n("og:description",t)??n("twitter:description",t)??n("description",t);let o=n("og:image",t)??n("twitter:image",t);if(o&&!o.startsWith("http"))try{o=new URL(o,e).toString()}catch{}const s=n("og:site_name",t);let a;const c=t.match(/<link[^>]*rel=["'](?:shortcut )?icon["'][^>]*href=["']([^"']*)["']/i);if(c?.[1]&&(a=c[1],!a.startsWith("http")))try{a=new URL(a,e).toString()}catch{a=void 0}const u=wp(r),l=wp(i),d=wp(s);if(!u&&!l&&!o)return mp.set(e,null),null;const f={title:u,description:l,image:o,siteName:d,url:e,favicon:a};return mp.set(e,f),function(e){const t=[...e.entries()].filter(([,e])=>null!==e).slice(-100);Kf.setItem(pp,JSON.stringify(t))}(mp),f}catch{return mp.set(e,null),null}}(e).then(e=>{t||(i(e),s(!1))}).catch(()=>{t||s(!1)}),()=>{t=!0}},[e]),o)return t.jsx("div",{className:"link-preview link-preview--loading",children:t.jsx("div",{className:"link-preview__skeleton",children:t.jsxs("div",{className:"link-preview__skeleton-text",children:[t.jsx("div",{className:"link-preview__skeleton-line link-preview__skeleton-line--title"}),t.jsx("div",{className:"link-preview__skeleton-line link-preview__skeleton-line--desc"}),t.jsx("div",{className:"link-preview__skeleton-line link-preview__skeleton-line--url"})]})})});if(!r)return null;const u=function(e){try{return new URL(e).hostname}catch{return e}}(e);return t.jsxs("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"link-preview",title:r.title||e,children:[r.image&&!a&&t.jsx("div",{className:"link-preview__image-wrapper",children:t.jsx("img",{src:r.image,alt:r.title||"",className:"link-preview__image",onError:()=>c(!0),loading:"lazy"})}),t.jsxs("div",{className:"link-preview__content",children:[r.title&&t.jsx("div",{className:"link-preview__title",children:r.title}),r.description&&t.jsx("div",{className:"link-preview__description",children:r.description.length>120?r.description.slice(0,120)+"…":r.description}),t.jsxs("div",{className:"link-preview__url",children:[r.favicon&&t.jsx("img",{src:r.favicon,alt:"",className:"link-preview__favicon",onError:e=>{e.target.style.display="none"}}),t.jsx("span",{children:r.siteName||u})]})]})]})};function yp(e){const n=[],r=/!\[([^\]]*)\]\(([^)]+)\)|\[([^\]]*)\]\(([^)]+)\)|(https?:\/\/[^\s<>]+)|\*\*(.+?)\*\*|__(.+?)__|\*(.+?)\*|_(.+?)_|~~(.+?)~~|`([^`]+)`/g;let i,o=0;for(;null!==(i=r.exec(e));)i.index>o&&n.push(e.slice(o,i.index)),void 0!==i[1]||void 0!==i[2]?n.push(t.jsx("img",{src:i[2],alt:i[1],className:"mc-image",onError:e=>{e.target.src="data:image/svg+xml,%3csvg%20width='180'%20height='180'%20viewBox='0%200%20180%20180'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20opacity='0.1'%3e%3cpath%20d='M102.392%20118.157L102.417%20109.35L89.7594%20102.042C89.5768%20101.937%2089.3953%20101.826%2089.2149%20101.71L89.1861%20101.692C89.012%20101.581%2088.839%20101.47%2088.666%20101.346C88.6061%20101.305%2088.5473%20101.262%2088.4874%20101.22C88.3765%20101.139%2088.259%20101.057%2088.1459%20100.972C88.0749%20100.919%2088.0051%20100.861%2087.9352%20100.811C87.8321%20100.733%2087.73%20100.653%2087.6291%20100.571C87.5552%20100.51%2087.4813%20100.449%2087.4073%20100.387C87.3098%20100.306%2087.2125%20100.224%2087.1157%20100.141C87.0418%20100.075%2086.9678%20100.009%2086.8939%2099.9421C86.7985%2099.8578%2086.7039%2099.772%2086.61%2099.6848C86.5346%2099.6149%2086.4592%2099.5462%2086.3882%2099.4752C86.2929%2099.3843%2086.1986%2099.2922%2086.1044%2099.2002C86.0356%2099.1325%2085.9657%2099.0649%2085.897%2098.9961C85.7983%2098.8963%2085.7007%2098.7954%2085.6031%2098.6934C85.541%2098.628%2085.4778%2098.5637%2085.4168%2098.4982C85.3059%2098.3763%2085.195%2098.2521%2085.0786%2098.1267L84.9533%2097.9881C84.7995%2097.8137%2084.648%2097.6366%2084.4986%2097.457C84.4643%2097.4159%2084.4321%2097.3738%2084.3977%2097.3328C84.2868%2097.1919%2084.1671%2097.05%2084.054%2096.9069C83.9172%2096.7325%2083.7826%2096.5558%2083.6503%2096.3769L83.5827%2096.2881C83.3675%2095.9965%2083.1591%2095.6971%2082.955%2095.3943L82.8441%2095.228C82.5876%2094.8421%2082.341%2094.4495%2082.1045%2094.0503L82.0135%2093.8984C81.8487%2093.616%2081.6886%2093.3306%2081.5334%2093.0423C81.4768%2092.937%2081.4225%2092.8316%2081.3681%2092.7263C81.3138%2092.6209%2081.2572%2092.5045%2081.1952%2092.3936C81.1164%2092.2361%2081.0399%2092.0787%2080.9634%2091.9201C80.939%2091.8691%2080.9135%2091.8181%2080.8891%2091.7671C80.793%2091.5623%2080.6995%2091.3564%2080.6085%2091.1494C80.5852%2091.095%2080.562%2091.0385%2080.5398%2090.9875C80.4732%2090.8337%2080.4082%2090.6792%2080.3446%2090.524L80.2592%2090.3121C80.2008%2090.1643%2080.1435%2090.0164%2080.0873%2089.8686C80.0629%2089.8043%2080.0385%2089.7388%2080.0141%2089.6745C79.9454%2089.486%2079.8789%2089.2971%2079.8145%2089.1079L79.789%2089.0347C79.7151%2088.8218%2079.6471%2088.6088%2079.585%2088.3959C79.5639%2088.3283%2079.5451%2088.2606%2079.5262%2088.193C79.483%2088.0444%2079.4397%2087.8958%2079.3998%2087.7494C79.3776%2087.6685%2079.3566%2087.5875%2079.3355%2087.5066C79.3%2087.3691%2079.2656%2087.2319%2079.2324%2087.0952C79.2131%2087.0138%2079.1943%2086.9325%2079.1758%2086.8512C79.1436%2086.7104%2079.1137%2086.5695%2079.0849%2086.4298C79.0693%2086.3555%2079.0538%2086.2801%2079.0394%2086.208C79.0047%2086.0276%2078.9725%2085.848%2078.9429%2085.6691C78.9429%2085.638%2078.9318%2085.607%2078.9274%2085.5759C78.8941%2085.366%2078.8646%2085.1564%2078.8387%2084.9472C78.832%2084.8906%2078.8265%2084.8363%2078.8198%2084.7775C78.8028%2084.6259%2078.7873%2084.4748%2078.7733%2084.3239C78.7666%2084.253%2078.7622%2084.182%2078.7566%2084.1121C78.7455%2083.9702%2078.7378%2083.8294%2078.7311%2083.6885C78.7311%2083.622%2078.7245%2083.5544%2078.7222%2083.4878C78.7156%2083.2882%2078.71%2083.0897%2078.7112%2082.8934L78.7466%2069.3645L77.6377%2068.7258L71.9567%2065.45C70.7912%2064.7503%2069.5073%2064.2703%2068.1686%2064.0339V64.0417C68.1597%2064.1105%2068.1542%2064.1825%2068.1464%2064.2513C68.1387%2064.32%2068.1298%2064.4021%2068.1231%2064.4797C68.1231%2064.5119%2068.1165%2064.5418%2068.1132%2064.574C68.1043%2064.676%2068.0999%2064.7802%2068.0943%2064.8845C68.0943%2064.941%2068.0865%2064.9954%2068.0843%2065.0541V65.0952C68.0769%2065.2704%2068.0729%2065.4482%2068.0721%2065.6286V65.6607L68.0078%2089.1023C68.0078%2089.2679%2068.01%2089.4339%2068.0145%2089.6002C68.0145%2089.6324%2068.0145%2089.6634%2068.0145%2089.6956C68.0145%2089.7632%2068.0211%2089.832%2068.0244%2089.8996C68.0278%2089.9673%2068.03%2090.056%2068.0355%2090.1347C68.0355%2090.1957%2068.0455%2090.2578%2068.05%2090.3199C68.0544%2090.382%2068.061%2090.463%2068.0677%2090.535C68.0677%2090.5805%2068.0743%2090.6271%2068.0788%2090.6725C68.0888%2090.7757%2068.1021%2090.8799%2068.1132%2090.9842C68.1198%2091.0418%2068.1254%2091.095%2068.132%2091.1583L68.1387%2091.2137C68.1623%2091.3985%2068.1886%2091.5833%2068.2174%2091.7682V91.7837C68.2174%2091.8147%2068.2285%2091.8469%2068.234%2091.8779C68.2584%2092.0277%2068.2839%2092.1774%2068.3117%2092.3282C68.3172%2092.357%2068.3239%2092.3858%2068.3294%2092.4147C68.3438%2092.4901%2068.3604%2092.5655%2068.376%2092.6365C68.3915%2092.7074%2068.4104%2092.8128%2068.4292%2092.9004C68.4403%2092.9525%2068.4536%2093.0046%2068.4658%2093.0556C68.4843%2093.1362%2068.5031%2093.2172%2068.5224%2093.2985C68.5368%2093.3595%2068.5501%2093.4205%2068.5645%2093.4803C68.5789%2093.5402%2068.6055%2093.6345%2068.6255%2093.711C68.6454%2093.7875%2068.6676%2093.8729%2068.6887%2093.9527C68.6998%2093.9916%2068.7087%2094.0304%2068.7186%2094.0636C68.7486%2094.1745%2068.7818%2094.2854%2068.8151%2094.3963C68.8351%2094.464%2068.8539%2094.5316%2068.8739%2094.5993L68.8894%2094.6547C68.9478%2094.8462%2069.0092%2095.0376%2069.0735%2095.2291V95.2391L69.099%2095.3123C69.1533%2095.4731%2069.2099%2095.6339%2069.2676%2095.7947C69.2775%2095.8224%2069.2886%2095.8501%2069.2986%2095.8778C69.3219%2095.9422%2069.3463%2096.0054%2069.3707%2096.0697C69.4039%2096.1595%2069.4372%2096.2482%2069.4716%2096.338C69.4949%2096.3979%2069.5193%2096.4567%2069.5437%2096.5166L69.628%2096.7262C69.649%2096.7761%2069.6679%2096.8271%2069.6889%2096.877C69.7322%2096.9812%2069.7777%2097.0855%2069.8231%2097.1897C69.8464%2097.244%2069.8686%2097.3006%2069.893%2097.3516L69.9174%2097.4082C69.9972%2097.5878%2070.0789%2097.7671%2070.1625%2097.946L70.1735%2097.9704C70.1979%2098.0214%2070.2234%2098.0724%2070.2478%2098.1234C70.3133%2098.2598%2070.3776%2098.3973%2070.4452%2098.5326L70.4785%2098.5969C70.5351%2098.7078%2070.5894%2098.8187%2070.6515%2098.9296C70.6981%2099.0194%2070.7424%2099.1093%2070.7901%2099.198L70.8167%2099.2456C70.9712%2099.534%2071.1313%2099.8193%2071.2969%20100.102C71.3113%20100.126%2071.3235%20100.151%2071.3379%20100.175C71.3523%20100.199%2071.3723%20100.227%2071.3878%20100.254C71.6244%20100.653%2071.8709%20101.045%2072.1275%20101.431C72.1419%20101.452%2072.1541%20101.475%2072.1685%20101.497C72.1829%20101.519%2072.2173%20101.564%2072.2406%20101.6C72.4446%20101.902%2072.652%20102.201%2072.8682%20102.493L72.9314%20102.575C73.0645%20102.754%2073.1994%20102.931%2073.3362%20103.107L73.3595%20103.137C73.4704%20103.272%2073.5746%20103.405%2073.6833%20103.537L73.7798%20103.656L73.7875%20103.665C73.9287%20103.835%2074.0718%20104.002%2074.2167%20104.167L74.2344%20104.187L74.3597%20104.326C74.4551%20104.437%2074.5516%20104.541%2074.6481%20104.646L74.698%20104.698C74.7601%20104.764%2074.8222%20104.828%2074.8843%20104.893C74.9464%20104.959%2075.0284%20105.046%2075.106%20105.122L75.1814%20105.197C75.2502%20105.266%2075.319%20105.334%2075.3888%20105.401C75.4587%20105.469%2075.5108%20105.524%2075.5729%20105.583L75.6727%20105.676C75.747%20105.747%2075.8224%20105.817%2075.8945%20105.886C75.9488%20105.936%2076.0054%20105.987%2076.0564%20106.036L76.1784%20106.146L76.4002%20106.345C76.4478%20106.386%2076.4944%20106.429%2076.5432%20106.469C76.592%20106.509%2076.643%20106.55%2076.6918%20106.59L76.9136%20106.774C76.9535%20106.806%2076.9923%20106.84%2077.0322%20106.872C77.0943%20106.921%2077.1576%20106.967%2077.2197%20107.015C77.2818%20107.062%2077.3594%20107.126%2077.4292%20107.174L77.5168%20107.241C77.6011%20107.303%2077.6876%20107.362%2077.7719%20107.423C77.8307%20107.465%2077.8894%20107.508%2077.9493%20107.549L77.997%20107.584C78.1523%20107.69%2078.3086%20107.794%2078.4661%20107.894L78.4905%20107.91C78.6357%20108.002%2078.7821%20108.092%2078.9341%20108.178L79.0449%20108.241L98.4999%20119.478C98.6175%20119.546%2098.7346%20119.611%2098.8515%20119.674L98.9867%20119.744L99.1653%20119.836C99.2119%20119.859%2099.2584%20119.885%2099.3039%20119.908C99.3793%20119.946%2099.4547%20119.979%2099.5257%20120.019L99.6832%20120.093L99.7464%20120.123C99.8942%20120.19%20100.042%20120.252%20100.19%20120.311L100.208%20120.317C100.35%20120.374%20100.492%20120.428%20100.633%20120.477L100.693%20120.497L100.856%20120.55C100.93%20120.575%20101.004%20120.6%20101.078%20120.622L101.189%20120.655L101.385%20120.709C101.434%20120.722%20101.484%20120.738%20101.532%20120.75C101.579%20120.762%20101.643%20120.773%20101.693%20120.785L101.888%20120.829L101.986%20120.851L102.085%20120.867C102.158%20120.553%20102.219%20120.227%20102.266%20119.886C102.346%20119.313%20102.388%20118.736%20102.392%20118.157Z'%20fill='url(%23paint0_linear_302_6100)'/%3e%3cpath%20d='M91.4307%2064.3019L78.0005%2056.5472L75.8214%2055.2885L71.9957%2053.0796C59.9427%2046.1222%2050.1032%2051.73%2050.0633%2065.5794L50.0001%2087.9076C49.9613%20101.769%2059.7365%20118.694%2071.7894%20125.652L91.2244%20136.872C103.276%20143.831%20113.117%20138.227%20113.156%20124.373L113.183%20114.546V113.668L113.217%20102.041C113.259%2088.1926%20103.482%2071.2604%2091.4307%2064.3019ZM102.419%20108.881V109.349L102.395%20118.156C102.394%20118.733%20102.355%20119.309%20102.278%20119.881C102.232%20120.222%20102.167%20120.547%20102.097%20120.863C100.943%20125.853%2096.5184%20127.534%2091.2621%20124.5L71.8249%20113.283C65.708%20109.753%2060.7478%20101.16%2060.7678%2094.1275L60.831%2071.7949C60.8454%2066.777%2063.3948%2063.8927%2067.0787%2063.9382C67.4454%2063.9447%2067.8112%2063.9777%2068.1732%2064.0369C69.5103%2064.2737%2070.7927%2064.7537%2071.9568%2065.453L77.6312%2068.7232L78.7401%2069.3619L91.3974%2076.6697C97.512%2080.205%20102.476%2088.7947%20102.452%2095.8275L102.419%20108.881Z'%20fill='url(%23paint1_linear_302_6100)'/%3e%3cpath%20d='M129.993%2090.9695C129.993%2090.9063%20129.987%2090.842%20129.985%2090.7788C129.985%2090.648%20129.972%2090.516%20129.966%2090.3851C129.958%2090.2288%20129.953%2090.0746%20129.944%2089.9172C129.936%2089.7952%20129.924%2089.671%20129.914%2089.5479C129.904%2089.4248%20129.892%2089.2707%20129.88%2089.1309C129.873%2089.04%20129.867%2088.9491%20129.858%2088.8582C129.838%2088.6519%20129.813%2088.4445%20129.789%2088.2383C129.776%2088.1274%20129.766%2088.0165%20129.752%2087.9056C129.752%2087.869%20129.744%2087.8324%20129.739%2087.7947C129.694%2087.431%20129.642%2087.0658%20129.583%2086.6991L129.578%2086.6669C129.568%2086.6037%20129.555%2086.5405%20129.544%2086.4773C129.497%2086.1845%20129.448%2085.8918%20129.392%2085.5979C129.381%2085.5391%20129.368%2085.4815%20129.357%2085.4227C129.328%2085.2752%20129.297%2085.1277%20129.267%2084.9791C129.232%2084.805%20129.199%2084.632%20129.156%2084.459C129.134%2084.3559%20129.107%2084.2528%20129.084%2084.1497C129.048%2083.99%20129.011%2083.8303%20128.973%2083.6706C128.944%2083.5519%20128.92%2083.4333%20128.89%2083.3146C128.852%2083.1627%20128.809%2083.0097%20128.77%2082.8566C128.731%2082.7036%20128.688%2082.5395%20128.645%2082.3809C128.625%2082.3055%20128.606%2082.2301%20128.585%2082.1591C128.524%2081.9373%20128.458%2081.7222%20128.393%2081.5038C128.354%2081.3729%20128.318%2081.2409%20128.282%2081.1101C128.271%2081.0746%20128.262%2081.0391%20128.251%2080.9992C128.135%2080.6214%20128.014%2080.244%20127.889%2079.867L127.881%2079.8448C127.863%2079.7927%20127.844%2079.7417%20127.827%2079.6896C127.716%2079.3768%20127.613%2079.063%20127.494%2078.7503C127.474%2078.6948%20127.452%2078.6394%20127.432%2078.584C127.385%2078.4564%20127.336%2078.3289%20127.288%2078.2014C127.222%2078.0273%20127.159%2077.8532%20127.091%2077.6791C127.046%2077.5615%20126.997%2077.4451%20126.949%2077.3275C126.894%2077.1886%20126.838%2077.0499%20126.782%2076.9117C126.742%2076.813%20126.704%2076.7143%20126.663%2076.6167C126.577%2076.4094%20126.487%2076.2042%20126.398%2075.9979C126.353%2075.8871%20126.308%2075.7861%20126.262%2075.6797L126.215%2075.5688C126.059%2075.2147%20125.898%2074.8617%20125.733%2074.5098L125.711%2074.4632C125.661%2074.3523%20125.608%2074.2525%20125.558%2074.146C125.431%2073.881%20125.305%2073.616%20125.174%2073.3532C125.153%2073.311%20125.13%2073.2689%20125.109%2073.2256C124.998%2073.0038%20124.887%2072.7821%20124.768%2072.5669C124.677%2072.3906%20124.589%2072.2143%20124.495%2072.0391C124.478%2072.0069%20124.459%2071.9759%20124.441%2071.9426C124.136%2071.3756%20123.821%2070.8137%20123.495%2070.257C123.467%2070.2094%20123.443%2070.1617%20123.415%2070.114C123.333%2069.9743%20123.247%2069.8379%20123.164%2069.6992C123.024%2069.4675%20122.885%2069.2357%20122.742%2069.0062C122.618%2068.8066%20122.492%2068.6092%20122.365%2068.4118C122.22%2068.19%20122.076%2067.9604%20121.927%2067.7364C121.877%2067.6599%20121.829%2067.5823%20121.778%2067.5069C121.727%2067.4315%20121.682%2067.3727%20121.635%2067.304C121.233%2066.7085%20120.824%2066.1196%20120.4%2065.5441L120.395%2065.5352C120.354%2065.4787%20120.309%2065.4243%20120.268%2065.3689C120.006%2065.017%20119.741%2064.6688%20119.472%2064.3243L119.425%2064.2633C119.215%2063.996%20119%2063.7343%20118.786%2063.4715C118.722%2063.395%20118.661%2063.3163%20118.598%2063.2398L118.584%2063.222C118.306%2062.8879%20118.024%2062.5581%20117.739%2062.2328L117.702%2062.1929C117.621%2062.0998%20117.537%2062.0111%20117.455%2061.919C117.266%2061.7083%20117.078%2061.4954%20116.886%2061.2892L116.788%2061.1871C116.666%2061.0563%20116.542%2060.9288%20116.418%2060.799C116.276%2060.6504%20116.135%2060.4985%20115.991%2060.3554C115.942%2060.3055%20115.891%2060.2579%20115.841%2060.208C115.706%2060.0716%20115.57%2059.9385%20115.433%2059.8043C115.297%2059.6701%20115.193%2059.5626%20115.071%2059.445C115.005%2059.3829%20114.939%2059.323%20114.873%2059.2609C114.726%2059.1212%20114.577%2058.9837%20114.43%2058.8473C114.319%2058.7497%20114.219%2058.6488%20114.112%2058.5523C114.034%2058.4814%20113.953%2058.4137%20113.873%2058.3427C113.725%2058.2104%20113.575%2058.0796%20113.424%2057.9502C113.33%2057.8692%20113.238%2057.7849%20113.142%2057.7051C113.047%2057.6253%20112.946%2057.5465%20112.848%2057.4656C112.7%2057.3443%20112.553%2057.2242%20112.405%2057.1052C112.326%2057.042%20112.248%2056.9754%20112.169%2056.9122C112.045%2056.8157%20111.921%2056.7248%20111.798%2056.6294C111.675%2056.5341%20111.523%2056.4176%20111.386%2056.3145C111.328%2056.2713%20111.275%2056.2258%20111.213%2056.1826C111.045%2056.0595%20110.88%2055.943%20110.707%2055.8233C110.596%2055.7412%20110.476%2055.6569%20110.36%2055.5771L110.265%2055.5094C109.958%2055.2995%20109.651%2055.0958%20109.341%2054.8984H109.334L109.288%2054.8696C109%2054.6877%20108.711%2054.5092%20108.42%2054.3384L108.206%2054.2142L88.7824%2042.9941C88.551%2042.8603%2088.3204%2042.7313%2088.0904%2042.6071C88.0017%2042.5594%2087.9141%2042.5162%2087.8254%2042.4696L87.4717%2042.2866C87.3807%2042.24%2087.2887%2042.1901%2087.1989%2042.1447C87.0492%2042.0704%2086.9017%2042.0049%2086.7553%2041.9351C86.6511%2041.8863%2086.5479%2041.8353%2086.4448%2041.7887L86.3195%2041.7299C86.0238%2041.5991%2085.7332%2041.476%2085.4479%2041.3607L85.4035%2041.344C85.1252%2041.2331%2084.8491%2041.1289%2084.5729%2041.0313L84.4465%2040.9847C84.3356%2040.9481%2084.2336%2040.9149%2084.1271%2040.8805C83.9819%2040.8328%2083.8366%2040.7818%2083.6924%2040.7385C83.6159%2040.7153%2083.5405%2040.6975%2083.464%2040.6753C83.3354%2040.6376%2083.2078%2040.6033%2083.0792%2040.5644C82.9827%2040.5389%2082.8851%2040.5079%2082.7898%2040.4846C82.6944%2040.4613%2082.5802%2040.4436%2082.4737%2040.4192C82.3462%2040.3903%2082.2176%2040.3604%2082.0912%2040.3327C82.0268%2040.3194%2081.9603%2040.3016%2081.896%2040.2894C81.7729%2040.265%2081.6531%2040.2506%2081.53%2040.2295C81.3826%2040.204%2081.234%2040.1774%2081.0865%2040.1564C81.0388%2040.1508%2080.9878%2040.1397%2080.939%2040.1331C80.8148%2040.1109%2080.6928%2040.1109%2080.5697%2040.0954C80.4122%2040.0776%2080.2548%2040.0599%2080.0995%2040.0477C80.0563%2040.0477%2080.0108%2040.0377%2079.9676%2040.0344C79.8567%2040.0266%2079.7558%2040.0288%2079.6482%2040.0233C79.4608%2040.0144%2079.2756%2040.0067%2079.0893%2040C79.0394%2040%2078.9884%2040%2078.9385%2040C78.8575%2040%2078.7799%2040.01%2078.699%2040.0111C78.4661%2040.0111%2078.2354%2040.0266%2078.0081%2040.0432C77.9405%2040.0432%2077.8706%2040.0432%2077.8041%2040.0532C77.7054%2040.0621%2077.61%2040.0765%2077.5124%2040.0876L77.3017%2040.1109C77.0455%2040.1453%2076.7916%2040.1841%2076.5421%2040.2351L76.5144%2040.244C76.4401%2040.2595%2076.368%2040.2794%2076.2926%2040.2961C76.0897%2040.3415%2075.8878%2040.3892%2075.6904%2040.4447C75.5895%2040.4735%2075.4919%2040.5068%2075.3921%2040.5389C75.2646%2040.5789%2075.1349%2040.6143%2075.0085%2040.6598C74.9752%2040.6709%2074.9441%2040.6875%2074.912%2040.6986C74.7146%2040.7707%2074.5239%2040.8517%2074.332%2040.9348C74.2389%2040.9747%2074.1435%2041.0113%2074.0526%2041.0535C73.7731%2041.1843%2073.4981%2041.3252%2073.2331%2041.4793L62.5375%2047.6893C62.8036%2047.5351%2063.0775%2047.3943%2063.3559%2047.2635C63.4479%2047.2202%2063.5433%2047.1847%2063.6364%2047.1437C63.8272%2047.0605%2064.019%2046.9796%2064.2153%2046.9075C64.3727%2046.8498%2064.5335%2046.7966%2064.6954%2046.7478C64.7952%2046.7168%2064.8928%2046.6824%2064.9937%2046.6536C65.1911%2046.5981%2065.3941%2046.5504%2065.5959%2046.505C65.6691%2046.4883%2065.7412%2046.4684%2065.8177%2046.4528C66.0761%2046.4007%2066.3389%2046.3586%2066.605%2046.3231C66.6749%2046.3142%2066.7458%2046.3065%2066.8157%2046.2987C66.9798%2046.2798%2067.1484%2046.2665%2067.3114%2046.2543C67.5387%2046.2366%2067.7694%2046.2266%2068.0023%2046.2211C68.132%2046.2211%2068.2606%2046.2133%2068.3915%2046.2144C68.5756%2046.2144%2068.763%2046.2244%2068.946%2046.2333C69.0957%2046.2399%2069.2454%2046.2455%2069.3973%2046.2577C69.5492%2046.2699%2069.71%2046.2887%2069.8675%2046.3054C70.0249%2046.322%2070.2112%2046.3431%2070.3865%2046.3675C70.5328%2046.3885%2070.6803%2046.4151%2070.83%2046.4406C71.0163%2046.4728%2071.2026%2046.505%2071.3911%2046.5449C71.5176%2046.5715%2071.6462%2046.6003%2071.7737%2046.6303C71.9748%2046.6768%2072.177%2046.7271%2072.3803%2046.7811C72.5078%2046.8155%2072.6365%2046.8498%2072.764%2046.892C72.9858%2046.9552%2073.2076%2047.025%2073.4293%2047.0971C73.5402%2047.1315%2073.6411%2047.1648%2073.7476%2047.2014C74.0625%2047.3123%2074.3786%2047.4231%2074.698%2047.5529L74.7423%2047.5695C75.075%2047.7026%2075.4077%2047.8479%2075.7403%2047.9998C75.8435%2048.0464%2075.9466%2048.0974%2076.0508%2048.1462C76.2896%2048.2585%2076.5295%2048.3757%2076.7705%2048.4977C76.8881%2048.5576%2077.006%2048.6186%2077.1243%2048.6807C77.4414%2048.8481%2077.7597%2049.0189%2078.0802%2049.2041L97.5219%2060.4253C97.8834%2060.6338%2098.2427%2060.8515%2098.5997%2061.0785L98.6507%2061.1095C98.9945%2061.3313%2099.3361%2061.5531%2099.6754%2061.7915C99.7918%2061.8724%2099.9072%2061.9567%20100.022%2062.0388C100.244%2062.1996%20100.476%2062.3626%20100.701%2062.53C100.839%2062.6332%20100.975%2062.7385%20101.113%2062.8439C101.316%2062.9999%20101.518%2063.1588%20101.72%2063.3207C101.868%2063.439%20102.016%2063.5588%20102.164%2063.68C102.357%2063.8397%20102.549%2064.0016%20102.739%2064.1657C102.887%2064.2951%20103.035%2064.4256%20103.183%2064.5572C103.37%2064.7228%20103.555%2064.8909%20103.737%2065.0617C103.886%2065.1981%20104.035%2065.3356%20104.181%2065.4753C104.369%2065.6539%20104.557%2065.8357%20104.743%2066.0187C104.878%2066.1518%20105.015%2066.2849%20105.149%2066.4202C105.343%2066.6153%20105.534%2066.8149%20105.726%2067.0145C105.85%2067.1443%20105.974%2067.2718%20106.097%2067.4038C106.319%2067.6433%20106.541%2067.8884%20106.763%2068.1334C106.845%2068.2255%20106.929%2068.3153%20107.011%2068.4085C107.313%2068.7522%20107.612%2069.1015%20107.907%2069.4564C107.97%2069.5329%20108.031%2069.6116%20108.094%2069.6882C108.325%2069.9698%20108.556%2070.2526%20108.781%2070.5409C109.05%2070.8847%20109.315%2071.2329%20109.576%2071.5855C109.619%2071.6443%20109.665%2071.6964%20109.709%2071.7607C110.133%2072.3363%20110.543%2072.9251%20110.944%2073.5195C111.042%2073.6637%20111.141%2073.8078%20111.236%2073.9531C111.383%2074.1749%20111.529%2074.4022%20111.674%2074.6284C111.8%2074.8258%20111.927%2075.0232%20112.051%2075.2228C112.194%2075.4524%20112.333%2075.6841%20112.472%2075.9159C112.583%2076.1011%20112.694%2076.2863%20112.805%2076.4703C113.13%2077.027%20113.446%2077.5893%20113.751%2078.157C113.862%2078.3633%20113.973%2078.5706%20114.076%2078.7769C114.179%2078.9832%20114.307%2079.2205%20114.417%2079.4423C114.57%2079.7472%20114.72%2080.0544%20114.867%2080.3616C114.918%2080.4725%20114.97%2080.5723%20115.02%2080.6787C115.209%2081.0816%20115.394%2081.4882%20115.574%2081.8985C115.621%2082.0094%20115.666%2082.1126%20115.712%2082.2201C115.842%2082.5232%20115.97%2082.8274%20116.095%2083.1328C116.152%2083.2718%20116.208%2083.4104%20116.263%2083.5486C116.379%2083.8399%20116.49%2084.1315%20116.595%2084.4236C116.643%2084.5511%20116.692%2084.6786%20116.74%2084.8061C116.874%2085.1758%20117.004%2085.5454%20117.129%2085.9151C117.147%2085.9661%20117.165%2086.0182%20117.183%2086.0692C117.324%2086.4891%20117.457%2086.909%20117.585%2087.3289C117.624%2087.4609%20117.661%2087.5929%20117.695%2087.7248C117.782%2088.0176%20117.866%2088.3103%20117.945%2088.6031C117.988%2088.7628%20118.029%2088.9225%20118.071%2089.0833C118.142%2089.3531%20118.209%2089.6229%20118.273%2089.8928C118.312%2090.0532%20118.349%2090.2133%20118.384%2090.3729C118.447%2090.6494%20118.506%2090.9259%20118.561%2091.2024C118.591%2091.3499%20118.622%2091.4974%20118.651%2091.646C118.719%2091.9986%20118.782%2092.3502%20118.839%2092.7006C118.849%2092.7638%20118.862%2092.827%20118.872%2092.8902C118.938%2093.3042%20118.996%2093.7167%20119.046%2094.1278C119.061%2094.2387%20119.07%2094.3496%20119.084%2094.4604C119.118%2094.7562%20119.148%2095.0537%20119.175%2095.3531C119.187%2095.4929%20119.198%2095.6315%20119.208%2095.7701C119.229%2096.0495%20119.246%2096.3279%20119.259%2096.6051C119.266%2096.7371%20119.272%2096.869%20119.278%2097.001C119.292%2097.3936%20119.301%2097.7839%20119.3%2098.172L119.237%20120.505C119.237%20120.912%20119.225%20121.31%20119.207%20121.702C119.207%20121.813%20119.192%20121.924%20119.187%20122.035C119.171%20122.304%20119.154%20122.572%20119.129%20122.835C119.116%20122.986%20119.099%20123.135%20119.083%20123.285C119.058%20123.507%20119.033%20123.728%20119.003%20123.95C118.981%20124.11%20118.957%20124.266%20118.932%20124.423C118.9%20124.624%20118.866%20124.822%20118.829%20125.018C118.795%20125.193%20118.761%20125.367%20118.725%20125.538C118.688%20125.71%20118.648%20125.884%20118.605%20126.06C118.556%20126.262%20118.504%20126.461%20118.449%20126.657C118.406%20126.811%20118.363%20126.964%20118.316%20127.115C118.244%20127.349%20118.168%20127.577%20118.088%20127.804C118.044%20127.928%20118.001%20128.053%20117.956%20128.175C117.811%20128.557%20117.657%20128.928%20117.488%20129.284C117.357%20129.561%20117.221%20129.832%20117.077%20130.092C117.061%20130.121%20117.042%20130.148%20117.027%20130.177C116.895%20130.412%20116.758%20130.64%20116.616%20130.862C116.582%20130.915%20116.545%20130.966%20116.506%20131.02C116.386%20131.199%20116.263%20131.375%20116.136%20131.546C116.084%20131.616%20116.031%20131.686%20115.978%20131.755C115.855%20131.913%20115.729%20132.067%20115.6%20132.216C115.552%20132.273%20115.504%20132.327%20115.455%20132.385C115.279%20132.582%20115.097%20132.774%20114.91%20132.956C114.881%20132.983%20114.85%20133.01%20114.821%20133.038C114.66%20133.191%20114.495%20133.339%20114.327%20133.481C114.264%20133.533%20114.2%20133.584%20114.137%20133.635C113.989%20133.753%20113.841%20133.866%20113.693%20133.975C113.63%20134.02%20113.568%20134.067%20113.504%20134.11C113.292%20134.255%20113.077%20134.395%20112.855%20134.524L123.549%20128.314C123.771%20128.185%20123.986%20128.045%20124.199%20127.9C124.264%20127.857%20124.326%20127.81%20124.388%20127.765C124.539%20127.656%20124.687%20127.543%20124.831%20127.425C124.895%20127.374%20124.959%20127.323%20125.021%20127.271C125.19%20127.129%20125.356%20126.982%20125.518%20126.828C125.547%20126.801%20125.577%20126.776%20125.604%20126.748C125.792%20126.566%20125.974%20126.374%20126.15%20126.177C126.199%20126.121%20126.246%20126.066%20126.295%20126.007C126.424%20125.859%20126.55%20125.706%20126.673%20125.546C126.727%20125.477%20126.784%20125.407%20126.832%20125.337C126.958%20125.167%20127.081%20124.991%20127.2%20124.812C127.236%20124.759%20127.272%20124.707%20127.311%20124.653L127.344%20124.604C127.475%20124.399%20127.598%20124.186%20127.72%20123.971C127.737%20123.941%20127.756%20123.915%20127.772%20123.885C127.911%20123.633%20128.044%20123.375%20128.17%20123.108L128.184%20123.076C128.352%20122.72%20128.506%20122.349%20128.652%20121.967C128.665%20121.933%20128.68%20121.902%20128.694%20121.868C128.726%20121.78%20128.753%20121.686%20128.784%20121.597C128.863%20121.375%20128.941%20121.141%20129.013%20120.907C129.033%20120.843%20129.056%20120.783%20129.075%20120.719C129.101%20120.632%20129.121%20120.539%20129.145%20120.451C129.2%20120.255%20129.252%20120.056%20129.301%20119.854C129.321%20119.769%20129.347%20119.691%20129.366%20119.605C129.385%20119.52%20129.401%20119.423%20129.42%20119.334C129.457%20119.161%20129.492%20118.987%20129.525%20118.811C129.543%20118.719%20129.564%20118.631%20129.581%20118.537C129.598%20118.444%20129.612%20118.323%20129.629%20118.218C129.653%20118.062%20129.677%20117.904%20129.7%20117.745C129.711%20117.661%20129.726%20117.582%20129.736%20117.497C129.753%20117.362%20129.764%20117.221%20129.779%20117.085C129.795%20116.948%20129.813%20116.785%20129.826%20116.632C129.832%20116.57%20129.84%20116.51%20129.845%20116.448C129.861%20116.249%20129.87%20116.041%20129.883%20115.837C129.889%20115.726%20129.898%20115.615%20129.904%20115.505C129.904%20115.477%20129.904%20115.45%20129.904%20115.422C129.918%20115.077%20129.927%20114.726%20129.928%20114.37V114.308L129.991%2091.9753C130.002%2091.6331%20130.003%2091.2978%20129.993%2090.9695Z'%20fill='%230B0E11'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_302_6100'%20x1='68.0078'%20y1='92.449'%20x2='102.417'%20y2='92.449'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23313131'/%3e%3cstop%20offset='1'%20stop-color='%230B0E11'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_302_6100'%20x1='50.0001'%20y1='94.977'%20x2='113.22'%20y2='94.977'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%234E4E4E'/%3e%3cstop%20offset='1'%20stop-color='%230B0E11'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e"}},i.index)):void 0!==i[3]?n.push(t.jsx("a",{href:i[4],target:"_blank",rel:"noopener noreferrer",className:"mc-link",children:i[3]},i.index)):void 0!==i[5]?n.push(t.jsx("a",{href:i[5],target:"_blank",rel:"noopener noreferrer",className:"mc-link",children:i[5]},i.index)):void 0!==i[6]?n.push(t.jsx("strong",{children:yp(i[6])},i.index)):void 0!==i[7]?n.push(t.jsx("strong",{children:yp(i[7])},i.index)):void 0!==i[8]?n.push(t.jsx("em",{children:yp(i[8])},i.index)):void 0!==i[9]?n.push(t.jsx("em",{children:yp(i[9])},i.index)):void 0!==i[10]?n.push(t.jsx("del",{children:yp(i[10])},i.index)):void 0!==i[11]&&n.push(t.jsx("code",{className:"mc-inline-code",children:i[11]},i.index)),o=i.index+i[0].length;return o<e.length&&n.push(e.slice(o)),n.length>0?n:[e]}const vp=({content:e})=>{const n=e.split("\n"),r=[];let i=0;for(;i<n.length;){const e=n[i];if(e.trimStart().startsWith("```")){const o=e.trimStart().slice(3)?.trim(),s=[];for(i++;i<n.length&&!n[i].trimStart().startsWith("```");)s.push(n[i]),i++;r.push(t.jsxs("div",{className:"mc-codeblock",children:[o&&t.jsx("div",{className:"mc-codeblock-lang",children:o}),t.jsx("pre",{children:t.jsx("code",{children:s.join("\n")})})]},`code-${i}`)),i++;continue}if(/^(\s*[-*_]\s*){3,}$/.test(e)){r.push(t.jsx("hr",{className:"mc-hr"},`hr-${i}`)),i++;continue}const o=e.match(/^(#{1,3})\s+(.+)/);if(o){const e=o[1].length,n=o[2];r.push(t.jsx("div",{className:`mc-heading mc-h${e}`,children:yp(n)},`h-${i}`)),i++;continue}if(e.trimStart().startsWith("> ")){const e=[];for(;i<n.length&&n[i].trimStart().startsWith("> ");)e.push(n[i].replace(/^\s*>\s?/,"")),i++;r.push(t.jsx("div",{className:"mc-blockquote",children:e.map((e,n)=>t.jsx("div",{children:yp(e)},n))},`bq-${i}`));continue}""!==e?.trim()?(r.push(t.jsx("div",{className:"mc-line",children:yp(e)},`line-${i}`)),i++):(r.push(t.jsx("div",{className:"mc-empty-line"},`empty-${i}`)),i++)}const o=function(e){const t=e.match(/https?:\/\/[^\s<>)\]]+/g);return t?[...new Set(t)]:[]}(e).slice(0,3);return t.jsxs("div",{className:"message-content",children:[r,o.length>0&&t.jsx("div",{className:"mc-link-previews",children:o.map(e=>t.jsx(gp,{url:e},e))})]})},Ap=Zf()?.webAppUrl||"https://nft.keyring.app";function kp(e){const t=e.indexOf("{");if(-1===t)return e;let n=0,r=!1,i=!1;for(let o=t;o<e.length;o++){const s=e[o];if(i)i=!1;else if("\\"===s&&r)i=!0;else if('"'!==s){if(!r)if("{"===s)n++;else if("}"===s&&(n--,0===n))return e.slice(t,o+1)}else r=!r}return e}function xp(e,t,n){if(!e)return e;const r=e.toLowerCase().trim();if("max"===r||"all"===r)return t||e;const i=r.match(/^(\d+(?:\.\d+)?)%$/);if(i){const e=parseFloat(i[1])/100;return((parseFloat(t)||0)*e).toFixed(8).replace(/\.?0+$/,"")||"0"}const o=r.match(/^\$?(\d+(?:\.\d+)?)\$?$/),s=r.startsWith("$")||r.endsWith("$")||/\d(usd|dollar|dollars|đô|đồng)$/.test(r);if(o&&s){const t=parseFloat(o[1]);return n&&n>0?(t/n).toFixed(8).replace(/\.?0+$/,"")||"0":e}const a=r.match(/^(\d+(?:\.\d+)?)\s*(?:usd|dollar|dollars|đô|đồng)$/);if(a){const t=parseFloat(a[1]);return n&&n>0?(t/n).toFixed(8).replace(/\.?0+$/,"")||"0":e}return e}const Ep=({isOpen:e,onClose:r,onTransaction:i,position:o="bottom-right",modalChatStyle:s={}})=>{const{t:c,ti:u}=a(),{messages:l,addMessage:d,updateMessageAction:f,updateMessageActionParameters:h,updateMessageText:p,clearMessagesById:m,updateMessageType:w}=function(){const{account:e}=$f(),{t:t}=a(),r=(i=e?.address,o=e?.chainId,i&&o?`${i}_${o}`:"");var i,o;const s=n.useMemo(()=>oh(t("welcomeMessage")),[t]),[c,u]=n.useState(()=>r||"pending"),[l,d]=n.useState(()=>{const e=ah();return r?e&&e.owner===r?e.messages:oh(t("welcomeMessage")):e?.messages??oh(t("welcomeMessage"))});if("pending"===c&&r){const e=ah();e&&e.owner===r?d(e.messages):ch(r,l),u(r)}else"pending"!==c&&r&&c!==r&&(d(s),ch(r,s),u(r));const f=n.useMemo(()=>l.map(e=>e.id===ih?{...e,text:t("welcomeMessage")}:e),[l,t]);n.useEffect(()=>{"pending"!==c&&ch(c,l)},[l,c]),n.useEffect(()=>{const e=[];for(let t=0;t<Kf.length;t++){const n=Kf.key(t);n&&n.startsWith(nh+"_")&&e.push(n)}e.forEach(e=>Kf.removeItem(e))},[]);const h=n.useCallback(()=>{d(s),ch(r,s)},[r,s]),p=n.useCallback(e=>{d(t=>{const n=t.filter(t=>!e.includes(t.id));return n.length>rh?n.slice(n.length-rh):n})},[]);return{messages:f,setMessages:d,addMessage:(e,t,n,r,i,o="web3")=>{const s=n?l.find(e=>e.id===n):void 0,a={id:Math.random().toString(36).substring(2,12),text:e,sender:t,timestamp:new Date,typeChat:o,...s&&{replyTo:{id:s.id,text:s.text,sender:s.sender}},...r&&{buttons:r},...i&&{actionData:i}};return d(e=>{const t=[...e,a];return t.length>rh?t.slice(t.length-rh):t}),a},updateMessageAction:(e,t)=>{d(n=>n.map(n=>n.id===e&&n.actionData?{...n,actionData:{...n.actionData,status:t}}:n))},updateMessageActionParameters:(e,t)=>{d(n=>n.map(n=>n.id===e&&n.actionData?{...n,actionData:{...n.actionData,parameters:{...n.actionData.parameters,...t}}}:n))},updateMessageText:(e,t)=>{d(n=>n.map(n=>n.id===e?{...n,text:t}:n))},getMessageById:e=>l.find(t=>t.id===e),clearMessages:h,clearMessagesById:p,updateMessageType:(e,t)=>{d(n=>n.map(n=>n.id===e?{...n,typeChat:t}:n))}}}(),[b,g]=n.useState(""),[y,v]=n.useState(!1),[A,k]=n.useState(!0),[x,E]=n.useState(null),T=n.useRef(null),C=n.useRef(null),I=n.useRef(null),S=n.useRef(null),N=n.useRef(null),B=n.useRef(!1),M=n.useRef(A);n.useEffect(()=>{M.current=A},[A]);const{account:U,chainData:R,chainType:O,chainTypeMoralis:F,chainId:L,isChainSupported:D}=$f(),{config:P}=(()=>{const e=n.useContext(uh);if(!e)throw new Error("useConfig must be used within ConfigProvider");return e})(),H=L&&P?.rpcUrls?.[L]||void 0,j=n.useCallback(()=>{const e=Kf.getItem("dataBuyToken");if(e)try{return JSON.parse(e)}catch{return{srcTokenAddress:"",descTokenAddress:"",amount:"",srcTokenDecimals:18,descTokenDecimals:18}}return{srcTokenAddress:"",descTokenAddress:"",amount:"",srcTokenDecimals:18,descTokenDecimals:18}},[]),z=n.useCallback(e=>{Kf.setItem("dataBuyToken",JSON.stringify(e))},[]),J=n.useCallback(e=>{const t={...j(),...e};z(t)},[j,z]),q=n.useCallback(e=>{E(e),lp.isDesktop&&I.current?.focus()},[]),V=n.useCallback(async(e,t)=>{J({descTokenAddress:e,descTokenDecimals:t||18});try{v(!0);const e=await Lh({address:U?.address||"",chain:F});if(e?.success&&e?.data?.result){const t=e.data.result;if(t?.length>0){const e=t.map(e=>({id:e.token_address,text:`${e.name}: ${e.balance_formatted} ${e.symbol} ($${Nh(e.usd_value||0)?.decimalPlaces(2).toFormat()||"0"})`,value:u("buttonBuyWith",{symbol:e.symbol}),action:"click_balance_item_user_to_buy_button",fullWidth:!0,extraData:{tokenAddress:e.token_address,symbol:e.symbol,balance:e.balance_formatted,usdValue:e.usd_value,decimals:e.decimals}}));d(u("walletBalanceSpendable",{chain:R?.name||"unknown"}),"bot",void 0,e)}else d(u("walletNoTokensFound",{chain:R?.name||"unknown"}),"bot")}else d(c("walletFetchFailed"),"bot")}catch(n){d(c("walletFetchError"),"bot")}finally{v(!1)}},[J,U?.address,F,d,R?.name,c,u]),Y=n.useCallback(async(e,t,n,r)=>{J({srcTokenAddress:e,srcTokenDecimals:r||18});let i=n||"0";if(e===mn)try{const e=await ip({chainId:L,rpcUrl:H});if(e.isGreaterThan(0)){const t=e.times(1e6),o=new Nh(pn(n,r||18).toString()).minus(t);i=o.isGreaterThan(0)?Nh(st(BigInt(o.toFixed(0)),18)).toFixed():"0"}}catch(s){}const o=[25,50,75,100].map(n=>({id:`percent-${n}`,text:`${n}%`,value:u("buttonUsePercent",{percent:String(n),symbol:t}),action:"select_percent",extraData:{percent:n,tokenAddress:e,tokenSymbol:t,tokenDecimals:r||18,tokenBalance:i}}));Nh(i).isZero()?d(u("insufficientFeeToken",{symbol:t}),"bot"):d(u("selectAmountOf",{symbol:t,balance:i}),"bot",void 0,o)},[d,L,H,J,u]),G=n.useCallback(async(e,t,n,r)=>{const i={amount:Nh(t).times(e).dividedBy(100).toFixed()};void 0!==n&&(i.srcTokenAddress=n),void 0!==r&&(i.srcTokenDecimals=r),J(i);const o=j(),s=pn(o.amount,o.srcTokenDecimals||18).toString(),a=await zh({chainId:L,tokenIn:o.srcTokenAddress,tokenInAmount:s,tokenOut:o.descTokenAddress,tokenOutRecipient:U?.address||"",slippage:"auto",accesstoken:"d6c45897b8f6"});if(a.success&&a.data){const e=a.data,t=e.tokenIn,n=e.tokenOut,r=Nh(st(BigInt(t.amount||0),t.decimals)).decimalPlaces(8).toFormat(),i=Nh(st(BigInt(n.amount||0),n.decimals)).decimalPlaces(8).toFormat();let f=!1;if(o.srcTokenAddress!==mn&&""!==o.srcTokenAddress&&U?.address&&e.tx?.to)try{const t=await ep({tokenAddress:o.srcTokenAddress,ownerAddress:U.address,spenderAddress:e.tx.to,chainId:L,rpcUrl:H});f=Nh(t.toString()).isLessThan(s)}catch(l){f=!0}const h=e.estimatedTransactionFee?.total?Nh(e.estimatedTransactionFee.total):Nh(0);let p=Nh(0);if(f&&U?.address)try{const t=tp({tokenAddress:o.srcTokenAddress,spenderAddress:e.tx?.to||"",fromAddress:U.address,chainId:L,amount:s});p=await rp({from:U.address,to:t.to,data:t.data,chainId:L,rpcUrl:H})}catch(l){}const m=h.plus(p),w=R?.nativeCurrency?.symbol||"native";let b="",g=!1;if(U?.address&&m.isGreaterThan(0))try{const e=await np({address:U.address,chainId:L,rpcUrl:H});if(e.isLessThan(m)){g=!0;const t=Nh(st(BigInt(e.toFixed(0)),18)).decimalPlaces(8).toFormat(),n=Nh(st(BigInt(m.toFixed(0)),18)).decimalPlaces(8).toFormat();b=u("swapFeeWarning",{symbol:w,balance:t,needed:n})}}catch(l){}const y=`From: ${r} ${t.symbol}\n⬇️\nTo: ${i} ${n.symbol}\n\n`+b+"\n";if(g)d(y,"bot");else if(f){const n=y+u("swapNeedApprove",{symbol:t.symbol}),r=[{id:"approve-for-swap",text:u("swapApproveButton",{symbol:t.symbol}),value:u("swapApproveValue",{symbol:t.symbol}),action:"approve_for_swap",fullWidth:!0,extraData:{tokenAddress:o.srcTokenAddress,spenderAddress:e.tx.to,tokenSymbol:t.symbol,amountInWei:s,tx:e.tx}}];d(n,"bot",void 0,r)}else{const t=[{id:"confirm-swap",text:c("swapConfirmButton"),value:c("swapConfirmValue"),action:"confirm_swap",extraData:{tx:e.tx}}];d(y+c("swapReadyToProceed"),"bot",void 0,t)}}else d(u("swapEstimationError",{error:a.errorMessage||a.error||"Unknown error"}),"bot")},[j,J,d,L,U?.address,R?.nativeCurrency?.symbol,H,c,u]),W=n.useCallback(async(e,t,n)=>{try{if("suggested_action"===t)return S.current=e,void g(e);if(d(e,"user"),k(!1),v(!0),t)switch(await Yf(500),t){case"click_buy_item_token_button":await V(n?.tokenAddress||"",n?.decimals||18);break;case"click_balance_item_user_to_buy_button":await Y(n?.tokenAddress||"",n?.symbol||"",n?.balance||"",n?.decimals||18);break;case"select_percent":await G(n?.percent||0,n?.tokenBalance||"",n?.tokenAddress||void 0,n?.tokenDecimals||void 0);break;case"confirm_swap":if(n?.tx&&i){const e=n.tx,t={from:U?.address||"",to:e.to,data:e.data,value:e.value,chainId:L},s=d(c("txProcessing"),"bot");try{v(!1);const e=await i(t);if("success"===e.status&&e.transactionHash){const t=R?.blockExplorers?.default?.url,n=t?` [View on Explorer](${t}/tx/${e.transactionHash})`:` Tx: ${e.transactionHash}`;p(s.id,c("txSubmitted")+n);try{await Yf(2e3),"success"===(await $h({transactionHash:e.transactionHash,chainId:L||1,rpcUrl:H})).status?p(s.id,c("txConfirmedSwap")+n):p(s.id,c("txRevertedSwap")+n)}catch(r){p(s.id,c("txTimeout")+n)}}else if("success"===e.status)p(s.id,c("txSuccessfulSwap"));else{const t=e.error?`\nError: ${e.error}`:"";p(s.id,c("txFailed")+t)}}catch(o){p(s.id,c("txFailed"))}}else d(c("txDataNotAvailable"),"bot");break;case"approve_for_swap":{const e=n?.tokenAddress||"",t=n?.spenderAddress||"",s=n?.tokenSymbol||"token",a=n?.tx;if(!e||!t||!i){d(c("approvalDataNotAvailable"),"bot");break}const l=n?.amountInWei||void 0,f=tp({tokenAddress:e,spenderAddress:t,fromAddress:U?.address||"",chainId:L,tokenSymbol:s,amount:l}),h={from:f.from,to:f.to,data:f.data,value:f.value,chainId:f.chainId};d(u("approving",{symbol:s}),"bot");try{v(!1);const e=await i(h);let t="success"===e.status;if("success"===e.status&&e.transactionHash)try{t="success"===(await $h({transactionHash:e.transactionHash,chainId:L||1,rpcUrl:H})).status}catch(r){t=!0}if(t){d(u("approvalSuccess",{symbol:s}),"bot");const e=[{id:"confirm-swap-after-approve",text:c("confirmSwapButton"),value:c("swapConfirmValue"),action:"confirm_swap",fullWidth:!0,extraData:{tx:a}}];d(c("approvalConfirmSwap"),"bot",void 0,e)}else{const t=e.error?`\nError: ${e.error}`:"";d(c("approvalFailed")+t,"bot")}}catch(o){d(c("approvalFailed"),"bot")}break}case"click_swap_dest_token":{const e=n?.tokenAddress||"",t=n?.symbol||"";J({descTokenAddress:e,descTokenDecimals:n?.decimals||18});const r=j(),i=r.srcTokenAddress||"",o=i===mn,l=r.amount||"";try{const n=await Lh({address:U?.address||"",chain:F});if(n?.success&&n?.data?.result){const a=n.data.result;let f,h="",p="0";if(o){const e=a.find(e=>e.native_token);h=R?.nativeCurrency?.symbol||"ETH",p=e?.balance_formatted||"0",f=e?.usd_price}else{const e=a.find(e=>e.token_address.toLowerCase()===i.toLowerCase());e&&(h=e.symbol,p=e.balance_formatted,f=e.usd_price)}if(l&&h){const t=xp(l,p,f),n=r.srcTokenDecimals||18,a=o?mn:i;J({amount:t});try{const r=pn(t,n).toString(),i=await zh({chainId:L,tokenIn:a,tokenInAmount:r,tokenOut:e,tokenOutRecipient:U?.address||"",slippage:"auto",accesstoken:"d6c45897b8f6"});if(i.success&&i.data){const e=i.data,t=e.tokenIn,n=e.tokenOut,s=Nh(st(BigInt(t.amount||0),t.decimals)).decimalPlaces(8).toFormat(),l=Nh(st(BigInt(n.amount||0),n.decimals)).decimalPlaces(8).toFormat();let f=!1;if(!o&&U?.address&&e.tx?.to)try{const t=await ep({tokenAddress:a,ownerAddress:U.address,spenderAddress:e.tx.to,chainId:L,rpcUrl:H});f=Nh(t.toString()).isLessThan(r)}catch{f=!0}const h=e.estimatedTransactionFee?.total?Nh(e.estimatedTransactionFee.total):Nh(0);let p=Nh(0);if(f&&U?.address)try{const t=tp({tokenAddress:a,spenderAddress:e.tx?.to||"",fromAddress:U.address,chainId:L,amount:r});p=await rp({from:U.address,to:t.to,data:t.data,chainId:L,rpcUrl:H})}catch{}const m=h.plus(p),w=R?.nativeCurrency?.symbol||"native";let b="",g=!1;if(U?.address&&m.isGreaterThan(0))try{const e=await np({address:U.address,chainId:L,rpcUrl:H});if(e.isLessThan(m)){g=!0;const t=Nh(st(BigInt(e.toFixed(0)),18)).decimalPlaces(8).toFormat(),n=Nh(st(BigInt(m.toFixed(0)),18)).decimalPlaces(8).toFormat();b=u("swapFeeWarning",{symbol:w,balance:t,needed:n})}}catch{}const y=`From: ${s} ${t.symbol}\n⬇️\nTo: ${l} ${n.symbol}\n\n`+b+"\n";if(g)d(y,"bot");else if(f){const n=[{id:"approve-for-swap",text:u("swapApproveButton",{symbol:t.symbol}),value:u("swapApproveValue",{symbol:t.symbol}),action:"approve_for_swap",fullWidth:!0,extraData:{tokenAddress:a,spenderAddress:e.tx.to,tokenSymbol:t.symbol,amountInWei:r,tx:e.tx}}];d(y+u("swapNeedApprove",{symbol:t.symbol}),"bot",void 0,n)}else{const t=[{id:"confirm-swap",text:c("swapConfirmYes"),value:c("swapConfirmValue"),action:"confirm_swap",extraData:{tx:e.tx}}];d(y+c("swapReadyToProceed"),"bot",void 0,t)}}else d(u("swapEstimationError",{error:i.errorMessage||i.error||"Unknown error"}),"bot")}catch(s){d(c("swapEstimationFailed"),"bot")}}else if(h&&parseFloat(p)>0){const e=[25,50,75,100],n=r.srcTokenDecimals||18,o=e.map(e=>({id:`percent-${e}`,text:`${e}%`,value:u("buttonUsePercent",{percent:String(e),symbol:h}),action:"select_percent",extraData:{percent:e,tokenAddress:i,tokenSymbol:h,tokenDecimals:n,tokenBalance:p}}));d(u("swapSelectAmount",{from:h,to:t,balance:p}),"bot",void 0,o)}else d(c("swapNoSourceToken"),"bot")}else d(c("couldNotFetchBalance"),"bot")}catch(a){d(c("couldNotLoadBalance"),"bot")}break}case"select_nft_to_send":{const e=n?.name||"NFT",t=n?.contractAddress||"",r=n?.tokenId||"",i=n?.tokenStandard||"ERC721",o=n?.amount||"1",s=n?.image||"",a={contract_address:t,token_id:r,to_address:n?.toAddress||"",token_standard:i,amount:o,maxAmount:o,nft_name:e};d(u("nftSendReview",{name:e,standard:i,tokenId:r}),"bot",void 0,void 0,{action:"send_nft",parameters:a,status:"pending",nftInfo:{name:e,image:s||void 0,tokenId:r,contractAddress:t,tokenStandard:i}});break}default:d(u("actionExecutedFor",{action:t,value:e}),"bot")}else await Yf(500),d(u("receivedButtonValue",{value:e}),"bot");v(!1),lp.isDesktop&&I.current?.focus()}catch(o){d(c("errorProcessingRequest"),"bot"),v(!1)}},[U?.address,d,p,R?.blockExplorers?.default?.url,R?.nativeCurrency?.symbol,L,F,j,V,Y,i,G,J,H,c,u]),X=n.useCallback(async()=>{try{v(!0);const e=R?.tokenTrendingDefault||[],[t,n]=await Promise.allSettled([Hh.getTopGainers(O,"24h",5),Hh.getTokensDetails(e,O)]);let r=[];"fulfilled"===t.status&&t.value?.data&&(r=[...t.value.data]),"fulfilled"===n.status&&n.value?.data&&(r=[...n.value.data,...r]),r=r.filter((e,t,n)=>t===n.findIndex(t=>t.address.toLowerCase()===e.address.toLowerCase()));const i=r.map(e=>({id:e?.symbol,text:e?.symbol,value:u("buttonBuyToken",{name:e.name,symbol:e?.symbol||""}),action:"click_buy_item_token_button",extraData:{tokenAddress:e?.address||"",symbol:e?.symbol||"",decimals:e?.decimals||18}}));await Yf(1e3),v(!1),d(u("trendingTokensHeader",{chain:R?.name||"Unknown"}),"bot");const o=r.map((e,t)=>`${t+1}. ${e.name} (${e?.auditGoplus?.token_symbol||e.symbol||"Unknown"})\n$${Nh(e?.price||0).decimalPlaces(4).toFormat()} (${e.price_change_percentage_24h||e.priceChange}%)\n\n---\n`).join("\n");d(`${o}${c("trendingTokensQuestion")}`,"bot",void 0,i)}catch(e){d(c("trendingTokensError"),"bot")}finally{v(!1)}},[d,R?.name,R?.tokenTrendingDefault,O,c,u]),K=n.useCallback(async()=>{try{d(u("viewNftViaWebsite",{link:Ap}),"bot"),v(!1)}catch(e){v(!1),d(c("nftFetchError"),"bot")}},[d,c,u]),Q=n.useCallback(async()=>{try{v(!0);const e=await Lh({address:U?.address||"",chain:F});if(e?.success&&e?.data?.result&&e.data.result.length>0){const t=e.data.result.map((e,t)=>{const n=void 0!==e.usd_value?` ≈ $${Nh(e.usd_value).decimalPlaces(2).toFormat()}`:"";return`${t+1}. **${e.name}** (${e.symbol})\n Balance: ${e.balance_formatted}${n}`}).join("\n\n");await Yf(500),v(!1),d(u("viewBalancesHeader",{chain:R?.name||"this chain",list:t}),"bot",void 0)}else v(!1),d(c("viewBalancesEmpty"),"bot")}catch(e){v(!1),d(c("viewBalancesFetchError"),"bot")}},[U?.address,F,d,R?.name,c,u]),Z=n.useMemo(()=>[{id:"ask",icon:"❓",text:c("suggestionAskText"),action:async()=>{k(!1),v(!0),d(c("suggestionAskUserMessage"),"user"),await Yf(1e3),v(!1),d(c("suggestionAskBotReply"),"bot")}},{id:"buy",icon:"💰",text:c("suggestionBuyText"),action:async()=>{k(!1),d(c("suggestionBuyText"),"user"),De(U?.address||"")&&D?await X():(v(!0),await Yf(1e3),De(U?.address||"")&&!D?d(c("walletConnectedChainUnsupported"),"bot"):d(c("walletNotConnected"),"bot"),v(!1))}}],[d,U?.address,X,c,D]),_=e=>{if(0===e)return!0;const t=l[e],n=l[e-1],r=new Date(t.timestamp),i=new Date(n.timestamp);return r.setHours(0,0,0,0),i.setHours(0,0,0,0),r.getTime()!==i.getTime()};n.useEffect(()=>{T.current?.scrollIntoView({behavior:"smooth"})},[l]),n.useEffect(()=>{e?(I.current&&lp.isDesktop&&I.current.focus(),T.current?.scrollIntoView({behavior:"instant"}),B.current&&N.current?Date.now()-N.current>12e5&&k(!0):k(!0),N.current=null,B.current=!1,setTimeout(()=>{T.current?.scrollIntoView({behavior:"smooth"})},50)):(N.current=Date.now(),B.current=!M.current)},[e]),n.useEffect(()=>{const t=t=>{"Escape"===t.key&&e&&r()};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[e,r]);const $=n.useCallback(async()=>{if(""===b?.trim()||y)return;const e=x,t=d(b?.trim(),"user",x?.id);g(""),E(null),v(!0),k(!1),v(!0);try{let m,g;const y=l.slice(-10);let A="",k="";if(y.length>0){A="\n\n## CONVERSATION HISTORY:\n";for(const e of y)"user"===e.sender?A+=`User: ${e.text}\n`:A+=`Assistant: ${e.text.length>400?e.text.substring(0,400)+"...":e.text}\n`;A+="\n---\n"}let x=b?.trim();e&&(x=`[Replying to ${"user"===e.sender?"my previous":"your"} message: "${e.text}"]\n\n${x}`);try{const e=await hp.checkInfoQuestion(x,A),n=e?.result?.includes("no");if(e?.language&&(k=e?.language),n){w(t.id,"normal");const e=l.filter(e=>"normal"===e.typeChat);let n="";if(e.slice(-20).length>0){n="\n\n## CONVERSATION HISTORY:\n";for(const t of e.slice(-20))"normal"===t.typeChat&&("user"===t.sender?n+=`User: ${t.text}\n`:n+=`Assistant: ${t.text.length>400?t.text.substring(0,400)+"...":t.text}\n\n`)}const r=await hp.generateContent(x,n,k);let i=null;try{let e=r?.trim();e.startsWith("```json")?e=e.replace(/^```json\s*/,"").replace(/\s*```$/,""):e.startsWith("```")&&(e=e.replace(/^```\s*/,"").replace(/\s*```$/,"")),i=JSON.parse(kp(e))}catch{i=null}return v(!1),void d(i?.message||r,"bot",void 0,void 0,void 0,"normal")}}catch(r){}if(U?.address&&D)try{const[e,t]=await Promise.allSettled([Lh({address:U.address,chain:F}),Ph({address:U.address,chain:F,limit:100,exclude_spam:!0})]);"fulfilled"===e.status&&e.value?.success&&e.value?.data?.result&&(m=e.value.data.result.map(e=>({symbol:e.symbol,name:e.name,balance_formatted:e.balance_formatted,usd_value:e.usd_value,native_token:e.native_token,token_address:e.token_address,price:e.usd_price}))),"fulfilled"===t.status&&t.value?.success&&t.value?.data?.result&&(g=t.value.data.result.map(e=>({name:e.normalized_metadata?.name||e.name||`#${e.token_id}`,token_address:e.token_address,token_id:e.token_id,contract_type:e.contract_type||"",amount:e.amount||"1"})))}catch{}const E=function(e){const{walletAddress:t,chainName:n,chainId:r,nativeSymbol:i,walletTokens:o,walletNfts:s,language:a}=e;if(!t)return`You are a Web3 wallet assistant for the Keyring crypto EVM wallet app.\nThe user is currently NOT connected to any wallet.\n\n## YOUR ROLE:\n- You are a friendly, knowledgeable assistant that can talk about ANY topic naturally\n- You can freely answer general questions, discuss crypto tokens, prices, market info, provide token details, etc. — these do NOT require a wallet connection\n- ONLY ask the user to connect their wallet when their request explicitly requires their personal wallet/address, such as:\n - Sending tokens or NFTs\n - Swapping tokens\n - Approving token spending\n - Wrapping/unwrapping tokens\n - Checking THEIR OWN balance ("what is MY balance?", "how much ETH do I have?")\n - Viewing THEIR OWN NFT collection\n - Any action that reads or writes to THEIR wallet address\n- For all other requests (token info, prices, general crypto questions, market data, etc.), respond normally and helpfully\n- ${Gh(a)}\n- **LANGUAGE DETECTION — CRYPTO TICKERS**: Crypto token symbols and tickers (ETH, BTC, USDC, BNB, MATIC, SOL, etc.) are NOT language indicators. They are proper nouns used in ALL languages. Detect the language from the surrounding non-ticker text only. Example: "ETHの現在の価格は?" → Japanese (the surrounding text は Japanese characters). "ETH의 가격은?" → Korean. "Giá ETH là bao nhiêu?" → Vietnamese. NEVER treat a ticker symbol as evidence of English.\n\n## RESPONSE FORMAT:\nAlways respond with a valid JSON object:\n{"action":"chat","message":"<your friendly response to the user>", "suggested_actions":[{"label":"<short button text>","prompt":"<message sent when clicked>"}]}\n\n## RULES:\n- suggested_actions: include when your message offers the user interactive choices or asks a follow-up question. NEVER include suggested_actions that ask the user to connect their wallet (e.g., "Connect wallet", "Connect now", etc.) — the app handles wallet connection separately\n- **CRITICAL**: NEVER include any "Buy" actions (e.g., "Buy USDC", "Buy ETH", "Purchase token", etc.) in suggested_actions. The app handles Buy buttons separately. Only include non-buy actions in suggested_actions (e.g., "Send token", "Swap token", "Check balance", "Show my NFTs").\n- For wallet-required actions, politely explain the user needs to connect their wallet first, and put this in the "message" field\n- ALWAYS respond with raw JSON only, never wrap in \`\`\`json code blocks\n- ${Gh(a)}`;if(t&&!In[r]?.isSupported)return`You are a Web3 wallet assistant for the Keyring crypto EVM wallet app.\n The user's wallet address is: ${t}\n The user is selected on (chainId: ${r}) an UNSUPPORTED chain.\n\n ## YOUR ROLE:\n - You are a friendly, knowledgeable assistant that can talk about ANY topic naturally\n - You can freely answer general questions, discuss crypto tokens, prices, market info, token details, etc. — these do NOT require a supported chain\n - **BLOCKED on unsupported chain** — if the user asks for any of the following, politely inform them that chain (chainId: ${r}) is not currently supported and the action cannot be performed:\n - Checking THEIR OWN balance ("what is my balance?", "how much ETH do I have?")\n - Sending tokens or NFTs\n - Swapping or buying tokens\n - Approving token spending\n - Wrapping/unwrapping tokens\n - Viewing or transferring their NFT collection\n - Any action that reads or writes to their wallet on the current chain\n - **ALLOWED on unsupported chain** — respond normally and helpfully for:\n - General questions (weather, coding, history, math, etc.)\n - Token information, prices, market data, token details\n - Any query that does NOT require interacting with the user's wallet on the current chain\n - ${Gh(a)}\n - **LANGUAGE DETECTION — CRYPTO TICKERS**: Crypto token symbols and tickers (ETH, BTC, USDC, BNB, MATIC, SOL, etc.) are NOT language indicators. They are proper nouns used in ALL languages. Detect the language from the surrounding non-ticker text only. Example: "ETHの現在の価格は?" → Japanese. "ETH의 가격은?" → Korean. "Giá ETH là bao nhiêu?" → Vietnamese. NEVER treat a ticker symbol as evidence of English.\n\n ## RESPONSE FORMAT:\n Always respond with a valid JSON object:\n {"action":"chat","message":"<your response>", suggested_actions:[{"label":"<short button text>","prompt":"<message sent when clicked>"}]}\n\n ## RULES:\n - suggested_actions: include when your message offers the user interactive choices or asks a follow-up question. NEVER include suggested_actions that ask the user to connect their wallet (e.g., "Connect wallet", "Connect now", etc.) — the app handles wallet connection separately\n - **CRITICAL**: NEVER include any "Buy" actions (e.g., "Buy USDC", "Buy ETH", "Purchase token", etc.) in suggested_actions. The app handles Buy buttons separately. Only include non-buy actions in suggested_actions (e.g., "Send token", "Swap token", "Check balance", "Show my NFTs").\n - **CRITICAL**: ABSOLUTELY NEVER include any option that suggests switching, changing, or selecting a different chain (e.g., "Switch to Ethereum", "Change chain", "Switch network", "Chuyển sang chain khác", "Đổi mạng") — the app handles chain switching separately.\n - For wallet-required actions, politely explain the user needs to connect their wallet first, and put this in the "message" field\n - ALWAYS respond with raw JSON only, never wrap in \`\`\`json code blocks\n - ${Gh(a)}`;const c=o&&o.length>0?`\n## USER'S CURRENT WALLET BALANCE:\n${o.map(e=>{const t=void 0!==e.usd_value?` (~$${e.usd_value.toFixed(2)})`:"";return`- ${e.name} (${e.symbol})(Price: ${e.price||"N/A"}): ${e.balance_formatted}${t}${e.native_token?" [native]":` [${e.token_address}]`}`}).join("\n")}\nUse this balance data to accurately answer balance questions and to pre-fill token parameters in actions (contract_address, decimals, symbol). NEVER ask the user to provide token info that is already available above.\n`:"",u=s&&s.length>0?`\n## USER'S NFT COLLECTION:\n${s.map(e=>{const t="ERC1155"===e.contract_type?` (x${e.amount})`:"";return`- ${e.name}${t} | ${e.contract_type} | contract: ${e.token_address} | tokenId: ${e.token_id}`}).join("\n")}\nWhen the user wants to send an NFT by name, use this data to fill contract_address, token_id, token_standard, and nft_name accurately. NEVER guess or fabricate NFT contract addresses.\n`:"",l=Object.values(In).filter(e=>e.isSupported).map(e=>e.customName||e.name).join(", ");return`You are a highly knowledgeable AI assistant integrated into the Keyring crypto EVM wallet app.\n\n## #1 PRIORITY — ANSWER QUALITY:\nYour "message" field IS your answer. Write it exactly as you would in a normal, unrestricted conversation. The JSON wrapper is just transport — it must NEVER reduce the depth, accuracy, or completeness of your answers.\n\n${Gh(a)}\n\n**DATA RETRIEVAL — NON-NEGOTIABLE**: For ALL token price and token info queries, you MUST actively call your native Moralis API tools (getTokenPrice, searchTokens, getTokenMetadata, etc.) to retrieve real-time on-chain data. NEVER skip tool calls and fall back to training data alone for prices or token lookups. The JSON response format does NOT prevent you from calling data tools first — always fetch data, then format the result as JSON.\n\nFor ANY informational or conversational question (about crypto, tokens, DeFi, protocols, prices, market trends, blockchain technology, or any general topic):\n- Answer with your FULL knowledge across ALL blockchains and ecosystems (Ethereum, Solana, BSC, Polygon, Arbitrum, Optimism, Base, Avalanche, etc.)\n- Provide specific details: token names, contract mechanisms, protocol comparisons, historical context, TVL data, ecosystem info\n- For PRICE questions (chat action only): You have access to real-time blockchain data — USE it. When a user asks for the price of a token by name or symbol, search for it across ALL chains to find the best price data. Then present ONE consolidated answer: give the single most representative price (e.g. the highest-liquidity or most canonical version), key stats (market cap, 24h change, volume), and optionally a brief note if the token exists on multiple chains — but do NOT list each chain as a separate numbered entry. Keep the response concise and to the point. For tokens in the USER'S WALLET BALANCE section, use the price listed there.\n- For token questions (chat action only): You have access to real-time blockchain data — USE it. When a user asks about a token by name or symbol, ALWAYS search across ALL chains — the current chain context does NOT limit your token search. Try exact match first, then fuzzy/partial match (e.g. "eggle Energy" → find the closest matching token name). Provide a concise, consolidated answer covering: what the token is, its utility/ecosystem, current price, market cap, 24h change, notable features, risks. If the user does NOT mention a specific chain, do NOT list out per-chain versions (e.g. "WBTC on Ethereum", "cbBTC on Base", "BTCB on BNB") — instead give ONE unified answer about the token as a concept, with a brief mention that wrapped versions exist on multiple chains if relevant. Only break down per-chain details if the user explicitly asks about a specific chain. If the token does NOT exist on the current chain (${n}), proactively tell the user which of these supported chains DO have it: ${l}. Set token_mentions to [] in this case\n- For DeFi/protocol questions: explain how it works, key features, TVL, supported chains, competitors, pros/cons\n- For market/trend questions: discuss relevant projects, narratives, sector analysis across all chains\n- Write detailed paragraphs, use bullet points, include numbers and facts. Minimum 3-5 sentences for simple questions, more for complex topics\n\n## CONTEXT:\nWallet: ${t} | Chain: ${n} (chainId: ${r}) | Native: ${i}${c}${u}\n\n## WHEN TO USE WHICH ACTION:\n- "send_native": user wants to send the native token (${i}) to an address\n- "send_token": user wants to send an ERC20 token to an address\n- "swap_token": user wants to swap/exchange/convert/trade/sell one token for another — covers ALL of the following keywords and patterns, even if only ONE token or NO amount is mentioned:\n - swap: "swap X", "swap X to Y", "swap X for Y", "swap to ETH", "swap native"\n - exchange: "exchange X", "exchange X to Y", "exchange X for Y", "exchange native", "exchange ETH"\n - convert: "convert X to Y", "convert native", "convert ETH to USDC", "convert X"\n - trade: "trade X for Y", "trade X to Y", "trade X"\n - sell (for another token): "sell X for Y", "sell ETH for USDC"\n - Vietnamese: "đổi X sang Y", "đổi X", "đổi native", "đổi ETH sang USDC", "chuyển đổi X", "bán X lấy Y", "hoán đổi X"\n - **CRITICAL**: When the source is the native token (ETH, BNB, MATIC, etc.) → token_in: "native". This MUST be treated as swap_token, never chat.\n → ALWAYS return swap_token. Leave missing params as "". NEVER fall back to chat.\n- "buy_token": user wants to buy a specific token AND the user clearly names a token (symbol or contract address). If user also specifies which token to pay with (e.g. "buy PEPE with USDC", "mua PEPE bằng ETH", "buy PEPE using my USDC"), fill pay_with_symbol and pay_with_address from USER'S WALLET BALANCE. **CRITICAL**: ALWAYS return buy_token if the user clearly names a token they want to buy — even if you cannot find the contract address or token data. Leave contract_address as "" and the app will search for it. NEVER fall back to "chat" just because you lack token data.\n- "buy_token_trending": user wants to buy a token BUT does NOT specify which token — covers ALL of the following patterns:\n - User asks to buy trending tokens: "buy trending tokens", "buy trending", "mua token trending", "mua token đang trending"\n - User asks to buy tokens with strong growth/momentum: "buy tokens pumping", "buy hot tokens", "buy movers", "mua token tăng mạnh", "mua token đang tăng", "mua token tiềm năng"\n - User says "buy a token" / "I want to buy" / "mua token" with NO specific token name or address provided\n - User asks for token recommendations to buy without specifying one\n → ALWAYS return buy_token_trending. Leave all params as "". NEVER fall back to chat or buy_token.\n- "approve_token": user wants to approve a token for a spender\n- "wrap_native": user wants to wrap native token (e.g. ETH → WETH) — also triggered by "deposit" into WETH/wrapped token\n- "unwrap_native": user wants to unwrap (e.g. WETH → ETH) — also triggered by "withdraw" from WETH/wrapped token\n- "send_nft": user wants to send/transfer an NFT\n- "view_nfts": user wants to see/browse their NFT collection\n- "view_balances": user wants to see ALL their token balances/tokens at once — covers ALL of the following patterns (NOT for single token price/info):\n - "show my balance", "view my balance", "check my balance", "what's my balance"\n - "what's in my wallet", "what do I have", "what tokens do I have"\n - "view all tokens", "show all tokens", "list my tokens"\n - "my portfolio", "show portfolio", "wallet overview"\n - Vietnamese: "xem số dư", "số dư của tôi", "kiểm tra số dư", "ví tôi có gì", "tôi có bao nhiêu tiền", "xem ví", "danh mục của tôi"\n → ALWAYS return view_balances for these. Do NOT return chat.\n- "chat": EVERYTHING ELSE — questions, token info, prices, greetings, DeFi explanations, market data, etc.\n\nAll wallet actions (send, swap, buy, approve, wrap, unwrap, send_nft) are chain-specific: use chainId ${r} only.\nFor "chat" action: no chain restriction — use cross-chain knowledge freely.\n\n## OUTPUT FORMAT:\n${Gh(a)}\n**LANGUAGE DETECTION — CRYPTO TICKERS**: Crypto token symbols/tickers (ETH, BTC, USDC, BNB, SOL, etc.) are NOT language indicators — they are proper nouns used universally. Detect language ONLY from the surrounding non-ticker text. Examples: "ETHの現在の価格は?" → Japanese. "ETH의 가격은?" → Korean. "Giá ETH?" → Vietnamese. NEVER classify a message as English just because it contains a ticker symbol.\n\nWallet action: {"action":"<type>","message":"<explanation>","parameters":{...}}\nChat/info: {"action":"chat","message":"<YOUR FULL DETAILED ANSWER>","parameters":{},"token_mentions":[],"suggested_actions":[]}\n\n## WALLET ACTION RULES:\n- Return action type IMMEDIATELY even if params are missing (leave as ""). Ask for missing info in "message". NEVER fall back to "chat" just because parameters are incomplete — always return the intended action.\n- **CROSS-CHAIN REQUESTS**: All wallet actions (send, swap, buy, approve, wrap, unwrap, send_nft, view_nfts, view_balances) execute ONLY on the CURRENT chain: ${n} (chainId: ${r}). If the user's message explicitly targets a DIFFERENT chain (e.g. "send on Ethereum", "swap on BSC", "transfer on Polygon", "buy on base") and the current chain is NOT that chain, do NOT execute the wallet action. Instead, return action: "chat" and politely notify the user to switch to the requested chain in the app first. This rule applies to ALL non-chat actions.\n- For ERC20 actions: provide correct contract_address on chainId ${r}. **CRITICAL — CHAIN-SPECIFIC ADDRESSES**: Contract addresses differ on every chain. You MUST obtain the address via your Moralis API tools (searchTokens, getTokenMetadata) for chainId ${r}, OR use the address already present in USER'S WALLET BALANCE. NEVER fill in a contract_address from training knowledge alone — leave it as "" if you cannot verify it via API or wallet balance. If token doesn't exist on this chain, inform user.\n- send_native: ONLY for ${i}. If user says "send ETH" but native ≠ ETH, use send_token.\n- Amount: "max"/"all" → "max". "X%" → "50%". USD formats → always prefix with "$": "5 dollar" → "$5", "5$" → "$5", "$5" → "$5", "5usd" → "$5", "5 đô la" → "$5", "0.01$ eth" → "$0.01", "$0.01 eth" → "$0.01", "5$ usdc" → "$5". The "$" MUST appear in the amount field (not stripped) so the app knows it's a USD value. Otherwise exact number string.\n- Decimals & symbol: always accurate.\n- send_nft: contract_address optional — use nft_name if NFT known by name.\n\n## suggested_actions & token_mentions:\n- suggested_actions: include when offering choices. {"label":"<2-6 words>","prompt":"<message>"}. Max 4. Never include "Buy" (app handles separately). **ABSOLUTELY NEVER** include any option that suggests switching, changing, or selecting a different chain (e.g., "Switch to Ethereum", "Change chain", "Switch network", "Chuyển sang chain khác", "Đổi mạng") — the app handles chain switching separately.\n- token_mentions: ONLY include when the token EXISTS on the CURRENT chain (chainId ${r}) AND you have obtained a VERIFIED contract address via your Moralis API tools (searchTokens, getTokenMetadata, getTokenPrice) for this exact chain.\n - **CRITICAL — CONTRACT ADDRESSES ARE CHAIN-SPECIFIC**: The same token has a DIFFERENT contract address on every chain. USDC on Ethereum ≠ USDC on Base ≠ USDC on Polygon ≠ USDC on BNB Chain. NEVER use an address from your training knowledge — training-data addresses are frequently wrong, hallucinated, or belong to a different chain.\n - **REQUIRED WORKFLOW**: Before populating token_mentions for a token, you MUST call your Moralis API tool (searchTokens or getTokenMetadata) specifying chainId ${r} to retrieve the verified contract address. If the API call fails or returns no result for this chain, set token_mentions: [].\n - If the token address is already available in the USER'S WALLET BALANCE section above, you MAY use that address (it is already verified for chainId ${r}).\n - If you cannot confirm the address via API or wallet balance, set token_mentions: [] — never guess.\n - **Native token**: If the token IS the chain's native token (${i}), use contract_address: "native" — do NOT look up an address.\n - Format: {"symbol":"","contract_address":"<API-verified address on chainId ${r}, or 'native' for the native token>","decimals":<n>}. 2+ tokens → [], use suggested_actions. Non-crypto → [].\n\n## ACTION PARAMS REFERENCE:\nValid actions: send_native, send_token, swap_token, buy_token, buy_token_trending, approve_token, wrap_native, unwrap_native, send_nft, view_nfts, view_balances, chat. NEVER use any other action name.\n\n1. send_native: {"to_address":"","amount":""}\n2. send_token: {"contract_address":"(REQ)","token_symbol":"","to_address":"","amount":"","decimals":""}\n3. swap_token: {"token_in":"<addr or 'native'>","token_in_symbol":"","token_in_decimals":"","token_out":"<addr>","token_out_symbol":"","token_out_decimals":"","amount":""}\n No tokens specified → all params "". Native → token_in:"native".\n4. buy_token: {"token_symbol":"(REQ — always fill this)","contract_address":"(if known and verified, else leave '')","decimals":"","buy_amount":"(opt — amount of the TOKEN BEING BOUGHT that user wants to RECEIVE. Use this when the amount refers to the destination token.)","pay_with_symbol":"(opt — symbol of token user wants to pay with, e.g. 'USDC', 'ETH')","pay_with_address":"(opt — contract address of payment token from WALLET BALANCE, or 'native' for native token)","pay_with_decimals":"(opt — decimals of payment token)","pay_with_amount":"(opt — amount of the PAYMENT TOKEN (token in) user wants to SPEND. Use this when the amount refers to the payment/source token.)"}.\n **CRITICAL — AMOUNT DISAMBIGUATION:**\n The amount in a buy request belongs to EITHER the token being bought OR the payment token. Parse the grammar carefully:\n - "buy PEPE with 10 USDC" → amount=10 belongs to USDC (payment) → pay_with_amount:"10", buy_amount:""\n - "buy 0.02 PCM with USDC" → amount=0.02 belongs to PCM (bought) → buy_amount:"0.02", pay_with_amount:""\n - "dùng 10 USDC mua PEPE" → amount=10 belongs to USDC (payment) → pay_with_amount:"10", buy_amount:""\n - "mua 0.02 PCM bằng USDC" → amount=0.02 belongs to PCM (bought) → buy_amount:"0.02", pay_with_amount:""\n NEVER put the amount of the token being bought into pay_with_amount. NEVER put the payment amount into buy_amount.\n If pay token is native (${i}), set pay_with_address:"native". Both tokens specified as a trade/exchange → swap_token. If you cannot verify the address, set contract_address:'' but ALWAYS return buy_token with the symbol filled. **NATIVE TOKEN**: If the token to buy IS the chain's native token (${i}), set contract_address: "native" directly — no API lookup needed.\n5. buy_token_trending: {} — no parameters needed; app handles discovery of trending/high-growth tokens. **message**: write ONLY a short 1-sentence header (e.g. "Here are the trending tokens on [chain] right now!"). Do NOT write analysis, tips, or explanations.\n6. approve_token: {"contract_address":"(REQ)","token_symbol":"","spender_address":"","amount":"","decimals":""}\n7. wrap_native: {"amount":""}\n8. unwrap_native: {"amount":""}\n9. send_nft: {"contract_address":"(opt)","token_id":"","to_address":"","token_standard":"","amount":"(def 1)","nft_name":""}\n10. view_nfts: {}\n11. view_balances: {} — use ONLY when user wants to see all balances/tokens, NOT for single token price/info queries\n12. chat: {} + token_mentions + suggested_actions — use for ALL informational/conversational requests\n\n## EXAMPLES:\nThese examples show INTENT → ACTION + PARAMETERS mapping only. The "message" content is for illustration — compose your own natural, helpful response based on context.\n\n// --- SEND NATIVE ---\n// Intent: user wants to send the chain's native token to an address\n// Triggers: "send ETH/BNB/MATIC to...", "transfer [native] to...", "chuyển [native] cho..."\n→ action: send_native | parameters: {to_address, amount}\n\n// --- SEND TOKEN ---\n// Intent: user wants to send an ERC20 token to an address\n// Triggers: "send USDC to...", "transfer [token] to...", "gửi [token] cho..."\n→ action: send_token | parameters: {contract_address, token_symbol, to_address, amount, decimals}\n\n// --- SWAP ---\n// Intent: exchange one token for another — trigger with ANY conversion/exchange/trade/sell keyword,\n// even with just ONE token mentioned, no amount, or only the native token as source\n// EN triggers: "swap X", "swap X to Y", "swap X for Y", "swap to ETH", "swap native"\n// "exchange X", "exchange X to Y", "exchange X for Y", "exchange native", "exchange ETH"\n// "convert X to Y", "convert native to USDC", "convert ETH", "convert X"\n// "trade X for Y", "trade X to Y", "trade ETH"\n// "sell X for Y", "sell ETH for USDC" (selling one token FOR another = swap)\n// VI triggers: "đổi X sang Y", "đổi X", "đổi native", "đổi ETH", "chuyển đổi X", "bán X lấy Y", "hoán đổi X"\n// Native source: token_in = "native" (e.g. "exchange ETH" → token_in:"native", token_in_symbol:"ETH")\n// Native dest: token_out = zeroAddress\n// ⚠️ NEVER confuse with wrap/unwrap: those are specifically ETH↔WETH. All other pairs = swap_token.\n→ action: swap_token | parameters: {token_in, token_in_symbol, token_in_decimals, token_out, token_out_symbol, token_out_decimals, amount}\n// Missing params → leave as "", ask for them in message. NEVER downgrade to chat.\n\n// --- WRAP / UNWRAP ---\n// Intent wrap: convert native to wrapped version — also triggered by "deposit"\n// Triggers: "wrap ETH", "deposit ETH", "deposit ETH to WETH", "đổi ETH sang WETH"\n→ action: wrap_native | parameters: {amount}\n\n// Intent unwrap: convert wrapped token back to native — also triggered by "withdraw"\n// Triggers: "unwrap WETH", "withdraw WETH", "convert WETH to ETH", "rút WETH"\n→ action: unwrap_native | parameters: {amount}\n\n// --- VIEW NFTs ---\n// Intent: user wants to see/browse their NFT collection\n// Triggers: "show my NFTs", "what NFTs do I have", "view my NFTs", "xem NFT của tôi"\n→ action: view_nfts | parameters: {}\n\n// --- VIEW BALANCES ---\n// Intent: user wants to see ALL their token balances at once (not a single token query)\n// EN triggers: "show my balance", "view my balance", "check my balance", "what's my balance"\n// "what's in my wallet", "what do I have", "what tokens do I have"\n// "view all tokens", "show all tokens", "list my tokens"\n// "my portfolio", "show portfolio", "wallet overview"\n// VI triggers: "xem số dư", "số dư của tôi", "kiểm tra số dư", "ví tôi có gì"\n// "tôi có bao nhiêu tiền", "xem ví", "danh mục của tôi"\n// ⚠️ Do NOT use view_balances for single-token queries ("price of ETH", "how much USDC is worth") → use chat instead\n→ action: view_balances | parameters: {}\n\n// --- BUY TOKEN TRENDING ---\n// Intent: user wants to buy but does NOT specify a token — or explicitly asks for trending/pumping/high-growth tokens to buy\n// EN triggers: "buy trending tokens", "buy trending", "buy hot tokens", "buy tokens pumping", "buy movers", "I want to buy a token", "buy a token"\n// VI triggers: "mua token trending", "mua token đang trending", "mua token tăng mạnh", "mua token đang tăng", "mua token tiềm năng", "mua token", "tôi muốn mua token"\n// ⚠️ CRITICAL: If user says "buy X" where X is a named token → use buy_token, NOT buy_token_trending\n// ⚠️ CRITICAL: If user gives NO specific token → ALWAYS use buy_token_trending, never chat\n// ⚠️ MESSAGE: ONLY a short 1-sentence header introducing the trending list. NO analysis, NO tips, NO explanations.\n→ action: buy_token_trending | parameters: {} | message: short header only (e.g. "Here are the trending tokens on [chain]!")\n\n// --- BUY TOKEN WITH SPECIFIC PAYMENT ---\n// Intent: user wants to buy a specific token AND specifies which token to pay with\n// EN triggers: "buy PEPE with USDC", "buy PEPE using ETH", "buy PEPE with 10 USDC", "purchase DOGE with my 0.5 ETH"\n// VI triggers: "mua PEPE bằng USDC", "mua PEPE dùng ETH", "mua PEPE bằng 10 USDC", "mua DOGE bằng 0.5 ETH của tôi"\n// → action: buy_token | parameters: {token_symbol, contract_address, decimals, pay_with_symbol, pay_with_address, pay_with_decimals, pay_with_amount}\n// AMOUNT DISAMBIGUATION (critical):\n// "buy PEPE with 10 USDC" → pay_with_amount:"10" buy_amount:"" (10 USDC to spend)\n// "buy 0.02 PCM with USDC" → buy_amount:"0.02" pay_with_amount:"" (0.02 PCM to receive)\n// "mua PEPE bằng 0.5 ETH" → pay_with_amount:"0.5" buy_amount:"" (0.5 ETH to spend)\n// "mua 0.02 PCM bằng USDC" → buy_amount:"0.02" pay_with_amount:"" (0.02 PCM to receive)\n// pay_with_* fields are filled from USER'S WALLET BALANCE. If pay token = native → pay_with_address: "native"\n// ⚠️ This is still buy_token (NOT swap_token) — the user's intent is to BUY, with a specified payment method\n\n// --- TOKEN INFO / PRICE (chat) ---\n// Intent: learn about a token, its price, market data — NOT a wallet action\n// Triggers: "tell me about X", "what is X token", "price of X", "X coin info", "X là gì"\n→ action: chat | compose a detailed answer using real-time data from your tools\n// If token EXISTS on current chain → token_mentions: [{symbol, contract_address, decimals}]\n// If token NOT on current chain → token_mentions: [] but tell user which supported chains have it\n\n// --- CROSS-CHAIN / GENERAL INFO (chat) ---\n// Intent: any question not requiring a wallet action — crypto trends, DeFi, protocols, general Q&A\n// Triggers: "what's trending on X?", "explain DeFi", "how does Uniswap work", anything conversational\n→ action: chat | compose a full, knowledgeable answer; add relevant suggested_actions if helpful\n\n// --- GREETING (chat) ---\n// Intent: greeting or open-ended start\n// Triggers: "hello", "hi", "hey", "xin chào", "bắt đầu"\n→ action: chat | introduce yourself and offer helpful options via suggested_actions`}({walletAddress:U?.address||void 0,chainName:R?.name||void 0,chainId:L||void 0,nativeSymbol:R?.nativeCurrency?.symbol||void 0,walletTokens:m,walletNfts:g,language:k}),T=await async function(e){const{prompt:t,model:n="gpt-4.1-mini",stream:i=!1,systemPrompt:o,signal:s}=e;if(!t)throw new Error("Prompt is required");const a=new Bh(Oh),c=o?`${o}\n\n---\n\n Current User's question: ${t}`:t;let u="Unknown error";for(let l=1;l<=5;l++){if(s?.aborted)return{success:!1,error:"Request cancelled"};try{const e=(await a.post("api/moralis-cortex/proxy/chat",{prompt:c,model:n,stream:i},{headers:{Accept:"application/json","Content-Type":"application/json"},signal:s})).data;if(!e?.text?.trim()){if(u="Empty response from Cortex AI",l<5&&await Mh(1e3,s),s?.aborted)return{success:!1,error:"Request cancelled"};continue}return{success:!0,data:e}}catch(r){if(s?.aborted)return{success:!1,error:"Request cancelled"};if(u=r instanceof Error?r.message:"Unknown error",l<5&&await Mh(1e3,s),s?.aborted)return{success:!1,error:"Request cancelled"}}}return{success:!1,error:u}}({prompt:x,model:"gpt-4.1-mini",stream:!1,systemPrompt:E+A});if(T.success&&T.data){const e=T.data.text||"";let l=null;try{let t=e?.trim();t.startsWith("```json")?t=t.replace(/^```json\s*/,"").replace(/\s*```$/,""):t.startsWith("```")&&(t=t.replace(/^```\s*/,"").replace(/\s*```$/,"")),l=JSON.parse(kp(t))}catch{l=null}if(l&&l.action&&"chat"!==l.action)if("buy_token"===l.action){const e=l.parameters?.token_symbol||"";let n=l.parameters?.contract_address||"",r=18,a=!1;if("native"!==n.toLowerCase()&&n!==mn||(n=mn),!n&&e&&R?.nativeCurrency?.symbol&&e.toUpperCase()===R.nativeCurrency.symbol.toUpperCase()&&(n=mn),n&&n!==mn)try{const t=await Hh.getTokensDetails([n],O),i=t?.data?.[0];i&&(e&&i.symbol?.toUpperCase()!==e.toUpperCase()?n="":r=i.decimals||18)}catch(i){}if(!n&&e&&U?.address)try{const t=await Lh({address:U.address,chain:F});if(t?.success&&t?.data?.result){const i=t.data.result,o=i.find(e=>e.token_address.toLowerCase()===n.toLowerCase())||i.find(t=>t.symbol.toUpperCase()===e.toUpperCase());o&&(n=o.token_address,r=o.decimals)}if(!n){const t=R.tokenTrendingDefault||[],[i,o]=await Promise.allSettled([Hh.getTopGainers(O,"24h",10),Hh.getTokensDetails(t,O)]),s=[];"fulfilled"===i.status&&i.value?.data&&s.push(...i.value.data),"fulfilled"===o.status&&o.value?.data&&s.push(...o.value.data);const a=s.find(e=>e.address?.toLowerCase()===n.toLowerCase())||s.find(t=>t.symbol?.toUpperCase()===e.toUpperCase());a&&(n=a.address,r=a.decimals||18)}if(!n&&L)try{const t=await Hh.searchTokensByKey(e,L);if(Array.isArray(t?.data)&&t.data.length>0){const i=t.data.find(t=>t.symbol?.toUpperCase()===e.toUpperCase())||t.data[0];i?.address&&(a=!0,n=i.address,r=i.decimals||18)}}catch(o){}}catch(i){}if(n){d(a?u("buyingOnChain",{symbol:e,chain:R?.name}):l.message||u("buyTokenHelp",{symbol:e}),"bot",t.id),J({descTokenAddress:n,descTokenDecimals:r||18});const o=l.parameters?.pay_with_symbol||"",c=l.parameters?.pay_with_address||"";let f=!1;if(o||c)try{const e=await Lh({address:U?.address||"",chain:F});if(e?.success&&e?.data?.result){const t=e.data.result;let r;if(r="native"===c.toLowerCase()||c===mn||!c&&o&&R?.nativeCurrency?.symbol&&o.toUpperCase()===R.nativeCurrency.symbol.toUpperCase()?t.find(e=>e.token_address===mn||e.native_token):t.find(e=>c&&e.token_address.toLowerCase()===c.toLowerCase())||t.find(e=>o&&e.symbol.toUpperCase()===o.toUpperCase()),r){f=!0;const t=l.parameters?.pay_with_amount||"",i=l.parameters?.buy_amount||"";if(t)J({srcTokenAddress:r.token_address,srcTokenDecimals:r.decimals}),await G(100,t,r.token_address,r.decimals);else if(i){let t="";try{const o=e.data.result.find(e=>e.token_address.toLowerCase()===n.toLowerCase());let s=o?.usd_price??null;if(null==s&&n){const e=await Dh({address:n,chain:F});e.success&&null!=e.data?.usd_price&&(s=e.data.usd_price)}const a=r.usd_price??null;null!=s&&null!=a&&a>0&&(t=(parseFloat(i)*s/a).toFixed(8).replace(/\.?0+$/,""))}catch(s){}t?(J({srcTokenAddress:r.token_address,srcTokenDecimals:r.decimals}),await G(100,t,r.token_address,r.decimals)):await Y(r.token_address,r.symbol,r.balance_formatted,r.decimals)}else await Y(r.token_address,r.symbol,r.balance_formatted,r.decimals)}}}catch(i){}f||await V(n,r)}else d(u("tokenNotFoundOnChain",{symbol:e}),"bot",t.id),await X()}else if("buy_token_trending"===l.action)await X();else if("swap_token"===l.action){const e={...l.parameters||{}},n="native"===e.token_in||e.token_in_symbol?.toUpperCase()===R?.nativeCurrency?.symbol?.toUpperCase(),r="native"===e.token_out||e.token_out_symbol?.toUpperCase()===R?.nativeCurrency?.symbol?.toUpperCase();r&&(e.token_out=mn);let o=[];if(U?.address)try{const e=await Lh({address:U.address,chain:F});e?.success&&e?.data?.result&&(o=e.data.result)}catch(i){}if(!n&&(e.token_in||e.token_in_symbol)&&o.length>0){const t=e.token_in?o.find(t=>t.token_address.toLowerCase()===e.token_in.toLowerCase()):o.find(t=>t.symbol.toUpperCase()===e.token_in_symbol.toUpperCase());t&&(e.token_in=t.token_address,e.token_in_decimals=String(t.decimals))}if(!r&&(e.token_out||e.token_out_symbol)&&o.length>0){const t=e.token_out?o.find(t=>t.token_address.toLowerCase()===e.token_out.toLowerCase()):o.find(t=>t.symbol.toUpperCase()===e.token_out_symbol.toUpperCase());t&&(e.token_out=t.token_address,e.token_out_decimals=String(t.decimals))}const s=!(!e.token_in&&!n),m=!!e.token_out,w=!!e.amount;if(s&&o.length>0)if(n){const e=o.find(e=>e.native_token);if(!e||Nh(e.balance_formatted||"0").isZero())return d(u("formInsufficientBalance",{balance:"0",symbol:R?.nativeCurrency?.symbol||"native"}),"bot",t.id),void v(!1)}else if(e.token_in){const n=o.find(t=>t.token_address.toLowerCase()===e.token_in.toLowerCase());if(!n)return d(u("swapTokenNotInWallet",{symbol:e.token_in_symbol||e.token_in}),"bot",t.id),void v(!1);if(Nh(n.balance_formatted||"0").isZero())return d(u("formInsufficientBalance",{balance:"0",symbol:n.symbol}),"bot",t.id),void v(!1)}if(s&&m&&w)try{const t=[];e.token_out&&t.push(e.token_out),e.token_in&&!n&&t.push(e.token_in);let r=18,s=18;if(t.length>0)try{const i=await Hh.getTokensDetails(t,O);if(i?.data)for(const t of i.data)n||t.address.toLowerCase()!==e.token_in?.toLowerCase()||(r=t.decimals||18),t.address.toLowerCase()===e.token_out?.toLowerCase()&&(s=t.decimals||18)}catch(a){}if(U?.address)try{if(o.length>0)if(n){const t=o.find(e=>e.native_token);let n=t?.balance_formatted||"0";try{const e=await ip({chainId:L,rpcUrl:H});if(e.isGreaterThan(0)){const r=e.times(1e6),i=new Nh(t?.balance||"0").minus(r);n=i.isGreaterThan(0)?Nh(st(BigInt(i.toFixed(0)),t?.decimals||18)).toFixed():"0"}}catch(f){}e.amount=xp(e.amount,n,t?.usd_price);const r=parseFloat(n),i=parseFloat(e.amount);if(Nh(r).lte(0))return d(u("formInsufficientBalance",{balance:Nh(r).decimalPlaces(8).toFixed(),symbol:R?.nativeCurrency?.symbol||"native"}),"bot"),void v(!1);if(Nh(r).lt(i))return d(u("swapInsufficientNativeBalance",{balance:Nh(r).decimalPlaces(8).toFixed(),symbol:R?.nativeCurrency?.symbol||"native",amount:e.amount}),"bot"),void v(!1)}else{const t=o.find(t=>t.token_address.toLowerCase()===e.token_in?.toLowerCase());if(!t)return d(u("swapTokenNotInWallet",{symbol:e.token_in_symbol||e.token_in}),"bot"),void v(!1);e.amount=xp(e.amount,t.balance_formatted||"0",t.usd_price);const n=parseFloat(t.balance_formatted||"0"),r=parseFloat(e.amount);if(Nh(n).lt(r))return d(u("swapInsufficientTokenBalance",{balance:Nh(n).decimalPlaces(8).toFixed(),symbol:t.symbol,amount:e.amount}),"bot"),void v(!1)}}catch(h){}const l=n?mn:e.token_in;J({srcTokenAddress:l,descTokenAddress:e.token_out,amount:e.amount,srcTokenDecimals:r,descTokenDecimals:s});const p=pn(e.amount,r).toString(),m=await zh({chainId:L,tokenIn:l,tokenInAmount:p,tokenOut:e.token_out,tokenOutRecipient:U?.address||"",slippage:"auto",accesstoken:"d6c45897b8f6"});if(m.success&&m.data){const e=m.data,t=e.tokenIn,r=e.tokenOut,o=Nh(st(BigInt(t.amount||0),t.decimals)).decimalPlaces(8).toFormat(),s=Nh(st(BigInt(r.amount||0),r.decimals)).decimalPlaces(8).toFormat();let a=!1;if(!n&&U?.address&&e.tx?.to)try{const t=await ep({tokenAddress:l,ownerAddress:U.address,spenderAddress:e.tx.to,chainId:L,rpcUrl:H});a=Nh(t.toString()).isLessThan(p)}catch(i){a=!0}const f=e.estimatedTransactionFee?.total?Nh(e.estimatedTransactionFee.total):Nh(0);let h=Nh(0);if(a&&U?.address)try{const t=tp({tokenAddress:l,spenderAddress:e.tx?.to||"",fromAddress:U.address,chainId:L,amount:p});h=await rp({from:U.address,to:t.to,data:t.data,chainId:L,rpcUrl:H})}catch(i){}const w=f.plus(h),b=R?.nativeCurrency?.symbol||"native";let g="",y=!1;if(U?.address&&w.isGreaterThan(0))try{const e=await np({address:U.address,chainId:L,rpcUrl:H});if(e.isLessThan(w)){y=!0;const t=Nh(st(BigInt(e.toFixed(0)),18)).decimalPlaces(8).toFormat(),n=Nh(st(BigInt(w.toFixed(0)),18)).decimalPlaces(8).toFormat();g=u("swapFeeWarning",{symbol:b,balance:t,needed:n})}}catch(i){}const v=`From: ${o} ${t.symbol}\n⬇️\nTo: ${s} ${r.symbol}\n\n`+g+"\n";if(y)d(v,"bot");else if(a){const n=[{id:"approve-for-swap",text:u("swapApproveButton",{symbol:t.symbol}),value:u("swapApproveValue",{symbol:t.symbol}),action:"approve_for_swap",fullWidth:!0,extraData:{tokenAddress:l,spenderAddress:e.tx.to,tokenSymbol:t.symbol,amountInWei:p,tx:e.tx}}];d(v+u("swapNeedApprove",{symbol:t.symbol}),"bot",void 0,n)}else{const t=[{id:"confirm-swap",text:c("swapConfirmYes"),value:c("swapConfirmValue"),action:"confirm_swap",extraData:{tx:e.tx}}];d(v+c("swapReadyToProceed"),"bot",void 0,t)}}else d(u("swapEstimationError",{error:m.errorMessage||m.error||"Unknown error"}),"bot")}catch(p){d(c("swapEstimationFailed"),"bot")}else if(s&&m&&!w){let r=n?18:parseInt(e.token_in_decimals||"18",10),s=parseInt(e.token_out_decimals||"18",10);const l=[];if(e.token_out&&l.push(e.token_out),e.token_in&&!n&&l.push(e.token_in),l.length>0)try{const t=await Hh.getTokensDetails(l,O);if(t?.data)for(const i of t.data)n||i.address.toLowerCase()!==e.token_in?.toLowerCase()||(r=i.decimals||r),i.address.toLowerCase()===e.token_out?.toLowerCase()&&(s=i.decimals||s)}catch(a){}if(J({descTokenAddress:e.token_out,descTokenDecimals:s}),n)try{if(o.length>0){const e=o.find(e=>e.native_token),n=R?.nativeCurrency?.symbol||"ETH";let i=e?.balance_formatted||"0";try{const t=await ip({chainId:L,rpcUrl:H});if(t.isGreaterThan(0)){const n=t.times(1e6),r=new Nh(e?.balance||"0").minus(n);i=r.isGreaterThan(0)?Nh(st(BigInt(r.toFixed(0)),e?.decimals||18)).toFixed():"0"}}catch(f){}J({srcTokenAddress:mn,srcTokenDecimals:r});const s=[25,50,75,100].map(e=>({id:`percent-${e}`,text:`${e}%`,value:u("buttonUsePercent",{percent:String(e),symbol:n}),action:"select_percent",extraData:{percent:e,tokenAddress:mn,tokenSymbol:n,tokenDecimals:r,tokenBalance:i}}));d(u("selectAmountToSwap",{symbol:n,balance:i}),"bot",t.id,s)}else d(c("couldNotFetchBalance"),"bot")}catch(i){d(c("couldNotFetchBalanceRetry"),"bot")}else{const n=e.token_in_symbol||"Token";J({srcTokenAddress:e.token_in,srcTokenDecimals:r});try{if(o.length>0){const r=o.find(t=>t.token_address.toLowerCase()===e.token_in?.toLowerCase());if(!r)return d(u("swapTokenNotInWallet",{symbol:n}),"bot"),void v(!1);const i=[25,50,75,100].map(e=>({id:`percent-${e}`,text:`${e}%`,value:u("buttonUsePercent",{percent:String(e),symbol:r.symbol}),action:"select_percent",extraData:{percent:e,tokenAddress:r.token_address,tokenSymbol:r.symbol,tokenDecimals:r.decimals||18,tokenBalance:r.balance_formatted}}));d(u("selectAmountToSwap",{symbol:r.symbol,balance:`${r.balance_formatted} (~$${r.usd_value?.toFixed(2)||"0"})`}),"bot",t.id,i)}else d(c("couldNotFetchBalance"),"bot")}catch(i){d(c("couldNotFetchBalanceRetry"),"bot")}}}else if(!s&&m){d(l.message||c("swapChooseFrom"),"bot",t.id);let n=parseInt(e.token_out_decimals||"18",10);if(e.token_out)try{const t=await Hh.getTokensDetails([e.token_out],O);t?.data?.[0]&&(n=t.data[0].decimals||n)}catch(a){}w&&J({descTokenAddress:e.token_out,descTokenDecimals:n,amount:e.amount}),await V(e.token_out,n)}else if(s&&!m){let r=n?18:parseInt(e.token_in_decimals||"18",10);if(e.token_in&&!n)try{const t=await Hh.getTokensDetails([e.token_in],O);t?.data?.[0]&&(r=t.data[0].decimals||r)}catch(a){}if(J(n?{srcTokenAddress:mn,srcTokenDecimals:18,...w?{amount:e.amount}:{}}:{srcTokenAddress:e.token_in,srcTokenDecimals:r,...w?{amount:e.amount}:{}}),w&&o.length>0)if(n){const n=o.find(e=>e.native_token),r=xp(e.amount,n?.balance_formatted||"0",n?.usd_price);if(Nh(n?.balance_formatted||"0").lt(r))return d(u("swapInsufficientNativeBalance",{balance:Nh(n?.balance_formatted||"0").decimalPlaces(8).toFixed(),symbol:R?.nativeCurrency?.symbol||"native",amount:r}),"bot",t.id),void v(!1);e.amount=r,J({amount:r})}else if(e.token_in){const n=o.find(t=>t.token_address.toLowerCase()===e.token_in.toLowerCase());if(n){const r=xp(e.amount,n.balance_formatted||"0",n.usd_price);if(Nh(n.balance_formatted||"0").lt(r))return d(u("swapInsufficientTokenBalance",{balance:Nh(n.balance_formatted||"0").decimalPlaces(8).toFixed(),symbol:n.symbol,amount:r}),"bot",t.id),void v(!1);e.amount=r,J({amount:r})}}d(l.message||u("swapChooseTo",{symbol:e.token_in_symbol||"your token"}),"bot",t.id);try{v(!0);const e=R?.tokenTrendingDefault||[],[t,n]=await Promise.allSettled([Hh.getTopGainers(O,"24h",5),Hh.getTokensDetails(e,O)]);let r=[];"fulfilled"===t.status&&t.value?.data&&(r=[...t.value.data]),"fulfilled"===n.status&&n.value?.data&&(r=[...n.value.data,...r]),r=r.filter((e,t,n)=>t===n.findIndex(t=>t.address.toLowerCase()===e.address.toLowerCase()));const i=r.map(e=>({id:e?.symbol,text:e?.symbol,value:u("buttonSwapTo",{name:e.name,symbol:e?.symbol||""}),action:"click_swap_dest_token",extraData:{tokenAddress:e?.address||"",symbol:e?.symbol||"",decimals:e?.decimals||18}}));d(u("trendingTokensForReceive",{chain:R?.name||"Unknown"}),"bot",void 0,i)}catch(i){d(c("couldNotLoadTokenList"),"bot")}finally{v(!1)}}else if(w&&J({amount:e.amount}),d(l.message||c("swapChooseToken"),"bot",t.id),U?.address)try{v(!0);const e=await Lh({address:U.address,chain:F});if(e?.success&&e?.data?.result&&e.data.result.length>0){const t=e.data.result.map(e=>({id:`swap-select-${e.token_address}`,text:`${e.name}: ${e.balance_formatted} ${e.symbol} ($${Nh(e?.usd_value||0).decimalPlaces(2).toFixed()||"0"})`,value:`Swap ${e.symbol}`,action:"suggested_action",fullWidth:!0}));await Yf(500),v(!1),d(u("walletBalanceSpendable",{chain:R?.name||"this chain"}),"bot",void 0,t)}else v(!1),d(u("walletNoTokensFound",{chain:R?.name||"this chain"}),"bot")}catch(i){v(!1),d(c("walletFetchError"),"bot")}}else if("view_balances"===l.action)await Q();else if("view_nfts"===l.action)await K();else if("send_token"!==l.action||l.parameters?.contract_address||l.parameters?.token_symbol||!U?.address)if("send_nft"!==l.action||l.parameters?.contract_address||l.parameters?.token_id||l.parameters?.nft_name||!U?.address)if("send_nft"===l.action&&!De(l.parameters?.contract_address||"")&&(l.parameters?.nft_name||l.parameters?.token_id)&&U?.address)try{v(!0);const e=await Ph({address:U.address,chain:F,limit:100,exclude_spam:!1});if(e?.success&&e?.data?.result){const n=e.data.result,r=(l.parameters?.nft_name||"").toLowerCase(),i=l.parameters?.token_id||"",o=e=>{const t=(e.normalized_metadata?.name||e.name||"").toLowerCase(),n=(e.name||"").toLowerCase(),o=r&&(t.includes(r)||n.includes(r)),s=i&&e.token_id===i;return r&&i?o&&s:r?o:s},s=!r&&!!i,a=s?n.filter(o):[],c=s?1===a.length?a[0]:null:n.find(o);if(s&&a.length>1){const e=a.map(e=>{const t=e.normalized_metadata?.name||e.name||`#${e.token_id}`,n=e.normalized_metadata?.image||e.media?.original_media_url||"";return{id:`${e.token_address}-${e.token_id}`,text:`${t} (${e.symbol||e.contract_type}) #${e.token_id}`,value:u("buttonSendNft",{name:t}),action:"select_nft_to_send",fullWidth:!0,extraData:{contractAddress:e.token_address,tokenId:e.token_id,tokenStandard:e.contract_type,name:t,symbol:e.symbol,amount:e.amount,image:n,toAddress:l.parameters?.to_address||""}}}),n=a.map((e,t)=>{const n=e.normalized_metadata?.name||e.name||`#${e.token_id}`,r=e.normalized_metadata?.image||e.media?.original_media_url||"";return`${t+1}. ${r?`![${n}](${r})\n`:"🖼️ "}**${n}**\n ${e.symbol||e.contract_type} | Token ID: ${e.token_id}`}).join("\n\n");v(!1),d(u("nftMultipleMatchesForTokenId",{count:String(a.length),tokenId:i})+"\n\n"+n,"bot",t.id,e)}else if(c){const e=c.normalized_metadata?.name||c.name||`#${c.token_id}`,n=c.normalized_metadata?.image||c.media?.original_media_url||"",r={contract_address:c.token_address,token_id:c.token_id,to_address:l.parameters?.to_address||"",token_standard:c.contract_type||"",amount:l.parameters?.amount||"1",maxAmount:c.amount||"1",nft_name:e};d(l.message||u("nftSendReview",{name:e,standard:c.contract_type||"NFT",tokenId:c.token_id}),"bot",t.id,void 0,{action:"send_nft",parameters:r,status:"pending",nftInfo:{name:e,image:n||void 0,tokenId:c.token_id,contractAddress:c.token_address,tokenStandard:c.contract_type||void 0}})}else d(u("nftNotFoundInWallet",{name:r||i}),"bot",t.id)}else d(c("nftNoCollection"),"bot",t.id)}catch(i){d(c("nftFetchError"),"bot",t.id)}finally{v(!1)}else{const o=(n=l.action,["send_native","send_token","approve_token","wrap_native","unwrap_native","send_nft"].includes(n));let s,a,c={...l.parameters||{}};const h=["send_token","approve_token"].includes(l.action)&&(c.contract_address||c.token_symbol),p="send_native"===l.action||"wrap_native"===l.action,m="unwrap_native"===l.action,w="send_nft"===l.action&&c.contract_address;if(h&&U?.address)try{const e=await Lh({address:U.address,chain:F});if(e?.success&&e?.data?.result){const t=e.data.result,n=c.contract_address?t.find(e=>e.token_address.toLowerCase()===c.contract_address.toLowerCase()):t.find(e=>e.symbol.toUpperCase()===c.token_symbol.toUpperCase());n&&(c={...c,contract_address:n.token_address,decimals:String(n.decimals)},s={symbol:n.symbol,name:n.name,balance:n.balance,balanceFormatted:n.balance_formatted,usdValue:n.usd_value,usdPrice:n.usd_price,decimals:n.decimals,logo:n.logo||n.thumbnail,contractAddress:n.token_address})}}catch(i){}if(h&&!s&&"send_token"===l.action){const e=c.token_symbol||c.contract_address||"this token";return d(u("sendTokenNotInWallet",{symbol:e}),"bot",t.id),void v(!1)}if(h&&!s&&c.contract_address)try{const e=await Dh({address:c.contract_address,chain:F});if(e?.success&&e?.data){const t=e.data;s={symbol:t.symbol,name:t.name,balance:"0",balanceFormatted:"0",usdPrice:t.usd_price,decimals:t.decimals,logo:t.logo,contractAddress:c.contract_address},c={...c,decimals:String(t.decimals)}}}catch(i){}if(p&&U?.address)try{const e=await Lh({address:U.address,chain:F});if(e?.success&&e?.data?.result){const t=e.data.result.find(e=>e.native_token);if(t){let e=t.balance_formatted,n=t.balance;try{const r=new Nh(t.balance),i="0x"+BigInt(r.toFixed(0)).toString(16),o=await rp({from:U.address,to:U.address,data:"0x",value:i,chainId:L,rpcUrl:H});if(o.isGreaterThan(0)){const i=r.minus(o);i.isGreaterThan(0)?(n=i.toFixed(0),e=Nh(st(BigInt(i.toFixed(0)),t.decimals)).toFixed()):(n="0",e="0")}}catch(f){}s={symbol:t.symbol,name:t.name,balance:n,balanceFormatted:e,usdValue:t.usd_value,usdPrice:t.usd_price,decimals:t.decimals,logo:t.logo||t.thumbnail,contractAddress:mn}}else{const e=await Dh({address:mn,chain:F});if(e?.success&&e?.data){const t=e.data;s={symbol:t.symbol,name:t.name,balance:"0",balanceFormatted:"0",usdValue:0,usdPrice:t.usd_price,decimals:t.decimals,logo:t.logo||t.thumbnail,contractAddress:mn}}}}}catch(i){}if(m&&U?.address)try{const e=await Lh({address:U.address,chain:F});if(e?.success&&e?.data?.result){const t=e.data.result,n=`W${R?.nativeCurrency?.symbol||"ETH"}`,r=t.find(e=>e.symbol.toUpperCase()===n.toUpperCase());r&&(s={symbol:r.symbol,name:r.name,balance:r.balance,balanceFormatted:r.balance_formatted,usdValue:r.usd_value,usdPrice:r.usd_price,decimals:r.decimals,logo:r.logo||r.thumbnail,contractAddress:r.token_address})}}catch(i){}if(w){try{const e=await async function(e){const{address:t,chain:n="base"}=e;if(!t)throw new Error("Contract address is required");try{return{success:!0,data:(await Fh.get(`api/moralis/proxy/nft/${encodeURIComponent(t)}/metadata`,{query:{chain:n}})).data}}catch(r){return{success:!1,error:r instanceof Error?r.message:"Unknown error"}}}({address:c.contract_address,chain:F});if(e?.success&&e?.data){const t=e.data;t.contract_type&&(c={...c,token_standard:t.contract_type}),!c.nft_name&&t.name&&(c={...c,nft_name:t.name})}}catch(i){}if(U?.address)try{const e=await Ph({address:U.address,chain:F,limit:100,exclude_spam:!1});if(e?.success&&e?.data?.result){const n=e.data.result.find(e=>e.token_address.toLowerCase()===c.contract_address.toLowerCase()&&e.token_id===c.token_id);if(!n){const e=c.nft_name||`#${c.token_id||c.contract_address}`;return d(u("nftNotFoundInWallet",{name:e}),"bot",t.id),void v(!1)}{c={...c,amount:c.amount||"1",maxAmount:n.amount||"1"};const e=n.normalized_metadata?.image||n.media?.original_media_url||"";a={name:n.normalized_metadata?.name||n.name||c.nft_name||`#${n.token_id}`,image:e||void 0,tokenId:n.token_id,contractAddress:n.token_address,tokenStandard:n.contract_type||c.token_standard||void 0}}}}catch(i){}}if(c.amount&&s?.balanceFormatted&&("send_token"===l.action||"send_native"===l.action||"wrap_native"===l.action||"unwrap_native"===l.action)&&(c.amount=xp(c.amount,s.balanceFormatted,s.usdPrice)),o){const e=l.message||"Please review and complete the form below.";d(e,"bot",t.id,void 0,{action:l.action,parameters:c,status:"pending",tokenInfo:s,nftInfo:a})}else d(l.message||e,"bot",t.id)}else d(u("sendNftViaWebsite",{link:Ap}),"bot");else try{const e=await Lh({address:U.address,chain:F});if(e?.success&&e?.data?.result&&e.data.result.length>0){d(c("sendTokenChoose"),"bot",t.id),v(!0),await Yf(500);const n=e.data.result.map(e=>({id:`send-select-${e.token_address}`,text:`${e.name}: ${e.balance_formatted} ${e.symbol} ($${Nh(e?.usd_value||0).decimalPlaces(2).toFixed()||"0"})`,value:u("buttonSendToken",{symbol:e.symbol}),action:"suggested_action",fullWidth:!0}));await Yf(500),v(!1),d(u("walletBalanceSpendable",{chain:R?.name||"this chain"}),"bot",void 0,n)}else v(!1),d(u("walletNoTokensFound",{chain:R?.name||"this chain"}),"bot")}catch(i){v(!1),d(c("walletFetchError"),"bot")}else if(l&&"chat"===l.action){const n=l.token_mentions||[],r=l.suggested_actions||[],i=[];n.length>0&&(await Promise.all(n.map(async e=>{let t=e.contract_address||"",n=e.decimals||18;if("native"===t.toLowerCase()&&(t=mn),t===mn){const t=m?.find(e=>e.native_token);return t?{symbol:e.symbol||t.symbol,contract_address:mn,decimals:18}:e.symbol?{symbol:e.symbol,contract_address:mn,decimals:18}:null}if(t&&t!==mn){const r=m?.find(n=>n.token_address.toLowerCase()===t.toLowerCase()&&n.symbol.toUpperCase()===e.symbol.toUpperCase());if(r){try{const e=await Hh.getTokensDetails([t],O);n=e?.data?.[0]?.decimals??n}catch{}return{symbol:e.symbol,contract_address:t,decimals:n}}try{const r=await Hh.getTokensDetails([t],O),i=r?.data?.[0];if(i&&i.symbol?.toUpperCase()===e.symbol.toUpperCase())return{symbol:e.symbol,contract_address:t,decimals:i.decimals??n};t=""}catch{t=""}}if(!t&&m){const r=m.find(t=>t.symbol.toUpperCase()===e.symbol.toUpperCase());if(r){t=r.token_address;try{const e=await Hh.getTokensDetails([t],O);n=e?.data?.[0]?.decimals??n}catch{}}}return t?{symbol:e.symbol,contract_address:t,decimals:n}:null}))).filter(e=>null!==e).forEach(e=>{i.push({id:`buy-${e.symbol}`,text:`💰 Buy ${e.symbol}`,value:u("buttonBuySymbol",{symbol:e.symbol}),action:"click_buy_item_token_button",extraData:{tokenAddress:e.contract_address,symbol:e.symbol,decimals:e.decimals},fullWidth:!0})}),r.length>0&&r.forEach((e,t)=>{i.push({id:`suggested-${t}-${e.label}`,text:e.label,value:e.prompt,action:"suggested_action",fullWidth:!0})}),i.length>0?d(l.message||e,"bot",t.id,i):d(l.message||e,"bot",t.id)}else d(e,"bot",t.id)}else d(c("errorProcessingRequest"),"bot",t.id)}catch(r){d(c("errorProcessingRequest"),"bot",t.id)}var n;v(!1),await Yf(50),lp.isDesktop&&I.current?.focus()},[b,y,x,d,l,U?.address,D,R?.name,R?.nativeCurrency?.symbol,R?.tokenTrendingDefault,L,w,F,O,u,V,Y,G,X,c,J,H,Q,K]);n.useEffect(()=>{S.current&&b===S.current&&(S.current=null,$())},[b,$]);const ee=n.useCallback(async(e,t,n)=>{try{if(k(!1),f(n,"submitted"),"swap_token"===e){let e=18;if(t.token_in&&t.token_in!==mn)try{const n=await Hh.getTokensDetails([t.token_in],O);n?.data?.[0]&&(e=n.data[0].decimals||18)}catch(r){}const i=pn(t.amount||"0",e).toString(),s=await zh({chainId:L,tokenIn:t.token_in||"",tokenInAmount:i,tokenOut:t.token_out||"",tokenOutRecipient:U?.address||"",slippage:"auto",accesstoken:"d6c45897b8f6"});if(s.success&&s.data){const e=s.data,r=e.tokenIn,a=e.tokenOut,l=Nh(st(BigInt(r.amount||0),r.decimals)).decimalPlaces(8).toFormat(),h=Nh(st(BigInt(a.amount||0),a.decimals)).decimalPlaces(8).toFormat(),p=!t.token_in||t.token_in===mn;let m=!1;if(!p&&U?.address&&e.tx?.to)try{const n=await ep({tokenAddress:t.token_in,ownerAddress:U.address,spenderAddress:e.tx.to,chainId:L,rpcUrl:H});m=Nh(n.toString()).isLessThan(i)}catch(o){}const w=e.estimatedTransactionFee?.total?Nh(e.estimatedTransactionFee.total):Nh(0);let b=Nh(0);if(m&&U?.address)try{const n=tp({tokenAddress:t.token_in,spenderAddress:e.tx?.to||"",fromAddress:U.address,chainId:L,amount:i});b=await rp({from:U.address,to:n.to,data:n.data,chainId:L,rpcUrl:H})}catch(o){}const g=w.plus(b),y=R?.nativeCurrency?.symbol||"native";let v="",A=!1;if(U?.address&&g.isGreaterThan(0))try{const e=await np({address:U.address,chainId:L,rpcUrl:H});if(e.isLessThan(g)){A=!0;const t=Nh(st(BigInt(e.toFixed(0)),18)).decimalPlaces(8).toFormat(),n=Nh(st(BigInt(g.toFixed(0)),18)).decimalPlaces(8).toFormat();v=u("swapFeeWarning",{symbol:y,balance:t,needed:n})}}catch(o){}const k=`From: ${l} ${r.symbol}\n⬇️\nTo: ${h} ${a.symbol}\n\n`+v+"\n";if(A)f(n,"pending"),d(k,"bot");else if(m){const o=[{id:"approve-swap-actionform",text:u("swapApproveButton",{symbol:r.symbol}),value:u("swapApproveValue",{symbol:r.symbol}),action:"approve_for_swap",extraData:{tokenAddress:t.token_in,spenderAddress:e.tx.to,tokenSymbol:r.symbol,amountInWei:i,tx:e.tx},fullWidth:!0}];f(n,"success"),d(k+u("swapApprovalRequired",{symbol:r.symbol}),"bot",void 0,o)}else{const t=[{id:"confirm-swap-actionform",text:c("swapConfirmYes"),value:c("swapConfirmValue"),action:"confirm_swap",extraData:{tx:e.tx}}];f(n,"success"),d(k+c("swapReadyToProceed"),"bot",void 0,t)}}else f(n,"pending"),d(u("swapEstimationError",{error:s.errorMessage||s.error||"Unknown error"}),"bot")}else{const r=function(e){const{action:t,parameters:n,fromAddress:r,chainId:i}=e;switch(t){case"send_native":return function(e,t,n){const{to_address:r,amount:i}=e;if(!r)throw new Error("Recipient address is required");if(!i)throw new Error("Amount is required");return{from:t,to:r,data:"0x",value:pn(Nh(i).decimalPlaces(18,Nh.ROUND_DOWN).toFixed(),18).toString(),chainId:n,description:`Send ${i} native token to ${r}`}}(n,r,i);case"send_token":return function(e,t,n){const{contract_address:r,to_address:i,amount:o,decimals:s,token_symbol:a}=e;if(!r)throw new Error("Token contract address is required");if(!i)throw new Error("Recipient address is required");if(!o)throw new Error("Amount is required");const c=parseInt(s)||18,u=pn(Nh(o).decimalPlaces(c,Nh.ROUND_DOWN).toFixed(),c);return{from:t,to:r,data:_e({abi:Xh,functionName:"transfer",args:[i,u]}),value:"0",chainId:n,description:`Send ${o} ${a||"tokens"} to ${i}`}}(n,r,i);case"approve_token":return function(e,t,n){const{contract_address:r,spender_address:i,amount:o,decimals:s,token_symbol:a}=e;if(!r)throw new Error("Token contract address is required");if(!i)throw new Error("Spender address is required");const c=parseInt(s)||18,u=o&&""!==o?.trim()?pn(Nh(o).decimalPlaces(c,Nh.ROUND_DOWN).toFixed(),c):Ot;return{from:t,to:r,data:_e({abi:Xh,functionName:"approve",args:[i,u]}),value:"0",chainId:n,description:`Approve ${o||"unlimited"} ${a||"tokens"} for ${i}`}}(n,r,i);case"wrap_native":return function(e,t,n){const{amount:r}=e;if(!r)throw new Error("Amount is required");const i=Wh[n];if(!i)throw new Error(`WETH not supported on chain ${n}`);const o=pn(Nh(r).decimalPlaces(18,Nh.ROUND_DOWN).toFixed(),18).toString();return{from:t,to:i,data:_e({abi:Kh,functionName:"deposit"}),value:o,chainId:n,description:`Wrap ${r} native token`}}(n,r,i);case"unwrap_native":return function(e,t,n){const{amount:r}=e;if(!r)throw new Error("Amount is required");const i=Wh[n];if(!i)throw new Error(`WETH not supported on chain ${n}`);const o=pn(Nh(r).decimalPlaces(18,Nh.ROUND_DOWN).toFixed(),18);return{from:t,to:i,data:_e({abi:Kh,functionName:"withdraw",args:[o]}),value:"0",chainId:n,description:`Unwrap ${r} WETH`}}(n,r,i);case"send_nft":return function(e,t,n){const{contract_address:r,token_id:i,to_address:o,token_standard:s,amount:a,nft_name:c}=e;if(!r)throw new Error("NFT contract address is required");if(!i)throw new Error("Token ID is required");if(!o)throw new Error("Recipient address is required");const u=(s||"ERC721").toUpperCase(),l=BigInt(i);let d,f;if("ERC1155"===u){const e=BigInt(a||"1");d=_e({abi:Zh,functionName:"safeTransferFrom",args:[t,o,l,e,"0x"]}),f=`Send ${e>1n?e.toString()+"x ":""}${c||"NFT"} (ERC1155 #${i}) to ${o}`}else d=_e({abi:Qh,functionName:"safeTransferFrom",args:[t,o,l]}),f=`Send ${c||"NFT"} (ERC721 #${i}) to ${o}`;return{from:t,to:r,data:d,value:"0",chainId:n,description:f}}(n,r,i);default:throw new Error(`Action "${t}" does not produce a transaction`)}}({action:e,parameters:t,fromAddress:U?.address||"",chainId:L||1}),o={from:r.from,to:r.to,data:r.data,value:r.value,chainId:r.chainId};if(("send_token"===e||"send_native"===e||"send_nft"===e||"wrap_native"===e||"unwrap_native"===e||"approve_token"===e)&&U?.address)try{const e=R?.nativeCurrency?.symbol||"native",t=await rp({from:r.from,to:r.to,data:r.data,value:r.value&&"0"!==r.value?`0x${BigInt(r.value).toString(16)}`:void 0,chainId:L,rpcUrl:H});if(t.isGreaterThan(0)){const r=await np({address:U.address,chainId:L,rpcUrl:H});if(r.isLessThan(t)){const i=Nh(st(BigInt(r.toFixed(0)),18)).decimalPlaces(8).toFormat(),o=Nh(st(BigInt(t.toFixed(0)),18)).decimalPlaces(8).toFormat();return f(n,"pending"),void d(u("txInsufficientGas",{symbol:e,balance:i,fee:o}),"bot")}}}catch(s){}if(i){v(!1);const r=await i(o);if("success"===r.status&&r.transactionHash){const i=R?.blockExplorers?.default?.url,o=i?` [View on Explorer](${i}/tx/${r.transactionHash})`:` Tx: ${r.transactionHash}`;try{if(await Yf(4e3),"success"===(await $h({transactionHash:r.transactionHash,chainId:L||1,rpcUrl:H})).status){if(f(n,"success"),h(n,t),"approve_token"===e&&d(u("approvalSuccess",{symbol:t.token_symbol||t.contract_address||"Token"})+o,"bot"),"send_token"===e||"send_native"===e||"send_nft"===e){const n=t.to_address||t.recipient||"",r=n?`${n.slice(0,6)}...${n.slice(-4)}`:"";d("send_nft"===e?u("txSuccessfulSendNft",{name:t.nft_name||t.token_symbol||"NFT",tokenId:t.token_id||"",to:r})+o:u("send_native"===e?"txSuccessfulSendNative":"txSuccessfulSendToken",{amount:t.amount||"",symbol:t.token_symbol||("send_native"===e?R?.nativeCurrency?.symbol||"native":"Token"),to:r})+o,"bot")}if("wrap_native"===e){const e=R?.nativeCurrency?.symbol||"native";d(u("txSuccessfulWrapNative",{amount:t.amount||"",from:e,to:`W${e}`})+o,"bot")}if("unwrap_native"===e){const e=R?.nativeCurrency?.symbol||"native";d(u("txSuccessfulUnwrapNative",{amount:t.amount||"",from:`W${e}`,to:e})+o,"bot")}}else f(n,"pending"),d(c("txReverted")+"\n"+o,"bot")}catch(a){f(n,"success"),d(c("txTimeout")+"\n"+o,"bot")}}else if("success"===r.status)f(n,"success");else{f(n,"pending");const e=r.error?`\nError: ${r.error}`:"";d(c("txFailed")+e,"bot")}}else f(n,"pending"),d(c("txNoHandler"),"bot")}}catch(l){f(n,"pending"),d(u("txError",{message:l instanceof Error?l.message:"Unknown error"}),"bot")}},[f,L,U?.address,O,R?.nativeCurrency?.symbol,R?.blockExplorers?.default?.url,H,u,d,c,i,h]),te=n.useCallback(e=>{m([e])},[m]),[ne,re]=n.useState({}),ie=n.useCallback(async(e,t,n)=>{re(e=>({...e,[n]:!0}));try{await ee(e,t,n)}finally{re(e=>({...e,[n]:!1}))}},[ee]),oe=n.useCallback(e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),$())},[$]),se=n.useCallback(()=>{const e=window.getSelection();e&&e.toString().length>0||r()},[r]);return e?t.jsx("div",{className:"chat-modal-overlay"+("bottom-left"===o?" chat-modal-overlay--left":""),onClick:se,role:"dialog","aria-modal":"true","aria-labelledby":"chat-modal-title",children:t.jsxs("div",{className:"chat-modal",style:s,onClick:e=>e.stopPropagation(),children:[t.jsxs("div",{className:"chat-modal-header",children:[t.jsxs("div",{className:"chat-modal-header-title",children:[t.jsxs("div",{className:"chat-modal-header-left",children:[t.jsx("div",{className:"keyring-logo",children:t.jsx("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAA8CAYAAAAdUliaAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAADAhJREFUeAHtWUtsnNUVPufOw2NAjS3UqqwyZtNVhaO2cbyoYqMKlU2xaRKIQPUMBQqllcegFgVVeBwEIZWKbQQElYfHoDYPUo1pqdpN40EgOSatxlm1KzzuhlZt5Umblsbz//dw7ut/zCOZQLLLkWb+131899zvnse9ANfkmsQE4VMIlcf6oJGaACkHICm2gU8bIJIV3HusAldZLgswLTDQG5KTQFjgmtuA+B/5X12BCEBscJNzuO/4PFwl6RowvbVnhIEuMK4soKqmAGKn+jUQWMQ9JxbhCsslAdPRu7MgvEkuOshPrEQxyFj7QsBtgDutI66Dt3Ur7l+qwRWSiwLWXK1zofxSPfb+xN7dfMnZH1xC20pKkGrM4PhnB962k+xytS8FjWyP5/f1UqJ+5rada+3Kae0n/DLfDjZ9cQOwmtYvNwFpHveenIErBbhvZSXb60Oxh/BbPR729/hIaY+gV+JG2oNKyvdnfj8+XGtuhI5/e4K5UuTWskGzJCHG9WBxwjrze+bT8hujYBNCLDOwbI8PwD/KeIAKcFoK6vEI+cfvRQkY+NL+dsD3MWia7qJXBo9vg781d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PjLdhvbaHjp8ZsJMnjpyZ5kOdHCek2/XJkwYYgjYnU+qcjyB6YsXvKOXJxYHXduXdLiXuP1np1M8VA6xEmbQM4DSfSOX0MZiHsaMyPnGitISIhvmZT53SKEcHXm4947vqgJ3MHlrJpkGUGdxgxk27Bdxjzv/QUSVNMP6lI0NL3bZ9VQA7ee3plVzSw4leiSPRU1ULupaRMv/lF4Yrl9PmVQXs5GiRqeKJwd4GbU9JOsdHw7Wvz10e0GtyTTrIJznoNVtvIOH9AAAAAElFTkSuQmCC",alt:"Keyring Logo",width:22,height:30})}),t.jsx("h3",{id:"chat-modal-title",children:c("chatTitle")})]}),t.jsx("button",{className:"close-button",onClick:r,"aria-label":c("closeChat"),type:"button",children:t.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})})]}),t.jsx(th,{address:U?.address,chainId:U?.chainId})]}),t.jsxs("div",{className:"chat-modal-messages-wrapper",children:[t.jsxs("div",{className:"chat-modal-messages",ref:C,role:"log","aria-live":"polite",children:[l.map((e,n)=>t.jsxs("div",{children:[_(n)&&t.jsx("div",{className:"date-separator",children:Vf(e.timestamp)}),t.jsxs("div",{className:"message "+("user"===e.sender?"message-user":"message-bot"),role:"article",children:[t.jsx("button",{disabled:lp.isMobile,className:"message-reply-button",onClick:()=>q(e),"aria-label":c("replyToMessage"),type:"button",children:t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:t.jsx("path",{d:"M3.5 8.5L1 6L3.5 3.5M1.5 6H10C12.2091 6 14 7.79086 14 10V13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),t.jsxs("div",{className:"message-bubble",children:[e.replyTo&&t.jsxs("div",{className:"message-reply-to",children:[t.jsxs("div",{className:"message-reply-to-label",children:[c("replyingTo")," ","user"===e.replyTo.sender?c("replyingToYou"):c("replyingToAgent")]}),t.jsx("div",{className:"message-reply-to-text",children:e.replyTo.text})]}),t.jsx("div",{className:"message-text",children:t.jsx(vp,{content:e.text})}),e.buttons&&e.buttons.length>0&&t.jsx("div",{className:"message-buttons",children:e.buttons.map(e=>t.jsx("button",{className:`message-button ${e.fullWidth?"full-width":""} ${"suggested_action"===e.action?"suggested-action":""}`,onClick:()=>W(e.value,e.action,e?.extraData),type:"button",children:e.text},e.id))}),e.actionData&&("pending"===e.actionData.status||"success"===e.actionData.status||"submitted"===e.actionData.status)&&t.jsx(Vh,{disabled:"success"===e.actionData.status||"submitted"===e.actionData.status,action:e.actionData.action,initialValues:e.actionData.parameters,onSubmit:(t,n)=>{ie(t,n,e.id),setTimeout(()=>{T.current?.scrollIntoView({behavior:"smooth"})},100)},onCancel:()=>te(e.id),isSubmitting:ne[e.id]||!1,tokenInfo:e.actionData.tokenInfo,nftInfo:e.actionData.nftInfo}),e.actionData&&"submitted"===e.actionData.status&&t.jsx("div",{className:"action-status action-status-submitted mb-1",children:c("txProcessing")}),e.actionData&&"fail"===e.actionData.status&&t.jsx("div",{className:"action-status action-status-fail mb-1",children:c("actionFail")}),t.jsxs("div",{className:"message-timestamp",children:[e.timestamp.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1}),"user"===e.sender&&t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"check-icon",children:t.jsx("path",{d:"M13.3333 4L6 11.3333L2.66667 8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]})]})]})]},e.id)),y&&t.jsx("div",{className:"message message-bot typing-indicator",role:"status","aria-label":c("botIsTyping"),children:t.jsxs("div",{className:"message-bubble",children:[t.jsx("span",{className:"typing-dot"}),t.jsx("span",{className:"typing-dot"}),t.jsx("span",{className:"typing-dot"})]})}),(A||1===l.length)&&t.jsxs(t.Fragment,{children:[l.length>1&&t.jsx("div",{className:"message message-bot",role:"article",children:t.jsx("div",{className:"message-bubble",children:t.jsx("div",{className:"message-text",children:c("canIHelpYou")})})}),t.jsx("div",{className:"suggestions-container",children:Z.map(e=>t.jsxs("button",{className:"suggestion-button",onClick:e.action,type:"button",children:[t.jsx("span",{className:"suggestion-icon",children:e.icon}),t.jsx("span",{className:"suggestion-text",children:e.text})]},e.id))})]}),t.jsx("div",{ref:T})]}),t.jsx(Yh,{scrollContainerRef:C})]}),t.jsxs("div",{className:"chat-modal-input",children:[x&&t.jsxs("div",{className:"reply-preview",children:[t.jsxs("div",{className:"reply-preview-content",children:[t.jsxs("div",{className:"reply-preview-label",children:[c("replyingTo")," ","user"===x.sender?c("replyingToYou"):c("replyingToAgent")]}),t.jsx("div",{className:"reply-preview-text",children:x.text})]}),t.jsx("button",{className:"reply-preview-close",onClick:()=>E(null),"aria-label":c("cancelReply"),type:"button",children:t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:t.jsx("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}),t.jsxs("div",{className:"chat-modal-input-row",children:[t.jsx("input",{ref:I,type:"text",placeholder:c("messagePlaceholder"),value:b,onChange:e=>g(e.target.value),onKeyPress:oe,disabled:y,"aria-label":"Message input"}),t.jsx("button",{className:"send-button",onClick:$,"aria-label":c("sendMessage"),disabled:y||""===b?.trim(),type:"button",children:t.jsx("img",{src:"data:image/svg+xml,%3csvg%20width='36'%20height='36'%20viewBox='0%200%2036%2036'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3crect%20width='36'%20height='36'%20rx='18'%20fill='%232358B2'/%3e%3cmask%20id='mask0_1924_16177'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='11'%20y='10'%20width='17'%20height='16'%3e%3crect%20x='11.334'%20y='10'%20width='16'%20height='16'%20fill='url(%23pattern0_1924_16177)'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_1924_16177)'%3e%3crect%20x='11.334'%20y='10'%20width='16'%20height='16'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cpattern%20id='pattern0_1924_16177'%20patternContentUnits='objectBoundingBox'%20width='1'%20height='1'%3e%3cuse%20xlink:href='%23image0_1924_16177'%20transform='scale(0.00195312)'/%3e%3c/pattern%3e%3cimage%20id='image0_1924_16177'%20width='512'%20height='512'%20preserveAspectRatio='none'%20xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOgAAADoABlffMYAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAACAASURBVHic7d13uGRlme7/79M0ijnrKM6ImHAMmHXGgB7zKJhzAAMgZjFg4DfnzO8ISM4gKIKIEgwImAAjiAQRCSoCCgaCgOQcn/PHu5reNHt37121qt61qr6f6+pLbLr3vi/Seuqtp947MhNJkjRdFtUOIEmSxs8BQJKkKeQAIEnSFHIAkCRpCjkASJI0hRbXDjCoiFgMPBB40Iwf9wZimV96E/AP4PzmxwWZeeMYo0qS1DnRl48BRsSqwFrA85ofa3DHh/18JHAxcCrwmyU/MvPslqJKktR5nR0AImJ1lj7s1wJWH/G3vAw4EjgE+EFmXj7i7ydJUjWdGgAi4uXA2ykP/YdWjHITcBRlGDggMy+umEWSpNZVHwAiYmXgrcAngMdXDTO7G4ADgZ0z88TaYSRJakO1ASAi7glsAHwUWLVKiIU7FtgZ+FZm3lQ7jCRJgxr7ABARDwE+AmwI3Gus37w9fwW2AvbKzBtqh5EkaaHGNgBExKOBz1CO++80lm86ehcA2wB7ZOY1tcNIkjRfIx8Ams/rbwL8f8CdR/rN6vknsD2wS2ZeWTuMJEkrMtIBICKeCuwFrDmyb9Itl1N2BHbMzEtqh5EkaS4jGQCaV/3/F/gksFLr36D7rgZ2B7bNzAtrh5EkaVmtDwAR8UDgIMrlPdPueuDLwFaZ+ffaYSRJW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jiPZSSmruO5Bt023XAl4GtMvPc2mEkSVrWyAYAgIhYA9gPeOrIvkm3XA3sDmybmRfWDiNJ0lxGOgAARMQiYH3g88D9R/rN6rkc2BnYITMvrR1GkqQVGfkAcNs3irgP8P8DGzE5Vwj/E9ge2CUzr6wdRpKk+RrbAHDbNyyfFPgf4FUMcRNhZRdQLj/aw0peSVIfjX0AuO0bRzwK2BhYF7hLlRALdwKwG3CAlbySpD6rNgDcFiDiAcAHgXcCq1UNM7trKZ/h3z0zT6odRpKkNlQfAGaKiH8HXtH8eDawuFKUG4GjgO8C+2XmFZVySJI0Ep0aAGaKiHsBL6EMAy8HHjjib3ku8EPg+8BPMvPqEX8/SZKq6ewAMFNEBPB0ykCwOvDgGT/uz8KWCW8G/gT8fsaP07yiV5I0TXoxACxPRCymnA7MHAoeAFwPXAFcOeN/LwPOycwb66SVJKkbej8ASJKkhevr5/AlSdIQHAAkSZpCDgCSJE0hBwBJkqaQA4AkSVPo/wH9hnZgmG1pVwAAAABJRU5ErkJggg=='/%3e%3c/defs%3e%3c/svg%3e",alt:"Send",width:44,height:44})})]})]})]})}):null};let Tp=!1;!function(){if(Tp||"undefined"==typeof document)return;Tp=!0;const e=document.createElement("style");e.setAttribute("data-keyring-utils",""),e.textContent="\n/* ===== Display ===== */\n.hidden { display: none !important; }\n.block { display: block; }\n.inline-block { display: inline-block; }\n.inline { display: inline; }\n.flex { display: flex; }\n.inline-flex { display: inline-flex; }\n.grid { display: grid; }\n\n/* ===== Flex Direction ===== */\n.flex-row { flex-direction: row; }\n.flex-col { flex-direction: column; }\n.flex-row-reverse { flex-direction: row-reverse; }\n.flex-col-reverse { flex-direction: column-reverse; }\n\n/* ===== Flex Wrap ===== */\n.flex-wrap { flex-wrap: wrap; }\n.flex-nowrap { flex-wrap: nowrap; }\n\n/* ===== Flex Grow / Shrink ===== */\n.flex-1 { flex: 1 1 0%; }\n.flex-auto { flex: 1 1 auto; }\n.flex-none { flex: none; }\n.grow { flex-grow: 1; }\n.grow-0 { flex-grow: 0; }\n.shrink { flex-shrink: 1; }\n.shrink-0 { flex-shrink: 0; }\n\n/* ===== Justify Content ===== */\n.justify-start { justify-content: flex-start; }\n.justify-end { justify-content: flex-end; }\n.justify-center { justify-content: center; }\n.justify-between { justify-content: space-between; }\n.justify-around { justify-content: space-around; }\n.justify-evenly { justify-content: space-evenly; }\n\n/* ===== Align Items ===== */\n.items-start { align-items: flex-start; }\n.items-end { align-items: flex-end; }\n.items-center { align-items: center; }\n.items-baseline { align-items: baseline; }\n.items-stretch { align-items: stretch; }\n\n/* ===== Align Self ===== */\n.self-auto { align-self: auto; }\n.self-start { align-self: flex-start; }\n.self-end { align-self: flex-end; }\n.self-center { align-self: center; }\n.self-stretch { align-self: stretch; }\n\n/* ===== Gap ===== */\n.gap-0 { gap: 0; }\n.gap-1 { gap: 4px; }\n.gap-2 { gap: 8px; }\n.gap-3 { gap: 12px; }\n.gap-4 { gap: 16px; }\n.gap-5 { gap: 20px; }\n.gap-6 { gap: 24px; }\n.gap-8 { gap: 32px; }\n\n/* ===== Padding ===== */\n.p-0 { padding: 0; }\n.p-1 { padding: 4px; }\n.p-2 { padding: 8px; }\n.p-3 { padding: 12px; }\n.p-4 { padding: 16px; }\n.p-5 { padding: 20px; }\n.p-6 { padding: 24px; }\n.p-8 { padding: 32px; }\n.px-0 { padding-left: 0; padding-right: 0; }\n.px-1 { padding-left: 4px; padding-right: 4px; }\n.px-2 { padding-left: 8px; padding-right: 8px; }\n.px-3 { padding-left: 12px; padding-right: 12px; }\n.px-4 { padding-left: 16px; padding-right: 16px; }\n.px-6 { padding-left: 24px; padding-right: 24px; }\n.py-0 { padding-top: 0; padding-bottom: 0; }\n.py-1 { padding-top: 4px; padding-bottom: 4px; }\n.py-2 { padding-top: 8px; padding-bottom: 8px; }\n.py-3 { padding-top: 12px; padding-bottom: 12px; }\n.py-4 { padding-top: 16px; padding-bottom: 16px; }\n.py-6 { padding-top: 24px; padding-bottom: 24px; }\n\n/* ===== Margin ===== */\n.m-0 { margin: 0; }\n.m-1 { margin: 4px; }\n.m-2 { margin: 8px; }\n.m-3 { margin: 12px; }\n.m-4 { margin: 16px; }\n.m-auto { margin: auto; }\n.mx-auto { margin-left: auto; margin-right: auto; }\n.mx-0 { margin-left: 0; margin-right: 0; }\n.mx-2 { margin-left: 8px; margin-right: 8px; }\n.mx-4 { margin-left: 16px; margin-right: 16px; }\n.my-0 { margin-top: 0; margin-bottom: 0; }\n.my-1 { margin-top: 4px; margin-bottom: 4px; }\n.my-2 { margin-top: 8px; margin-bottom: 8px; }\n.my-4 { margin-top: 16px; margin-bottom: 16px; }\n.mt-0 { margin-top: 0; }\n.mt-1 { margin-top: 4px; }\n.mt-2 { margin-top: 8px; }\n.mt-4 { margin-top: 16px; }\n.mb-0 { margin-bottom: 0; }\n.mb-1 { margin-bottom: 4px; }\n.mb-2 { margin-bottom: 8px; }\n.mb-4 { margin-bottom: 16px; }\n.ml-auto { margin-left: auto; }\n.mr-auto { margin-right: auto; }\n.mr-2 { margin-right: 8px; }\n\n/* ===== Width & Height ===== */\n.w-full { width: 100%; }\n.w-auto { width: auto; }\n.w-screen { width: 100vw; }\n.w-fit { width: fit-content; }\n.min-w-0 { min-width: 0; }\n.max-w-full { max-width: 100%; }\n.h-full { height: 100%; }\n.h-auto { height: auto; }\n.h-screen { height: 100vh; }\n.h-fit { height: fit-content; }\n.min-h-0 { min-height: 0; }\n.min-h-screen { min-height: 100vh; }\n\n/* ===== Position ===== */\n.relative { position: relative; }\n.absolute { position: absolute; }\n.fixed { position: fixed; }\n.sticky { position: sticky; }\n.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }\n.top-0 { top: 0; }\n.right-0 { right: 0; }\n.bottom-0 { bottom: 0; }\n.left-0 { left: 0; }\n\n/* ===== Overflow ===== */\n.overflow-hidden { overflow: hidden; }\n.overflow-auto { overflow: auto; }\n.overflow-scroll { overflow: scroll; }\n.overflow-visible { overflow: visible; }\n.overflow-x-auto { overflow-x: auto; }\n.overflow-y-auto { overflow-y: auto; }\n.overflow-x-hidden { overflow-x: hidden; }\n\n/* ===== Text ===== */\n.text-xs { font-size: 12px; line-height: 16px; }\n.text-sm { font-size: 14px; line-height: 20px; }\n.text-base { font-size: 16px; line-height: 24px; }\n.text-lg { font-size: 18px; line-height: 28px; }\n.text-xl { font-size: 20px; line-height: 28px; }\n.text-2xl { font-size: 24px; line-height: 32px; }\n.text-3xl { font-size: 30px; line-height: 36px; }\n\n.font-thin { font-weight: 100; }\n.font-light { font-weight: 300; }\n.font-normal { font-weight: 400; }\n.font-medium { font-weight: 500; }\n.font-semibold { font-weight: 600; }\n.font-bold { font-weight: 700; }\n.font-extrabold { font-weight: 800; }\n\n.text-left { text-align: left; }\n.text-center { text-align: center; }\n.text-right { text-align: right; }\n\n.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }\n.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }\n.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }\n.whitespace-nowrap { white-space: nowrap; }\n.whitespace-pre-wrap { white-space: pre-wrap; }\n.break-words { overflow-wrap: break-word; }\n.break-all { word-break: break-all; }\n.uppercase { text-transform: uppercase; }\n.lowercase { text-transform: lowercase; }\n.capitalize { text-transform: capitalize; }\n.italic { font-style: italic; }\n.underline { text-decoration: underline; }\n.line-through { text-decoration: line-through; }\n.no-underline { text-decoration: none; }\n\n/* ===== Border ===== */\n.border { border: 1px solid #e5e7eb; }\n.border-0 { border: 0; }\n.border-2 { border-width: 2px; }\n.border-t { border-top: 1px solid #e5e7eb; }\n.border-b { border-bottom: 1px solid #e5e7eb; }\n.border-l { border-left: 1px solid #e5e7eb; }\n.border-r { border-right: 1px solid #e5e7eb; }\n.rounded { border-radius: 4px; }\n.rounded-sm { border-radius: 2px; }\n.rounded-md { border-radius: 6px; }\n.rounded-lg { border-radius: 8px; }\n.rounded-xl { border-radius: 12px; }\n.rounded-2xl { border-radius: 16px; }\n.rounded-full { border-radius: 9999px; }\n.rounded-none { border-radius: 0; }\n\n/* ===== Background & Colors ===== */\n.bg-transparent { background-color: transparent; }\n.bg-white { background-color: #ffffff; }\n.bg-black { background-color: #000000; }\n.bg-gray-50 { background-color: #f9fafb; }\n.bg-gray-100 { background-color: #f3f4f6; }\n.bg-gray-200 { background-color: #e5e7eb; }\n.bg-gray-500 { background-color: #6b7280; }\n.bg-gray-800 { background-color: #1f2937; }\n.bg-blue-500 { background-color: #3b82f6; }\n.bg-red-500 { background-color: #ef4444; }\n.bg-green-500 { background-color: #22c55e; }\n\n.text-white { color: #ffffff; }\n.text-black { color: #000000; }\n.text-gray-400 { color: #9ca3af; }\n.text-gray-500 { color: #6b7280; }\n.text-gray-600 { color: #4b5563; }\n.text-gray-700 { color: #374151; }\n.text-gray-900 { color: #111827; }\n.text-blue-500 { color: #3b82f6; }\n.text-blue-600 { color: #2563eb; }\n.text-red-500 { color: #ef4444; }\n.text-green-500 { color: #22c55e; }\n\n/* ===== Opacity ===== */\n.opacity-0 { opacity: 0; }\n.opacity-25 { opacity: 0.25; }\n.opacity-50 { opacity: 0.5; }\n.opacity-75 { opacity: 0.75; }\n.opacity-100 { opacity: 1; }\n\n/* ===== Shadow ===== */\n.shadow-none { box-shadow: none; }\n.shadow-sm { box-shadow: 0 1px 2px rgba(0,0,0,0.05); }\n.shadow { box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06); }\n.shadow-md { box-shadow: 0 4px 6px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06); }\n.shadow-lg { box-shadow: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05); }\n.shadow-xl { box-shadow: 0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04); }\n\n/* ===== Cursor ===== */\n.cursor-pointer { cursor: pointer; }\n.cursor-default { cursor: default; }\n.cursor-not-allowed { cursor: not-allowed; }\n.cursor-wait { cursor: wait; }\n\n/* ===== Pointer Events ===== */\n.pointer-events-none { pointer-events: none; }\n.pointer-events-auto { pointer-events: auto; }\n\n/* ===== Select ===== */\n.select-none { user-select: none; }\n.select-text { user-select: text; }\n.select-all { user-select: all; }\n\n/* ===== Z-Index ===== */\n.z-0 { z-index: 0; }\n.z-10 { z-index: 10; }\n.z-20 { z-index: 20; }\n.z-30 { z-index: 30; }\n.z-40 { z-index: 40; }\n.z-50 { z-index: 50; }\n\n/* ===== Transition ===== */\n.transition { transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1); }\n.transition-colors { transition: color, background-color, border-color 150ms ease; }\n.transition-opacity { transition: opacity 150ms ease; }\n.transition-transform { transition: transform 150ms ease; }\n.duration-75 { transition-duration: 75ms; }\n.duration-100 { transition-duration: 100ms; }\n.duration-150 { transition-duration: 150ms; }\n.duration-200 { transition-duration: 200ms; }\n.duration-300 { transition-duration: 300ms; }\n.duration-500 { transition-duration: 500ms; }\n\n/* ===== Transform ===== */\n.scale-95 { transform: scale(0.95); }\n.scale-100 { transform: scale(1); }\n.scale-105 { transform: scale(1.05); }\n.rotate-45 { transform: rotate(45deg); }\n.rotate-90 { transform: rotate(90deg); }\n.rotate-180 { transform: rotate(180deg); }\n\n/* ===== Object Fit ===== */\n.object-cover { object-fit: cover; }\n.object-contain { object-fit: contain; }\n.object-fill { object-fit: fill; }\n.object-center { object-position: center; }\n\n/* ===== List ===== */\n.list-none { list-style: none; }\n.list-disc { list-style-type: disc; }\n.list-decimal { list-style-type: decimal; }\n\n/* ===== Visibility ===== */\n.visible { visibility: visible; }\n.invisible { visibility: hidden; }\n\n/* ===== Aspect Ratio ===== */\n.aspect-square { aspect-ratio: 1 / 1; }\n.aspect-video { aspect-ratio: 16 / 9; }\n\n/* ===== Scrollbar ===== */\n.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }\n.scrollbar-hide::-webkit-scrollbar { display: none; }\n",document.head.appendChild(e)}();const Cp=({position:e,theme:r,defaultOpen:i,onOpen:o,onClose:s,onTransaction:a})=>{const{account:u,chainId:l}=$f(),[d,f]=n.useState(i);n.useEffect(()=>{i&&o&&o()},[]),n.useEffect(()=>{if("undefined"==typeof window)return;const e=document.body,t=document.documentElement,n=e.style.overscrollBehavior,r=t.style.overscrollBehavior,i=e.style.overflow;return d&&(e.style.overscrollBehavior="none",t.style.overscrollBehavior="none",e.style.overflow="hidden"),()=>{e.style.overscrollBehavior=n,t.style.overscrollBehavior=r,e.style.overflow=i}},[d]);const h=n.useCallback(()=>{f(!0),o?.()},[o]),p=n.useCallback(()=>{f(!1),s?.()},[s]),m=n.useCallback(()=>{d?p():h()},[d,h,p]),w={position:"fixed",["bottom-right"===e?"right":"left"]:r.offset?.x??20,bottom:r.offset?.y??20,zIndex:r.zIndex??9999};return Qf(u?.address||"")&&l?t.jsxs("div",{style:w,role:"complementary","aria-label":"Chat widget",children:[t.jsx(c,{buttonSize:r.buttonSize,onClick:m}),t.jsx(Ep,{isOpen:d,onClose:p,onTransaction:a,position:e,modalChatStyle:r.modalChatStyle})]}):t.jsx(t.Fragment,{})};e.ChatWidget=({position:e="bottom-right",theme:n={},defaultOpen:r=!1,onOpen:i,onClose:o,account:a,onTransaction:c,language:u="en",rpcUrls:l})=>{const d={position:e,theme:n,rpcUrls:l};return"undefined"==typeof window?null:t.jsx(lh,{initialConfig:d,children:t.jsx(eh,{initialAccount:a,children:t.jsx(s,{initialLanguage:u,children:t.jsx(Cp,{position:e,theme:n,defaultOpen:r,onOpen:i,onClose:o,onTransaction:c})})})})},Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
1
+ !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode(".chat-button{cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px #00000026;transition:all .3s ease;border-radius:16px}.chat-button:hover{transform:scale(1.1);box-shadow:0 6px 16px #0003}.chat-button:active{transform:scale(.95)}.chat-modal-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:transparent;display:flex;align-items:flex-end;justify-content:flex-end;z-index:9999;pointer-events:all;animation:fadeIn .2s ease}#chat-modal-title{color:#0b3988;font-weight:900;font-style:Regular;font-size:18px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;flex:1}.chat-modal-overlay.chat-modal-overlay--left{justify-content:flex-start}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.chat-modal{width:90%;max-width:480px;height:700px;max-height:calc(100dvh - 64px);background:#f5f5f7;border-radius:12px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 20px 60px #0000004d;margin:20px;pointer-events:all;animation:slideUp .3s ease}@keyframes slideUp{0%{transform:translateY(30px);opacity:0}to{transform:translateY(0);opacity:1}}.chat-modal-header{background:#fff;padding:8px 8px 8px 16px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e5e5e7;flex-flow:column}.chat-modal-header-title{width:100%;display:flex;align-items:center;justify-content:space-between;overflow:hidden}.chat-modal-header-left{display:flex;align-items:center;gap:6px;overflow:hidden}.keyring-logo{width:22px;height:30px;display:flex;align-items:center;justify-content:center}.chat-modal-header h3{margin:0;font-size:18px;font-weight:700;color:#1a1a1d}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;border-radius:8px;color:#666;transition:all .2s}.close-button:hover{background:#f5f5f7;color:#000}.chat-user-info{display:flex;align-items:center;gap:6px;width:100%}.user-wallet,.user-wallet a{font-size:14px;font-weight:500;color:#0b3988}.copy-address-btn{display:flex;align-items:center;justify-content:center;background:none;border:none;cursor:pointer;padding:3px;color:#999;border-radius:4px;transition:color .15s,background .15s;line-height:0}@media(min-width:640px){.copy-address-btn:hover{color:#1a1a1d;background:#f0f0f0}}.chat-modal-messages-wrapper{position:relative;flex:1;overflow:hidden;display:flex;flex-direction:column}.chat-modal-messages{flex:1;padding:8px 16px;overflow-y:auto;overscroll-behavior:contain;display:flex;flex-direction:column;gap:8px}.date-separator{text-align:center;font-size:12px;font-weight:600;color:#666;align-self:center;width:fit-content;margin:0 auto 8px}.message{display:flex;animation:messageSlide .3s ease;position:relative}@media(min-width:640px){.message:hover .message-reply-button{opacity:1}}@keyframes messageSlide{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.message-reply-button{position:absolute;top:50%;transform:translateY(-50%);background:#fff;border:1px solid #e5e5e7;border-radius:8px;padding:6px;cursor:pointer;opacity:0;transition:all .2s;box-shadow:0 2px 8px #0000001a;z-index:10}.message-bot .message-reply-button{right:20px}.message-user .message-reply-button{left:20px}.message-reply-button:hover{background:#f5f5f7;transform:translateY(-50%) scale(1.1)}.message-reply-button svg{display:block;width:16px;height:16px;color:#666}.message-bot{justify-content:flex-start}.message-user{justify-content:flex-end}.message-bubble{max-width:85%;padding:8px 16px;border-radius:20px}.message-bot .message-bubble{background:#fff;box-shadow:0 2px 8px #0000000f;border-bottom-left-radius:4px}.message-user .message-bubble{background:#5b7fff;color:#fff;border-bottom-right-radius:4px}.message-user .message-bubble a{color:#fff}.message-reply-to{background:#0000000d;padding:8px 12px;border-radius:6px;margin-bottom:8px;border-left:3px solid #5b7fff}.message-bot .message-reply-to{background:#f5f5f7}.message-user .message-reply-to{background:#ffffff26;border-left-color:#ffffff80}.message-reply-to-label{font-size:11px;font-weight:600;margin-bottom:4px}.message-bot .message-reply-to-label{color:#5b7fff}.message-user .message-reply-to-label{color:#ffffffe6}.message-reply-to-text{font-size:12px;opacity:.8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.message-text{font-size:14px;line-height:1.5;word-wrap:break-word;white-space:pre-line}.message-bot .message-text{color:#1a1a1d}.message-user .message-text{color:#fff}.message-buttons{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;margin-bottom:8px}.message-button{flex:1 1 calc(50% - 4px);min-width:100px;padding:6px 12px;background:#fffffff2;border:1px solid #e0e0e0;border-radius:12px;font-size:13px;font-weight:500;color:#1a1a1d;cursor:pointer;transition:all .2s ease;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.message-button.full-width{flex:1 1 100%;text-align:center;white-space:normal;font-size:14px}@media(min-width:640px){.message-button:hover{background:#fff;border-color:#007aff;color:#007aff;transform:translateY(-1px);box-shadow:0 2px 8px #007aff26}.message-button:active{transform:translateY(0);box-shadow:0 1px 4px #007aff1a}}.message-user .message-button{background:#fff3;border-color:#ffffff4d;color:#fff}.message-user .message-button:hover{background:#ffffff4d;border-color:#ffffff80}.message-timestamp{line-height:1;font-size:11px;color:#999;display:flex;align-items:center;gap:4px;justify-content:flex-end}.message-user .message-timestamp{color:#ffffffb3}.check-icon{width:14px;height:14px}.typing-indicator .message-bubble{padding:12px 18px;display:flex;gap:6px;min-width:60px}.typing-dot{width:8px;height:8px;border-radius:50%;background:#999;animation:typingDot 1.4s infinite ease-in-out}.typing-dot:nth-child(1){animation-delay:0s}.typing-dot:nth-child(2){animation-delay:.2s}.typing-dot:nth-child(3){animation-delay:.4s}@keyframes typingDot{0%,60%,to{transform:translateY(0);opacity:.7}30%{transform:translateY(-8px);opacity:1}}.suggestions-container{display:flex;flex-direction:column;gap:10px;margin-top:8px}.suggestion-button{background:#d4d8f0;border:none;padding:6px 12px;border-radius:12px;display:flex;gap:12px;cursor:pointer;transition:all .2s;font-size:14px;font-weight:500;color:#1a1a1d;width:100%;text-align:center;align-items:center;justify-content:center}.suggestion-button:hover{background:#c5caeb;transform:translateY(-1px)}.suggestion-icon{font-size:18px}.chat-modal-input{padding:8px 16px;background:#fff;border-top:1px solid #e5e5e7;display:flex;flex-direction:column;gap:8px;box-shadow:0 -5px 8px 4px #0000000d;border-radius:12px 12px 0 0}.reply-preview{background:#f5f5f7;padding:6px 6px 6px 12px;border-radius:6px;border-left:3px solid #5b7fff;display:flex;justify-content:space-between;align-items:flex-start;gap:6px}.reply-preview-content{flex:1;min-width:0}.reply-preview-label{font-size:11px;color:#5b7fff;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.reply-preview-text{font-size:13px;color:#666;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.reply-preview-close{background:transparent;border:none;cursor:pointer;padding:2px;color:#999;transition:color .2s;flex-shrink:0}.reply-preview-close:hover{color:#666}.chat-modal-input-row{display:flex;gap:12px;align-items:center}.chat-modal-input input{flex:1;padding:14px 18px;border:1px solid #e5e5e7;border-radius:12px;outline:none;font-size:16px;color:#1a1a1d;transition:all .2s;height:44px}.chat-modal-input input::placeholder{color:#999}.chat-modal-input input:focus{border-color:#5b7fff;box-shadow:0 0 0 3px #5b7fff1a}.chat-modal-input input:disabled{opacity:.6;cursor:not-allowed;background:#f5f5f7}.send-button{width:40px;height:40px;border-radius:50%;background:#5b7fff;border:none;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s}.send-button:hover:not(:disabled){background:#4a6fee;transform:scale(1.05)}.send-button:disabled{opacity:.4;cursor:not-allowed}.chat-modal-messages::-webkit-scrollbar{width:6px}.chat-modal-messages::-webkit-scrollbar-thumb{background:#d1d1d6;border-radius:3px}@media(max-width:640px){.chat-modal{width:100%;height:100dvh;max-height:100dvh;border-radius:12px 12px 0 0;margin:0}}.action-status{margin-top:8px;margin-bottom:4px;padding:6px 10px;border-radius:6px;font-size:.8em;font-weight:500}.action-status-submitted{background:#fef3c7;color:#92400e;border:1px solid #fde68a}.action-status-success{background:#d1fae5;color:#065f46;border:1px solid #a7f3d0}.action-status-fail{background:#fee2e2;color:#991b1b;border:1px solid #fca5a5}.action-form{background:#f8f9fb;border:1px solid #e2e6ea;border-radius:10px;padding:12px;margin-top:8px;margin-bottom:8px}.action-form-title{font-weight:600;font-size:.9em;margin-bottom:10px;color:#1a1a2e;display:flex;align-items:center;gap:6px}.action-form-general-error{background:#fef2f2;border:1px solid #fecaca;border-radius:8px;padding:10px 12px;margin-bottom:10px;font-size:.8em;color:#dc2626;font-weight:500;display:flex;align-items:center;gap:6px}.action-form-fields{display:flex;flex-direction:column;gap:8px}.action-form-field{display:flex;flex-direction:column;gap:3px}.action-form-field label{font-size:.75em;font-weight:500;color:#6b7280}.action-form-field input,.action-form-field textarea{padding:8px 10px;border:1px solid #d1d5db;border-radius:6px;font-size:16px;background:#fff;color:#1a1a2e;outline:none;transition:border-color .2s;font-family:inherit}.action-form-field textarea{resize:none;word-break:break-all}.action-form-field input:focus,.action-form-field textarea:focus{border-color:#0b3988;box-shadow:0 0 0 2px #6c5ce726}.action-form-field input.error,.action-form-field textarea.error{border-color:#ef4444}.action-form-field input.readonly,.action-form-field textarea.readonly{background:#f3f4f6;color:#6b7280;cursor:not-allowed;border-color:#e5e7eb}.action-form-field .field-error{font-size:.7em;color:#ef4444;margin-top:1px}.action-form-actions{display:flex;gap:8px;margin-top:10px}.action-form-submit{flex:1;padding:8px 14px;background:#0b3988;color:#fff;border:none;border-radius:6px;font-size:.85em;font-weight:500;cursor:pointer;transition:background .2s}.action-form-submit:hover:not(:disabled){background:#5a4bd1}.action-form-submit:disabled{background:#a5b4fc;cursor:not-allowed}.action-form-cancel{padding:8px 14px;background:transparent;color:#6b7280;border:1px solid #d1d5db;border-radius:6px;font-size:.85em;font-weight:500;cursor:pointer;transition:all .2s}.action-form-cancel:hover{background:#f3f4f6;color:#374151}.action-form-token-info{background:#eef2ff;border:1px solid #c7d2fe;border-radius:8px;padding:8px 10px;margin-bottom:10px}.token-info-row{display:flex;align-items:center;gap:8px}.token-info-logo{border-radius:50%;flex-shrink:0}.token-info-details{display:flex;flex-direction:column;gap:2px;min-width:0}.token-info-name{font-size:.8em;font-weight:600;color:#1a1a2e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.token-info-balance{font-size:.75em;color:#4b5563}.token-info-usd{color:#0b3988;font-weight:500}.action-form-field-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.action-form-field-header .action-form-field-label{margin-bottom:0;font-size:12px}.action-form-pct-btns{display:inline-flex;gap:4px}.action-form-pct-btn{padding:1px 6px;font-size:.7em;font-weight:600;color:#0b3988;background:#eef2ff;border:1px solid #c7d2fe;border-radius:4px;cursor:pointer;transition:all .15s}@media(min-width:640px){.action-form-pct-btn:hover:not(:disabled){background:#0b3988;color:#fff}}.action-form-pct-btn:disabled{opacity:.5;cursor:not-allowed}.action-form-max-btn{font-weight:700}.action-form-nft-info{margin-bottom:10px;text-align:center;display:flex;align-items:center;justify-content:center}.nft-info-image{width:80px;height:80px;border-radius:8px;object-fit:contain;background:#e5e7eb;padding:4px}.scroll-to-bottom-btn{position:absolute;bottom:16px;right:20px;background:#1a1a1dd6;color:#fff;border:1px solid rgba(255,255,255,.12);border-radius:50%;width:36px;height:36px;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px #00000040;z-index:20;transition:background .15s,transform .15s,box-shadow .15s;animation:fadeInUp .18s ease}@keyframes fadeInUp{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@media(min-width:640px){.scroll-to-bottom-btn:hover{background:#2d2d35;box-shadow:0 6px 16px #0000004d;transform:scale(1.08)}}.scroll-to-bottom-btn:active{transform:scale(.96)}.message-content{display:block;word-wrap:break-word;overflow-wrap:break-word;max-width:100%;overflow:hidden;font-size:inherit;line-height:1.5}.mc-line{min-height:1.2em;word-break:break-word}.mc-empty-line{height:.5em}.mc-heading{font-weight:600;margin:.3em 0;word-break:break-word}.mc-h1{font-size:1.4em}.mc-h2{font-size:1.2em}.mc-h3{font-size:1.05em}.mc-inline-code{background:#afb8c133;padding:1px 5px;border-radius:3px;font-family:Monaco,Menlo,Ubuntu Mono,Consolas,monospace;font-size:.88em}.mc-codeblock{background:#f6f8fa;border:1px solid #d0d7de;border-radius:6px;margin:6px 0;overflow:hidden;max-width:100%}.mc-codeblock-lang{background:#e8ecf0;padding:3px 10px;font-size:.75em;font-weight:600;color:#57606a;text-transform:uppercase;font-family:Monaco,Menlo,monospace;border-bottom:1px solid #d0d7de}.mc-codeblock pre{margin:0;padding:10px;overflow-x:auto}.mc-codeblock code{font-family:Monaco,Menlo,Ubuntu Mono,Consolas,monospace;font-size:.85em;line-height:1.5;color:#24292f;white-space:pre}.mc-link{color:#0969da;text-decoration:none;word-break:break-word}.mc-link:hover{text-decoration:underline}.mc-image{max-width:150px;width:150px;height:150px;object-fit:contain;border-radius:8px;margin:8px 0;display:block}.mc-image-inline{width:20px;height:20px;border-radius:50%;margin:0 4px;display:inline-block;vertical-align:middle;object-fit:cover}.mc-blockquote{margin:4px 0;padding:2px 0 2px 12px;color:#57606a;border-left:3px solid #d0d7de}.mc-hr{height:1px;border:0;background:#d0d7de;margin:.4em 0}.message-content strong{font-weight:600}.message-content del{text-decoration:line-through}.mc-link-previews{display:flex;flex-direction:column;gap:6px;margin-top:6px}")),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}}();
2
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react/jsx-runtime"),require("react")):"function"==typeof define&&define.amd?define(["exports","react/jsx-runtime","react"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ChatWidgetSDK={},e.jsxRuntime,e.React)}(this,function(e,t,n){"use strict";const o={en:{chatTitle:"Keyring Agent",closeChat:"Close chat",messagePlaceholder:"Message ....",sendMessage:"Send message",botIsTyping:"Bot is typing",canIHelpYou:"Can I help you with anything?",replyToMessage:"Reply to message",replyingTo:"Replying to",replyingToYou:"You",replyingToAgent:"Keyring Agent",cancelReply:"Cancel reply",suggestionAskText:"Ask a question",suggestionAskUserMessage:"I have a question",suggestionAskBotReply:"Ask me anything",suggestionBuyText:"Buy trending token",walletConnectedChainUnsupported:"Your wallet is connected but the chain is not supported for trading. Please switch to a supported chain to see trending tokens.",walletNotConnected:"Please connect your wallet to see trending tokens.",actionProcessing:"⏳ Processing transaction...",actionSuccess:"✅ Transaction completed",actionFail:"❌ Action cancelled or failed",txSubmitted:"⏳ Transaction submitted. Waiting for confirmation...",txConfirmed:"✅ Transaction confirmed!",txReverted:"❌ Transaction reverted on-chain.",txTimeout:"⚠️ Transaction submitted but confirmation timed out. Please check manually.",txSuccessful:"✅ Transaction successful!",txFailed:"❌ Transaction failed. Please try again.",txNoHandler:"⚠️ No transaction handler configured.",txInsufficientGas:"⚠️ **Insufficient {symbol} for gas!** You have {balance} {symbol} but need ~{fee} {symbol} for the transaction fee. Please top up your wallet and try again.",txError:"❌ Error: {message}",swapConfirmButton:"Confirm",swapConfirmValue:"Confirm swap",swapReadyToProceed:"Ready to proceed with the swap?",swapEstimationError:"⚠️ Unable to get swap estimation. Error: {error}",formCancel:"Cancel",formExecute:"Execute",formProcessing:"⏳ Processing...",formBalance:"Balance:",formTokenNotFound:"Token not found in your wallet.",formNoBalance:"You have no {symbol} balance in your wallet.",formInsufficientBalance:"Insufficient balance. Spendable: {balance} {symbol}",formFieldRequired:"{field} is required",formInvalidAddress:"Invalid address (Must contain 0x and 40 hex chars)",formMustBePositive:"Must be a positive number",formMustBeValidNumber:"Must be a valid number",openChat:"Open chat",openChatTitle:"Open chat support",walletBalanceSpendable:"This is the spendable balance of your wallet on {chain} chain. Please choose the coins you want to use for this trade.",walletNoTokensFound:"Sorry, I couldn't find any tokens in your wallet on {chain} chain. Please make sure you have some tokens to trade.",walletFetchFailed:"Sorry, I could not fetch your wallet balance. Please try again.",walletFetchError:"Sorry, I encountered an error fetching your wallet balance.",insufficientFeeToken:"Insufficient fee. Please ensure you have enough {symbol} to cover the transaction fees, or select a different token.",selectAmountOf:"Select the amount of {symbol} to use:\n\nSpendable: {balance} {symbol}",swapFeeWarning:"\n⚠️ **Insufficient {symbol} for fees!**\n You have {balance} {symbol} but need ~{needed} {symbol}.\n",swapNeedApprove:"You need to approve {symbol} first before swapping.",swapApproveButton:"Approve {symbol}",swapApproveValue:"Approve {symbol} for swap",swapNoSourceToken:"⚠️ You don't have the source token in your wallet or balance is 0.",swapSelectAmount:"Swap {from} → {to}\n\nSelect the amount of {from} to swap:\n\nSpendable: {balance} {from}",swapApprovalRequired:"⚠️ Token approval required before swapping.\n\nStep 1: Approve {symbol}\nStep 2: Confirm Swap",swapEstimationFailed:"⚠️ Failed to get swap estimation. Please try again.",swapInsufficientNativeBalance:"⚠️ Insufficient balance! You have {balance} {symbol} but need {amount} {symbol}. Please top up your wallet or reduce the amount.",swapTokenNotInWallet:"⚠️ You don't have {symbol} in your wallet. Please acquire some first before swapping.",swapInsufficientTokenBalance:"⚠️ Insufficient balance! You have {balance} {symbol} but need {amount} {symbol}. Please reduce the amount or add more tokens.",selectAmountToSwap:"Select the amount of {symbol} to swap:\n\nSpendable: {balance} {symbol}",couldNotLoadTokenList:"⚠️ Could not load token list. Please specify the destination token.",trendingTokensForReceive:"📈 Trending tokens on {chain} chain. Pick the token you want to receive or type the token you want to receive:",txProcessing:"⏳ Transaction processing... Please confirm in your wallet.",txConfirmedSwap:"✅ Transaction confirmed! Your swap has been completed.",txRevertedSwap:"❌ Transaction reverted on-chain. Please try again.",txSuccessfulSwap:"✅ Transaction successful! Your swap has been completed.",txSuccessfulSendToken:"✅ Sent successfully **{amount} {symbol}** to {to}",txSuccessfulSendNative:"✅ Sent successfully **{amount} {symbol}** to {to}",txSuccessfulSendNft:"✅ Sent successfully NFT **{name}** (#{tokenId}) to {to}",txSuccessfulWrapNative:"✅ Wrapped successfully **{amount} {from}** → **{to}**",txSuccessfulUnwrapNative:"✅ Unwrapped successfully **{amount} {from}** → **{to}**",txDataNotAvailable:"⚠️ Transaction data not available.",approvalDataNotAvailable:"⚠️ Approval data not available.",approving:"Approving {symbol}... Please confirm in your wallet.",approvalSuccess:"✅ {symbol} approved successfully!",approvalConfirmSwap:"Now you can execute the swap.",confirmSwapButton:"Confirm Swap",approvalFailed:"❌ Approval failed. Please try again.",couldNotFetchBalance:"⚠️ Could not fetch your wallet balance.",couldNotLoadBalance:"⚠️ Could not load balance. Please try again.",couldNotFetchBalanceRetry:"⚠️ Could not fetch your balance. Please try again.",nftSendReview:"📤 Send **{name}** ({standard} #{tokenId})\n\nPlease review and fill in the recipient address below:",nftCollectionHeader:"Your NFTs :\n\n{list}",nftMoreItems:"\n\nAnd {count} more NFTs...",nftSelectBelow:"\n\nSelect an NFT below to send",nftNoCollection:"You don't have any NFTs in your wallet on this chain.",nftMultipleMatchesForTokenId:"I found {count} NFTs with Token ID #{tokenId} in your wallet. Please select the one you want to send:",nftNotFoundInWallet:"I couldn't find \"{name}\" in your NFT collection. You don't own this NFT on this chain.",nftFetchError:"Sorry, I encountered an error fetching your NFTs.",trendingTokensHeader:"📈 Here is the list of tokens that are currently trending upwards on {chain} chain",trendingTokensQuestion:"\nIs there any token you want to buy?",trendingTokensError:"Sorry, I encountered an error fetching trending tokens.",errorProcessingRequest:"Sorry, I encountered an error processing your request.Please try again in a few moments.",buttonBuyWith:"Buy with {symbol}",buttonUsePercent:"Use {percent}% of {symbol}",buttonBuyToken:"Buy {name} ({symbol})",buttonSendNft:"Send {name}",buttonSwapTo:"Swap to {name} ({symbol})",buttonBuySymbol:"Buy {symbol}",viewBalancesLoading:"Fetching your wallet balances...",viewBalancesHeader:"Your token balances on {chain}:\n\n{list}",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}",formMax:"MAX",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!",sendTokenNotInWallet:"You don't have {symbol} in your wallet on this chain. Please acquire some first before sending.",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! 🚀**\nYou’re now connected and ready to explore the world of Blockchain. I can assist you anytime with NFT insights, trading, price tracking, and portfolio analysis.",sendOtherNfts:"\nIf the NFT you want to send is not in the list above, please visit our website to send it.",sendNftViaWebsite:"Please select the NFT you would like to send from the list and proceed via this website.",sendNftViaWebsiteWithLink:"Please select the NFT you would like to send from the list and proceed via [this website]({link}).",viewNftViaWebsite:"Please view your NFT collection on this website for more details.",viewNftViaWebsiteWithLink:"Please view your NFT collection on [this website]({link}) for more details.",buyingOnChain:"Buying {symbol} on {chain}",viewOnExplorer:"View on Explorer",copyWalletAddress:"Copy wallet address",copied:"Copied!",copyAddress:"Copy address",poolGeneralInfoIntro:"💧 **Liquidity Pools** are smart contracts where users deposit token pairs to provide liquidity for DEX trading (like Uniswap). Liquidity providers (LPs) earn trading fees from each swap.",poolGeneralInfoMetricsTitle:"**Key Metrics:**",poolGeneralInfoMetricTVL:"**TVL** - Total Value Locked in the pool",poolGeneralInfoMetricAPR:"**APR** - Estimated annual return from fees",poolGeneralInfoMetricVol24h:"**Volume 24h** - Trading volume in last 24 hours",poolGeneralInfoMetricFeeTier:"**Fee Tier** - Trading fee (0.01%, 0.05%, 0.3%, 1%)",poolGeneralInfoTryAsk:'Try asking something specific, like: *"ETH/USDC pools on Base"* or *"Highest APR pools"*.',poolNoMatch:"❌ No matching pools found.",poolNoMatchForTokenOnChain:"❌ No matching pools found for **{token}** on **{chain}**.",poolSuggestionsTitle:"💡 **Suggestions:**",poolSuggestionTryChain:"Try a different chain (Ethereum, Base, Arbitrum...)",poolSuggestionTryPair:"Try a more popular pair (ETH/USDC, ETH/USDT)",poolSuggestionRelaxFilters:"Remove filters if too narrow",poolHeaderBest:"🏆 Best Pool",poolHeaderSafe:"🛡️ Safest Pools",poolHeaderTrending:"🔥 Trending Pools",poolHeaderHighApr:"📈 Highest APR Pools",poolHeaderLowFee:"💰 Lowest Fee Pools",poolHeaderCompare:"⚖️ Pool Comparison",poolHeaderDetail:"🔎 Pool Details",poolHeaderGeneral:"💧 Pool Info",poolHeaderSearch:"🔍 Search Results",poolTableMetric:"Metric",poolTableValue:"Value",poolTableLink:"Link",poolLinkView:"View on Uniswap",poolRecommendationHighApr:"👉 **Recommended:** [{pair}]({link}) - Highest APR at **{apr}%**. _Note: Higher APR may come with higher risk._",poolRecommendationLowFee:"👉 **Recommended:** [{pair}]({link}) - Lowest fee at **{fee}%**, ideal for frequent trading.",poolRecommendationSafe:"👉 **Recommended:** [{pair}]({link}) - Highest TVL at **{tvl}**, deep liquidity and stable.",poolRecommendationTrending:"👉 **Most Active:** [{pair}]({link}) - 24h Volume **{volume}**, highest trading activity.",poolRecommendationTopPick:"👉 **Top pick:** [{pair}]({link}) - TVL **{tvl}**, best match for your criteria.",sendPositionNoId:'Please provide your LP position ID to send it. For example: "send position 12345 to 0x...".',sendPositionNotFound:"Position #{id} was not found in your wallet on {chain}. Please make sure you own this position.",sendPositionReview:"📤 Send LP Position **#{positionId}** ({pair})\n\nPlease enter the recipient address below:",sendPositionFetchError:"Error fetching your positions. Please try again.",poolUnsupportedChain:"This chain is not supported for data queries. Sorry for the inconvenience.",poolUniswapV3Only:"I can only get information of pools that is on Uniswap ver 3."},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文字である必要があります)",formMustBePositive:"正の数値を入力してください",formMustBeValidNumber:"有効な数値を入力してください",openChat:"チャットを開く",openChatTitle:"チャットサポートを開く",walletBalanceSpendable:"これは {chain} チェーン上のウォレットの利用可能な残高です。この取引に使用するコインを選択してください。",walletNoTokensFound:"申し訳ありませんが、{chain} チェーン上のウォレットにトークンが見つかりませんでした。取引するためのトークンを保有しているかご確認ください。",walletFetchFailed:"ウォレット残高を取得できませんでした。もう一度お試しください。",walletFetchError:"ウォレット残高の取得中にエラーが発生しました。",insufficientFeeToken:"手数料が不足しています。取引手数料をカバーするのに十分な {symbol} を保有しているか、別のトークンを選択してください。",selectAmountOf:"使用する {symbol} の数量を選択してください:\n\n利用可能: {balance} {symbol}",swapFeeWarning:"\n⚠️ **手数料の {symbol} が不足しています!**\n 保有量は {balance} {symbol} ですが、~{needed} {symbol} 必要です。\n",swapNeedApprove:"スワップを行う前に、まず {symbol} の承認が必要です。",swapApproveButton:"{symbol} を承認する",swapApproveValue:"スワップのために {symbol} を承認",swapNoSourceToken:"⚠️ ウォレットにソーストークンがないか、残高が 0 です。",swapSelectAmount:"スワップ {from} → {to}\n\nスワップする {from} の数量を選択してください:\n\n利用可能: {balance} {from}",swapApprovalRequired:"⚠️ スワップの前にトークンの承認が必要です。\n\nステップ 1: {symbol} を承認\nステップ 2: スワップを確定",swapEstimationFailed:"⚠️ スワップの見積もり取得に失敗しました。もう一度お試しください。",swapInsufficientNativeBalance:"⚠️ 残高不足です! 保有量は {balance} {symbol} ですが、{amount} {symbol} 必要です。ウォレットにチャージするか、数量を減らしてください。",swapTokenNotInWallet:"⚠️ ウォレットに {symbol} がありません。スワップする前にまず入手してください。",swapInsufficientTokenBalance:"⚠️ 残高不足です! 保有量は {balance} {symbol} ですが、{amount} {symbol} 必要です。数量を減らすか、トークンを追加してください。",selectAmountToSwap:"スwaップする {symbol} の数量を選択してください:\n\n利用可能: {balance} {symbol}",couldNotLoadTokenList:"⚠️ トークンリストを読み込めませんでした。受け取り希望のトークンを指定してください。",trendingTokensForReceive:"📈 {chain} チェーンのトレンドトークン。受け取りたいトークンを選択するか、入力してください:",txProcessing:"⏳ トランザクション処理中... ウォレットで承認してください。",txConfirmedSwap:"✅ トランザクションが確認されました!スワップが完了しました。",txRevertedSwap:"❌ オンチェーンでトランザクションがリバートされました。もう一度お試しください。",txSuccessfulSwap:"✅ トランザクションに成功しました!スワップが完了しました。",txSuccessfulSendToken:"✅ **{amount} {symbol}** を {to} に送信しました",txSuccessfulSendNative:"✅ **{amount} {symbol}** を {to} に送信しました",txSuccessfulWrapNative:"✅ **{amount} {from}** を **{to}** にラップしました",txSuccessfulUnwrapNative:"✅ **{amount} {from}** を **{to}** にアンラップしました",txSuccessfulSendNft:"✅ NFT **{name}** (#{tokenId}) を {to} に送信しました",txDataNotAvailable:"⚠️ トランザクションデータが利用できません。",approvalDataNotAvailable:"⚠️ 承認データが利用できません。",approving:"{symbol} を承認中... ウォレットで確認してください。",approvalSuccess:"✅ {symbol} の承認に成功しました!",approvalConfirmSwap:"これでスワップを実行できます。",confirmSwapButton:"スワップを確定する",approvalFailed:"❌ 承認に失敗しました。もう一度お試しください。",couldNotFetchBalance:"⚠️ ウォレット残高を取得できませんでした。",couldNotLoadBalance:"⚠️ 残高を読み込めませんでした。もう一度お試しください。",couldNotFetchBalanceRetry:"⚠️ 残高を取得できませんでした。もう一度お試しください。",nftSendReview:"📤 **{name}** ({standard} #{tokenId}) を送信\n\n内容を確認し、以下に受信者のアドレスを入力してください:",nftCollectionHeader:"您的 NFT 资产:\n\n{list}",nftMoreItems:"\n\n以及其他 {count} 件 NFT...",nftSelectBelow:"\n\n请在下方选择要发送的 NFT",nftNoCollection:"このチェーン上のウォレットにNFTは見つかりませんでした。",nftMultipleMatchesForTokenId:"ウォレット内にToken ID #{tokenId} のNFTが{count}件見つかりました。送信したいNFTを選択してください:",nftNotFoundInWallet:'あなたのNFTコレクションに "{name}" が見つかりませんでした。このチェーンでこのNFTを所有していません。',nftFetchError:"申し訳ありませんが、NFTの取得中にエラーが発生しました。",trendingTokensHeader:"📈 {chain} チェーンで現在価格が上昇中のトレンドトークン一覧です:",trendingTokensQuestion:"\n購入したいトークンはありますか?",trendingTokensError:"トレンドトークンの取得中にエラーが発生しました。",errorProcessingRequest:"リクエストの処理中にエラーが発生しました。しばらく時間を置いてからもう一度お試しください。",buttonBuyWith:"{symbol} で購入",buttonUsePercent:"{symbol}の{percent}%を使用",buttonBuyToken:"{name} ({symbol}) を購入",buttonSendNft:"{name} を送信",buttonSwapTo:"{name} ({symbol}) にスワップ",buttonBuySymbol:"{symbol} を購入",viewBalancesLoading:"ウォレットの残高を取得中...",viewBalancesHeader:"{chain} 上のトークン残高:\n\n{list}",viewBalancesEmpty:"このチェーン上のウォレットにトークンは見つかりませんでした。",viewBalancesFetchError:"残高の取得中にエラーが発生しました。",buttonSendToken:"{symbol} を送信",formMax:"最大",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コレクションを表示します!",sendTokenNotInWallet:"このチェーンのウォレットに {symbol} がありません。送信する前にまず入手してください。",sendTokenChoose:"どのトークンを送信しますか?",sendNftChoose:"どのNFTを送信しますか?",swapChooseToken:"どのトークンをスワップしますか?現在の残高はこちらです:",spendable:"利用可能",welcomeMessage:"**ようこそ! 🚀**\n次世代のブロックチェーンへ。NFT情報、トレード、価格チェック、ポートフォリオ分析など、いつでもお手伝いします。",sendOtherNfts:"\n送信したいNFTが上記のリストにない場合は、当ウェブサイトにアクセスして送信してください。",sendNftViaWebsite:"送信したいNFTをリストから選択し、当ウェブサイトで手続きを進めてください。",sendNftViaWebsiteWithLink:"送信したいNFTをリストから選択し、[当ウェブサイト]({link})で手続きを進めてください。",viewNftViaWebsite:"NFTコレクションの詳細は、当ウェブサイトでご確認ください。",viewNftViaWebsiteWithLink:"NFTコレクションの詳細は、[当ウェブサイト]({link})でご確認ください。",buyingOnChain:"{chain} チェーンで {symbol} を購入中",viewOnExplorer:"エクスプローラーで見る",copyWalletAddress:"ウォレットアドレスをコピー",copied:"コピーしました!",copyAddress:"アドレスをコピー",poolGeneralInfoIntro:"💧 **流動性プール** は、ユーザーがトークンペアを預けてDEX取引(Uniswap など)の流動性を提供するスマートコントラクトです。LP は各スワップの手数料を獲得します。",poolGeneralInfoMetricsTitle:"**主要メトリクス:**",poolGeneralInfoMetricTVL:"**TVL** - プールにロックされている総価値",poolGeneralInfoMetricAPR:"**APR** - 手数料に基づく年間想定利回り",poolGeneralInfoMetricVol24h:"**24時間出来高** - 直近24時間の取引量",poolGeneralInfoMetricFeeTier:"**手数料ティア** - 取引手数料 (0.01%, 0.05%, 0.3%, 1%)",poolGeneralInfoTryAsk:'例: *"Base の ETH/USDC プール"* や *"APR が高いプール"* のように聞いてみてください。',poolNoMatch:"❌ 条件に一致するプールが見つかりませんでした。",poolNoMatchForTokenOnChain:"❌ **{chain}** 上で **{token}** に一致するプールが見つかりませんでした。",poolSuggestionsTitle:"💡 **提案:**",poolSuggestionTryChain:"別のチェーンを試す (Ethereum, Base, Arbitrum...)",poolSuggestionTryPair:"より一般的なペアを試す (ETH/USDC, ETH/USDT)",poolSuggestionRelaxFilters:"フィルター条件を緩める",poolHeaderBest:"🏆 最適なプール",poolHeaderSafe:"🛡️ 安全性の高いプール",poolHeaderTrending:"🔥 トレンドプール",poolHeaderHighApr:"📈 APRの高いプール",poolHeaderLowFee:"💰 手数料の低いプール",poolHeaderCompare:"⚖️ プール比較",poolHeaderDetail:"🔎 プール詳細",poolHeaderGeneral:"💧 プール情報",poolHeaderSearch:"🔍 検索結果",poolTableMetric:"指標",poolTableValue:"値",poolTableLink:"リンク",poolLinkView:"Uniswapで表示",poolRecommendationHighApr:"👉 **おすすめ:** [{pair}]({link}) - APR は **{apr}%** で最も高いです。_注意: APR が高いほどリスクも高い可能性があります。_",poolRecommendationLowFee:"👉 **おすすめ:** [{pair}]({link}) - 手数料 **{fee}%** で、頻繁な取引に適しています。",poolRecommendationSafe:"👉 **おすすめ:** [{pair}]({link}) - TVL **{tvl}** で流動性が厚く安定しています。",poolRecommendationTrending:"👉 **最も活発:** [{pair}]({link}) - 24時間出来高 **{volume}** で取引が最も活発です。",poolRecommendationTopPick:"👉 **トップ候補:** [{pair}]({link}) - TVL **{tvl}**、条件に最も適合しています。",sendPositionNoId:'LP ポジション ID を提供してください。例:"ポジション 12345 を 0x... に送信"。',sendPositionNotFound:"{chain} 上のウォレットにポジション #{id} が見つかりませんでした。このポジションを所有していることを確認してください。",sendPositionReview:"📤 LP ポジション **#{positionId}** ({pair}) を送信\n\n受取人アドレスを以下に入力してください:",sendPositionFetchError:"ポジションの取得中にエラーが発生しました。もう一度お試しください。",poolUnsupportedChain:"このチェーンはデータクエリに対応していません。ご不便をおかけして申し訳ございません。",poolUniswapV3Only:"Uniswap v3上のプールの情報のみ取得できます。"},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} 数量:\n\n可用余额: {balance} {symbol}",swapFeeWarning:"\n⚠️ **手续费所需的 {symbol} 不足!**\n 您当前有 {balance} {symbol},但需要 ~{needed} {symbol}。\n",swapNeedApprove:"在兑换之前,您需要先授权 {symbol}。",swapApproveButton:"授权 {symbol}",swapApproveValue:"授权 {symbol} 以进行兑换",swapNoSourceToken:"⚠️ 您的钱包中没有源代币或余额为 0。",swapSelectAmount:"兑换 {from} → {to}\n\n选择要兑换的 {from} 数量:\n\n可用余额: {balance} {from}",swapApprovalRequired:"⚠️ 兑换前需要代币授权。\n\n第 1 步:授权 {symbol}\n第 2 步:确认兑换",swapEstimationFailed:"⚠️ 获取兑换估算失败。请重试。",swapInsufficientNativeBalance:"⚠️ 余额不足!您有 {balance} {symbol} 但需要 {amount} {symbol}。请充值钱包或减少金额。",swapTokenNotInWallet:"⚠️ 您的钱包中没有 {symbol}。请在兑换前先获取一些代币。",swapInsufficientTokenBalance:"⚠️ 余额不足!您有 {balance} {symbol} 但需要 {amount} {symbol}。请减少金额或添加更多代币。",selectAmountToSwap:"选择要兑换的 {symbol} 数量:\n\n可用余额: {balance} {symbol}",couldNotLoadTokenList:"⚠️ 无法加载代币列表。请指定目标代币。",trendingTokensForReceive:"📈 {chain} 链上的热门代币。请选择您想收到的代币或输入代币名称:",txProcessing:"⏳ 交易处理中... 请在钱包中确认。",txConfirmedSwap:"✅ 交易已确认!您的兑换已完成。",txRevertedSwap:"❌ 交易在链上被退回。请重试。",txSuccessfulSwap:"✅ 交易成功!您的兑换已完成。",txSuccessfulSendToken:"✅ 已成功发送 **{amount} {symbol}** 至 {to}",txSuccessfulSendNative:"✅ 已成功发送 **{amount} {symbol}** 至 {to}",txSuccessfulWrapNative:"✅ 成功封装 **{amount} {from}** → **{to}**",txSuccessfulUnwrapNative:"✅ 成功解封装 **{amount} {from}** → **{to}**",txSuccessfulSendNft:"✅ 已成功发送 NFT **{name}** (#{tokenId}) 至 {to}",txDataNotAvailable:"⚠️ 交易数据不可用。",approvalDataNotAvailable:"⚠️ 授权数据不可用。",approving:"正在授权 {symbol}... 请在钱包中确认。",approvalSuccess:"✅ {symbol} 授权成功!",approvalConfirmSwap:"现在您可以执行兑换了。",confirmSwapButton:"确认兑换",approvalFailed:"❌ 授权失败。请重试。",couldNotFetchBalance:"⚠️ 无法获取您的钱包余额。",couldNotLoadBalance:"⚠️ 无法加载余额。请重试。",couldNotFetchBalanceRetry:"⚠️ 无法获取您的余额。请重试。",nftSendReview:"📤 发送 **{name}** ({standard} #{tokenId})\n\n请核对并在下方填写接收者地址:",nftCollectionHeader:"保有中のNFT一覧 :\n\n{list}",nftMoreItems:"\n\n他 {count} 件のNFT...",nftSelectBelow:"\n\n送信するNFTを以下から選択してください",nftNoCollection:"您在该链的钱包中没有任何 NFT。",nftMultipleMatchesForTokenId:"在您的钱包中找到了 {count} 个 Token ID #{tokenId} 的 NFT。请选择您要发送的 NFT:",nftNotFoundInWallet:'我在您的 NFT 收藏中没找到 "{name}"。您在此链上不拥有此 NFT。',nftFetchError:"抱歉,获取您的 NFT 时出错。",trendingTokensHeader:"📈 以下是 {chain} 链上目前呈上升趋势的热门代币列表",trendingTokensQuestion:"\n有您想购买的代币吗?",trendingTokensError:"抱歉,获取热门代币时出错。",errorProcessingRequest:"抱歉,处理您的请求时出错。请稍后再试。",buttonBuyWith:"使用 {symbol} 购买",buttonUsePercent:"使用{percent}%的{symbol}",buttonBuyToken:"购买 {name} ({symbol})",buttonSendNft:"发送 {name}",buttonSwapTo:"兑换为 {name} ({symbol})",buttonBuySymbol:"购买 {symbol}",viewBalancesLoading:"正在获取您的钱包余额...",viewBalancesHeader:"您在 {chain} 上的代币余额:\n\n{list}",viewBalancesEmpty:"您在该链的钱包中没有任何代币。",viewBalancesFetchError:"抱歉,获取您的余额时出错。",buttonSendToken:"发送 {symbol}",formMax:"最多",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 收藏!",sendTokenNotInWallet:"您的钱包中在此链上没有 {symbol}。请在发送前先获取一些代币。",sendTokenChoose:"您想发送哪个代币?",sendNftChoose:"您想发送哪个 NFT?",swapChooseToken:"您想兑换哪个代币?以下是您的当前余额:",spendable:"可用余额",welcomeMessage:"**欢迎您!🚀**\n带你一起探索新一代区块链世界。我可以随时为您提供NFT资讯、交易支持、价格查询以及投资组合分析等服务。",sendOtherNfts:"\n如果您想发送的NFT不在上述列表中,请访问我们的网站进行发送。",sendNftViaWebsite:"请从列表中选择您想发送的NFT,并通过这个网站继续操作。",sendNftViaWebsiteWithLink:"请从列表中选择您想发送的NFT,并通过[这个网站]({link})继续操作。",viewNftViaWebsite:"如需查看更多详情,请在这个网站查看您的NFT收藏。",viewNftViaWebsiteWithLink:"如需查看更多详情,请在[这个网站]({link})查看您的NFT收藏。",buyingOnChain:"正在 {chain} 链上购买 {symbol}",viewOnExplorer:"在区块浏览器查看",copyWalletAddress:"复制钱包地址",copied:"已复制!",copyAddress:"复制地址",poolGeneralInfoIntro:"💧 **流动性池** 是用户存入代币对、为 DEX(如 Uniswap)提供流动性的智能合约。流动性提供者(LP)可从每笔兑换中获得手续费收益。",poolGeneralInfoMetricsTitle:"**关键指标:**",poolGeneralInfoMetricTVL:"**TVL** - 池中锁仓总价值",poolGeneralInfoMetricAPR:"**APR** - 基于手续费估算的年化收益",poolGeneralInfoMetricVol24h:"**24小时成交量** - 最近24小时交易量",poolGeneralInfoMetricFeeTier:"**费率档位** - 交易费率 (0.01%, 0.05%, 0.3%, 1%)",poolGeneralInfoTryAsk:'你可以更具体地提问,例如:*"Base 上的 ETH/USDC 池"* 或 *"APR 最高的池"*。',poolNoMatch:"❌ 未找到匹配的流动性池。",poolNoMatchForTokenOnChain:"❌ 在 **{chain}** 上未找到 **{token}** 的匹配池。",poolSuggestionsTitle:"💡 **建议:**",poolSuggestionTryChain:"尝试其他链(Ethereum、Base、Arbitrum...)",poolSuggestionTryPair:"尝试更热门的交易对(ETH/USDC、ETH/USDT)",poolSuggestionRelaxFilters:"放宽筛选条件",poolHeaderBest:"🏆 最佳流动性池",poolHeaderSafe:"🛡️ 更稳健的流动性池",poolHeaderTrending:"🔥 热门流动性池",poolHeaderHighApr:"📈 高 APR 流动性池",poolHeaderLowFee:"💰 低费率流动性池",poolHeaderCompare:"⚖️ 流动性池对比",poolHeaderDetail:"🔎 流动性池详情",poolHeaderGeneral:"💧 流动性池信息",poolHeaderSearch:"🔍 搜索结果",poolTableMetric:"指标",poolTableValue:"数值",poolTableLink:"链接",poolLinkView:"在 Uniswap 查看",poolRecommendationHighApr:"👉 **推荐:**[{pair}]({link}) - APR 最高,为 **{apr}%**。_注意:APR 越高通常风险也越高。_",poolRecommendationLowFee:"👉 **推荐:**[{pair}]({link}) - 费率仅 **{fee}%**,适合高频交易。",poolRecommendationSafe:"👉 **推荐:**[{pair}]({link}) - TVL 达 **{tvl}**,流动性更充足且相对稳定。",poolRecommendationTrending:"👉 **最活跃:**[{pair}]({link}) - 24 小时成交量 **{volume}**,交易最活跃。",poolRecommendationTopPick:"👉 **首选:**[{pair}]({link}) - TVL **{tvl}**,最符合你的筛选条件。",sendPositionNoId:'请提供您的 LP 仓位 ID 以便转出。例如:"发送仓位 12345 至 0x..."。',sendPositionNotFound:"在 {chain} 上的钱包中未找到仓位 #{id}。请确认您拥有该仓位。",sendPositionReview:"📤 发送 LP 仓位 **#{positionId}** ({pair})\n\n请在下方填写接收者地址:",sendPositionFetchError:"获取您的仓位时出错。请重试。",poolUnsupportedChain:"该链不支持数据查询,给您带来不便,深表歉意。",poolUniswapV3Only:"我只能获取 Uniswap v3 上的流动性池信息。"}};function i(e,t){return o[t]?.[e]??o.en[e]??e}const r=n.createContext(void 0),a=({children:e,initialLanguage:o="en"})=>{const[a,s]=n.useState(o);n.useEffect(()=>{o&&s(o)},[o]);const c=n.useCallback(e=>i(e,a),[a]),u=n.useCallback((e,t)=>function(e,t){return e.replace(/\{(\w+)\}/g,(e,n)=>t[n]??`{${n}}`)}(i(e,a),t),[a]);return t.jsx(r.Provider,{value:{language:a,setLanguage:s,t:c,ti:u},children:e})},s=()=>{const e=n.useContext(r);if(!e)throw new Error("useLanguage must be used within a LanguageProvider");return e},c=n.memo(({onClick:e,buttonSize:n=56,customIcon:o,customChatButton:i})=>{const{t:r}=s(),a=t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),e())};return i?t.jsx("div",{onClick:e,onKeyDown:a,role:"button",tabIndex:0,children:i}):t.jsx("button",{className:"chat-button",onClick:e,onKeyDown:a,"aria-label":r("openChat"),title:r("openChatTitle"),type:"button",style:{width:n,height:n,aspectRatio:1},children:t.jsx("img",{draggable:!1,style:{width:n,height:n,objectFit:"contain"},src:o||"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAABwCAYAAADG4PRLAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAfXSURBVHgB7Z1LbFRVGMe/c4YCAmKrEFiQWIIrNm13RE0olLRuTCq4w4C6Mbopo9GltFsVpmxQN1pJ2MkjcSMESrsgYdd2w8rGkrCA8GjFVintzPH878wZjrfzujPTe88p3y+ZzMydOxO4//s9z3dvBTWB7sxsqyTqF2q5k4R8nUh06s2thQeTZyZ4qOwU0bqJFkHjv6fbZqhBBNVJIJqiASFUN94SExl98CeVEsONiBlZQEu4E8QW1kTUSAvJoahCRhLw4OnZkyzc6qItcnD087ahWvevScB3MrPty6QuKaJOYuJgpoXEgVqsUVbboef07PElUhMsXqy045j3ZB72V9uxooCHtMskoUaIXWYS6GMuLyFsVdqprAuFeEqoQWISp1JcLClgz3fadFPyEjHuIMWH1wfafglvXiEgEhb4X2K36RpzOrHpCic2K2KgFu8GsXgu0opKILzxfwIeygfMdmKcBJXAwVOPBu1tRRdacJ1/EuM6c1kSu8fSbXN4U7TAJZUdJMYHWmUud8K8CSyQrc87ilYYWOCzXLabGJ8oWmEgoJRygBivEFLsD57ZffqLdqNtkt2nv8hctl8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iling the Truth of Liquidity Pools & Earn Over 20% APR. How Is This Possible?"},"answer":{"en":"The high APR of liquidity pools like Uniswap comes from: Trading fees, Compensation for impermanent loss, Yieldfarming incentives, Market volatility in high-trading-volume pools"}},{"question":{"en":"What Is a Liquidity Pool?"},"answer":{"en":"A liquidity pool is a smart contract that holds two tokens and facilitates swaps using an AMM model. Liquidity providers (LPs) deposit tokens and earn trading fees from transactions in the pool."}},{"question":{"en":"What Are the Benefits of Liquidity Providers?"},"answer":{"en":"Liquidity providers (LPs) earn passive income by supplying tokens to pools, benefiting from trading fees, improved capital efficiency, yield farming rewards, and permissionless participation, while also potentially increasing their total coin holdings over time."}},{"question":{"en":"Are There Any Risks?"},"answer":{"en":"Liquidity providers (LPs) face several key risks when providing liquidity: out-of-range risk, where prices move outside the set range causing liquidity to become inactive and stop earning fees; impermanent loss, where large price fluctuations reduce the value compared to simply holding assets; and asset imbalance, where one token becomes dominant, leaving the portfolio unbalanced."}},{"question":{"en":"What is CoinPool?"},"answer":{"en":"Simply access CoinPool to find the best high-APR pairs easily. Normally, before adding liquidity, users must swap assets to balance their holdings, but CoinPool simplifies this process."}},{"question":{"en":"How Do I Get Started?"},"answer":{"en":"For example, if you hold USDC and select the ETH/WBTC pair, CoinPool will automatically swap USDC into ETH and WBTC, then create a liquidity position for you, making it easy to provide liquidity to the pool."}},{"question":{"en":"Why Should You Use CoinPool?"},"answer":{"en":"CoinPool simplifies and optimizes earning potential by prioritizing high-APR pools to maximize returns, while handling all liquidity provisioning automatically—eliminating the need for manual swaps or rebalancing. With just a single asset deposit, CoinPool seamlessly manages the process to generate efficient passive income."}},{"question":{"en":"How It Works"},"answer":{"en":"CoinPool allows users to create an LP position with a single token, eliminating the need for direct access and manual operations on sites like Uniswap."}},{"question":{"en":"How do you manage Liquidity Positions (LPs)?"},"answer":{"en":"You can manage your LP position directly using the KEYRING PRO app. Since your LP NFT is linked to your wallet, CoinPool only provides smooth access to manage your position but does not hold or control your assets."}},{"question":{"en":"Why Should I Use the ‘High APR Pairs’ Feature?"},"answer":{"en":"The ‘High APR Pairs’ feature helps users quickly add liquidity to high-yield pools without needing to create a new pair, streamlining the liquidity provision process. Notice: Always select pairs from verified and reliable creators to ensure the best security and returns."}},{"question":{"en":"What is the Earnings Overview Dashboard?"},"answer":{"en":"The Earnings Overview Dashboard provides a clear summary of your liquidity value and earnings from providing liquidity, along with the average APR. It also allows you to view other users’ LP earnings and follow their strategies for insight and inspiration."}},{"question":{"en":"What tokens can I use to add liquidity?"},"answer":{"en":"CoinPool supports ETH. Users can use any of these assets, and CoinPool will automatically swap them into the required token pairs for liquidity provision."}},{"question":{"en":"How does CoinPool simplify liquidity provision?"},"answer":{"en":"Instead of manually swapping and balancing tokens, CoinPool automates the entire process. Users can simply deposit a single asset, and CoinPool will convert, balance, and provide liquidity in the selected pool, prioritizing those with the best APRs."}},{"question":{"en":"Can I create my own liquidity pool?"},"answer":{"en":"Yes! CoinPool allows users to create custom liquidity pools instead of joining existing ones. Users can also invite others to contribute liquidity to their pools."}},{"question":{"en":"How do I earn from providing liquidity?"},"answer":{"en":"Liquidity providers earn a share of trading fees generated by the pool.\\nTrading volume of the pool – Higher activity means more fees.\\nYour liquidity share – The more you contribute, the more you earn.\\nFee tier selection – Pools with higher fee tiers may generate higher earnings but attract fewer trades."}},{"question":{"en":"How do I choose the right fee tier when adding liquidity?"},"answer":{"en":"0.01% → Best for stablecoin pairs (e.g., USDT/USDC).\\n0.05% → Best for low-volatility tokens.\\n0.3% (Default) → Best for most trading pairs.\\n1% → Best for high-volatility, low-liquidity pairs.\\nIf unsure, check existing pools to see the most commonly used fee rate."}},{"question":{"en":"Can I lose money by providing liquidity?"},"answer":{"en":"Yes, the biggest risk is impermanent loss, which happens when token prices change significantly after you deposit them. However, this loss can be offset by the trading fees earned from the pool."}},{"question":{"en":"What happens if my liquidity goes out of range?"},"answer":{"en":"If you provide liquidity within a specific price range (Uniswap V3 model), your position can become inactive when the market price moves beyond your set range.\\nYou stop earning fees.\\nYour balance shifts toward one of the two tokens in the pair.\\nTo reactivate, you need to remove and re-add liquidity at a new range."}},{"question":{"en":"What is the difference between \'Collect Profit\' and \'Delete the Pair and Collect Profit\'?"},"answer":{"en":"\'Collect Profit\' – Withdraw only profit.\\n\'Delete the Pair and Collect Profit\' – Withdraw both initial liquidity and profit."}},{"question":{"en":"What is the URL of the CoinPool website?"},"answer":{"en":"The official website URL is https://coinpool.app/"}},{"question":{"en":"Where can I find pools with high volume-to-liquidity ratio?"},"answer":{"en":"You can find pools with a high volume-to-liquidity ratio on this page: https://coinpool.app/pool-ranking"}},{"question":{"en":"Where can I see my earnings or liquidity profits?"},"answer":{"en":"You can track your earnings and liquidity performance here: https://coinpool.app/earnings-overview"}},{"question":{"en":"Where can I view my NFT pools?"},"answer":{"en":"You can check your NFT pools on this page:https://coinpool.app/my-liquidity"}},{"question":{"en":"Where can I create or choose a pair to create a pool?"},"answer":{"en":"You can create or choose a pair to create a pool here: https://coinpool.app/pair"}},{"question":{"en":"About Fee Tiers"},"answer":{"en":"0.01% - Used for highly stable pairs like stablecoin-to-stablecoin.\\n0.05% - Used for relatively stable pairs such as ETH/stETH.\\n0.3% - Used for most standard trading pairs.\\n1% - Used for minor or highly volatile pairs, such as meme coins."}},{"question":{"en":"What is the Min Value?"},"answer":{"en":"Min is the lowest price of Token A in terms of Token B at which you are willing to provide liquidity.If the price drops below this level, your liquidity will not be used in the pool. This helps protect your assets from excessive price drops.\\nExample: You create an ETH/USDC pair and set Min = 2000 USDC/ETH. If ETH\'s price falls below 2000 USDC, your liquidity will no longer be used."}},{"question":{"en":"What is the Max Value?"},"answer":{"en":"Max is the highest price of Token A in terms of Token B at which you are willing to provide liquidity. If the market price of Token A exceeds this limit, your liquidity will not be used for transactions. The main purpose of setting a Max value is to protect your liquidity from excessive price fluctuations. \\nExample: You create an ETH/USDC pair and set Max = 4000 USDC/ETH. If ETH\'s price rises above 4000 USDC, your liquidity will no longer be used for trading."}},{"question":{"en":"When should you choose the 0.01% fee tier?”"},"answer":{"en":"0.01% - Best for very stable pairs. \\nSuitable for pairs with extremely low volatility, such as USDT/USDC. \\nThese pairs have almost no price fluctuation risk, so a low fee attracts more traders. \\nIdeal for those who want to provide liquidity long-term with stable returns."}},{"question":{"en":"When should you choose the 0.05% fee tier?"},"answer":{"en":"0.05% - Best for stable pairs.\\nWorks well for stablecoin pairs or low volatility pairs like ETH/stETH.\\nOffers a reasonable fee higher than 0.01% while still attracting traders.\\nA great choice for liquidity providers seeking earnings while maintaining low fees to encourage trading."}},{"question":{"en":"When should you choose the 0.3% fee tier?"},"answer":{"en":"0.3% - Best for most pairs.\\nThe standard fee for most trading pairs, including popular ones like ETH/USDC, BTC/ETH.\\nSuitable for high-liquidity pairs with some level of price fluctuation.\\nA balanced choice for liquidity providers who want both trading volume and fee income."}},{"question":{"en":"When should you choose the 1% fee tier?"},"answer":{"en":"1% - Best for exotic pairs. \\nDesigned for low-liquidity or highly volatile trading pairs, such as new or lesser-known tokens.\\nSince these pairs have higher risks, the high fee compensates liquidity providers.\\nA good choice if you are providing liquidity for new tokens and want to earn higher fees."}},{"question":{"en":"Would you like to add more liquidity to this position?"},"answer":{"en":"Select an existing liquidity pair to add more liquidity and increase your potential rewards.\\nYour liquidity will be locked in the pool until you decide to withdraw.\\nAdding liquidity may affect trading fees and rewards earned from swaps in the pool."}},{"question":{"en":"Collect earnings"},"answer":{"en":"11You can withdraw your accumulated rewards from the liquidity pool at any time. Collected rewards will be sent directly to your connected wallet."}},{"question":{"en":"Delete your liquidity & collect liquidity and earnings"},"answer":{"en":"This option allows you to withdraw both your initial liquidity and any earned rewards. Once removed, your liquidity will no longer participate in earning trading fees. This action does not burn your NFT, so you can reuse it later if needed."}},{"question":{"en":"Repositioning"},"answer":{"en":"When your liquidity position goes out of range, you can use the Repositioning feature to reconfigure the pair by setting your preferred Max Price and Min Price.\\nA wider price range provides more stable but lower fee income, while a narrower range can increase your potential returns.\\nf you want to adjust your position and narrow your range to boost fee earnings, please use this feature.\\nPlease note that DEX fees will apply each time the pool is reconfigured.\\nUncollected earnings are not added to liquidity but are returned to your wallet."}},{"question":{"en":"Auto Repositioning"},"answer":{"en":"You can set the BOT to automatically reposition your liquidity pool whenever it goes out of range. When your pool’s liquidity falls outside the preset range, the BOT will automatically reconfigure the pool. Once automatic positioning is enabled, the BOT will continue to reposition based on the same settings until you manually stop it. \\nThis significantly reduces the time your liquidity stays outside the range, helping to maximize your potential fee income. The BOT does not operate in real time — it checks positions once every hour, and repositioning may occasionally fail. Please note that DEX fees apply for each automatic reconfiguration. Frequent reconfigurations may lead to net fee losses. Uncollected earnings are not added to liquidity but are returned to your wallet."}},{"question":{"en":"Burn this NFT"},"answer":{"en":"Burning an NFT means permanently removing the NFT that represents your liquidity position. Once burned, the NFT cannot be restored, and all associated benefits will be lost. Only burn if you are sure you no longer need the NFT and have already withdrawn all liquidity."}},{"question":{"en":"When is the data updated?"},"answer":{"en":"Data is aggregated and updated at 00:00 UTC.\\nStarting from 23:00 UTC, LP token data is sequentially retrieved from the blockchain. The displayed values are then calculated based on the rates at 00:00 UTC. Please note that discrepancies may occur between the figures shown in the earnings overview and the actual values. The figures presented in the earnings summary are for reference only."}},{"question":{"en":"Pack & store tokens"},"answer":{"en":"View your purchased token packages here \'https://coinpool.app/package\'. Each package is stored in a Token Bound Account (TBA), where you can easily check the included tokens and their asset value.\\nYou can unpack your package, the unpacked tokens will be sent to your connected wallet. Or you can unpack&Swap USDC, all tokens in your package will be swapped to USDC and sent to your connected wallet."}},{"question":{"en":"Custom pack"},"answer":{"en":"You can create a custom package tailored to your investment preferences."}},{"question":{"en":"Token Bound Account 6551 (TBA)"},"answer":{"en":"A Token Bound Account (TBA), defined by the ERC-6551 Ethereum standard, is a smart contract wallet linked to an ERC-721 NFT. Your token package is securely stored in a TBA, which you can manage effortlessly through your account."}},{"question":{"en":"Which company developed the CoinPool website?"},"answer":{"en":"CoinPool is a platform developed by Bacoor Company in 2025"}}]')},l={"keyring-chatbot-agent-sdk-test":{name:"keyring-chatbot-agent-sdk-test",webAppUrl:"https://nft-demo.keyring.app",isPackageTest:!0},"keyring-chatbot-coinpool-test":{name:"keyring-chatbot-coinpool-test",webAppUrl:"https://nft.keyring.app",faqUrl:"https://api.coinpool.app/faq",faqInternal:u,linkViewNft:"https://nft.keyring.app",linkAddLiquidity:"https://coinpool.app/pair/create",modal:{title:"COINPOOL Agent",icon:"https://coinpool.app/favicon.ico"}},"keyring-chatbot-coinpool":{name:"keyring-chatbot-coinpool",webAppUrl:"https://nft.keyring.app",faqUrl:"https://api.coinpool.app/faq",faqInternal:u,linkViewNft:"https://nft.keyring.app",linkAddLiquidity:"https://coinpool.app/pair/create",modal:{title:"COINPOOL Agent",icon:"https://coinpool.app/favicon.ico"}},"keyring-chatbot-agent":{name:"keyring-chatbot-agent",webAppUrl:"https://nft.keyring.app"}},d=["https://nft-demo.keyring.app","https://nft.keyring.app","https://coinpool.app","https://coinpool-op.bacoor-test001.xyz","https://dev2-coinpool-op.bacoor-test001.xyz","https://rwa.bacoor-test001.xyz"],h=/^tuple(?<array>(\[(\d*)\])*)$/;function f(e){let t=e.type;if(h.test(e.type)&&"components"in e){t="(";const n=e.components.length;for(let i=0;i<n;i++)t+=f(e.components[i]),i<n-1&&(t+=", ");const o=function(e,t){const n=e.exec(t);return n?.groups}(h,e.type);return t+=`)${o?.array||""}`,f({...e,type:t})}return"indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}function p(e){let t="";const n=e.length;for(let o=0;o<n;o++)t+=f(e[o]),o!==n-1&&(t+=", ");return t}function m(e,{includeName:t=!1}={}){if("function"!==e.type&&"event"!==e.type&&"error"!==e.type)throw new B(e.type);return`${e.name}(${w(e.inputs,{includeName:t})})`}function w(e,{includeName:t=!1}={}){return e?e.map(e=>function(e,{includeName:t}){return e.type.startsWith("tuple")?`(${w(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}(e,{includeName:t})).join(t?", ":","):""}function g(e,{strict:t=!0}={}){return!!e&&"string"==typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x"))}function b(e){return g(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const y="2.47.0";let v=`viem@${y}`;class A extends Error{constructor(e,t={}){const n=t.cause instanceof A?t.cause.details:t.cause?.message?t.cause.message:t.details,o=t.cause instanceof A&&t.cause.docsPath||t.docsPath,i=(({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0)?.({...t,docsPath:o});super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...i?[`Docs: ${i}`]:[],...n?[`Details: ${n}`]:[],...v?[`Version: ${v}`]:[]].join("\n"),t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=n,this.docsPath=o,this.metaMessages=t.metaMessages,this.name=t.name??this.name,this.shortMessage=e,this.version=y}walk(e){return k(this,e)}}function k(e,t){return t?.(e)?e:e&&"object"==typeof e&&"cause"in e&&void 0!==e.cause?k(e.cause,t):t?null:e}class T extends A{constructor({expectedLength:e,givenLength:t,type:n}){super([`ABI encoding array length mismatch for type ${n}.`,`Expected length: ${e}`,`Given length: ${t}`].join("\n"),{name:"AbiEncodingArrayLengthMismatchError"})}}class E extends A{constructor({expectedSize:e,value:t}){super(`Size of bytes "${t}" (bytes${b(t)}) does not match expected size (bytes${e}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class x extends A{constructor({expectedLength:e,givenLength:t}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${e}`,`Given length (values): ${t}`].join("\n"),{name:"AbiEncodingLengthMismatchError"})}}class C extends A{constructor(e,{docsPath:t}={}){super([`Function ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join("\n"),{docsPath:t,name:"AbiFunctionNotFoundError"})}}class I extends A{constructor(e,t){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${e.type}\` in \`${m(e.abiItem)}\`, and`,`\`${t.type}\` in \`${m(t.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}class S extends A{constructor(e,{docsPath:t}){super([`Type "${e}" is not a valid encoding type.`,"Please provide a valid ABI type."].join("\n"),{docsPath:t,name:"InvalidAbiEncodingType"})}}class N extends A{constructor(e){super([`Value "${e}" is not a valid array.`].join("\n"),{name:"InvalidArrayError"})}}class B extends A{constructor(e){super([`"${e}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join("\n"),{name:"InvalidDefinitionTypeError"})}}class M extends A{constructor({offset:e,position:t,size:n}){super(`Slice ${"start"===t?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${n}).`,{name:"SliceOffsetOutOfBoundsError"})}}class U extends A{constructor({size:e,targetSize:t,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`,{name:"SizeExceedsPaddingSizeError"})}}function R(e,{dir:t,size:n=32}={}){return"string"==typeof e?P(e,{dir:t,size:n}):function(e,{dir:t,size:n=32}={}){if(null===n)return e;if(e.length>n)throw new U({size:e.length,targetSize:n,type:"bytes"});const o=new Uint8Array(n);for(let i=0;i<n;i++){const r="right"===t;o[r?i:n-i-1]=e[r?i:e.length-i-1]}return o}(e,{dir:t,size:n})}function P(e,{dir:t,size:n=32}={}){if(null===n)return e;const o=e.replace("0x","");if(o.length>2*n)throw new U({size:Math.ceil(o.length/2),targetSize:n,type:"hex"});return`0x${o["right"===t?"padEnd":"padStart"](2*n,"0")}`}class O extends A{constructor({max:e,min:t,signed:n,size:o,value:i}){super(`Number "${i}" is not in safe ${o?`${8*o}-bit ${n?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`,{name:"IntegerOutOfRangeError"})}}class L extends A{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}function D(e,{dir:t="left"}={}){let n="string"==typeof e?e.replace("0x",""):e,o=0;for(let i=0;i<n.length-1&&"0"===n["left"===t?i:n.length-i-1].toString();i++)o++;return n="left"===t?n.slice(o):n.slice(0,n.length-o),"string"==typeof e?(1===n.length&&"right"===t&&(n=`${n}0`),`0x${n.length%2==1?`0${n}`:n}`):n}function F(e,{size:t}){if(b(e)>t)throw new L({givenSize:b(e),maxSize:t})}function q(e,t={}){const{signed:n}=t;t.size&&F(e,{size:t.size});const o=BigInt(e);if(!n)return o;const i=(e.length-2)/2;return o<=(1n<<8n*BigInt(i)-1n)-1n?o:o-BigInt(`0x${"f".padStart(2*i,"f")}`)-1n}function H(e,t={}){const n=q(e,t),o=Number(n);if(!Number.isSafeInteger(o))throw new O({max:`${Number.MAX_SAFE_INTEGER}`,min:`${Number.MIN_SAFE_INTEGER}`,signed:t.signed,size:t.size,value:`${n}n`});return o}const V=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function W(e,t={}){return"number"==typeof e||"bigint"==typeof e?Y(e,t):"string"==typeof e?j(e,t):"boolean"==typeof e?G(e,t):J(e,t)}function G(e,t={}){const n=`0x${Number(e)}`;return"number"==typeof t.size?(F(n,{size:t.size}),R(n,{size:t.size})):n}function J(e,t={}){let n="";for(let i=0;i<e.length;i++)n+=V[e[i]];const o=`0x${n}`;return"number"==typeof t.size?(F(o,{size:t.size}),R(o,{dir:"right",size:t.size})):o}function Y(e,t={}){const{signed:n,size:o}=t,i=BigInt(e);let r;o?r=n?(1n<<8n*BigInt(o)-1n)-1n:2n**(8n*BigInt(o))-1n:"number"==typeof e&&(r=BigInt(Number.MAX_SAFE_INTEGER));const a="bigint"==typeof r&&n?-r-1n:0;if(r&&i>r||i<a){const t="bigint"==typeof e?"n":"";throw new O({max:r?`${r}${t}`:void 0,min:`${a}${t}`,signed:n,size:o,value:`${e}${t}`})}const s=`0x${(n&&i<0?(1n<<BigInt(8*o))+BigInt(i):i).toString(16)}`;return o?R(s,{size:o}):s}const z=new TextEncoder;function j(e,t={}){return J(z.encode(e),t)}const X=new TextEncoder;function Q(e,t={}){return"number"==typeof e||"bigint"==typeof e?function(e,t){return _(Y(e,t))}(e,t):"boolean"==typeof e?function(e,t={}){const n=new Uint8Array(1);return n[0]=Number(e),"number"==typeof t.size?(F(n,{size:t.size}),R(n,{size:t.size})):n}(e,t):g(e)?_(e,t):$(e,t)}const K={zero:48,nine:57,A:65,F:70,a:97,f:102};function Z(e){return e>=K.zero&&e<=K.nine?e-K.zero:e>=K.A&&e<=K.F?e-(K.A-10):e>=K.a&&e<=K.f?e-(K.a-10):void 0}function _(e,t={}){let n=e;t.size&&(F(n,{size:t.size}),n=R(n,{dir:"right",size:t.size}));let o=n.slice(2);o.length%2&&(o=`0${o}`);const i=o.length/2,r=new Uint8Array(i);for(let a=0,s=0;a<i;a++){const e=Z(o.charCodeAt(s++)),t=Z(o.charCodeAt(s++));if(void 0===e||void 0===t)throw new A(`Invalid byte sequence ("${o[s-2]}${o[s-1]}" in "${o}").`);r[a]=16*e+t}return r}function $(e,t={}){const n=X.encode(e);return"number"==typeof t.size?(F(n,{size:t.size}),R(n,{dir:"right",size:t.size})):n}const ee=BigInt(2**32-1),te=BigInt(32);function ne(e,t=!1){return t?{h:Number(e&ee),l:Number(e>>te&ee)}:{h:0|Number(e>>te&ee),l:0|Number(e&ee)}}function oe(e,t=!1){const n=e.length;let o=new Uint32Array(n),i=new Uint32Array(n);for(let r=0;r<n;r++){const{h:n,l:a}=ne(e[r],t);[o[r],i[r]]=[n,a]}return[o,i]}const ie=(e,t,n)=>e>>>n,re=(e,t,n)=>e<<32-n|t>>>n,ae=(e,t,n)=>e>>>n|t<<32-n,se=(e,t,n)=>e<<32-n|t>>>n,ce=(e,t,n)=>e<<64-n|t>>>n-32,ue=(e,t,n)=>e>>>n-32|t<<64-n;function le(e,t,n,o){const i=(t>>>0)+(o>>>0);return{h:e+n+(i/2**32|0)|0,l:0|i}}const de=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),he=(e,t,n,o)=>t+n+o+(e/2**32|0)|0,fe=(e,t,n,o)=>(e>>>0)+(t>>>0)+(n>>>0)+(o>>>0),pe=(e,t,n,o,i)=>t+n+o+i+(e/2**32|0)|0,me=(e,t,n,o,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(o>>>0)+(i>>>0),we=(e,t,n,o,i,r)=>t+n+o+i+r+(e/2**32|0)|0,ge="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0;function be(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function ye(e,...t){if(!((n=e)instanceof Uint8Array||ArrayBuffer.isView(n)&&"Uint8Array"===n.constructor.name))throw new Error("Uint8Array expected");var n;if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function ve(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 Ae(e,t){ye(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function ke(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Te(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Ee(e,t){return e<<32-t|e>>>t}function xe(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}const Ce=(()=>68===new Uint8Array(new Uint32Array([287454020]).buffer)[0])()?e=>e:function(e){for(let t=0;t<e.length;t++)e[t]=xe(e[t]);return e};function Ie(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw new Error("string expected");return new Uint8Array((new TextEncoder).encode(e))}(e)),ye(e),e}class Se{}function Ne(e){const t=t=>e().update(Ie(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function Be(e=32){if(ge&&"function"==typeof ge.getRandomValues)return ge.getRandomValues(new Uint8Array(e));if(ge&&"function"==typeof ge.randomBytes)return Uint8Array.from(ge.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}const Me=BigInt(0),Ue=BigInt(1),Re=BigInt(2),Pe=BigInt(7),Oe=BigInt(256),Le=BigInt(113),De=[],Fe=[],qe=[];for(let Ep=0,xp=Ue,Cp=1,Ip=0;Ep<24;Ep++){[Cp,Ip]=[Ip,(2*Cp+3*Ip)%5],De.push(2*(5*Ip+Cp)),Fe.push((Ep+1)*(Ep+2)/2%64);let e=Me;for(let t=0;t<7;t++)xp=(xp<<Ue^(xp>>Pe)*Le)%Oe,xp&Re&&(e^=Ue<<(Ue<<BigInt(t))-Ue);qe.push(e)}const He=oe(qe,!0),Ve=He[0],We=He[1],Ge=(e,t,n)=>n>32?((e,t,n)=>t<<n-32|e>>>64-n)(e,t,n):((e,t,n)=>e<<n|t>>>32-n)(e,t,n),Je=(e,t,n)=>n>32?((e,t,n)=>e<<n-32|t>>>64-n)(e,t,n):((e,t,n)=>t<<n|e>>>32-n)(e,t,n);class Ye extends Se{constructor(e,t,n,o=!1,i=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=o,this.rounds=i,be(n),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");var r;this.state=new Uint8Array(200),this.state32=(r=this.state,new Uint32Array(r.buffer,r.byteOffset,Math.floor(r.byteLength/4)))}clone(){return this.o()}keccak(){Ce(this.state32),function(e,t=24){const n=new Uint32Array(10);for(let o=24-t;o<24;o++){for(let o=0;o<10;o++)n[o]=e[o]^e[o+10]^e[o+20]^e[o+30]^e[o+40];for(let o=0;o<10;o+=2){const t=(o+8)%10,i=(o+2)%10,r=n[i],a=n[i+1],s=Ge(r,a,1)^n[t],c=Je(r,a,1)^n[t+1];for(let n=0;n<50;n+=10)e[o+n]^=s,e[o+n+1]^=c}let t=e[2],i=e[3];for(let n=0;n<24;n++){const o=Fe[n],r=Ge(t,i,o),a=Je(t,i,o),s=De[n];t=e[s],i=e[s+1],e[s]=r,e[s+1]=a}for(let o=0;o<50;o+=10){for(let t=0;t<10;t++)n[t]=e[o+t];for(let t=0;t<10;t++)e[o+t]^=~n[(t+2)%10]&n[(t+4)%10]}e[0]^=Ve[o],e[1]^=We[o]}ke(n)}(this.state32,this.rounds),Ce(this.state32),this.posOut=0,this.pos=0}update(e){ve(this),ye(e=Ie(e));const{blockLen:t,state:n}=this,o=e.length;for(let i=0;i<o;){const r=Math.min(t-this.pos,o-i);for(let t=0;t<r;t++)n[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:n,blockLen:o}=this;e[n]^=t,128&t&&n===o-1&&this.keccak(),e[o-1]^=128,this.keccak()}writeInto(e){ve(this,!1),ye(e),this.finish();const t=this.state,{blockLen:n}=this;for(let o=0,i=e.length;o<i;){this.posOut>=n&&this.keccak();const r=Math.min(n-this.posOut,i-o);e.set(t.subarray(this.posOut,this.posOut+r),o),this.posOut+=r,o+=r}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return be(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(Ae(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,ke(this.state)}o(e){const{blockLen:t,suffix:n,outputLen:o,rounds:i,enableXOF:r}=this;return e||(e=new Ye(t,n,o,r,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=n,e.outputLen=o,e.enableXOF=r,e.destroyed=this.destroyed,e}}const ze=(()=>Ne(()=>new Ye(136,1,32)))();function je(e,t){const n=t||"hex",o=ze(g(e,{strict:!1})?Q(e):e);return"bytes"===n?o:W(o)}function Xe(e){return je(Q(function(e){let t=!0,n="",o=0,i="",r=!1;for(let a=0;a<e.length;a++){const s=e[a];if(["(",")",","].includes(s)&&(t=!0),"("===s&&o++,")"===s&&o--,t)if(0!==o)" "!==s?(i+=s,n+=s):","!==e[a-1]&&","!==n&&",("!==n&&(n="",t=!1);else if(" "===s&&["event","function",""].includes(i))i="";else if(i+=s,")"===s){r=!0;break}}if(!r)throw new A("Unable to normalize signature.");return i}("string"==typeof(t=e)?t:"function"===(n=t).type?`function ${n.name}(${p(n.inputs)})${n.stateMutability&&"nonpayable"!==n.stateMutability?` ${n.stateMutability}`:""}${n.outputs?.length?` returns (${p(n.outputs)})`:""}`:"event"===n.type?`event ${n.name}(${p(n.inputs)})`:"error"===n.type?`error ${n.name}(${p(n.inputs)})`:"constructor"===n.type?`constructor(${p(n.inputs)})${"payable"===n.stateMutability?" payable":""}`:"fallback"===n.type?"fallback() external"+("payable"===n.stateMutability?" payable":""):"receive() external payable")));var t,n}const Qe=Xe;class Ke extends A{constructor({address:e}){super(`Address "${e}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}class Ze extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){const t=super.get(e);return super.has(e)&&void 0!==t&&(this.delete(e),super.set(e,t)),t}set(e,t){if(super.set(e,t),this.maxSize&&this.size>this.maxSize){const e=this.keys().next().value;e&&this.delete(e)}return this}}const _e=new Ze(8192),$e=/^0x[a-fA-F0-9]{40}$/,et=new Ze(8192);function tt(e,t){const{strict:n=!0}=t??{},o=`${e}.${n}`;if(et.has(o))return et.get(o);const i=!(!$e.test(e)||e.toLowerCase()!==e&&n&&function(e){if(_e.has(`${e}.undefined`))return _e.get(`${e}.undefined`);const t=e.substring(2).toLowerCase(),n=je($(t),"bytes"),o=t.split("");for(let r=0;r<40;r+=2)n[r>>1]>>4>=8&&o[r]&&(o[r]=o[r].toUpperCase()),(15&n[r>>1])>=8&&o[r+1]&&(o[r+1]=o[r+1].toUpperCase());const i=`0x${o.join("")}`;return _e.set(`${e}.undefined`,i),i}(e)!==e);return et.set(o,i),i}function nt(e){return"string"==typeof e[0]?ot(e):function(e){let t=0;for(const i of e)t+=i.length;const n=new Uint8Array(t);let o=0;for(const i of e)n.set(i,o),o+=i.length;return n}(e)}function ot(e){return`0x${e.reduce((e,t)=>e+t.replace("0x",""),"")}`}function it(e,t,n,{strict:o}={}){return g(e,{strict:!1})?function(e,t,n,{strict:o}={}){rt(e,t);const i=`0x${e.replace("0x","").slice(2*(t??0),2*(n??e.length))}`;return o&&at(i,t,n),i}(e,t,n,{strict:o}):function(e,t,n,{strict:o}={}){rt(e,t);const i=e.slice(t,n);return o&&at(i,t,n),i}(e,t,n,{strict:o})}function rt(e,t){if("number"==typeof t&&t>0&&t>b(e)-1)throw new M({offset:t,position:"start",size:b(e)})}function at(e,t,n){if("number"==typeof t&&"number"==typeof n&&b(e)!==n-t)throw new M({offset:n,position:"end",size:b(e)})}const st=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function ct(e,t){if(e.length!==t.length)throw new x({expectedLength:e.length,givenLength:t.length});const n=function({params:e,values:t}){const n=[];for(let o=0;o<e.length;o++)n.push(ut({param:e[o],value:t[o]}));return n}({params:e,values:t}),o=lt(n);return 0===o.length?"0x":o}function ut({param:e,value:t}){const n=function(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}(e.type);if(n){const[o,i]=n;return function(e,{length:t,param:n}){const o=null===t;if(!Array.isArray(e))throw new N(e);if(!o&&e.length!==t)throw new T({expectedLength:t,givenLength:e.length,type:`${n.type}[${t}]`});let i=!1;const r=[];for(let a=0;a<e.length;a++){const t=ut({param:n,value:e[a]});t.dynamic&&(i=!0),r.push(t)}if(o||i){const e=lt(r);if(o){const t=Y(r.length,{size:32});return{dynamic:!0,encoded:r.length>0?nt([t,e]):t}}if(i)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:nt(r.map(({encoded:e})=>e))}}(t,{length:o,param:{...e,type:i}})}if("tuple"===e.type)return function(e,{param:t}){let n=!1;const o=[];for(let i=0;i<t.components.length;i++){const r=t.components[i],a=ut({param:r,value:e[Array.isArray(e)?i:r.name]});o.push(a),a.dynamic&&(n=!0)}return{dynamic:n,encoded:n?lt(o):nt(o.map(({encoded:e})=>e))}}(t,{param:e});if("address"===e.type)return function(e){if(!tt(e))throw new Ke({address:e});return{dynamic:!1,encoded:P(e.toLowerCase())}}(t);if("bool"===e.type)return function(e){if("boolean"!=typeof e)throw new A(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:P(G(e))}}(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){const n=e.type.startsWith("int"),[,,o="256"]=st.exec(e.type)??[];return function(e,{signed:t,size:n=256}){if("number"==typeof n){const o=2n**(BigInt(n)-(t?1n:0n))-1n,i=t?-o-1n:0n;if(e>o||e<i)throw new O({max:o.toString(),min:i.toString(),signed:t,size:n/8,value:e.toString()})}return{dynamic:!1,encoded:Y(e,{size:32,signed:t})}}(t,{signed:n,size:Number(o)})}if(e.type.startsWith("bytes"))return function(e,{param:t}){const[,n]=t.type.split("bytes"),o=b(e);if(!n){let t=e;return o%32!=0&&(t=P(t,{dir:"right",size:32*Math.ceil((e.length-2)/2/32)})),{dynamic:!0,encoded:nt([P(Y(o,{size:32})),t])}}if(o!==Number.parseInt(n,10))throw new E({expectedSize:Number.parseInt(n,10),value:e});return{dynamic:!1,encoded:P(e,{dir:"right"})}}(t,{param:e});if("string"===e.type)return function(e){const t=j(e),n=Math.ceil(b(t)/32),o=[];for(let i=0;i<n;i++)o.push(P(it(t,32*i,32*(i+1)),{dir:"right"}));return{dynamic:!0,encoded:nt([P(Y(b(t),{size:32})),...o])}}(t);throw new S(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function lt(e){let t=0;for(let r=0;r<e.length;r++){const{dynamic:n,encoded:o}=e[r];t+=n?32:b(o)}const n=[],o=[];let i=0;for(let r=0;r<e.length;r++){const{dynamic:a,encoded:s}=e[r];a?(n.push(Y(t+i,{size:32})),o.push(s),i+=b(s)):n.push(s)}return nt([...n,...o])}const dt=e=>it(Xe(e),0,4);function ht(e,t){const n=typeof e,o=t.type;switch(o){case"address":return tt(e,{strict:!1});case"bool":return"boolean"===n;case"function":case"string":return"string"===n;default:return"tuple"===o&&"components"in t?Object.values(t.components).every((t,o)=>"object"===n&&ht(Object.values(e)[o],t)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(o)?"number"===n||"bigint"===n:/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(o)?"string"===n||e instanceof Uint8Array:!!/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(o)&&Array.isArray(e)&&e.every(e=>ht(e,{...t,type:o.replace(/(\[[0-9]{0,}\])$/,"")}))}}function ft(e,t,n){for(const o in e){const i=e[o],r=t[o];if("tuple"===i.type&&"tuple"===r.type&&"components"in i&&"components"in r)return ft(i.components,r.components,n[o]);const a=[i.type,r.type];if((()=>!(!a.includes("address")||!a.includes("bytes20"))||(a.includes("address")&&a.includes("string")||!(!a.includes("address")||!a.includes("bytes")))&&tt(n[o],{strict:!1}))())return a}}function pt(e){return"string"==typeof e?{address:e,type:"json-rpc"}:e}const mt="/docs/contract/encodeFunctionData";function wt(e){const{args:t}=e,{abi:n,functionName:o}=1===e.abi.length&&e.functionName?.startsWith("0x")?e:function(e){const{abi:t,args:n,functionName:o}=e;let i=t[0];if(o){const e=function(e){const{abi:t,args:n=[],name:o}=e,i=g(o,{strict:!1}),r=t.filter(e=>i?"function"===e.type?dt(e)===o:"event"===e.type&&Qe(e)===o:"name"in e&&e.name===o);if(0===r.length)return;if(1===r.length)return r[0];let a;for(const s of r)if("inputs"in s)if(n&&0!==n.length){if(s.inputs&&0!==s.inputs.length&&s.inputs.length===n.length&&n.every((e,t)=>{const n="inputs"in s&&s.inputs[t];return!!n&&ht(e,n)})){if(a&&"inputs"in a&&a.inputs){const e=ft(s.inputs,a.inputs,n);if(e)throw new I({abiItem:s,type:e[0]},{abiItem:a,type:e[1]})}a=s}}else if(!s.inputs||0===s.inputs.length)return s;return a||r[0]}({abi:t,args:n,name:o});if(!e)throw new C(o,{docsPath:mt});i=e}if("function"!==i.type)throw new C(void 0,{docsPath:mt});return{abi:[i],functionName:dt(m(i))}}(e),i=n[0];return ot([o,("inputs"in i&&i.inputs?ct(i.inputs,t??[]):void 0)??"0x"])}class gt extends A{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class bt extends A{constructor({length:e,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`,{name:"PositionOutOfBoundsError"})}}class yt extends A{constructor({count:e,limit:t}){super(`Recursive read limit of \`${t}\` exceeded (recursive read count: \`${e}\`).`,{name:"RecursiveReadLimitExceededError"})}}const vt={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 yt({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new bt({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new gt({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 gt({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,255&e),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this.i();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this.i();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this.i();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this.i();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this.i();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this.i();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},i(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function At(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(vt);return n.bytes=e,n.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}const kt={gwei:9,wei:18},Tt={ether:-9,wei:9};function Et(e,t){let n=e.toString();const o=n.startsWith("-");o&&(n=n.slice(1)),n=n.padStart(t,"0");let[i,r]=[n.slice(0,n.length-t),n.slice(n.length-t)];return r=r.replace(/(0+)$/,""),`${o?"-":""}${i||"0"}${r?`.${r}`:""}`}function xt(e,t="wei"){return Et(e,kt[t])}function Ct(e,t="wei"){return Et(e,Tt[t])}function It(e){return e.reduce((e,{slot:t,value:n})=>`${e} ${t}: ${n}\n`,"")}function St(e){const t=Object.entries(e).map(([e,t])=>void 0===t||!1===t?null:[e,t]).filter(Boolean),n=t.reduce((e,[t])=>Math.max(e,t.length),0);return t.map(([e,t])=>` ${`${e}:`.padEnd(n+1)} ${t}`).join("\n")}class Nt extends A{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class Bt extends A{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",St(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class Mt extends A{constructor({storageKey:e}){super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}class Ut extends A{constructor(e,{account:t,docsPath:n,chain:o,data:i,gas:r,gasPrice:a,maxFeePerGas:s,maxPriorityFeePerGas:c,nonce:u,to:l,value:d,stateOverride:h}){const f=t?pt(t):void 0;let p=St({from:f?.address,to:l,value:void 0!==d&&`${xt(d)} ${o?.nativeCurrency?.symbol||"ETH"}`,data:i,gas:r,gasPrice:void 0!==a&&`${Ct(a)} gwei`,maxFeePerGas:void 0!==s&&`${Ct(s)} gwei`,maxPriorityFeePerGas:void 0!==c&&`${Ct(c)} gwei`,nonce:u});h&&(p+=`\n${function(e){return e.reduce((e,{address:t,...n})=>{let o=`${e} ${t}:\n`;return n.nonce&&(o+=` nonce: ${n.nonce}\n`),n.balance&&(o+=` balance: ${n.balance}\n`),n.code&&(o+=` code: ${n.code}\n`),n.state&&(o+=" state:\n",o+=It(n.state)),n.stateDiff&&(o+=" stateDiff:\n",o+=It(n.stateDiff)),o}," State Override:\n").slice(0,-1)}(h)}`),super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",p].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}function Rt(e,t="hex"){const n=Pt(e),o=At(new Uint8Array(n.length));return n.encode(o),"hex"===t?J(o.bytes):o.bytes}function Pt(e){return Array.isArray(e)?function(e){const t=e.reduce((e,t)=>e+t.length,0),n=Ot(t);return{length:t<=55?1+t:1+n+t,encode(o){t<=55?o.pushByte(192+t):(o.pushByte(247+n),1===n?o.pushUint8(t):2===n?o.pushUint16(t):3===n?o.pushUint24(t):o.pushUint32(t));for(const{encode:t}of e)t(o)}}}(e.map(e=>Pt(e))):function(e){const t="string"==typeof e?_(e):e,n=Ot(t.length);return{length:1===t.length&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(e){1===t.length&&t[0]<128?e.pushBytes(t):t.length<=55?(e.pushByte(128+t.length),e.pushBytes(t)):(e.pushByte(183+n),1===n?e.pushUint8(t.length):2===n?e.pushUint16(t.length):3===n?e.pushUint24(t.length):e.pushUint32(t.length),e.pushBytes(t))}}}(e)}function Ot(e){if(e<256)return 1;if(e<65536)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new A("Length is too large.")}class Lt extends A{constructor({cause:e,message:t}={}){const n=t?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${n?`with reason: ${n}`:"for an unknown reason"}.`,{cause:e,name:"ExecutionRevertedError"})}}Object.defineProperty(Lt,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(Lt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted|gas required exceeds allowance/});class Dt extends A{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${Ct(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e,name:"FeeCapTooHighError"})}}Object.defineProperty(Dt,"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 Ft extends A{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${Ct(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e,name:"FeeCapTooLowError"})}}Object.defineProperty(Ft,"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 qt extends A{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e,name:"NonceTooHighError"})}}Object.defineProperty(qt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class Ht extends A{constructor({cause:e,nonce:t}={}){super([`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join("\n"),{cause:e,name:"NonceTooLowError"})}}Object.defineProperty(Ht,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class Vt extends A{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e,name:"NonceMaxValueError"})}}Object.defineProperty(Vt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class Wt extends A{constructor({cause:e}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join("\n"),{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(Wt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class Gt extends A{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(Gt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class Jt extends A{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(Jt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class Yt extends A{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(Yt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class zt extends A{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${Ct(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${Ct(n)} gwei`:""}).`].join("\n"),{cause:e,name:"TipAboveFeeCapError"})}}Object.defineProperty(zt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class jt extends A{constructor({cause:e}){super(`An error occurred while executing: ${e?.shortMessage}`,{cause:e,name:"UnknownNodeError"})}}function Xt(e,{format:t}){if(!t)return{};const n={};return function t(o){const i=Object.keys(o);for(const r of i)r in e&&(n[r]=e[r]),o[r]&&"object"==typeof o[r]&&!Array.isArray(o[r])&&t(o[r])}(t(e||{})),n}function Qt(e,t){return({exclude:n,format:o})=>({exclude:n,format:(e,i)=>{const r=t(e,i);if(n)for(const t of n)delete r[t];return{...r,...o(e,i)}},type:e})}const Kt={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function Zt(e,t){const n={};return void 0!==e.authorizationList&&(n.authorizationList=e.authorizationList.map(e=>({address:e.address,r:e.r?Y(BigInt(e.r)):e.r,s:e.s?Y(BigInt(e.s)):e.s,chainId:Y(e.chainId),nonce:Y(e.nonce),...void 0!==e.yParity?{yParity:Y(e.yParity)}:{},...void 0!==e.v&&void 0===e.yParity?{v:Y(e.v)}:{}}))),void 0!==e.accessList&&(n.accessList=e.accessList),void 0!==e.blobVersionedHashes&&(n.blobVersionedHashes=e.blobVersionedHashes),void 0!==e.blobs&&("string"!=typeof e.blobs[0]?n.blobs=e.blobs.map(e=>J(e)):n.blobs=e.blobs),void 0!==e.data&&(n.data=e.data),e.account&&(n.from=e.account.address),void 0!==e.from&&(n.from=e.from),void 0!==e.gas&&(n.gas=Y(e.gas)),void 0!==e.gasPrice&&(n.gasPrice=Y(e.gasPrice)),void 0!==e.maxFeePerBlobGas&&(n.maxFeePerBlobGas=Y(e.maxFeePerBlobGas)),void 0!==e.maxFeePerGas&&(n.maxFeePerGas=Y(e.maxFeePerGas)),void 0!==e.maxPriorityFeePerGas&&(n.maxPriorityFeePerGas=Y(e.maxPriorityFeePerGas)),void 0!==e.nonce&&(n.nonce=Y(e.nonce)),void 0!==e.to&&(n.to=e.to),void 0!==e.type&&(n.type=Kt[e.type]),void 0!==e.value&&(n.value=Y(e.value)),n}const _t=2n**256n-1n,$t={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function en(e,t){const n={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?H(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?H(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?$t[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=e.authorizationList.map(e=>({address:e.address,chainId:Number(e.chainId),nonce:Number(e.nonce),r:e.r,s:e.s,yParity:Number(e.yParity)}))),n.yParity=(()=>{if(e.yParity)return Number(e.yParity);if("bigint"==typeof n.v){if(0n===n.v||27n===n.v)return 0;if(1n===n.v||28n===n.v)return 1;if(n.v>=35n)return n.v%2n==0n?1:0}})(),"legacy"===n.type&&(delete n.accessList,delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.yParity),"eip2930"===n.type&&(delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),"eip1559"===n.type&&delete n.maxFeePerBlobGas,n}const tn=Qt("transaction",en);function nn(e,t){const n=(e.transactions??[]).map(e=>"string"==typeof e?e:en(e));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 on=Qt("block",nn);function rn(e){const{kzg:t}=e,n=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),o="string"==typeof e.blobs[0]?e.blobs.map(e=>_(e)):e.blobs,i=[];for(const r of o)i.push(Uint8Array.from(t.blobToKzgCommitment(r)));return"bytes"===n?i:i.map(e=>J(e))}function an(e){const{kzg:t}=e,n=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),o="string"==typeof e.blobs[0]?e.blobs.map(e=>_(e)):e.blobs,i="string"==typeof e.commitments[0]?e.commitments.map(e=>_(e)):e.commitments,r=[];for(let a=0;a<o.length;a++){const e=o[a],n=i[a];r.push(Uint8Array.from(t.computeBlobKzgProof(e,n)))}return"bytes"===n?r:r.map(e=>J(e))}function sn(e,t,n){return e&t^~e&n}function cn(e,t,n){return e&t^e&n^t&n}class un extends Se{constructor(e,t,n,o){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=o,this.buffer=new Uint8Array(e),this.view=Te(this.buffer)}update(e){ve(this),ye(e=Ie(e));const{view:t,buffer:n,blockLen:o}=this,i=e.length;for(let r=0;r<i;){const a=Math.min(o-this.pos,i-r);if(a===o){const t=Te(e);for(;o<=i-r;r+=o)this.process(t,r);continue}n.set(e.subarray(r,r+a),this.pos),this.pos+=a,r+=a,this.pos===o&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){ve(this),Ae(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:o,isLE:i}=this;let{pos:r}=this;t[r++]=128,ke(this.buffer.subarray(r)),this.padOffset>o-r&&(this.process(n,0),r=0);for(let l=r;l<o;l++)t[l]=0;!function(e,t,n,o){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,n,o);const i=BigInt(32),r=BigInt(4294967295),a=Number(n>>i&r),s=Number(n&r),c=o?4:0,u=o?0:4;e.setUint32(t+c,a,o),e.setUint32(t+u,s,o)}(n,o-8,BigInt(8*this.length),i),this.process(n,0);const a=Te(e),s=this.outputLen;if(s%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=s/4,u=this.get();if(c>u.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;l<c;l++)a.setUint32(4*l,u[l],i)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}o(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:o,finished:i,destroyed:r,pos:a}=this;return e.destroyed=r,e.finished=i,e.length=o,e.pos=a,o%t&&e.buffer.set(n),e}clone(){return this.o()}}const ln=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),dn=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),hn=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]),fn=new Uint32Array(64);class pn extends un{constructor(e=32){super(64,e,8,!1),this.A=0|ln[0],this.B=0|ln[1],this.C=0|ln[2],this.D=0|ln[3],this.E=0|ln[4],this.F=0|ln[5],this.G=0|ln[6],this.H=0|ln[7]}get(){const{A:e,B:t,C:n,D:o,E:i,F:r,G:a,H:s}=this;return[e,t,n,o,i,r,a,s]}set(e,t,n,o,i,r,a,s){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|o,this.E=0|i,this.F=0|r,this.G=0|a,this.H=0|s}process(e,t){for(let l=0;l<16;l++,t+=4)fn[l]=e.getUint32(t,!1);for(let l=16;l<64;l++){const e=fn[l-15],t=fn[l-2],n=Ee(e,7)^Ee(e,18)^e>>>3,o=Ee(t,17)^Ee(t,19)^t>>>10;fn[l]=o+fn[l-7]+n+fn[l-16]|0}let{A:n,B:o,C:i,D:r,E:a,F:s,G:c,H:u}=this;for(let l=0;l<64;l++){const e=u+(Ee(a,6)^Ee(a,11)^Ee(a,25))+sn(a,s,c)+hn[l]+fn[l]|0,t=(Ee(n,2)^Ee(n,13)^Ee(n,22))+cn(n,o,i)|0;u=c,c=s,s=a,a=r+e|0,r=i,i=o,o=n,n=e+t|0}n=n+this.A|0,o=o+this.B|0,i=i+this.C|0,r=r+this.D|0,a=a+this.E|0,s=s+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(n,o,i,r,a,s,c,u)}roundClean(){ke(fn)}destroy(){this.set(0,0,0,0,0,0,0,0),ke(this.buffer)}}const mn=(()=>oe(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))))(),wn=(()=>mn[0])(),gn=(()=>mn[1])(),bn=new Uint32Array(80),yn=new Uint32Array(80);class vn extends un{constructor(e=64){super(128,e,16,!1),this.Ah=0|dn[0],this.Al=0|dn[1],this.Bh=0|dn[2],this.Bl=0|dn[3],this.Ch=0|dn[4],this.Cl=0|dn[5],this.Dh=0|dn[6],this.Dl=0|dn[7],this.Eh=0|dn[8],this.El=0|dn[9],this.Fh=0|dn[10],this.Fl=0|dn[11],this.Gh=0|dn[12],this.Gl=0|dn[13],this.Hh=0|dn[14],this.Hl=0|dn[15]}get(){const{Ah:e,Al:t,Bh:n,Bl:o,Ch:i,Cl:r,Dh:a,Dl:s,Eh:c,El:u,Fh:l,Fl:d,Gh:h,Gl:f,Hh:p,Hl:m}=this;return[e,t,n,o,i,r,a,s,c,u,l,d,h,f,p,m]}set(e,t,n,o,i,r,a,s,c,u,l,d,h,f,p,m){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|o,this.Ch=0|i,this.Cl=0|r,this.Dh=0|a,this.Dl=0|s,this.Eh=0|c,this.El=0|u,this.Fh=0|l,this.Fl=0|d,this.Gh=0|h,this.Gl=0|f,this.Hh=0|p,this.Hl=0|m}process(e,t){for(let b=0;b<16;b++,t+=4)bn[b]=e.getUint32(t),yn[b]=e.getUint32(t+=4);for(let b=16;b<80;b++){const e=0|bn[b-15],t=0|yn[b-15],n=ae(e,t,1)^ae(e,t,8)^ie(e,0,7),o=se(e,t,1)^se(e,t,8)^re(e,t,7),i=0|bn[b-2],r=0|yn[b-2],a=ae(i,r,19)^ce(i,r,61)^ie(i,0,6),s=se(i,r,19)^ue(i,r,61)^re(i,r,6),c=fe(o,s,yn[b-7],yn[b-16]),u=pe(c,n,a,bn[b-7],bn[b-16]);bn[b]=0|u,yn[b]=0|c}let{Ah:n,Al:o,Bh:i,Bl:r,Ch:a,Cl:s,Dh:c,Dl:u,Eh:l,El:d,Fh:h,Fl:f,Gh:p,Gl:m,Hh:w,Hl:g}=this;for(let b=0;b<80;b++){const e=ae(l,d,14)^ae(l,d,18)^ce(l,d,41),t=se(l,d,14)^se(l,d,18)^ue(l,d,41),y=l&h^~l&p,v=me(g,t,d&f^~d&m,gn[b],yn[b]),A=we(v,w,e,y,wn[b],bn[b]),k=0|v,T=ae(n,o,28)^ce(n,o,34)^ce(n,o,39),E=se(n,o,28)^ue(n,o,34)^ue(n,o,39),x=n&i^n&a^i&a,C=o&r^o&s^r&s;w=0|p,g=0|m,p=0|h,m=0|f,h=0|l,f=0|d,({h:l,l:d}=le(0|c,0|u,0|A,0|k)),c=0|a,u=0|s,a=0|i,s=0|r,i=0|n,r=0|o;const I=de(k,E,C);n=he(I,A,T,x),o=0|I}({h:n,l:o}=le(0|this.Ah,0|this.Al,0|n,0|o)),({h:i,l:r}=le(0|this.Bh,0|this.Bl,0|i,0|r)),({h:a,l:s}=le(0|this.Ch,0|this.Cl,0|a,0|s)),({h:c,l:u}=le(0|this.Dh,0|this.Dl,0|c,0|u)),({h:l,l:d}=le(0|this.Eh,0|this.El,0|l,0|d)),({h:h,l:f}=le(0|this.Fh,0|this.Fl,0|h,0|f)),({h:p,l:m}=le(0|this.Gh,0|this.Gl,0|p,0|m)),({h:w,l:g}=le(0|this.Hh,0|this.Hl,0|w,0|g)),this.set(n,o,i,r,a,s,c,u,l,d,h,f,p,m,w,g)}roundClean(){ke(bn,yn)}destroy(){ke(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const An=Ne(()=>new pn),kn=Ne(()=>new vn),Tn=An;function En(e){const{commitment:t,version:n=1}=e,o=e.to??("string"==typeof t?"hex":"bytes"),i=Tn(g(r=t,{strict:!1})?Q(r):r);var r;return i.set([n],0),"bytes"===o?i:J(i)}const xn=761855;class Cn extends A{constructor({maxSize:e,size:t}){super("Blob size is too large.",{metaMessages:[`Max: ${e} bytes`,`Given: ${t} bytes`],name:"BlobSizeTooLargeError"})}}class In extends A{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class Sn extends A{constructor({hash:e,size:t}){super(`Versioned hash "${e}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${t}`],name:"InvalidVersionedHashSizeError"})}}class Nn extends A{constructor({hash:e,version:t}){super(`Versioned hash "${e}" version is invalid.`,{metaMessages:["Expected: 1",`Received: ${t}`],name:"InvalidVersionedHashVersionError"})}}const Bn=BigInt(0),Mn=BigInt(1);function Un(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function Rn(e){if(!Un(e))throw new Error("Uint8Array expected")}function Pn(e,t){if("boolean"!=typeof t)throw new Error(e+" boolean expected, got "+t)}function On(e){const t=e.toString(16);return 1&t.length?"0"+t:t}function Ln(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);return""===e?Bn:BigInt("0x"+e)}const Dn="function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex,Fn=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function qn(e){if(Rn(e),Dn)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=Fn[e[n]];return t}function Hn(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function Vn(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);if(Dn)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const o=new Uint8Array(n);for(let i=0,r=0;i<n;i++,r+=2){const t=Hn(e.charCodeAt(r)),n=Hn(e.charCodeAt(r+1));if(void 0===t||void 0===n){const t=e[r]+e[r+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+r)}o[i]=16*t+n}return o}function Wn(e){return Ln(qn(e))}function Gn(e){return Rn(e),Ln(qn(Uint8Array.from(e).reverse()))}function Jn(e,t){return Vn(e.toString(16).padStart(2*t,"0"))}function Yn(e,t){return Jn(e,t).reverse()}function zn(e,t,n){let o;if("string"==typeof t)try{o=Vn(t)}catch(r){throw new Error(e+" must be hex string or Uint8Array, cause: "+r)}else{if(!Un(t))throw new Error(e+" must be hex string or Uint8Array");o=Uint8Array.from(t)}const i=o.length;if("number"==typeof n&&i!==n)throw new Error(e+" of length "+n+" expected, got "+i);return o}function jn(...e){let t=0;for(let o=0;o<e.length;o++){const n=e[o];Rn(n),t+=n.length}const n=new Uint8Array(t);for(let o=0,i=0;o<e.length;o++){const t=e[o];n.set(t,i),i+=t.length}return n}const Xn=e=>"bigint"==typeof e&&Bn<=e;function Qn(e,t,n){return Xn(e)&&Xn(t)&&Xn(n)&&t<=e&&e<n}function Kn(e,t,n,o){if(!Qn(t,n,o))throw new Error("expected valid "+e+": "+n+" <= n < "+o+", got "+t)}const Zn=e=>(Mn<<BigInt(e))-Mn,_n=e=>new Uint8Array(e),$n=e=>Uint8Array.from(e),eo={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||Un(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};function to(e,t,n={}){const o=(t,n,o)=>{const i=eo[n];if("function"!=typeof i)throw new Error("invalid validator function");const r=e[t];if(!(o&&void 0===r||i(r,e)))throw new Error("param "+String(t)+" is invalid. Expected "+n+", got "+r)};for(const[i,r]of Object.entries(t))o(i,r,!1);for(const[i,r]of Object.entries(n))o(i,r,!0);return e}function no(e){const t=new WeakMap;return(n,...o)=>{const i=t.get(n);if(void 0!==i)return i;const r=e(n,...o);return t.set(n,r),r}}class oo extends A{constructor({chainId:e}){super("number"==typeof e?`Chain ID "${e}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}class io extends A{constructor({docsPath:e}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join("\n"),{docsPath:e,docsSlug:"account",name:"AccountNotFoundError"})}}const ro={"0x0":"reverted","0x1":"success"};function ao(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(e=>function(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):null===e.blockTimestamp?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}:{}}}(e)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?H(e.transactionIndex):null,status:e.status?ro[e.status]:null,type:e.type?$t[e.type]||e.type:null};return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}const so=Qt("transactionReceipt",ao);function co(e){const{chainId:t,maxPriorityFeePerGas:n,maxFeePerGas:o,to:i}=e;if(t<=0)throw new oo({chainId:t});if(i&&!tt(i))throw new Ke({address:i});if(o&&o>_t)throw new Dt({maxFeePerGas:o});if(n&&o&&n>o)throw new zt({maxFeePerGas:o,maxPriorityFeePerGas:n})}function uo(e){if(!e||0===e.length)return[];const t=[];for(let n=0;n<e.length;n++){const{address:o,storageKeys:i}=e[n];for(let e=0;e<i.length;e++)if(i[e].length-2!=64)throw new Mt({storageKey:i[e]});if(!tt(o,{strict:!1}))throw new Ke({address:o});t.push([o,i])}return t}function lo(e,t){const n=function(e){if(e.type)return e.type;if(void 0!==e.authorizationList)return"eip7702";if(void 0!==e.blobs||void 0!==e.blobVersionedHashes||void 0!==e.maxFeePerBlobGas||void 0!==e.sidecars)return"eip4844";if(void 0!==e.maxFeePerGas||void 0!==e.maxPriorityFeePerGas)return"eip1559";if(void 0!==e.gasPrice)return void 0!==e.accessList?"eip2930":"legacy";throw new Bt({transaction:e})}(e);return"eip1559"===n?function(e,t){const{chainId:n,gas:o,nonce:i,to:r,value:a,maxFeePerGas:s,maxPriorityFeePerGas:c,accessList:u,data:l}=e;co(e);const d=uo(u);return ot(["0x02",Rt([Y(n),i?Y(i):"0x",c?Y(c):"0x",s?Y(s):"0x",o?Y(o):"0x",r??"0x",a?Y(a):"0x",l??"0x",d,...ho(e,t)])])}(e,t):"eip2930"===n?function(e,t){const{chainId:n,gas:o,data:i,nonce:r,to:a,value:s,accessList:c,gasPrice:u}=e;!function(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:o,maxFeePerGas:i,to:r}=e;if(t<=0)throw new oo({chainId:t});if(r&&!tt(r))throw new Ke({address:r});if(n||i)throw new A("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(o&&o>_t)throw new Dt({maxFeePerGas:o})}(e);const l=uo(c);return ot(["0x01",Rt([Y(n),r?Y(r):"0x",u?Y(u):"0x",o?Y(o):"0x",a??"0x",s?Y(s):"0x",i??"0x",l,...ho(e,t)])])}(e,t):"eip4844"===n?function(e,t){const{chainId:n,gas:o,nonce:i,to:r,value:a,maxFeePerBlobGas:s,maxFeePerGas:c,maxPriorityFeePerGas:u,accessList:l,data:d}=e;!function(e){const{blobVersionedHashes:t}=e;if(t){if(0===t.length)throw new In;for(const e of t){const t=b(e),n=H(it(e,0,1));if(32!==t)throw new Sn({hash:e,size:t});if(1!==n)throw new Nn({hash:e,version:n})}}co(e)}(e);let h=e.blobVersionedHashes,f=e.sidecars;if(e.blobs&&(void 0===h||void 0===f)){const t="string"==typeof e.blobs[0]?e.blobs:e.blobs.map(e=>J(e)),n=e.kzg,o=rn({blobs:t,kzg:n});void 0===h&&(h=function(e){const{commitments:t,version:n}=e,o=e.to??("string"==typeof t[0]?"hex":"bytes"),i=[];for(const r of t)i.push(En({commitment:r,to:o,version:n}));return i}({commitments:o})),void 0===f&&(f=function(e){const{data:t,kzg:n,to:o}=e,i=e.blobs??function(e){const t=e.to??("string"==typeof e.data?"hex":"bytes"),n="string"==typeof e.data?_(e.data):e.data,o=b(n);if(!o)throw new In;if(o>xn)throw new Cn({maxSize:xn,size:o});const i=[];let r=!0,a=0;for(;r;){const e=At(new Uint8Array(131072));let t=0;for(;t<4096;){const o=n.slice(a,a+31);if(e.pushByte(0),e.pushBytes(o),o.length<31){e.pushByte(128),r=!1;break}t++,a+=31}i.push(e)}return"bytes"===t?i.map(e=>e.bytes):i.map(e=>J(e.bytes))}({data:t,to:o}),r=e.commitments??rn({blobs:i,kzg:n,to:o}),a=e.proofs??an({blobs:i,commitments:r,kzg:n,to:o}),s=[];for(let c=0;c<i.length;c++)s.push({blob:i[c],commitment:r[c],proof:a[c]});return s}({blobs:t,commitments:o,proofs:an({blobs:t,commitments:o,kzg:n})}))}const p=uo(l),m=[Y(n),i?Y(i):"0x",u?Y(u):"0x",c?Y(c):"0x",o?Y(o):"0x",r??"0x",a?Y(a):"0x",d??"0x",p,s?Y(s):"0x",h??[],...ho(e,t)],w=[],g=[],y=[];if(f)for(let b=0;b<f.length;b++){const{blob:e,commitment:t,proof:n}=f[b];w.push(e),g.push(t),y.push(n)}return ot(["0x03",Rt(f?[m,w,g,y]:m)])}(e,t):"eip7702"===n?function(e,t){const{authorizationList:n,chainId:o,gas:i,nonce:r,to:a,value:s,maxFeePerGas:c,maxPriorityFeePerGas:u,accessList:l,data:d}=e;!function(e){const{authorizationList:t}=e;if(t)for(const n of t){const{chainId:e}=n,t=n.address;if(!tt(t))throw new Ke({address:t});if(e<0)throw new oo({chainId:e})}co(e)}(e);const h=uo(l),f=function(e){if(!e||0===e.length)return[];const t=[];for(const n of e){const{chainId:e,nonce:o,...i}=n,r=n.address;t.push([e?W(e):"0x",r,o?W(o):"0x",...ho({},i)])}return t}(n);return ot(["0x04",Rt([Y(o),r?Y(r):"0x",u?Y(u):"0x",c?Y(c):"0x",i?Y(i):"0x",a??"0x",s?Y(s):"0x",d??"0x",h,f,...ho(e,t)])])}(e,t):function(e,t){const{chainId:n=0,gas:o,data:i,nonce:r,to:a,value:s,gasPrice:c}=e;!function(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:o,maxFeePerGas:i,to:r}=e;if(r&&!tt(r))throw new Ke({address:r});if(void 0!==t&&t<=0)throw new oo({chainId:t});if(n||i)throw new A("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(o&&o>_t)throw new Dt({maxFeePerGas:o})}(e);let u=[r?Y(r):"0x",c?Y(c):"0x",o?Y(o):"0x",a??"0x",s?Y(s):"0x",i??"0x"];if(t){const e=(()=>{if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(35n===t.v?0n:1n);if(n>0)return BigInt(2*n)+BigInt(35n+t.v-27n);const e=27n+(27n===t.v?0n:1n);if(t.v!==e)throw new Nt({v:t.v});return e})(),o=D(t.r),i=D(t.s);u=[...u,Y(e),"0x00"===o?"0x":o,"0x00"===i?"0x":i]}else n>0&&(u=[...u,Y(n),"0x","0x"]);return Rt(u)}(e,t)}function ho(e,t){const n=t??e,{v:o,yParity:i}=n;if(void 0===n.r)return[];if(void 0===n.s)return[];if(void 0===o&&void 0===i)return[];const r=D(n.r),a=D(n.s);return["number"==typeof i?i?Y(1):"0x":0n===o?"0x":1n===o?Y(1):27n===o?"0x":Y(1),"0x00"===r?"0x":r,"0x00"===a?"0x":a]}function fo(e){const t={formatters:void 0,fees:void 0,serializers:void 0,...e};return Object.assign(t,{extend:function e(t){return n=>{const o="function"==typeof n?n(t):n,i={...t,...o};return Object.assign(i,{extend:e(i)})}}(t)})}class po extends Se{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,function(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.createHasher");be(e.outputLen),be(e.blockLen)}(e);const n=Ie(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,i=new Uint8Array(o);i.set(n.length>o?e.create().update(n).digest():n);for(let r=0;r<i.length;r++)i[r]^=54;this.iHash.update(i),this.oHash=e.create();for(let r=0;r<i.length;r++)i[r]^=106;this.oHash.update(i),ke(i)}update(e){return ve(this),this.iHash.update(e),this}digestInto(e){ve(this),ye(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}o(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:n,finished:o,destroyed:i,blockLen:r,outputLen:a}=this;return e.finished=o,e.destroyed=i,e.blockLen=r,e.outputLen=a,e.oHash=t.o(e.oHash),e.iHash=n.o(e.iHash),e}clone(){return this.o()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const mo=(e,t,n)=>new po(e,t).update(n).digest();mo.create=(e,t)=>new po(e,t);const wo=BigInt(0),go=BigInt(1),bo=BigInt(2),yo=BigInt(3),vo=BigInt(4),Ao=BigInt(5),ko=BigInt(8);function To(e,t){const n=e%t;return n>=wo?n:t+n}function Eo(e,t,n){let o=e;for(;t-- >wo;)o*=o,o%=n;return o}function xo(e,t){if(e===wo)throw new Error("invert: expected non-zero number");if(t<=wo)throw new Error("invert: expected positive modulus, got "+t);let n=To(e,t),o=t,i=wo,r=go;for(;n!==wo;){const e=o%n,t=i-r*(o/n);o=n,n=e,i=r,r=t}if(o!==go)throw new Error("invert: does not exist");return To(i,t)}function Co(e,t){const n=(e.ORDER+go)/vo,o=e.pow(t,n);if(!e.eql(e.sqr(o),t))throw new Error("Cannot find square root");return o}function Io(e,t){const n=(e.ORDER-Ao)/ko,o=e.mul(t,bo),i=e.pow(o,n),r=e.mul(t,i),a=e.mul(e.mul(r,bo),i),s=e.mul(r,e.sub(a,e.ONE));if(!e.eql(e.sqr(s),t))throw new Error("Cannot find square root");return s}const So=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function No(e,t,n=!1){const o=new Array(t.length).fill(n?e.ZERO:void 0),i=t.reduce((t,n,i)=>e.is0(n)?t:(o[i]=t,e.mul(t,n)),e.ONE),r=e.inv(i);return t.reduceRight((t,n,i)=>e.is0(n)?t:(o[i]=e.mul(t,o[i]),e.mul(t,n)),r),o}function Bo(e,t){const n=(e.ORDER-go)/bo,o=e.pow(t,n),i=e.eql(o,e.ONE),r=e.eql(o,e.ZERO),a=e.eql(o,e.neg(e.ONE));if(!i&&!r&&!a)throw new Error("invalid Legendre symbol result");return i?1:r?0:-1}function Mo(e,t){void 0!==t&&be(t);const n=void 0!==t?t:e.toString(2).length;return{nBitLength:n,nByteLength:Math.ceil(n/8)}}function Uo(e,t,n=!1,o={}){if(e<=wo)throw new Error("invalid field: expected ORDER > 0, got "+e);const{nBitLength:i,nByteLength:r}=Mo(e,t);if(r>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let a;const s=Object.freeze({ORDER:e,isLE:n,BITS:i,BYTES:r,MASK:Zn(i),ZERO:wo,ONE:go,create:t=>To(t,e),isValid:t=>{if("bigint"!=typeof t)throw new Error("invalid field element: expected bigint, got "+typeof t);return wo<=t&&t<e},is0:e=>e===wo,isOdd:e=>(e&go)===go,neg:t=>To(-t,e),eql:(e,t)=>e===t,sqr:t=>To(t*t,e),add:(t,n)=>To(t+n,e),sub:(t,n)=>To(t-n,e),mul:(t,n)=>To(t*n,e),pow:(e,t)=>function(e,t,n){if(n<wo)throw new Error("invalid exponent, negatives unsupported");if(n===wo)return e.ONE;if(n===go)return t;let o=e.ONE,i=t;for(;n>wo;)n&go&&(o=e.mul(o,i)),i=e.sqr(i),n>>=go;return o}(s,e,t),div:(t,n)=>To(t*xo(n,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>xo(t,e),sqrt:o.sqrt||(t=>{return a||(a=(n=e)%vo===yo?Co:n%ko===Ao?Io:function(e){if(e<BigInt(3))throw new Error("sqrt is not defined for small field");let t=e-go,n=0;for(;t%bo===wo;)t/=bo,n++;let o=bo;const i=Uo(e);for(;1===Bo(i,o);)if(o++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(1===n)return Co;let r=i.pow(o,t);const a=(t+go)/bo;return function(e,o){if(e.is0(o))return o;if(1!==Bo(e,o))throw new Error("Cannot find square root");let i=n,s=e.mul(e.ONE,r),c=e.pow(o,t),u=e.pow(o,a);for(;!e.eql(c,e.ONE);){if(e.is0(c))return e.ZERO;let t=1,n=e.sqr(c);for(;!e.eql(n,e.ONE);)if(t++,n=e.sqr(n),t===i)throw new Error("Cannot find square root");const o=go<<BigInt(i-t-1),r=e.pow(s,o);i=t,s=e.sqr(r),c=e.mul(c,s),u=e.mul(u,r)}return u}}(n)),a(s,t);var n}),toBytes:e=>n?Yn(e,r):Jn(e,r),fromBytes:e=>{if(e.length!==r)throw new Error("Field.fromBytes: expected "+r+" bytes, got "+e.length);return n?Gn(e):Wn(e)},invertBatch:e=>No(s,e),cmov:(e,t,n)=>n?t:e});return Object.freeze(s)}function Ro(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function Po(e){const t=Ro(e);return t+Math.ceil(t/2)}const Oo=BigInt(0),Lo=BigInt(1);function Do(e,t){const n=t.negate();return e?n:t}function Fo(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function qo(e,t){Fo(e,t);const n=2**e;return{windows:Math.ceil(t/e)+1,windowSize:2**(e-1),mask:Zn(e),maxNumber:n,shiftBy:BigInt(e)}}function Ho(e,t,n){const{windowSize:o,mask:i,maxNumber:r,shiftBy:a}=n;let s=Number(e&i),c=e>>a;s>o&&(s-=r,c+=Lo);const u=t*o;return{nextN:c,offset:u+Math.abs(s)-1,isZero:0===s,isNeg:s<0,isNegF:t%2!=0,offsetF:u}}const Vo=new WeakMap,Wo=new WeakMap;function Go(e){return Wo.get(e)||1}function Jo(e,t){return{constTimeNegate:Do,hasPrecomputes:e=>1!==Go(e),unsafeLadder(t,n,o=e.ZERO){let i=t;for(;n>Oo;)n&Lo&&(o=o.add(i)),i=i.double(),n>>=Lo;return o},precomputeWindow(e,n){const{windows:o,windowSize:i}=qo(n,t),r=[];let a=e,s=a;for(let t=0;t<o;t++){s=a,r.push(s);for(let e=1;e<i;e++)s=s.add(a),r.push(s);a=s.double()}return r},wNAF(n,o,i){let r=e.ZERO,a=e.BASE;const s=qo(n,t);for(let e=0;e<s.windows;e++){const{nextN:t,offset:n,isZero:c,isNeg:u,isNegF:l,offsetF:d}=Ho(i,e,s);i=t,c?a=a.add(Do(l,o[d])):r=r.add(Do(u,o[n]))}return{p:r,f:a}},wNAFUnsafe(n,o,i,r=e.ZERO){const a=qo(n,t);for(let e=0;e<a.windows&&i!==Oo;e++){const{nextN:t,offset:n,isZero:s,isNeg:c}=Ho(i,e,a);if(i=t,!s){const e=o[n];r=r.add(c?e.negate():e)}}return r},getPrecomputes(e,t,n){let o=Vo.get(t);return o||(o=this.precomputeWindow(t,e),1!==e&&Vo.set(t,n(o))),o},wNAFCached(e,t,n){const o=Go(e);return this.wNAF(o,this.getPrecomputes(o,e,n),t)},wNAFCachedUnsafe(e,t,n,o){const i=Go(e);return 1===i?this.unsafeLadder(e,t,o):this.wNAFUnsafe(i,this.getPrecomputes(i,e,n),t,o)},setWindowSize(e,n){Fo(n,t),Wo.set(e,n),Vo.delete(e)}}}function Yo(e,t,n,o){!function(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((e,n)=>{if(!(e instanceof t))throw new Error("invalid point at index "+n)})}(n,e),function(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((e,n)=>{if(!t.isValid(e))throw new Error("invalid scalar at index "+n)})}(o,t);const i=n.length,r=o.length;if(i!==r)throw new Error("arrays of points and scalars must have equal length");const a=e.ZERO,s=function(e){let t;for(t=0;e>Bn;e>>=Mn,t+=1);return t}(BigInt(i));let c=1;s>12?c=s-3:s>4?c=s-2:s>0&&(c=2);const u=Zn(c),l=new Array(Number(u)+1).fill(a);let d=a;for(let h=Math.floor((t.BITS-1)/c)*c;h>=0;h-=c){l.fill(a);for(let t=0;t<r;t++){const e=o[t],i=Number(e>>BigInt(h)&u);l[i]=l[i].add(n[t])}let e=a;for(let t=l.length-1,n=a;t>0;t--)n=n.add(l[t]),e=e.add(n);if(d=d.add(e),0!==h)for(let t=0;t<c;t++)d=d.double()}return d}function zo(e){return to(e.Fp,So.reduce((e,t)=>(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"})),to(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Mo(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}function jo(e){void 0!==e.lowS&&Pn("lowS",e.lowS),void 0!==e.prehash&&Pn("prehash",e.prehash)}class Xo extends Error{constructor(e=""){super(e)}}const Qo={Err:Xo,u:{encode:(e,t)=>{const{Err:n}=Qo;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(1&t.length)throw new n("tlv.encode: unpadded data");const o=t.length/2,i=On(o);if(i.length/2&128)throw new n("tlv.encode: long form length too big");const r=o>127?On(i.length/2|128):"";return On(e)+r+i+t},decode(e,t){const{Err:n}=Qo;let o=0;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length<2||t[o++]!==e)throw new n("tlv.decode: wrong tlv");const i=t[o++];let r=0;if(128&i){const e=127&i;if(!e)throw new n("tlv.decode(long): indefinite length not supported");if(e>4)throw new n("tlv.decode(long): byte length is too big");const a=t.subarray(o,o+e);if(a.length!==e)throw new n("tlv.decode: length bytes not complete");if(0===a[0])throw new n("tlv.decode(long): zero leftmost byte");for(const t of a)r=r<<8|t;if(o+=e,r<128)throw new n("tlv.decode(long): not minimal encoding")}else r=i;const a=t.subarray(o,o+r);if(a.length!==r)throw new n("tlv.decode: wrong value length");return{v:a,l:t.subarray(o+r)}}},T:{encode(e){const{Err:t}=Qo;if(e<Zo)throw new t("integer: negative integers are not allowed");let n=On(e);if(8&Number.parseInt(n[0],16)&&(n="00"+n),1&n.length)throw new t("unexpected DER parsing assertion: unpadded hex");return n},decode(e){const{Err:t}=Qo;if(128&e[0])throw new t("invalid signature integer: negative");if(0===e[0]&&!(128&e[1]))throw new t("invalid signature integer: unnecessary leading zero");return Wn(e)}},toSig(e){const{Err:t,T:n,u:o}=Qo,i=zn("signature",e),{v:r,l:a}=o.decode(48,i);if(a.length)throw new t("invalid signature: left bytes after parsing");const{v:s,l:c}=o.decode(2,r),{v:u,l:l}=o.decode(2,c);if(l.length)throw new t("invalid signature: left bytes after parsing");return{r:n.decode(s),s:n.decode(u)}},hexFromSig(e){const{u:t,T:n}=Qo,o=t.encode(2,n.encode(e.r))+t.encode(2,n.encode(e.s));return t.encode(48,o)}};function Ko(e,t){return qn(Jn(e,t))}const Zo=BigInt(0),_o=BigInt(1);BigInt(2);const $o=BigInt(3),ei=BigInt(4);function ti(e){const t=function(e){const t=zo(e);return to(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:n,n:o,nByteLength:i,nBitLength:r}=t,a=n.BYTES+1,s=2*n.BYTES+1;function c(e){return To(e,o)}function u(e){return xo(e,o)}const{ProjectivePoint:l,normPrivateKeyToScalar:d,weierstrassEquation:h,isWithinCurveOrder:f}=function(e){const t=function(e){const t=zo(e);to(t,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});const{endo:n,Fp:o,a:i}=t;if(n){if(!o.eql(i,o.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if("object"!=typeof n||"bigint"!=typeof n.beta||"function"!=typeof n.splitScalar)throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...t})}(e),{Fp:n}=t,o=Uo(t.n,t.nBitLength),i=t.toBytes||((e,t,o)=>{const i=t.toAffine();return jn(Uint8Array.from([4]),n.toBytes(i.x),n.toBytes(i.y))}),r=t.fromBytes||(e=>{const t=e.subarray(1);return{x:n.fromBytes(t.subarray(0,n.BYTES)),y:n.fromBytes(t.subarray(n.BYTES,2*n.BYTES))}});function a(e){const{a:o,b:i}=t,r=n.sqr(e),a=n.mul(r,e);return n.add(n.add(a,n.mul(e,o)),i)}function s(e,t){const o=n.sqr(t),i=a(e);return n.eql(o,i)}if(!s(t.Gx,t.Gy))throw new Error("bad curve params: generator point");const c=n.mul(n.pow(t.a,$o),ei),u=n.mul(n.sqr(t.b),BigInt(27));if(n.is0(n.add(c,u)))throw new Error("bad curve params: a or b");function l(e){const{allowedPrivateKeyLengths:n,nByteLength:o,wrapPrivateKey:i,n:r}=t;if(n&&"bigint"!=typeof e){if(Un(e)&&(e=qn(e)),"string"!=typeof e||!n.includes(e.length))throw new Error("invalid private key");e=e.padStart(2*o,"0")}let a;try{a="bigint"==typeof e?e:Wn(zn("private key",e,o))}catch(s){throw new Error("invalid private key, expected hex or "+o+" bytes, got "+typeof e)}return i&&(a=To(a,r)),Kn("private key",a,_o,r),a}function d(e){if(!(e instanceof p))throw new Error("ProjectivePoint expected")}const h=no((e,t)=>{const{px:o,py:i,pz:r}=e;if(n.eql(r,n.ONE))return{x:o,y:i};const a=e.is0();null==t&&(t=a?n.ONE:n.inv(r));const s=n.mul(o,t),c=n.mul(i,t),u=n.mul(r,t);if(a)return{x:n.ZERO,y:n.ZERO};if(!n.eql(u,n.ONE))throw new Error("invZ was invalid");return{x:s,y:c}}),f=no(e=>{if(e.is0()){if(t.allowInfinityPoint&&!n.is0(e.py))return;throw new Error("bad point: ZERO")}const{x:o,y:i}=e.toAffine();if(!n.isValid(o)||!n.isValid(i))throw new Error("bad point: x or y not FE");if(!s(o,i))throw new Error("bad point: equation left != right");if(!e.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class p{constructor(e,t,o){if(null==e||!n.isValid(e))throw new Error("x required");if(null==t||!n.isValid(t)||n.is0(t))throw new Error("y required");if(null==o||!n.isValid(o))throw new Error("z required");this.px=e,this.py=t,this.pz=o,Object.freeze(this)}static fromAffine(e){const{x:t,y:o}=e||{};if(!e||!n.isValid(t)||!n.isValid(o))throw new Error("invalid affine point");if(e instanceof p)throw new Error("projective point not allowed");const i=e=>n.eql(e,n.ZERO);return i(t)&&i(o)?p.ZERO:new p(t,o,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=No(n,e.map(e=>e.pz));return e.map((e,n)=>e.toAffine(t[n])).map(p.fromAffine)}static fromHex(e){const t=p.fromAffine(r(zn("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return p.BASE.multiply(l(e))}static msm(e,t){return Yo(p,o,e,t)}I(e){g.setWindowSize(this,e)}assertValidity(){f(this)}hasEvenY(){const{y:e}=this.toAffine();if(n.isOdd)return!n.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){d(e);const{px:t,py:o,pz:i}=this,{px:r,py:a,pz:s}=e,c=n.eql(n.mul(t,s),n.mul(r,i)),u=n.eql(n.mul(o,s),n.mul(a,i));return c&&u}negate(){return new p(this.px,n.neg(this.py),this.pz)}double(){const{a:e,b:o}=t,i=n.mul(o,$o),{px:r,py:a,pz:s}=this;let c=n.ZERO,u=n.ZERO,l=n.ZERO,d=n.mul(r,r),h=n.mul(a,a),f=n.mul(s,s),m=n.mul(r,a);return m=n.add(m,m),l=n.mul(r,s),l=n.add(l,l),c=n.mul(e,l),u=n.mul(i,f),u=n.add(c,u),c=n.sub(h,u),u=n.add(h,u),u=n.mul(c,u),c=n.mul(m,c),l=n.mul(i,l),f=n.mul(e,f),m=n.sub(d,f),m=n.mul(e,m),m=n.add(m,l),l=n.add(d,d),d=n.add(l,d),d=n.add(d,f),d=n.mul(d,m),u=n.add(u,d),f=n.mul(a,s),f=n.add(f,f),d=n.mul(f,m),c=n.sub(c,d),l=n.mul(f,h),l=n.add(l,l),l=n.add(l,l),new p(c,u,l)}add(e){d(e);const{px:o,py:i,pz:r}=this,{px:a,py:s,pz:c}=e;let u=n.ZERO,l=n.ZERO,h=n.ZERO;const f=t.a,m=n.mul(t.b,$o);let w=n.mul(o,a),g=n.mul(i,s),b=n.mul(r,c),y=n.add(o,i),v=n.add(a,s);y=n.mul(y,v),v=n.add(w,g),y=n.sub(y,v),v=n.add(o,r);let A=n.add(a,c);return v=n.mul(v,A),A=n.add(w,b),v=n.sub(v,A),A=n.add(i,r),u=n.add(s,c),A=n.mul(A,u),u=n.add(g,b),A=n.sub(A,u),h=n.mul(f,v),u=n.mul(m,b),h=n.add(u,h),u=n.sub(g,h),h=n.add(g,h),l=n.mul(u,h),g=n.add(w,w),g=n.add(g,w),b=n.mul(f,b),v=n.mul(m,v),g=n.add(g,b),b=n.sub(w,b),b=n.mul(f,b),v=n.add(v,b),w=n.mul(g,v),l=n.add(l,w),w=n.mul(A,v),u=n.mul(y,u),u=n.sub(u,w),w=n.mul(y,g),h=n.mul(A,h),h=n.add(h,w),new p(u,l,h)}subtract(e){return this.add(e.negate())}is0(){return this.equals(p.ZERO)}wNAF(e){return g.wNAFCached(this,e,p.normalizeZ)}multiplyUnsafe(e){const{endo:o,n:i}=t;Kn("scalar",e,Zo,i);const r=p.ZERO;if(e===Zo)return r;if(this.is0()||e===_o)return this;if(!o||g.hasPrecomputes(this))return g.wNAFCachedUnsafe(this,e,p.normalizeZ);let{k1neg:a,k1:s,k2neg:c,k2:u}=o.splitScalar(e),l=r,d=r,h=this;for(;s>Zo||u>Zo;)s&_o&&(l=l.add(h)),u&_o&&(d=d.add(h)),h=h.double(),s>>=_o,u>>=_o;return a&&(l=l.negate()),c&&(d=d.negate()),d=new p(n.mul(d.px,o.beta),d.py,d.pz),l.add(d)}multiply(e){const{endo:o,n:i}=t;let r,a;if(Kn("scalar",e,_o,i),o){const{k1neg:t,k1:i,k2neg:s,k2:c}=o.splitScalar(e);let{p:u,f:l}=this.wNAF(i),{p:d,f:h}=this.wNAF(c);u=g.constTimeNegate(t,u),d=g.constTimeNegate(s,d),d=new p(n.mul(d.px,o.beta),d.py,d.pz),r=u.add(d),a=l.add(h)}else{const{p:t,f:n}=this.wNAF(e);r=t,a=n}return p.normalizeZ([r,a])[0]}multiplyAndAddUnsafe(e,t,n){const o=p.BASE,i=(e,t)=>t!==Zo&&t!==_o&&e.equals(o)?e.multiply(t):e.multiplyUnsafe(t),r=i(this,t).add(i(e,n));return r.is0()?void 0:r}toAffine(e){return h(this,e)}isTorsionFree(){const{h:e,isTorsionFree:n}=t;if(e===_o)return!0;if(n)return n(p,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:n}=t;return e===_o?this:n?n(p,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return Pn("isCompressed",e),this.assertValidity(),i(p,this,e)}toHex(e=!0){return Pn("isCompressed",e),qn(this.toRawBytes(e))}}p.BASE=new p(t.Gx,t.Gy,n.ONE),p.ZERO=new p(n.ZERO,n.ONE,n.ZERO);const{endo:m,nBitLength:w}=t,g=Jo(p,m?Math.ceil(w/2):w);return{CURVE:t,ProjectivePoint:p,normPrivateKeyToScalar:l,weierstrassEquation:a,isWithinCurveOrder:function(e){return Qn(e,_o,t.n)}}}({...t,toBytes(e,t,o){const i=t.toAffine(),r=n.toBytes(i.x),a=jn;return Pn("isCompressed",o),o?a(Uint8Array.from([t.hasEvenY()?2:3]),r):a(Uint8Array.from([4]),r,n.toBytes(i.y))},fromBytes(e){const t=e.length,o=e[0],i=e.subarray(1);if(t!==a||2!==o&&3!==o){if(t===s&&4===o)return{x:n.fromBytes(i.subarray(0,n.BYTES)),y:n.fromBytes(i.subarray(n.BYTES,2*n.BYTES))};throw new Error("invalid Point, expected length of "+a+", or uncompressed "+s+", got "+t)}{const e=Wn(i);if(!Qn(e,_o,n.ORDER))throw new Error("Point is not on curve");const t=h(e);let a;try{a=n.sqrt(t)}catch(r){const e=r instanceof Error?": "+r.message:"";throw new Error("Point is not on curve"+e)}return!(1&~o)!=((a&_o)===_o)&&(a=n.neg(a)),{x:e,y:a}}}});function p(e){return e>o>>_o}const m=(e,t,n)=>Wn(e.slice(t,n));class w{constructor(e,t,n){Kn("r",e,_o,o),Kn("s",t,_o,o),this.r=e,this.s=t,null!=n&&(this.recovery=n),Object.freeze(this)}static fromCompact(e){const t=i;return e=zn("compactSignature",e,2*t),new w(m(e,0,t),m(e,t,2*t))}static fromDER(e){const{r:t,s:n}=Qo.toSig(zn("DER",e));return new w(t,n)}assertValidity(){}addRecoveryBit(e){return new w(this.r,this.s,e)}recoverPublicKey(e){const{r:o,s:i,recovery:r}=this,a=v(zn("msgHash",e));if(null==r||![0,1,2,3].includes(r))throw new Error("recovery id invalid");const s=2===r||3===r?o+t.n:o;if(s>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const d=1&r?"03":"02",h=l.fromHex(d+Ko(s,n.BYTES)),f=u(s),p=c(-a*f),m=c(i*f),w=l.BASE.multiplyAndAddUnsafe(h,p,m);if(!w)throw new Error("point at infinify");return w.assertValidity(),w}hasHighS(){return p(this.s)}normalizeS(){return this.hasHighS()?new w(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return Vn(this.toDERHex())}toDERHex(){return Qo.hexFromSig(this)}toCompactRawBytes(){return Vn(this.toCompactHex())}toCompactHex(){const e=i;return Ko(this.r,e)+Ko(this.s,e)}}const g={isValidPrivateKey(e){try{return d(e),!0}catch(t){return!1}},normPrivateKeyToScalar:d,randomPrivateKey:()=>{const e=Po(t.n);return function(e,t,n=!1){const o=e.length,i=Ro(t),r=Po(t);if(o<16||o<r||o>1024)throw new Error("expected "+r+"-1024 bytes of input, got "+o);const a=To(n?Gn(e):Wn(e),t-go)+go;return n?Yn(a,i):Jn(a,i)}(t.randomBytes(e),t.n)},precompute:(e=8,t=l.BASE)=>(t.I(e),t.multiply(BigInt(3)),t)};function b(e){if("bigint"==typeof e)return!1;if(e instanceof l)return!0;const o=zn("key",e).length,r=n.BYTES,a=r+1,s=2*r+1;return t.allowedPrivateKeyLengths||i===a?void 0:o===a||o===s}const y=t.bits2int||function(e){if(e.length>8192)throw new Error("input is too large");const t=Wn(e),n=8*e.length-r;return n>0?t>>BigInt(n):t},v=t.bits2int_modN||function(e){return c(y(e))},A=Zn(r);function k(e){return Kn("num < 2^"+r,e,Zo,A),Jn(e,i)}const T={lowS:t.lowS,prehash:!1},E={lowS:t.lowS,prehash:!1};return l.BASE.I(8),{CURVE:t,getPublicKey:function(e,t=!0){return l.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,n=!0){if(!0===b(e))throw new Error("first arg must be private key");if(!1===b(t))throw new Error("second arg must be public key");return l.fromHex(t).multiply(d(e)).toRawBytes(n)},sign:function(e,o,i=T){const{seed:r,k2sig:a}=function(e,o,i=T){if(["recovered","canonical"].some(e=>e in i))throw new Error("sign() legacy options not supported");const{hash:r,randomBytes:a}=t;let{lowS:s,prehash:h,extraEntropy:m}=i;null==s&&(s=!0),e=zn("msgHash",e),jo(i),h&&(e=zn("prehashed msgHash",r(e)));const g=v(e),b=d(o),A=[k(b),k(g)];if(null!=m&&!1!==m){const e=!0===m?a(n.BYTES):m;A.push(zn("extraEntropy",e))}const E=jn(...A),x=g;return{seed:E,k2sig:function(e){const t=y(e);if(!f(t))return;const n=u(t),o=l.BASE.multiply(t).toAffine(),i=c(o.x);if(i===Zo)return;const r=c(n*c(x+i*b));if(r===Zo)return;let a=(o.x===i?0:2)|Number(o.y&_o),d=r;return s&&p(r)&&(d=function(e){return p(e)?c(-e):e}(r),a^=1),new w(i,d,a)}}}(e,o,i),s=t;return function(e,t,n){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof n)throw new Error("hmacFn must be a function");let o=_n(e),i=_n(e),r=0;const a=()=>{o.fill(1),i.fill(0),r=0},s=(...e)=>n(i,o,...e),c=(e=_n(0))=>{i=s($n([0]),e),o=s(),0!==e.length&&(i=s($n([1]),e),o=s())},u=()=>{if(r++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const n=[];for(;e<t;){o=s();const t=o.slice();n.push(t),e+=o.length}return jn(...n)};return(e,t)=>{let n;for(a(),c(e);!(n=t(u()));)c();return a(),n}}(s.hash.outputLen,s.nByteLength,s.hmac)(r,a)},verify:function(e,n,o,i=E){const r=e;n=zn("msgHash",n),o=zn("publicKey",o);const{lowS:a,prehash:s,format:d}=i;if(jo(i),"strict"in i)throw new Error("options.strict was renamed to lowS");if(void 0!==d&&"compact"!==d&&"der"!==d)throw new Error("format must be compact or der");const h="string"==typeof r||Un(r),f=!h&&!d&&"object"==typeof r&&null!==r&&"bigint"==typeof r.r&&"bigint"==typeof r.s;if(!h&&!f)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let p,m;try{if(f&&(p=new w(r.r,r.s)),h){try{"compact"!==d&&(p=w.fromDER(r))}catch(C){if(!(C instanceof Qo.Err))throw C}p||"der"===d||(p=w.fromCompact(r))}m=l.fromHex(o)}catch(I){return!1}if(!p)return!1;if(a&&p.hasHighS())return!1;s&&(n=t.hash(n));const{r:g,s:b}=p,y=v(n),A=u(b),k=c(y*A),T=c(g*A),x=l.BASE.multiplyAndAddUnsafe(m,k,T)?.toAffine();return!!x&&c(x.x)===g},ProjectivePoint:l,Signature:w,utils:g}}function ni(e){return{hash:e,hmac:(t,...n)=>mo(e,t,function(...e){let t=0;for(let o=0;o<e.length;o++){const n=e[o];ye(n),t+=n.length}const n=new Uint8Array(t);for(let o=0,i=0;o<e.length;o++){const t=e[o];n.set(t,i),i+=t.length}return n}(...n)),randomBytes:Be}}const oi=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),ii=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),ri=BigInt(0),ai=BigInt(1),si=BigInt(2),ci=(e,t)=>(e+t/si)/t,ui=Uo(oi,void 0,void 0,{sqrt:function(e){const t=oi,n=BigInt(3),o=BigInt(6),i=BigInt(11),r=BigInt(22),a=BigInt(23),s=BigInt(44),c=BigInt(88),u=e*e*e%t,l=u*u*e%t,d=Eo(l,n,t)*l%t,h=Eo(d,n,t)*l%t,f=Eo(h,si,t)*u%t,p=Eo(f,i,t)*f%t,m=Eo(p,r,t)*p%t,w=Eo(m,s,t)*m%t,g=Eo(w,c,t)*w%t,b=Eo(g,s,t)*m%t,y=Eo(b,n,t)*l%t,v=Eo(y,a,t)*p%t,A=Eo(v,o,t)*u%t,k=Eo(A,si,t);if(!ui.eql(ui.sqr(k),e))throw new Error("Cannot find square root");return k}}),li=function(e,t){const n=t=>ti({...e,...ni(t)});return{...n(t),create:n}}({a:ri,b:BigInt(7),Fp:ui,n:ii,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=ii,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),o=-ai*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),r=n,a=BigInt("0x100000000000000000000000000000000"),s=ci(r*e,t),c=ci(-o*e,t);let u=To(e-s*n-c*i,t),l=To(-s*o-c*r,t);const d=u>a,h=l>a;if(d&&(u=t-u),h&&(l=t-l),u>a||l>a)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:d,k1:u,k2neg:h,k2:l}}}},An);class di extends A{constructor({value:e}){super(`Number \`${e}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}function hi(e,t){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(e))throw new di({value:e});let[n,o="0"]=e.split(".");const i=n.startsWith("-");if(i&&(n=n.slice(1)),o=o.replace(/(0+)$/,""),0===t)1===Math.round(Number(`.${o}`))&&(n=`${BigInt(n)+1n}`),o="";else if(o.length>t){const[e,i,r]=[o.slice(0,t-1),o.slice(t-1,t),o.slice(t)],a=Math.round(Number(`${i}.${r}`));o=a>9?`${BigInt(e)+BigInt(1)}0`.padStart(e.length+1,"0"):`${e}${a}`,o.length>t&&(o=o.slice(1),n=`${BigInt(n)+1n}`),o=o.slice(0,t)}else o=o.padEnd(t,"0");return BigInt(`${i?"-":""}${n}${o}`)}const fi="0x0000000000000000000000000000000000000000",pi={blockTime:2e3,contracts:{gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}},formatters:{block:on({format(e){const t=e.transactions?.map(e=>{if("string"==typeof e)return e;const t=en(e);return"0x7e"===t.typeHex&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?q(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t});return{transactions:t,stateRoot:e.stateRoot}}}),transaction:tn({format(e){const t={};return"0x7e"===e.type&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?q(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:so({format:e=>({l1GasPrice:e.l1GasPrice?q(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?q(e.l1GasUsed):null,l1Fee:e.l1Fee?q(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null})})},serializers:{transaction:function(e,t){return function(e){return"deposit"===e.type||void 0!==e.sourceHash}(e)?function(e){!function(e){const{from:t,to:n}=e;if(t&&!tt(t))throw new Ke({address:t});if(n&&!tt(n))throw new Ke({address:n})}(e);const{sourceHash:t,data:n,from:o,gas:i,isSystemTx:r,mint:a,to:s,value:c}=e;return ot(["0x7e",Rt([t,o,s??"0x",a?W(a):"0x",c?W(c):"0x",i?W(i):"0x",r?"0x1":"0x",n??"0x"])])}(e):lo(e,t)}}},mi=fo({id:42161,name:"Arbitrum One",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:250,rpcUrls:{default:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://arbiscan.io",apiUrl:"https://api.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7654707}}}),wi=fo({id:43114,name:"Avalanche",blockTime:1700,nativeCurrency:{decimals:18,name:"Avalanche",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax.network/ext/bc/C/rpc"]}},blockExplorers:{default:{name:"SnowTrace",url:"https://snowtrace.io",apiUrl:"https://api.snowtrace.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11907934}}}),gi=1,bi=fo({...pi,id:8453,name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://basescan.org",apiUrl:"https://api.basescan.org/api"}},contracts:{...pi.contracts,disputeGameFactory:{[gi]:{address:"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"}},l2OutputOracle:{[gi]:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{[gi]:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{[gi]:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:1}),yi=fo({id:56,name:"BNB Smart Chain",blockTime:750,nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://56.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"BscScan",url:"https://bscscan.com",apiUrl:"https://api.bscscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15921452}}});async function vi(e,t){const{account:n=e.account}=t;if(!n)throw new io;const o=pt(n);try{const{accessList:n,blockNumber:i,blockTag:r,data:a,gas:s,gasPrice:c,maxFeePerGas:u,maxPriorityFeePerGas:l,nonce:d,to:h,value:f,...p}=t,m=("bigint"==typeof i?Y(i):void 0)||r;!function(e){const{account:t,maxFeePerGas:n,maxPriorityFeePerGas:o,to:i}=e,r=t?pt(t):void 0;if(r&&!tt(r.address))throw new Ke({address:r.address});if(i&&!tt(i))throw new Ke({address:i});if(n&&n>_t)throw new Dt({maxFeePerGas:n});if(o&&n&&o>n)throw new zt({maxFeePerGas:n,maxPriorityFeePerGas:o})}(t);const w=e.chain?.formatters?.transactionRequest?.format,g=(w||Zt)({...Xt(p,{format:w}),account:o,accessList:n,data:a,gas:s,gasPrice:c,maxFeePerGas:u,maxPriorityFeePerGas:l,nonce:d,to:h,value:f},"estimateGas"),{baseFeePerGas:b,gasLimit:y,priorityFeePerGas:v}=await e.request({method:"linea_estimateGas",params:m?[g,m]:[g]});return{baseFeePerGas:BigInt(b),gasLimit:BigInt(y),priorityFeePerGas:BigInt(v)}}catch(i){throw function(e,{docsPath:t,...n}){const o=(()=>{const t=function(e,t){const n=(e.details||"").toLowerCase(),o=e instanceof A?e.walk(e=>e?.code===Lt.code):e;return o instanceof A?new Lt({cause:e,message:o.details}):Lt.nodeMessage.test(n)?new Lt({cause:e,message:e.details}):Dt.nodeMessage.test(n)?new Dt({cause:e,maxFeePerGas:t?.maxFeePerGas}):Ft.nodeMessage.test(n)?new Ft({cause:e,maxFeePerGas:t?.maxFeePerGas}):qt.nodeMessage.test(n)?new qt({cause:e,nonce:t?.nonce}):Ht.nodeMessage.test(n)?new Ht({cause:e,nonce:t?.nonce}):Vt.nodeMessage.test(n)?new Vt({cause:e,nonce:t?.nonce}):Wt.nodeMessage.test(n)?new Wt({cause:e}):Gt.nodeMessage.test(n)?new Gt({cause:e,gas:t?.gas}):Jt.nodeMessage.test(n)?new Jt({cause:e,gas:t?.gas}):Yt.nodeMessage.test(n)?new Yt({cause:e}):zt.nodeMessage.test(n)?new zt({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new jt({cause:e})}(e,n);return t instanceof jt?e:t})();return new Ut(o,{docsPath:t,...n})}(i,{...t,account:o,chain:e.chain})}}async function Ai({client:e,multiply:t,request:n,type:o}){try{const i=await vi(e,{...n,account:n?.account}),{priorityFeePerGas:r}=i,a=t(BigInt(i.baseFeePerGas))+r;return"legacy"===o?{gasPrice:a}:{maxFeePerGas:a,maxPriorityFeePerGas:r}}catch{return null}}const ki=fo({fees:{estimateFeesPerGas:Ai,async maxPriorityFeePerGas({block:e,client:t,request:n}){const o=await Ai({block:e,client:t,multiply:e=>e,request:n,type:"eip1559"});return o?.maxPriorityFeePerGas?o.maxPriorityFeePerGas:null}},id:59144,name:"Linea Mainnet",blockTime:2e3,nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://lineascan.build",apiUrl:"https://api.lineascan.build/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:42},ensRegistry:{address:"0x50130b669B28C339991d8676FA73CF122a121267",blockCreated:6682888},ensUniversalResolver:{address:"0x4D41762915F83c76EcaF6776d9b08076aA32b492",blockCreated:22222151}},ensTlds:[".linea.eth"],testnet:!1}),Ti=1,Ei=1,xi={1:{...fo({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:12e3,rpcUrls:{default:{http:["https://eth.merkle.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:23085558},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGgAAABoCAYAAAAdHLWhAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAAJalJREFUeAHVfQl4HNWZ4F/V96Vu3ZItS7IlMLLNEWTAGAwGAjmGhJ1JyHwQIGQ3B2ENhOwm2Xgg6xwfJGQIuwMTNiwTjswZhhyETABD4jiEK8YH2JIPWdjWZVmybqmvqnrz/+9Vtaqrq7pbp81vl6r61Tv///3H+99REry/QTLdmSXc+M3gfQwSnP5AdZTufrwrFpHClwOTGyUJGpmmNYDGGpnEYvg+yhjemaankEGSpBHG1FFZ8hyRXS7QNPUdSfZ0qqmJd4bV4T1/v6llSM//tCbg6UggXqf/9aPjy72uwHVMhvOYplyuqUqDpqVBVdOIUgaaquavPYOs90gwkF0ekGU3vyTJddTl8e5mavo5Na3tvm9T5S5TytMGThcCcS6559HBjZLbcx1TlOtUTWlQlAQgApFR7HEmyy5MiP9kmSiA/2UdvZpIQ89MJe5xxLrb7cXLD5LbfdTl8mzT0qmnv/ulim08k9MATjWBpP/+SHtZhXfJnYqmXqcqyXOVVJwj1AxECBkRiQjkxOCcILkccgRbHtCQUAzzRU7kXKjxS8lOiuW4PT7weINHNU37tsbS2753e817cAq56lQQiJe5+ZGBD2DXvVXStJuTqYmYqqSmIyA3UK8mohDCOGcsADDUWVSumk4i0VLTHQPJgeIPPJ4A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Al5Kmov6Z0WcsNq/yR5S0eT3gpWlQt4gO87qWI8QgawJFpPNLKGW1cYto4HbOGYrMXuRE5ZLxbSQ93d7f95M2+w7+hww/SNhcRhU+pwCngGCucLgSyAre5W1tb5d7eXk86nXZhj3Zj73ahV8JNx0jje5ff75dxnsUgroQ9XzKO18Rnhs+GvtDQMNFwzKJiHsr4+LhQRvpQALIJcsqJ8n4DiT6lrH/zmrjLMDAC1dXV5DcKo3iM4EieTqktsdzphIygflEa4ka3npcYeJ3mcNpXMA9IDmFOHPC+5Iz/BElwM6GmmQapAAAAAElFTkSuQmCC",chainId:1,chainType:"ether",chainTypeMoralis:"eth",customName:"Ethereum",tokenTrendingDefault:["0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","0x2260fac5e5542a773aa44fbcfedf7c193bc2c599"],isSupported:!0},10:{...fo({...pi,id:10,name:"OP Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.optimism.io"]}},blockExplorers:{default:{name:"Optimism Explorer",url:"https://optimistic.etherscan.io",apiUrl:"https://api-optimistic.etherscan.io/api"}},contracts:{...pi.contracts,disputeGameFactory:{[Ti]:{address:"0xe5965Ab5962eDc7477C8520243A95517CD252fA9"}},l2OutputOracle:{[Ti]:{address:"0xdfe97868233d1aa22e815a266982f2cf17685a27"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263},portal:{[Ti]:{address:"0xbEb5Fc579115071764c7423A4f12eDde41f106Ed"}},l1StandardBridge:{[Ti]:{address:"0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1"}}},sourceId:1}),logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAACW5JREFUeAHtnT1sHEUUx9+eD0QF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1UW5ev58kZa4oY8qFR138ikonDSq84JYCYswJGqsoaMTX35Ptq4tBndrGDyyRGAvyiC5TWdBhQjnBNBBj937ZWW26hFMljYSFqKtBQwPZFsoJZwwW2xBrYBnSRjRdwqkKxI/4WsPH1V6PFskER+I6Txk/DavA/4AYef6PJLXOU8Kpjnb/SXI8BG5LkHcKUJcPXIz6A+h5w41IXAksAhlb0QkDS39H/yetI4qBpGqu98iHRwuPnyYImz4uSbAzEx7+faPZG3XNeqoicW0IGBwxhNuyI4gqMNY0oI6W2eQf60cMVwiTpsqX4x1yeqoPuMY6QeLrpa3disExQEgXBtc7GR5TX6EL5KiGHp0Y3DQkCCuGfLhNDrtsYB3ALc80KvIszxTvaLE4tc1JsQ6QtcRfK7YStwCmSTS3tUidKKcyrtXhoOMozWzWUrH6dXub/nVyK5Oaou2tBLuydtBPJV2hveQ6i+UJ1dpYe3W7aQVR5uVcV3kasptSiiZbe6sBSiou6yrOPI93iK7lEy/IFGddiCf21kXZigxUc3WIL0dQWdcKvWtkZHG7EKe4ed5S7JZH0VJOrn+SBYJ4z/Itj4D6AE+p7jKvNCIxCt3TsPht86Ib1SOmOEtJ8liM6m6bt/bZTpT1lBQDuFuvmsLQrVdLX/SpDgCZxPbOvjqmbk5s5CpcHEica2/HzuN8fFu8gAxgfKXesOEfZpmxQvbWjiuIFyiHCHvgUqwsnRz3VbC8wTRtTdooFJqyiiRW17KObyp2fMsEfEtWkcT64uJxFjbLn/QhbW4QK2alt1AtSmWrvW9iYay5p42oTJA+m0KYUN0PfYEfF4reqL4olQvSJxZmmuoVY9D4i5hSa9s1pTEyQZKo+2dE92OaqlycaCULTDK/zOPdbRoxtRAkiaqPrfIgmEcz3FiTxgWCAA2OCz22hidpEXckoBpRO0EGiUcqIdIEFhqm/rK20eKdraE1I6PVjZbjRXUCfizxe++rJUR61B6VK5LyPxFwTRTwwp+SAAAAAElFTkSuQmCC",chainId:10,chainType:"optimism",chainTypeMoralis:"optimism",customName:"Optimism",tokenTrendingDefault:["0x4200000000000000000000000000000000000006","0x68f180fcce6836688e9084f035309e29bf0a2095","0xc47da4cb96ce65a96844a01bfae509f9d5454534"],isSupported:!0},56:{...yi,logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAACcRJREFUeAHlnU2IHMcVgF9V9+iPWTMbSJyIEGmTgwOJtR3QIZegWYgVmUBWOoQEQmIZcsjNziEHX6KNIaccvL75EIh0yCEnaQOJ7ZVhxxfjg8GzBoNtsLW66GBjdrVrS5Zmusr1eqbGPbszPdX1273+YFczy/z09KdXr+p1TRWBirN9PWnBCWjHETsFfVgASk6JP5/mAC1CoAVc/OQhsMM57BCArew+45sQw60+p5vwGXTnL3V3oMIQqBjbLyen4wZbJowkDKAtDvA0WARFCZldQvmNHqOb8+e7XagQlRCyfTNpxym7yClZti1gFsNI6vQIuTb/RLcDgQkmBJuiuMmeAU4uirsJVIBMDuUrvR59ff7J7hYEwLuQ7fUkiRm7DBF56kD7XyHEibnaS8nffIvxJiTLDRH/l7jZhhrhW4xzIdg0RU12hXDyLNQYX2KcCtl77QzmiJUqN01lkDmm+fN3roEjnAipa/NUgk4/JU+7iBYKlsGoiGP+NhxeGYgYqPK3775yxnozbC1CDkuuKAshfLX5xDt/BktYEYJNVCPi13lFxhO+wdwiEv6SjSbMWMhQxgb3PMLOc+QHf8r+ffjhSxAKW1KMhGSDPMI3QvaiUMaR7w+FfPRSUCkCUdQkS02D+pi2kKrJkNRdipaQqsqQ1FlKaSHZGAO7tRWVIamCFDFW+UnZnFJqHCITeNVlZI8Tj5HJPhAtPFd4zso8qZSQKvSmVGSMHh9YCp4rMYC8nl31VERZyO7NMy/UScboeeEjJWmIAbPqg5WEYDkk5AhcV8bo+aEjRZw71TLLzKQeOombysgTONErJfmZEZJVbQ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SPEsjfiVkXvEB5gsshzQvdFfBItaFIMNF/XF/jDYcTjpYKLTRRO3HiRDJ7npyWWS7K4clt7iKijzG62UV8cj57lXseXDOr0HdEbki/ZwsuJSBOI2QPIOeGFshhDwF9cJZ8zQJb0IkdRCDTRNh/Bqh9GrTYJCng3chkkxMJJJ+tXJMFzhZ69+DVVvd2LIEE5JnD/cuybbLIOd8y8EvvIpoWANOb8w92e1AYCohJA/WxxhAQoAvi3JEYlvQYD0R6HAg3TiFteOecoMqlROyH9wcPj4GCUSwCIwtwHDR+uHinS1cODL/eD5YTGdnuKjOFjB+Gyi9JeTeTu9BJ1RTpMqXLiNpVjp6y9MAAAAASUVORK5CYII=",chainId:56,chainType:"bsc",chainTypeMoralis:"bsc",customName:"BNB Chain",tokenTrendingDefault:["0x2170ed0880ac9a755fd29b2688956bd959f933f8","0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c"],isSupported:!0},137:{...fo({id:137,name:"Polygon",blockTime:2e3,nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{default:{http:["https://polygon.drpc.org"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://polygonscan.com",apiUrl:"https://api.etherscan.io/v2/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}}}),rpcUrls:{default:{http:["https://polygon-bor-rpc.publicnode.com"]}},logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAAC61JREFUeAHtnU9sFNcdx39vdmNMbbATQHZSEOtQieYSO5dYzQHbBzDqAcyhOSUBDimRooSkVLkFL84tbRRHUaqklVpIeuLCn14wqMKOVCoiVVmnJypRrwVN7DYpCzHJ2njn5X3f7phde3bnzcyb2Z1hP9LKa7PGu/N97/f3zXuMGpz03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t7ksTgNwdqBzs6M6Vx+aotIuLmROOz0MqX4MC6mazXIygEy/qBXqmjbatwi6lFXPRHl9fdGJ7YpnV6nvEKOLy6nuei9UxO3ZFXFAOrnh0z2CBtoHKCYdBZDQoa4bn6heeRRcHg6Rs/1ol78AZPzoaiU6esCl4eCeTposnlsnm4gBg/52DyLpiir8CkG8H/0akDHWkSQ+h+9CqRPKUYSWXpAweHEOsQAWu7UkaIsLj2FBIgeMPCZ+eKSFjGA9taaLLNwNhp7vyLvzeQnjk9s1XokVCC9Tnm+ummeYTHay7EcVG05SxzWNSvKCXTnsrG9Nw/J2RIXhx/QrCgn8K3kirOlkGaMHaQIU/QVy+lqh3npIrS9/aIqTJDmyY7QN1uMhDBoJjHzFGfJ8bCEsKjb7pcyoaTCYCP5GDEbMsJHnOP55fGgTVM16iZIOVgtieMySic0pChcsrg/A7djlO4AqCsNIUg5qI8lDGOAFxdWBHFqQ1Y8JhmxTIGxc2GbJCcaTpDVyK3QW5N9CZ7oNanQQ6VN68UFTZX2i6xMQIub6eREdzMn8iCM/lmDEjMFvjxLS4XJepkiVX4AbuLqSV+48XkAAAAASUVORK5CYII=",chainId:137,chainType:"matic",chainTypeMoralis:"polygon",tokenTrendingDefault:["0x7ceb23fd6bc0add59e62ac25578270cff1b9f619","0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6"],isSupported:!0},8453:{...bi,logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAACFhJREFUeAHtnT1sHEUUx/+7pCJIuAltzjVIdppQ+lwT5A8kKG3TIYESSwhKn0sQUhwpiDJ2SSRiI5Ha55YmjpTUXrehuQY6e5j/zq19n769eTP7dfuTLne52Lm9/e97b2b2zXsBis6qmtN/NvEe7uIS8wj0s0JDP/P95NFLJ34o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ONL16FMER4EaTem5teEJJRRzYWs9lo+stSZ4xIGrkI03Ym4bmhC8mo5RGhpbBcBa2GmzRtLSfpRXXyppslk01SRgYtjxJy6tDGLccUhpvz5+8AH942Gyx7SbYCnL/rJq6d55JdmWFTsIS6h+E4cmibl1CLMkiOjSUT6tarCU5ar8o3ffIAeCCCvK7Sw+QQR82J3ezC5YFwrO1oyb5U8DsrN2IQucsaxLT04e3/qscVsxqeovPaNLgXhJiWF89crhIXCq7acqHQkVX04keQBDYVM9bSQDXwYhW9+BWEGGtpuWgSkysmVrTStlC1xb8gCWUVxqN7GkV2giSUQxiTMKjiZARRvvO0ZC9IgplQNlGkGMP5BPObmVLr2TWNIz9BemH/DLbLMB0aGsiWKN4bw+0YPVnoeVEMQXox62O8CcZ69KKuDWOIwA0y3Fd5oYXIKDakpXiCDGJKoS/iPSzEDbSSsrameOcchiegHZgY0ImLIrB0CBudXcQlRNp5uaK0/A/QqtacrEVArQAAAABJRU5ErkJggg==",chainId:8453,chainType:"base",chainTypeMoralis:"base",tokenTrendingDefault:["0x4200000000000000000000000000000000000006","0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf","0xc47da4cb96ce65a96844a01bfae509f9d5454534"],isSupported:!0},42161:{...mi,logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAAEuFJREFUeAHlXQ1sFOeZfmd2ba+NbWwwBv8QbAjY/BuKayeQsE5Acmp0NiRcepe0IVV71zvpjnA65VRdq8JdTydFOsXRnYh6rZqgUpoqTbDbEJwG4qUtDcZOMBiojQleEv5iSGPw7/7MfP3ez5717O7MzuzszOw6fSKz49lvN+N55n2f932/+d7hIMVR5m7KyxnzuQlxLBJ5sZwHWATAlXFA8gjh8oCDvLAPEBjiODJEgPPiryKQs7zIDwAJn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OsDxb9LkTs0qMI/I+uB1phVWP5mHuqrvUCHXvI9Vdz+NVTXbmunXGk4Y40Gi+oI6cZy6J7We7yxPovWnRLLs+EBeOt/xtq7WV7oJmYq62u16sjOS4Vtcy/r8qkEiZn6Wg/VXwUkjtAo1i0BIRNj1rCqMqi50vF2ud3ycD3SpL3MQvh2X74JN0KMvemCLTkRAK8RVgoFHHlkv8krQcmNqYE/WoVMDZucTmtAp4pGYUQ8FQ+glxn6dkIGSIRKbHgomIdmPzcNuoNjYXyiYds9IAn/3JovYMLFLyjMNEyADMeMfLInAMBl/kvTcQtmBJEYGwoRHr9ov9KkIIwKuhIQXfeIB4IEQi+4PngmgKWq3GWQgzGu0CPYmj6kD8tJI5ther87H4mnB1AfcD16/1EbLLHdphbjWyI0SMwpUL7AcQpO+vUNer2nRg6kWImFqxhGfXeWGLyY8dMbvWTNcVCQsIUTCitqv7KJFye9/YQR/0ir2Xeg40gwWwVSXFYnb1/q75y5c0soRPp+zqQZmHahWZI1t7z/5rgcshKUWIgcLj0XHXkrMMzCzYJl7UoJthEiYEcRggseRAyDCq4kkeUZgOyESkBgeeHeKaQytt3CtI66RZrPC2HiRNELkWFW7zU1Esgs4stlucnChEp3GauU5voWtAEgyUoIQObA+RkONKl7kGwknVplNEBIgAueh39sd5Jyt8Tx83g6kHCGRKHO787InsquoX18rgljOT7W1xeadrF9kZGGT+n/scDTZVIfzipx4lbrGAeoarw5njXiS5Yr04s84I4HsxczfIwAAAABJRU5ErkJggg==",chainId:42161,chainType:"arbitrum",chainTypeMoralis:"arbitrum",customName:"Arbitrum",tokenTrendingDefault:["0x82af49447d8a07e3bd95bd0d56f35241523fbab1","0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f"],isSupported:!0},43114:{...wi,logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGUAAABkCAYAAACfIP5qAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOd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yvnljRbVed/zmQ9NcqlIWUNGKgftFBg8WV3NVQhhy3xwtIiFKrJBrcG98odE6RxAPjLwrGl+acHz33/H45zlQjbOj+EvTHsz206vgmh58L6R08GqZ5lpM31e72Gy4I07iY++/Ap5CdekWBAmuwGh1qLvD6WL2H2JN0+e3Mi6MHWu2w8QVT0Ddc//+AO76gPVVd6j+/wi+Dz5i8nRnAUSuHJofX158P5YUboXpdnAFENQa4fo3VHT8bHVLHlyy5T0cC6Jq48YW2KUNbdMScvoXBIxVhSOFjV6fB1TtKK+7CfHPZ5YjPcUbNnMFVa8bASg60kXJEgUJRyoJDqPKRqg1tMR/ZJBUpWtTpsxPXCzlab4MXUt8dv+xkX1skaqXl4Gwj5JyuuoZCrwVkp/NM0v2QnzyIhOYhyZRGGlpRKm6AzlywU10+SRfjIvhXjL95sqv3yBKSmgFrcuWYvoc18oTQ3DnHPlahFuEgqS60JpuRcNqTdbIcK0xz+S/IIwhS++OY2YQYoJwhReXscRIyiYJv8QahYVhNGy5lENrq2p5P/uy2yXCbS6o0EQZnrpcw3ETVblRasoEfe9U8uuXOrDLGH+OD9Y+FAUI6Iw3ajZKGvbKtNwL/3pmImqIhgTJWL/RY2Z6OjH+OYGh/z1ZaLgiPpDMhf5uQS7S+6X8by6SUE672WRvzyvMSPE1UkyAixGQOL6LoJrNvYc6LxnCXQvnKM6neVfFiSOMsR48d4lEl5HEoJzzglnDAGRLyHXnqC9aluMiFJF6edF9JQgkBKCIO4oT7Wio/NXFGdE6adzNerKCeJtxgV5vDEZ9NJSXXAlBO6o5mmtrIiIw0lRBmGR1AdYF6gcfo7gSLiPMqEGIWqq7a8NihY6JYgtFQHqwxZN1af4p7OBQ9Di5emuiTDI/4Da9NgV2sBcAAAAAElFTkSuQmCC",chainId:43114,chainType:"avax",chainTypeMoralis:"avalanche",tokenTrendingDefault:["0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB","0x0555E30da8f98308EdB960aa94C0Db47230d2B9c"],isSupported:!0},59144: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WkMj+SBmbhB96LRzzvLgUhCp2dnQdGiDvMnpyczIgPfO2zZoS4g28BiO8dB5UQnEH2BmK08pZfgQQggdO72HuvtVrUxABFbZS9LAHRthVwK4Wvqh/w1steak5oWTjIkAxRwXNcLkjKUVvF9+sSgGjdHv7y8vITHTYu+9KWuITmB//Tz6hs7+APS6IRrSIQOmz0JTiRjONNqcivx3EgHN9DgE8SAqHmXWt2p61sP53vmoRIJMnvIMYYhJhuFjGU6VnAEMT7RjtC6STSDIRJFyPqwreJJQ0kM6arXUsSsWmGsvmzdhb3qIk1F6favSSH2jca9cwOFjx+53bUtb4eiUmIqnJ2s4UMo4BeVSf01kQRh1Xw5XJ5Le6CryaxWWmrEqm/gjDPmURXbjYUzTo9pz7vKOK+A9RyblfG8a1Ckgq9lv8B/ms5OCQW+c4AAAAASUVORK5CYII=",chainId:59144,chainType:"linea",chainTypeMoralis:"linea",customName:"Linea",tokenTrendingDefault:["0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f","0x3aab2285ddcddad8edf438c1bab47e1a9d05a9b4"],isSupported:!0},130:{...fo({...pi,id:130,name:"Unichain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:1e3,rpcUrls:{default:{http:["https://mainnet.unichain.org/"]}},blockExplorers:{default:{name:"Uniscan",url:"https://uniscan.xyz",apiUrl:"https://api.uniscan.xyz/api"}},contracts:{...pi.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},disputeGameFactory:{[Ei]:{address:"0x2F12d621a16e2d3285929C9996f478508951dFe4"}},portal:{[Ei]:{address:"0x0bd48f6B86a26D3a217d0Fa6FfE2B491B956A7a2"}},l1StandardBridge:{[Ei]:{address:"0x81014F44b0a345033bB2b3B21C7a1A308B35fEeA"}}},sourceId:1}),logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABkCAYAAAB5CTUuAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARn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ivSXn9cUEBT1CCU/pLX4iQTGRQzsuL6v56Wvuh/Wf/wr84BsfnPn05p3N66kk1tO1LRjw51vvPWRdZ8/X7pmtOGFtedDRwW9tDWBeTJLUM7nixg9u7bb41DAoeWFIcLWGCM7VR8b3ZKlsnFdQa0hJX+IDhAFsafojfpRxxcf5yA9rRHZ0KZiCpQNoD669u7zrS18vL/36e2c+u+mR5vJUE+lnur0KDl36+uKkk0/uHn3iUrfP8RBm9qr4F1LlabPjgHa621G0NOYnmPBTzqF+Rpb0qyL1upmYFtKAKEUUM1mRlv9wdSsyA4hR5XCIpoWeF1FoN3OOl568657yx5d9t7zu/KrjLv2N6U9sgZ/h9jNngG1nw9l+urjx8KP8umNPaZ9wDCL7F7Rje280CG3X6zDsHM9s1VKgh+bvBXCen4jdzSQs7dfPIbVjIv8MBiKqrIB8cqnIb5/x5XDox7ciurzunNF/XL4hrv/+5cONd1wKl5bwDGzPGAOaG/1s7mGwZPffzk9du4dbfsiWYvjcdsz33aNYsbJXdLtYB+jgSNtorilUoh/UbUXCox0veH4UIqYMKGzGgDqO8PshpubHiN2H24fb5+6vtjyIKOmO5ePeTbfGe274RHn+HSOYWP9MEb25/VwwYMftBbDfosWwdPGHDnvX7geu2H/dtmJuHchvpC5Dek9hjXkVeu4J1BVJZaDdwr9Yna+GWBLdgJ77p3mWbVpdLb77e3dfcfOZt/3dfYshm74UfjwLP2fb/wd5ICT31PZzFAAAAABJRU5ErkJggg==",chainId:130,chainType:"unichain",chainTypeMoralis:"unichain",tokenTrendingDefault:["0x4200000000000000000000000000000000000006","0x0555e30da8f98308edb960aa94c0db47230d2b9c"],isSupported:!1},7565164:{id:7565164,name:"Solana",nativeCurrency:{decimals:18,name:"Solana",symbol:"SOL"},rpcUrls:{default:{http:[""]}},logo:"https://ipfs.pantograph.app/ipfs/QmZhKcFZVvw5r3cGLfSLsLcd1GzbQK5Vf7aoVYvgktzUUA?filename=Solana_logo.png",chainId:7565164,isSupported:!1}},Ci=e=>{const t=Object.values(xi).find(t=>t.chainTypeMoralis===e);return t?.chainType||null};function Ii(e){return e&&e.S&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Si(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){var n=!1;try{n=this instanceof e}catch{}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"S",{value:!0}),Object.keys(e).forEach(function(t){var o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:function(){return e[t]}})}),n}var Ni,Bi,Mi,Ui={},Ri={},Pi={};function Oi(){return Mi||(Mi=1,function(e){const t=function(){if(Ni)return Ri;Ni=1,Ri.byteLength=function(e){var t=r(e),n=t[0],o=t[1];return 3*(n+o)/4-o},Ri.toByteArray=function(e){var o,i,a=r(e),s=a[0],c=a[1],u=new n(function(e,t,n){return 3*(t+n)/4-n}(0,s,c)),l=0,d=c>0?s-4:s;for(i=0;i<d;i+=4)o=t[e.charCodeAt(i)]<<18|t[e.charCodeAt(i+1)]<<12|t[e.charCodeAt(i+2)]<<6|t[e.charCodeAt(i+3)],u[l++]=o>>16&255,u[l++]=o>>8&255,u[l++]=255&o;return 2===c&&(o=t[e.charCodeAt(i)]<<2|t[e.charCodeAt(i+1)]>>4,u[l++]=255&o),1===c&&(o=t[e.charCodeAt(i)]<<10|t[e.charCodeAt(i+1)]<<4|t[e.charCodeAt(i+2)]>>2,u[l++]=o>>8&255,u[l++]=255&o),u},Ri.fromByteArray=function(t){for(var n,o=t.length,i=o%3,r=[],a=16383,c=0,u=o-i;c<u;c+=a)r.push(s(t,c,c+a>u?u:c+a));return 1===i?(n=t[o-1],r.push(e[n>>2]+e[n<<4&63]+"==")):2===i&&(n=(t[o-2]<<8)+t[o-1],r.push(e[n>>10]+e[n>>4&63]+e[n<<2&63]+"=")),r.join("")};for(var e=[],t=[],n="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0;i<64;++i)e[i]=o[i],t[o.charCodeAt(i)]=i;function r(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function a(t){return e[t>>18&63]+e[t>>12&63]+e[t>>6&63]+e[63&t]}function s(e,t,n){for(var o,i=[],r=t;r<n;r+=3)o=(e[r]<<16&16711680)+(e[r+1]<<8&65280)+(255&e[r+2]),i.push(a(o));return i.join("")}return t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63,Ri}(),n=(Bi||(Bi=1,Pi.read=function(e,t,n,o,i){var r,a,s=8*i-o-1,c=(1<<s)-1,u=c>>1,l=-7,d=n?i-1:0,h=n?-1:1,f=e[t+d];for(d+=h,r=f&(1<<-l)-1,f>>=-l,l+=s;l>0;r=256*r+e[t+d],d+=h,l-=8);for(a=r&(1<<-l)-1,r>>=-l,l+=o;l>0;a=256*a+e[t+d],d+=h,l-=8);if(0===r)r=1-u;else{if(r===c)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,o),r-=u}return(f?-1:1)*a*Math.pow(2,r-o)},Pi.write=function(e,t,n,o,i,r){var a,s,c,u=8*r-i-1,l=(1<<u)-1,d=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=o?0:r-1,p=o?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+d>=1?h/c:h*Math.pow(2,1-d))*c>=2&&(a++,c/=2),a+d>=l?(s=0,a=l):a+d>=1?(s=(t*c-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[n+f]=255&s,f+=p,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;e[n+f]=255&a,f+=p,a/=256,u-=8);e[n+f-p]|=128*m}),Pi),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=function(e){return+e!=e&&(e=0),a.alloc(+e)},e.INSPECT_MAX_BYTES=50;const i=2147483647;function r(e){if(e>i)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function a(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return s(e,t,n)}function s(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!a.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|f(e,t);let o=r(n);const i=o.write(e,t);return i!==n&&(o=o.slice(0,i)),o}(e,t);if(ArrayBuffer.isView(e))return function(e){if(j(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return l(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(j(e,ArrayBuffer)||e&&j(e.buffer,ArrayBuffer))return d(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(j(e,SharedArrayBuffer)||e&&j(e.buffer,SharedArrayBuffer)))return d(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const o=e.valueOf&&e.valueOf();if(null!=o&&o!==e)return a.from(o,t,n);const i=function(e){if(a.isBuffer(e)){const t=0|h(e.length),n=r(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||X(e.length)?r(0):l(e):"Buffer"===e.type&&Array.isArray(e.data)?l(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return c(e),r(e<0?0:0|h(e))}function l(e){const t=e.length<0?0:0|h(e.length),n=r(t);for(let o=0;o<t;o+=1)n[o]=255&e[o];return n}function d(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let o;return o=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(o,a.prototype),o}function h(e){if(e>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|e}function f(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||j(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,o=arguments.length>2&&!0===arguments[2];if(!o&&0===n)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return J(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Y(e).length;default:if(i)return o?-1:J(e).length;t=(""+t).toLowerCase(),i=!0}}function p(e,t,n){let o=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return S(this,t,n);case"utf8":case"utf-8":return E(this,t,n);case"ascii":return C(this,t,n);case"latin1":case"binary":return I(this,t,n);case"base64":return T(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,n);default:if(o)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),o=!0}}function m(e,t,n){const o=e[t];e[t]=e[n],e[n]=o}function w(e,t,n,o,i){if(0===e.length)return-1;if("string"==typeof n?(o=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),X(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=a.from(t,o)),a.isBuffer(t))return 0===t.length?-1:g(e,t,n,o,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):g(e,[t],n,o,i);throw new TypeError("val must be string, number or Buffer")}function g(e,t,n,o,i){let r,a=1,s=e.length,c=t.length;if(void 0!==o&&("ucs2"===(o=String(o).toLowerCase())||"ucs-2"===o||"utf16le"===o||"utf-16le"===o)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let o=-1;for(r=n;r<s;r++)if(u(e,r)===u(t,-1===o?0:r-o)){if(-1===o&&(o=r),r-o+1===c)return o*a}else-1!==o&&(r-=r-o),o=-1}else for(n+c>s&&(n=s-c),r=n;r>=0;r--){let n=!0;for(let o=0;o<c;o++)if(u(e,r+o)!==u(t,o)){n=!1;break}if(n)return r}return-1}function b(e,t,n,o){n=Number(n)||0;const i=e.length-n;o?(o=Number(o))>i&&(o=i):o=i;const r=t.length;let a;for(o>r/2&&(o=r/2),a=0;a<o;++a){const o=parseInt(t.substr(2*a,2),16);if(X(o))return a;e[n+a]=o}return a}function y(e,t,n,o){return z(J(t,e.length-n),e,n,o)}function v(e,t,n,o){return z(function(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,o)}function A(e,t,n,o){return z(Y(t),e,n,o)}function k(e,t,n,o){return z(function(e,t){let n,o,i;const r=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),o=n>>8,i=n%256,r.push(i),r.push(o);return r}(t,e.length-n),e,n,o)}function T(e,n,o){return 0===n&&o===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(n,o))}function E(e,t,n){n=Math.min(e.length,n);const o=[];let i=t;for(;i<n;){const t=e[i];let r=null,a=t>239?4:t>223?3:t>191?2:1;if(i+a<=n){let n,o,s,c;switch(a){case 1:t<128&&(r=t);break;case 2:n=e[i+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(r=c));break;case 3:n=e[i+1],o=e[i+2],128==(192&n)&&128==(192&o)&&(c=(15&t)<<12|(63&n)<<6|63&o,c>2047&&(c<55296||c>57343)&&(r=c));break;case 4:n=e[i+1],o=e[i+2],s=e[i+3],128==(192&n)&&128==(192&o)&&128==(192&s)&&(c=(15&t)<<18|(63&n)<<12|(63&o)<<6|63&s,c>65535&&c<1114112&&(r=c))}}null===r?(r=65533,a=1):r>65535&&(r-=65536,o.push(r>>>10&1023|55296),r=56320|1023&r),o.push(r),i+=a}return function(e){const t=e.length;if(t<=x)return String.fromCharCode.apply(String,e);let n="",o=0;for(;o<t;)n+=String.fromCharCode.apply(String,e.slice(o,o+=x));return n}(o)}e.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),!a.TYPED_ARRAY_SUPPORT&&"undefined"!=typeof console&&console.error,Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(e,t,n){return s(e,t,n)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(e,t,n){return function(e,t,n){return c(e),e<=0?r(e):void 0!==t?"string"==typeof n?r(e).fill(t,n):r(e).fill(t):r(e)}(e,t,n)},a.allocUnsafe=function(e){return u(e)},a.allocUnsafeSlow=function(e){return u(e)},a.isBuffer=function(e){return null!=e&&!0===e.N&&e!==a.prototype},a.compare=function(e,t){if(j(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),j(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,o=t.length;for(let i=0,r=Math.min(n,o);i<r;++i)if(e[i]!==t[i]){n=e[i],o=t[i];break}return n<o?-1:o<n?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);let n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const o=a.allocUnsafe(t);let i=0;for(n=0;n<e.length;++n){let t=e[n];if(j(t,Uint8Array))i+t.length>o.length?(a.isBuffer(t)||(t=a.from(t)),t.copy(o,i)):Uint8Array.prototype.set.call(o,t,i);else{if(!a.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(o,i)}i+=t.length}return o},a.byteLength=f,a.prototype.N=!0,a.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)m(this,t,t+1);return this},a.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},a.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},a.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?E(this,0,e):p.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){let t="";const n=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(t+=" ... "),"<Buffer "+t+">"},o&&(a.prototype[o]=a.prototype.inspect),a.prototype.compare=function(e,t,n,o,i){if(j(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===o&&(o=0),void 0===i&&(i=this.length),t<0||n>e.length||o<0||i>this.length)throw new RangeError("out of range index");if(o>=i&&t>=n)return 0;if(o>=i)return-1;if(t>=n)return 1;if(this===e)return 0;let r=(i>>>=0)-(o>>>=0),s=(n>>>=0)-(t>>>=0);const c=Math.min(r,s),u=this.slice(o,i),l=e.slice(t,n);for(let a=0;a<c;++a)if(u[a]!==l[a]){r=u[a],s=l[a];break}return r<s?-1:s<r?1:0},a.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},a.prototype.indexOf=function(e,t,n){return w(this,e,t,n,!0)},a.prototype.lastIndexOf=function(e,t,n){return w(this,e,t,n,!1)},a.prototype.write=function(e,t,n,o){if(void 0===t)o="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)o=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===o&&(o="utf8")):(o=n,n=void 0)}const i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");let r=!1;for(;;)switch(o){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return y(this,e,t,n);case"ascii":case"latin1":case"binary":return v(this,e,t,n);case"base64":return A(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,n);default:if(r)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),r=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this.M||this,0)}};const x=4096;function C(e,t,n){let o="";n=Math.min(e.length,n);for(let i=t;i<n;++i)o+=String.fromCharCode(127&e[i]);return o}function I(e,t,n){let o="";n=Math.min(e.length,n);for(let i=t;i<n;++i)o+=String.fromCharCode(e[i]);return o}function S(e,t,n){const o=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>o)&&(n=o);let i="";for(let r=t;r<n;++r)i+=Q[e[r]];return i}function N(e,t,n){const o=e.slice(t,n);let i="";for(let r=0;r<o.length-1;r+=2)i+=String.fromCharCode(o[r]+256*o[r+1]);return i}function B(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,n,o,i,r){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<r)throw new RangeError('"value" argument is out of bounds');if(n+o>e.length)throw new RangeError("Index out of range")}function U(e,t,n,o,i){H(t,o,i,e,n,7);let r=Number(t&BigInt(4294967295));e[n++]=r,r>>=8,e[n++]=r,r>>=8,e[n++]=r,r>>=8,e[n++]=r;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,n}function R(e,t,n,o,i){H(t,o,i,e,n,7);let r=Number(t&BigInt(4294967295));e[n+7]=r,r>>=8,e[n+6]=r,r>>=8,e[n+5]=r,r>>=8,e[n+4]=r;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=a,a>>=8,e[n+2]=a,a>>=8,e[n+1]=a,a>>=8,e[n]=a,n+8}function P(e,t,n,o,i,r){if(n+o>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function O(e,t,o,i,r){return t=+t,o>>>=0,r||P(e,0,o,4),n.write(e,t,o,i,23,4),o+4}function L(e,t,o,i,r){return t=+t,o>>>=0,r||P(e,0,o,8),n.write(e,t,o,i,52,8),o+8}a.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);const o=this.subarray(e,t);return Object.setPrototypeOf(o,a.prototype),o},a.prototype.readUintLE=a.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||B(e,t,this.length);let o=this[e],i=1,r=0;for(;++r<t&&(i*=256);)o+=this[e+r]*i;return o},a.prototype.readUintBE=a.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||B(e,t,this.length);let o=this[e+--t],i=1;for(;t>0&&(i*=256);)o+=this[e+--t]*i;return o},a.prototype.readUint8=a.prototype.readUInt8=function(e,t){return e>>>=0,t||B(e,1,this.length),this[e]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||B(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||B(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||B(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||B(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readBigUInt64LE=K(function(e){V(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const o=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(o)+(BigInt(i)<<BigInt(32))}),a.prototype.readBigUInt64BE=K(function(e){V(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const o=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(o)<<BigInt(32))+BigInt(i)}),a.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||B(e,t,this.length);let o=this[e],i=1,r=0;for(;++r<t&&(i*=256);)o+=this[e+r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},a.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||B(e,t,this.length);let o=t,i=1,r=this[e+--o];for(;o>0&&(i*=256);)r+=this[e+--o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},a.prototype.readInt8=function(e,t){return e>>>=0,t||B(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||B(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(e,t){e>>>=0,t||B(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||B(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||B(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readBigInt64LE=K(function(e){V(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const o=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(o)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)}),a.prototype.readBigInt64BE=K(function(e){V(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const o=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(o)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+n)}),a.prototype.readFloatLE=function(e,t){return e>>>=0,t||B(e,4,this.length),n.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||B(e,4,this.length),n.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||B(e,8,this.length),n.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||B(e,8,this.length),n.read(this,e,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(e,t,n,o){e=+e,t>>>=0,n>>>=0,o||M(this,e,t,n,Math.pow(2,8*n)-1,0);let i=1,r=0;for(this[t]=255&e;++r<n&&(i*=256);)this[t+r]=e/i&255;return t+n},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(e,t,n,o){e=+e,t>>>=0,n>>>=0,o||M(this,e,t,n,Math.pow(2,8*n)-1,0);let i=n-1,r=1;for(this[t+i]=255&e;--i>=0&&(r*=256);)this[t+i]=e/r&255;return t+n},a.prototype.writeUint8=a.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeBigUInt64LE=K(function(e,t=0){return U(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=K(function(e,t=0){return R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(e,t,n,o){if(e=+e,t>>>=0,!o){const o=Math.pow(2,8*n-1);M(this,e,t,n,o-1,-o)}let i=0,r=1,a=0;for(this[t]=255&e;++i<n&&(r*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/r|0)-a&255;return t+n},a.prototype.writeIntBE=function(e,t,n,o){if(e=+e,t>>>=0,!o){const o=Math.pow(2,8*n-1);M(this,e,t,n,o-1,-o)}let i=n-1,r=1,a=0;for(this[t+i]=255&e;--i>=0&&(r*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/r|0)-a&255;return t+n},a.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeBigInt64LE=K(function(e,t=0){return U(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=K(function(e,t=0){return R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeFloatLE=function(e,t,n){return O(this,e,t,!0,n)},a.prototype.writeFloatBE=function(e,t,n){return O(this,e,t,!1,n)},a.prototype.writeDoubleLE=function(e,t,n){return L(this,e,t,!0,n)},a.prototype.writeDoubleBE=function(e,t,n){return L(this,e,t,!1,n)},a.prototype.copy=function(e,t,n,o){if(!a.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),o||0===o||(o=this.length),t>=e.length&&(t=e.length),t||(t=0),o>0&&o<n&&(o=n),o===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-t<o-n&&(o=e.length-t+n);const i=o-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,o):Uint8Array.prototype.set.call(e,this.subarray(n,o),t),i},a.prototype.fill=function(e,t,n,o){if("string"==typeof e){if("string"==typeof t?(o=t,t=0,n=this.length):"string"==typeof n&&(o=n,n=this.length),void 0!==o&&"string"!=typeof o)throw new TypeError("encoding must be a string");if("string"==typeof o&&!a.isEncoding(o))throw new TypeError("Unknown encoding: "+o);if(1===e.length){const t=e.charCodeAt(0);("utf8"===o&&t<128||"latin1"===o)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;let i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{const r=a.isBuffer(e)?e:a.from(e,o),s=r.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<n-t;++i)this[i+t]=r[i%s]}return this};const D={};function F(e,t,n){D[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function q(e){let t="",n=e.length;const o="-"===e[0]?1:0;for(;n>=o+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function H(e,t,n,o,i,r){if(e>n||e<t){const n="bigint"==typeof t?"n":"";let o;throw o=0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(r+1)}${n}`:`>= -(2${n} ** ${8*(r+1)-1}${n}) and < 2 ** ${8*(r+1)-1}${n}`,new D.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,n){V(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||W(t,e.length-(n+1))}(o,i,r)}function V(e,t){if("number"!=typeof e)throw new D.ERR_INVALID_ARG_TYPE(t,"number",e)}function W(e,t,n){if(Math.floor(e)!==e)throw V(e,n),new D.ERR_OUT_OF_RANGE("offset","an integer",e);if(t<0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${t}`,e)}F("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),F("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),F("ERR_OUT_OF_RANGE",function(e,t,n){let o=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=q(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=q(i)),i+="n"),o+=` It must be ${t}. Received ${i}`,o},RangeError);const G=/[^+/0-9A-Za-z-_]/g;function J(e,t){let n;t=t||1/0;const o=e.length;let i=null;const r=[];for(let a=0;a<o;++a){if(n=e.charCodeAt(a),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&r.push(239,191,189);continue}if(a+1===o){(t-=3)>-1&&r.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&r.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&r.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;r.push(n)}else if(n<2048){if((t-=2)<0)break;r.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;r.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;r.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return r}function Y(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(G,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,n,o){let i;for(i=0;i<o&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function j(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function X(e){return e!=e}const Q=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const o=16*n;for(let i=0;i<16;++i)t[o+i]=e[n]+e[i]}return t}();function K(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}}(Ui)),Ui}var Li=Oi();const Di=BigInt(0),Fi=BigInt(1),qi=BigInt(2),Hi=BigInt(8),Vi={zip215:!0};const Wi=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),Gi=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");BigInt(0);const Ji=BigInt(1),Yi=BigInt(2);BigInt(3);const zi=BigInt(5),ji=BigInt(8);function Xi(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}function Qi(e,t){const n=Wi,o=To(t*t*t,n),i=function(e){const t=BigInt(10),n=BigInt(20),o=BigInt(40),i=BigInt(80),r=Wi,a=e*e%r*e%r,s=Eo(a,Yi,r)*a%r,c=Eo(s,Ji,r)*e%r,u=Eo(c,zi,r)*c%r,l=Eo(u,t,r)*u%r,d=Eo(l,n,r)*l%r,h=Eo(d,o,r)*d%r,f=Eo(h,i,r)*h%r,p=Eo(f,i,r)*h%r,m=Eo(p,t,r)*u%r;return{pow_p_5_8:Eo(m,Yi,r)*e%r,b2:a}}(e*To(o*o*t,n)).pow_p_5_8;let r=To(e*o*i,n);const a=To(t*r*r,n),s=r,c=To(r*Gi,n),u=a===e,l=a===To(-e,n),d=a===To(-e*Gi,n);return u&&(r=s),(l||d)&&(r=c),(To(r,n)&go)===go&&(r=To(-r,n)),{isValid:u||l,value:r}}const Ki=(()=>Uo(Wi,void 0,!0))(),Zi=(()=>({a:Ki.create(BigInt(-1)),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:Ki,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:ji,Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:kn,randomBytes:Be,adjustScalarBytes:Xi,uvRatio:Qi}))(),_i=(()=>function(e){const t=function(e){const t=zo(e);return to(e,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...t})}(e),{Fp:n,n:o,prehash:i,hash:r,randomBytes:a,nByteLength:s,h:c}=t,u=qi<<BigInt(8*s)-Fi,l=n.create,d=Uo(t.n,t.nBitLength);if(!function(e,o){const i=n.sqr(e),r=n.sqr(o),a=n.add(n.mul(t.a,i),r),s=n.add(n.ONE,n.mul(t.d,n.mul(i,r)));return n.eql(a,s)}(t.Gx,t.Gy))throw new Error("bad curve params: generator point");const h=t.uvRatio||((e,t)=>{try{return{isValid:!0,value:n.sqrt(e*n.inv(t))}}catch(o){return{isValid:!1,value:Di}}}),f=t.adjustScalarBytes||(e=>e),p=t.domain||((e,t,n)=>{if(Pn("phflag",n),t.length||n)throw new Error("Contexts/pre-hash are not supported");return e});function m(e,t,n=!1){Kn("coordinate "+e,t,n?Fi:Di,u)}function w(e){if(!(e instanceof y))throw new Error("ExtendedPoint expected")}const g=no((e,t)=>{const{ex:o,ey:i,ez:r}=e,a=e.is0();null==t&&(t=a?Hi:n.inv(r));const s=l(o*t),c=l(i*t),u=l(r*t);if(a)return{x:Di,y:Fi};if(u!==Fi)throw new Error("invZ was invalid");return{x:s,y:c}}),b=no(e=>{const{a:n,d:o}=t;if(e.is0())throw new Error("bad point: ZERO");const{ex:i,ey:r,ez:a,et:s}=e,c=l(i*i),u=l(r*r),d=l(a*a),h=l(d*d),f=l(c*n);if(l(d*l(f+u))!==l(h+l(o*l(c*u))))throw new Error("bad point: equation left != right (1)");if(l(i*r)!==l(a*s))throw new Error("bad point: equation left != right (2)");return!0});class y{constructor(e,t,n,o){m("x",e),m("y",t),m("z",n,!0),m("t",o),this.ex=e,this.ey=t,this.ez=n,this.et=o,Object.freeze(this)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(e){if(e instanceof y)throw new Error("extended point not allowed");const{x:t,y:n}=e||{};return m("x",t),m("y",n),new y(t,n,Fi,l(t*n))}static normalizeZ(e){const t=No(n,e.map(e=>e.ez));return e.map((e,n)=>e.toAffine(t[n])).map(y.fromAffine)}static msm(e,t){return Yo(y,d,e,t)}I(e){k.setWindowSize(this,e)}assertValidity(){b(this)}equals(e){w(e);const{ex:t,ey:n,ez:o}=this,{ex:i,ey:r,ez:a}=e,s=l(t*a),c=l(i*o),u=l(n*a),d=l(r*o);return s===c&&u===d}is0(){return this.equals(y.ZERO)}negate(){return new y(l(-this.ex),this.ey,this.ez,l(-this.et))}double(){const{a:e}=t,{ex:n,ey:o,ez:i}=this,r=l(n*n),a=l(o*o),s=l(qi*l(i*i)),c=l(e*r),u=n+o,d=l(l(u*u)-r-a),h=c+a,f=h-s,p=c-a,m=l(d*f),w=l(h*p),g=l(d*p),b=l(f*h);return new y(m,w,b,g)}add(e){w(e);const{a:n,d:o}=t,{ex:i,ey:r,ez:a,et:s}=this,{ex:c,ey:u,ez:d,et:h}=e,f=l(i*c),p=l(r*u),m=l(s*o*h),g=l(a*d),b=l((i+r)*(c+u)-f-p),v=g-m,A=g+m,k=l(p-n*f),T=l(b*v),E=l(A*k),x=l(b*k),C=l(v*A);return new y(T,E,C,x)}subtract(e){return this.add(e.negate())}wNAF(e){return k.wNAFCached(this,e,y.normalizeZ)}multiply(e){const t=e;Kn("scalar",t,Fi,o);const{p:n,f:i}=this.wNAF(t);return y.normalizeZ([n,i])[0]}multiplyUnsafe(e,t=y.ZERO){const n=e;return Kn("scalar",n,Di,o),n===Di?A:this.is0()||n===Fi?this:k.wNAFCachedUnsafe(this,n,y.normalizeZ,t)}isSmallOrder(){return this.multiplyUnsafe(c).is0()}isTorsionFree(){return k.unsafeLadder(this,o).is0()}toAffine(e){return g(this,e)}clearCofactor(){const{h:e}=t;return e===Fi?this:this.multiplyUnsafe(e)}static fromHex(e,o=!1){const{d:i,a:r}=t,a=n.BYTES;e=zn("pointHex",e,a),Pn("zip215",o);const s=e.slice(),c=e[a-1];s[a-1]=-129&c;const d=Gn(s),f=o?u:n.ORDER;Kn("pointHex.y",d,Di,f);const p=l(d*d),m=l(p-Fi),w=l(i*p-r);let{isValid:g,value:b}=h(m,w);if(!g)throw new Error("Point.fromHex: invalid y coordinate");const v=(b&Fi)===Fi,A=!!(128&c);if(!o&&b===Di&&A)throw new Error("Point.fromHex: x=0 and x_0=1");return A!==v&&(b=l(-b)),y.fromAffine({x:b,y:d})}static fromPrivateKey(e){const{scalar:t}=x(e);return v.multiply(t)}toRawBytes(){const{x:e,y:t}=this.toAffine(),o=Yn(t,n.BYTES);return o[o.length-1]|=e&Fi?128:0,o}toHex(){return qn(this.toRawBytes())}}y.BASE=new y(t.Gx,t.Gy,Fi,l(t.Gx*t.Gy)),y.ZERO=new y(Di,Fi,Fi,Di);const{BASE:v,ZERO:A}=y,k=Jo(y,8*s);function T(e){return To(e,o)}function E(e){return T(Gn(e))}function x(e){const t=n.BYTES;e=zn("private key",e,t);const o=zn("hashed private key",r(e),2*t),i=f(o.slice(0,t));return{head:i,prefix:o.slice(t,2*t),scalar:E(i)}}function C(e){const{head:t,prefix:n,scalar:o}=x(e),i=v.multiply(o),r=i.toRawBytes();return{head:t,prefix:n,scalar:o,point:i,pointBytes:r}}function I(e=Uint8Array.of(),...t){const n=jn(...t);return E(r(p(n,zn("context",e),!!i)))}const S=Vi;return v.I(8),{CURVE:t,getPublicKey:function(e){return C(e).pointBytes},sign:function(e,t,r={}){e=zn("message",e),i&&(e=i(e));const{prefix:a,scalar:s,pointBytes:c}=C(t),u=I(r.context,a,e),l=v.multiply(u).toRawBytes(),d=T(u+I(r.context,l,c,e)*s);return Kn("signature.s",d,Di,o),zn("result",jn(l,Yn(d,n.BYTES)),2*n.BYTES)},verify:function(e,t,o,r=S){const{context:a,zip215:s}=r,c=n.BYTES;e=zn("signature",e,2*c),t=zn("message",t),o=zn("publicKey",o,c),void 0!==s&&Pn("zip215",s),i&&(t=i(t));const u=Gn(e.slice(c,2*c));let l,d,h;try{l=y.fromHex(o,s),d=y.fromHex(e.slice(0,c),s),h=v.multiplyUnsafe(u)}catch(p){return!1}if(!s&&l.isSmallOrder())return!1;const f=I(a,d.toRawBytes(),l.toRawBytes(),t);return d.add(l.multiplyUnsafe(f)).subtract(h).clearCofactor().equals(y.ZERO)},ExtendedPoint:y,utils:{getExtendedPublicKey:C,randomPrivateKey:()=>a(n.BYTES),precompute:(e=8,t=y.BASE)=>(t.I(e),t.multiply(BigInt(3)),t)}}}(Zi))();var $i={exports:{}};const er=Si(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var tr,nr=$i.exports;function or(){return tr||(tr=1,function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function o(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this.U(e||0,t||10,n||"be"))}var r;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{r="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:er.Buffer}catch(C){}function a(e,t){var o=e.charCodeAt(t);return o>=48&&o<=57?o-48:o>=65&&o<=70?o-55:o>=97&&o<=102?o-87:void n(!1,"Invalid character in "+e)}function s(e,t,n){var o=a(e,n);return n-1>=t&&(o|=a(e,n-1)<<4),o}function c(e,t,o,i){for(var r=0,a=0,s=Math.min(e.length,o),c=t;c<s;c++){var u=e.charCodeAt(c)-48;r*=i,a=u>=49?u-49+10:u>=17?u-17+10:u,n(u>=0&&a<i,"Invalid character"),r+=a}return r}function u(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype.U=function(e,t,o){if("number"==typeof e)return this.R(e,t,o);if("object"==typeof e)return this.P(e,t,o);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this.O(e,i,o):(this.L(e,t,i),"le"===o&&this.P(this.toArray(),t,o)))},i.prototype.R=function(e,t,o){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===o&&this.P(this.toArray(),t,o)},i.prototype.P=function(e,t,o){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var r,a,s=0;if("be"===o)for(i=e.length-1,r=0;i>=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[r]|=a<<s&67108863,this.words[r+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,r++);else if("le"===o)for(i=0,r=0;i<e.length;i+=3)a=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[r]|=a<<s&67108863,this.words[r+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,r++);return this.q()},i.prototype.O=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var o=0;o<this.length;o++)this.words[o]=0;var i,r=0,a=0;if("be"===n)for(o=e.length-1;o>=t;o-=2)i=s(e,t,o)<<r,this.words[a]|=67108863&i,r>=18?(r-=18,a+=1,this.words[a]|=i>>>26):r+=8;else for(o=(e.length-t)%2==0?t+1:t;o<e.length;o+=2)i=s(e,t,o)<<r,this.words[a]|=67108863&i,r>=18?(r-=18,a+=1,this.words[a]|=i>>>26):r+=8;this.q()},i.prototype.L=function(e,t,n){this.words=[0],this.length=1;for(var o=0,i=1;i<=67108863;i*=t)o++;o--,i=i/t|0;for(var r=e.length-n,a=r%o,s=Math.min(r,r-a)+n,u=0,l=n;l<s;l+=o)u=c(e,l,l+o,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this.V(u);if(0!==a){var d=1;for(u=c(e,l,e.length,t),l=0;l<a;l++)d*=t;this.imuln(d),this.words[0]+u<67108864?this.words[0]+=u:this.V(u)}this.q()},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},i.prototype.W=function(e){u(e,this)},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype.J=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype.q=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this.Y()},i.prototype.Y=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(C){i.prototype.inspect=l}else i.prototype.inspect=l;function l(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(e,t,n){n.negative=t.negative^e.negative;var o=e.length+t.length|0;n.length=o,o=o-1|0;var i=0|e.words[0],r=0|t.words[0],a=i*r,s=67108863&a,c=a/67108864|0;n.words[0]=s;for(var u=1;u<o;u++){for(var l=c>>>26,d=67108863&c,h=Math.min(u,t.length-1),f=Math.max(0,u-e.length+1);f<=h;f++){var p=u-f|0;l+=(a=(i=0|e.words[p])*(r=0|t.words[f])+d)/67108864|0,d=67108863&a}n.words[u]=0|d,c=0|l}return 0!==c?n.words[u]=0|c:n.length--,n.q()}i.prototype.toString=function(e,t){var o;if(t=0|t||1,16===(e=e||10)||"hex"===e){o="";for(var i=0,r=0,a=0;a<this.length;a++){var s=this.words[a],c=(16777215&(s<<i|r)).toString(16);r=s>>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),o=0!==r||a!==this.length-1?d[6-c.length]+c+o:c+o}for(0!==r&&(o=r.toString(16)+o);o.length%t!==0;)o="0"+o;return 0!==this.negative&&(o="-"+o),o}if(e===(0|e)&&e>=2&&e<=36){var u=h[e],l=f[e];o="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modrn(l).toString(e);o=(p=p.idivn(l)).isZero()?m+o:d[u-m.length]+m+o}for(this.isZero()&&(o="0"+o);o.length%t!==0;)o="0"+o;return 0!==this.negative&&(o="-"+o),o}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},r&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(r,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,o){this.q();var i=this.byteLength(),r=o||Math.max(1,i);n(i<=r,"byte array longer than desired length"),n(r>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,r);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},i.prototype.j=function(e,t){for(var n=0,o=0,i=0,r=0;i<this.length;i++){var a=this.words[i]<<r|o;e[n++]=255&a,n<e.length&&(e[n++]=a>>8&255),n<e.length&&(e[n++]=a>>16&255),6===r?(n<e.length&&(e[n++]=a>>24&255),o=0,r=0):(o=a>>>24,r+=2)}if(n<e.length)for(e[n++]=o;n<e.length;)e[n++]=0},i.prototype.X=function(e,t){for(var n=e.length-1,o=0,i=0,r=0;i<this.length;i++){var a=this.words[i]<<r|o;e[n--]=255&a,n>=0&&(e[n--]=a>>8&255),n>=0&&(e[n--]=a>>16&255),6===r?(n>=0&&(e[n--]=a>>24&255),o=0,r=0):(o=a>>>24,r+=2)}if(n>=0)for(e[n--]=o;n>=0;)e[n--]=0},Math.clz32?i.prototype.K=function(e){return 32-Math.clz32(e)}:i.prototype.K=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype.Z=function(e){if(0===e)return 26;var t=e,n=0;return 8191&t||(n+=13,t>>>=13),127&t||(n+=7,t>>>=7),15&t||(n+=4,t>>>=4),3&t||(n+=2,t>>>=2),1&t||n++,n},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this.K(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this.Z(this.words[t]);if(e+=n,26!==n)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.q()},i.prototype.ior=function(e){return n(0===(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.q()},i.prototype.iand=function(e){return n(0===(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var o=0;o<n.length;o++)this.words[o]=t.words[o]^n.words[o];if(this!==t)for(;o<t.length;o++)this.words[o]=t.words[o];return this.length=t.length,this.q()},i.prototype.ixor=function(e){return n(0===(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),o=e%26;this.J(t),o>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return o>0&&(this.words[i]=~this.words[i]&67108863>>26-o),this.q()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var o=e/26|0,i=e%26;return this.J(o+1),this.words[o]=t?this.words[o]|1<<i:this.words[o]&~(1<<i),this.q()},i.prototype.iadd=function(e){var t,n,o;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this.Y();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t.Y();this.length>e.length?(n=this,o=e):(n=e,o=this);for(var i=0,r=0;r<o.length;r++)t=(0|n.words[r])+(0|o.words[r])+i,this.words[r]=67108863&t,i=t>>>26;for(;0!==i&&r<n.length;r++)t=(0|n.words[r])+i,this.words[r]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;r<n.length;r++)this.words[r]=n.words[r];return this},i.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t.Y()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this.Y();var n,o,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,o=e):(n=e,o=this);for(var r=0,a=0;a<o.length;a++)r=(t=(0|n.words[a])-(0|o.words[a])+r)>>26,this.words[a]=67108863&t;for(;0!==r&&a<n.length;a++)r=(t=(0|n.words[a])+r)>>26,this.words[a]=67108863&t;if(0===r&&a<n.length&&n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this.length=Math.max(this.length,a),n!==this&&(this.negative=1),this.q()},i.prototype.sub=function(e){return this.clone().isub(e)};var m=function(e,t,n){var o,i,r,a=e.words,s=t.words,c=n.words,u=0,l=0|a[0],d=8191&l,h=l>>>13,f=0|a[1],p=8191&f,m=f>>>13,w=0|a[2],g=8191&w,b=w>>>13,y=0|a[3],v=8191&y,A=y>>>13,k=0|a[4],T=8191&k,E=k>>>13,x=0|a[5],C=8191&x,I=x>>>13,S=0|a[6],N=8191&S,B=S>>>13,M=0|a[7],U=8191&M,R=M>>>13,P=0|a[8],O=8191&P,L=P>>>13,D=0|a[9],F=8191&D,q=D>>>13,H=0|s[0],V=8191&H,W=H>>>13,G=0|s[1],J=8191&G,Y=G>>>13,z=0|s[2],j=8191&z,X=z>>>13,Q=0|s[3],K=8191&Q,Z=Q>>>13,_=0|s[4],$=8191&_,ee=_>>>13,te=0|s[5],ne=8191&te,oe=te>>>13,ie=0|s[6],re=8191&ie,ae=ie>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,le=0|s[8],de=8191&le,he=le>>>13,fe=0|s[9],pe=8191&fe,me=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var we=(u+(o=Math.imul(d,V))|0)+((8191&(i=(i=Math.imul(d,W))+Math.imul(h,V)|0))<<13)|0;u=((r=Math.imul(h,W))+(i>>>13)|0)+(we>>>26)|0,we&=67108863,o=Math.imul(p,V),i=(i=Math.imul(p,W))+Math.imul(m,V)|0,r=Math.imul(m,W);var ge=(u+(o=o+Math.imul(d,J)|0)|0)+((8191&(i=(i=i+Math.imul(d,Y)|0)+Math.imul(h,J)|0))<<13)|0;u=((r=r+Math.imul(h,Y)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,o=Math.imul(g,V),i=(i=Math.imul(g,W))+Math.imul(b,V)|0,r=Math.imul(b,W),o=o+Math.imul(p,J)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,J)|0,r=r+Math.imul(m,Y)|0;var be=(u+(o=o+Math.imul(d,j)|0)|0)+((8191&(i=(i=i+Math.imul(d,X)|0)+Math.imul(h,j)|0))<<13)|0;u=((r=r+Math.imul(h,X)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,o=Math.imul(v,V),i=(i=Math.imul(v,W))+Math.imul(A,V)|0,r=Math.imul(A,W),o=o+Math.imul(g,J)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(b,J)|0,r=r+Math.imul(b,Y)|0,o=o+Math.imul(p,j)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,j)|0,r=r+Math.imul(m,X)|0;var ye=(u+(o=o+Math.imul(d,K)|0)|0)+((8191&(i=(i=i+Math.imul(d,Z)|0)+Math.imul(h,K)|0))<<13)|0;u=((r=r+Math.imul(h,Z)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,o=Math.imul(T,V),i=(i=Math.imul(T,W))+Math.imul(E,V)|0,r=Math.imul(E,W),o=o+Math.imul(v,J)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(A,J)|0,r=r+Math.imul(A,Y)|0,o=o+Math.imul(g,j)|0,i=(i=i+Math.imul(g,X)|0)+Math.imul(b,j)|0,r=r+Math.imul(b,X)|0,o=o+Math.imul(p,K)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,K)|0,r=r+Math.imul(m,Z)|0;var ve=(u+(o=o+Math.imul(d,$)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(h,$)|0))<<13)|0;u=((r=r+Math.imul(h,ee)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,o=Math.imul(C,V),i=(i=Math.imul(C,W))+Math.imul(I,V)|0,r=Math.imul(I,W),o=o+Math.imul(T,J)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(E,J)|0,r=r+Math.imul(E,Y)|0,o=o+Math.imul(v,j)|0,i=(i=i+Math.imul(v,X)|0)+Math.imul(A,j)|0,r=r+Math.imul(A,X)|0,o=o+Math.imul(g,K)|0,i=(i=i+Math.imul(g,Z)|0)+Math.imul(b,K)|0,r=r+Math.imul(b,Z)|0,o=o+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,$)|0,r=r+Math.imul(m,ee)|0;var Ae=(u+(o=o+Math.imul(d,ne)|0)|0)+((8191&(i=(i=i+Math.imul(d,oe)|0)+Math.imul(h,ne)|0))<<13)|0;u=((r=r+Math.imul(h,oe)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,o=Math.imul(N,V),i=(i=Math.imul(N,W))+Math.imul(B,V)|0,r=Math.imul(B,W),o=o+Math.imul(C,J)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(I,J)|0,r=r+Math.imul(I,Y)|0,o=o+Math.imul(T,j)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(E,j)|0,r=r+Math.imul(E,X)|0,o=o+Math.imul(v,K)|0,i=(i=i+Math.imul(v,Z)|0)+Math.imul(A,K)|0,r=r+Math.imul(A,Z)|0,o=o+Math.imul(g,$)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(b,$)|0,r=r+Math.imul(b,ee)|0,o=o+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,oe)|0)+Math.imul(m,ne)|0,r=r+Math.imul(m,oe)|0;var ke=(u+(o=o+Math.imul(d,re)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(h,re)|0))<<13)|0;u=((r=r+Math.imul(h,ae)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,o=Math.imul(U,V),i=(i=Math.imul(U,W))+Math.imul(R,V)|0,r=Math.imul(R,W),o=o+Math.imul(N,J)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(B,J)|0,r=r+Math.imul(B,Y)|0,o=o+Math.imul(C,j)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(I,j)|0,r=r+Math.imul(I,X)|0,o=o+Math.imul(T,K)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(E,K)|0,r=r+Math.imul(E,Z)|0,o=o+Math.imul(v,$)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(A,$)|0,r=r+Math.imul(A,ee)|0,o=o+Math.imul(g,ne)|0,i=(i=i+Math.imul(g,oe)|0)+Math.imul(b,ne)|0,r=r+Math.imul(b,oe)|0,o=o+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(m,re)|0,r=r+Math.imul(m,ae)|0;var Te=(u+(o=o+Math.imul(d,ce)|0)|0)+((8191&(i=(i=i+Math.imul(d,ue)|0)+Math.imul(h,ce)|0))<<13)|0;u=((r=r+Math.imul(h,ue)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,o=Math.imul(O,V),i=(i=Math.imul(O,W))+Math.imul(L,V)|0,r=Math.imul(L,W),o=o+Math.imul(U,J)|0,i=(i=i+Math.imul(U,Y)|0)+Math.imul(R,J)|0,r=r+Math.imul(R,Y)|0,o=o+Math.imul(N,j)|0,i=(i=i+Math.imul(N,X)|0)+Math.imul(B,j)|0,r=r+Math.imul(B,X)|0,o=o+Math.imul(C,K)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(I,K)|0,r=r+Math.imul(I,Z)|0,o=o+Math.imul(T,$)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(E,$)|0,r=r+Math.imul(E,ee)|0,o=o+Math.imul(v,ne)|0,i=(i=i+Math.imul(v,oe)|0)+Math.imul(A,ne)|0,r=r+Math.imul(A,oe)|0,o=o+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ae)|0)+Math.imul(b,re)|0,r=r+Math.imul(b,ae)|0,o=o+Math.imul(p,ce)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(m,ce)|0,r=r+Math.imul(m,ue)|0;var Ee=(u+(o=o+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,he)|0)+Math.imul(h,de)|0))<<13)|0;u=((r=r+Math.imul(h,he)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,o=Math.imul(F,V),i=(i=Math.imul(F,W))+Math.imul(q,V)|0,r=Math.imul(q,W),o=o+Math.imul(O,J)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(L,J)|0,r=r+Math.imul(L,Y)|0,o=o+Math.imul(U,j)|0,i=(i=i+Math.imul(U,X)|0)+Math.imul(R,j)|0,r=r+Math.imul(R,X)|0,o=o+Math.imul(N,K)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(B,K)|0,r=r+Math.imul(B,Z)|0,o=o+Math.imul(C,$)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(I,$)|0,r=r+Math.imul(I,ee)|0,o=o+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,oe)|0)+Math.imul(E,ne)|0,r=r+Math.imul(E,oe)|0,o=o+Math.imul(v,re)|0,i=(i=i+Math.imul(v,ae)|0)+Math.imul(A,re)|0,r=r+Math.imul(A,ae)|0,o=o+Math.imul(g,ce)|0,i=(i=i+Math.imul(g,ue)|0)+Math.imul(b,ce)|0,r=r+Math.imul(b,ue)|0,o=o+Math.imul(p,de)|0,i=(i=i+Math.imul(p,he)|0)+Math.imul(m,de)|0,r=r+Math.imul(m,he)|0;var xe=(u+(o=o+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,me)|0)+Math.imul(h,pe)|0))<<13)|0;u=((r=r+Math.imul(h,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,o=Math.imul(F,J),i=(i=Math.imul(F,Y))+Math.imul(q,J)|0,r=Math.imul(q,Y),o=o+Math.imul(O,j)|0,i=(i=i+Math.imul(O,X)|0)+Math.imul(L,j)|0,r=r+Math.imul(L,X)|0,o=o+Math.imul(U,K)|0,i=(i=i+Math.imul(U,Z)|0)+Math.imul(R,K)|0,r=r+Math.imul(R,Z)|0,o=o+Math.imul(N,$)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(B,$)|0,r=r+Math.imul(B,ee)|0,o=o+Math.imul(C,ne)|0,i=(i=i+Math.imul(C,oe)|0)+Math.imul(I,ne)|0,r=r+Math.imul(I,oe)|0,o=o+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(E,re)|0,r=r+Math.imul(E,ae)|0,o=o+Math.imul(v,ce)|0,i=(i=i+Math.imul(v,ue)|0)+Math.imul(A,ce)|0,r=r+Math.imul(A,ue)|0,o=o+Math.imul(g,de)|0,i=(i=i+Math.imul(g,he)|0)+Math.imul(b,de)|0,r=r+Math.imul(b,he)|0;var Ce=(u+(o=o+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;u=((r=r+Math.imul(m,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,o=Math.imul(F,j),i=(i=Math.imul(F,X))+Math.imul(q,j)|0,r=Math.imul(q,X),o=o+Math.imul(O,K)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(L,K)|0,r=r+Math.imul(L,Z)|0,o=o+Math.imul(U,$)|0,i=(i=i+Math.imul(U,ee)|0)+Math.imul(R,$)|0,r=r+Math.imul(R,ee)|0,o=o+Math.imul(N,ne)|0,i=(i=i+Math.imul(N,oe)|0)+Math.imul(B,ne)|0,r=r+Math.imul(B,oe)|0,o=o+Math.imul(C,re)|0,i=(i=i+Math.imul(C,ae)|0)+Math.imul(I,re)|0,r=r+Math.imul(I,ae)|0,o=o+Math.imul(T,ce)|0,i=(i=i+Math.imul(T,ue)|0)+Math.imul(E,ce)|0,r=r+Math.imul(E,ue)|0,o=o+Math.imul(v,de)|0,i=(i=i+Math.imul(v,he)|0)+Math.imul(A,de)|0,r=r+Math.imul(A,he)|0;var Ie=(u+(o=o+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,me)|0)+Math.imul(b,pe)|0))<<13)|0;u=((r=r+Math.imul(b,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,o=Math.imul(F,K),i=(i=Math.imul(F,Z))+Math.imul(q,K)|0,r=Math.imul(q,Z),o=o+Math.imul(O,$)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(L,$)|0,r=r+Math.imul(L,ee)|0,o=o+Math.imul(U,ne)|0,i=(i=i+Math.imul(U,oe)|0)+Math.imul(R,ne)|0,r=r+Math.imul(R,oe)|0,o=o+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ae)|0)+Math.imul(B,re)|0,r=r+Math.imul(B,ae)|0,o=o+Math.imul(C,ce)|0,i=(i=i+Math.imul(C,ue)|0)+Math.imul(I,ce)|0,r=r+Math.imul(I,ue)|0,o=o+Math.imul(T,de)|0,i=(i=i+Math.imul(T,he)|0)+Math.imul(E,de)|0,r=r+Math.imul(E,he)|0;var Se=(u+(o=o+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,me)|0)+Math.imul(A,pe)|0))<<13)|0;u=((r=r+Math.imul(A,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,o=Math.imul(F,$),i=(i=Math.imul(F,ee))+Math.imul(q,$)|0,r=Math.imul(q,ee),o=o+Math.imul(O,ne)|0,i=(i=i+Math.imul(O,oe)|0)+Math.imul(L,ne)|0,r=r+Math.imul(L,oe)|0,o=o+Math.imul(U,re)|0,i=(i=i+Math.imul(U,ae)|0)+Math.imul(R,re)|0,r=r+Math.imul(R,ae)|0,o=o+Math.imul(N,ce)|0,i=(i=i+Math.imul(N,ue)|0)+Math.imul(B,ce)|0,r=r+Math.imul(B,ue)|0,o=o+Math.imul(C,de)|0,i=(i=i+Math.imul(C,he)|0)+Math.imul(I,de)|0,r=r+Math.imul(I,he)|0;var Ne=(u+(o=o+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(E,pe)|0))<<13)|0;u=((r=r+Math.imul(E,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,o=Math.imul(F,ne),i=(i=Math.imul(F,oe))+Math.imul(q,ne)|0,r=Math.imul(q,oe),o=o+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ae)|0)+Math.imul(L,re)|0,r=r+Math.imul(L,ae)|0,o=o+Math.imul(U,ce)|0,i=(i=i+Math.imul(U,ue)|0)+Math.imul(R,ce)|0,r=r+Math.imul(R,ue)|0,o=o+Math.imul(N,de)|0,i=(i=i+Math.imul(N,he)|0)+Math.imul(B,de)|0,r=r+Math.imul(B,he)|0;var Be=(u+(o=o+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,me)|0)+Math.imul(I,pe)|0))<<13)|0;u=((r=r+Math.imul(I,me)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,o=Math.imul(F,re),i=(i=Math.imul(F,ae))+Math.imul(q,re)|0,r=Math.imul(q,ae),o=o+Math.imul(O,ce)|0,i=(i=i+Math.imul(O,ue)|0)+Math.imul(L,ce)|0,r=r+Math.imul(L,ue)|0,o=o+Math.imul(U,de)|0,i=(i=i+Math.imul(U,he)|0)+Math.imul(R,de)|0,r=r+Math.imul(R,he)|0;var Me=(u+(o=o+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,me)|0)+Math.imul(B,pe)|0))<<13)|0;u=((r=r+Math.imul(B,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,o=Math.imul(F,ce),i=(i=Math.imul(F,ue))+Math.imul(q,ce)|0,r=Math.imul(q,ue),o=o+Math.imul(O,de)|0,i=(i=i+Math.imul(O,he)|0)+Math.imul(L,de)|0,r=r+Math.imul(L,he)|0;var Ue=(u+(o=o+Math.imul(U,pe)|0)|0)+((8191&(i=(i=i+Math.imul(U,me)|0)+Math.imul(R,pe)|0))<<13)|0;u=((r=r+Math.imul(R,me)|0)+(i>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,o=Math.imul(F,de),i=(i=Math.imul(F,he))+Math.imul(q,de)|0,r=Math.imul(q,he);var Re=(u+(o=o+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,me)|0)+Math.imul(L,pe)|0))<<13)|0;u=((r=r+Math.imul(L,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Pe=(u+(o=Math.imul(F,pe))|0)+((8191&(i=(i=Math.imul(F,me))+Math.imul(q,pe)|0))<<13)|0;return u=((r=Math.imul(q,me))+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,c[0]=we,c[1]=ge,c[2]=be,c[3]=ye,c[4]=ve,c[5]=Ae,c[6]=ke,c[7]=Te,c[8]=Ee,c[9]=xe,c[10]=Ce,c[11]=Ie,c[12]=Se,c[13]=Ne,c[14]=Be,c[15]=Me,c[16]=Ue,c[17]=Re,c[18]=Pe,0!==u&&(c[19]=u,n.length++),n};function w(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var o=0,i=0,r=0;r<n.length-1;r++){var a=i;i=0;for(var s=67108863&o,c=Math.min(r,t.length-1),u=Math.max(0,r-e.length+1);u<=c;u++){var l=r-u,d=(0|e.words[l])*(0|t.words[u]),h=67108863&d;s=67108863&(h=h+s|0),i+=(a=(a=a+(d/67108864|0)|0)+(h>>>26)|0)>>>26,a&=67108863}n.words[r]=s,o=a,a=i}return 0!==o?n.words[r]=o:n.length--,n.q()}function g(e,t,n){return w(e,t,n)}Math.imul||(m=p),i.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):n<63?p(this,e,t):n<1024?w(this,e,t):g(this,e,t)},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),g(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var o=0,i=0;i<this.length;i++){var r=(0|this.words[i])*e,a=(67108863&r)+(67108863&o);o>>=26,o+=r/67108864|0,o+=a>>>26,this.words[i]=67108863&a}return 0!==o&&(this.words[i]=o,this.length++),this.length=0===e?1:this.length,t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var o=n/26|0,i=n%26;t[n]=e.words[o]>>>i&1}return t}(e);if(0===t.length)return new i(1);for(var n=this,o=0;o<t.length&&0===t[o];o++,n=n.sqr());if(++o<t.length)for(var r=n.sqr();o<t.length;o++,r=r.sqr())0!==t[o]&&(n=n.mul(r));return n},i.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,o=e%26,i=(e-o)/26,r=67108863>>>26-o<<26-o;if(0!==o){var a=0;for(t=0;t<this.length;t++){var s=this.words[t]&r,c=(0|this.words[t])-s<<o;this.words[t]=c|a,a=s>>>26-o}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.q()},i.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,o){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var r=e%26,a=Math.min((e-r)/26,this.length),s=67108863^67108863>>>r<<r,c=o;if(i-=a,i=Math.max(0,i),c){for(var u=0;u<a;u++)c.words[u]=this.words[u];c.length=a}if(0===a);else if(this.length>a)for(this.length-=a,u=0;u<this.length;u++)this.words[u]=this.words[u+a];else this.words[0]=0,this.length=1;var l=0;for(u=this.length-1;u>=0&&(0!==l||u>=i);u--){var d=0|this.words[u];this.words[u]=l<<26-r|d>>>r,l=d&s}return c&&0!==l&&(c.words[c.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.q()},i.prototype.ishrn=function(e,t,o){return n(0===this.negative),this.iushrn(e,t,o)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,o=(e-t)/26,i=1<<t;return!(this.length<=o||!(this.words[o]&i))},i.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,o=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=o)return this;if(0!==t&&o++,this.length=Math.min(o,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return 0===this.length&&(this.words[0]=0,this.length=1),this.q()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this.V(e)},i.prototype.V=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.q()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._=function(e,t,o){var i,r,a=e.length+o;this.J(a);var s=0;for(i=0;i<e.length;i++){r=(0|this.words[i+o])+s;var c=(0|e.words[i])*t;s=((r-=67108863&c)>>26)-(c/67108864|0),this.words[i+o]=67108863&r}for(;i<this.length-o;i++)s=(r=(0|this.words[i+o])+s)>>26,this.words[i+o]=67108863&r;if(0===s)return this.q();for(n(-1===s),s=0,i=0;i<this.length;i++)s=(r=-(0|this.words[i])+s)>>26,this.words[i]=67108863&r;return this.negative=1,this.q()},i.prototype.$=function(e,t){var n=(this.length,e.length),o=this.clone(),r=e,a=0|r.words[r.length-1];0!=(n=26-this.K(a))&&(r=r.ushln(n),o.iushln(n),a=0|r.words[r.length-1]);var s,c=o.length-r.length;if("mod"!==t){(s=new i(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u<s.length;u++)s.words[u]=0}var l=o.clone()._(r,1,c);0===l.negative&&(o=l,s&&(s.words[c]=1));for(var d=c-1;d>=0;d--){var h=67108864*(0|o.words[r.length+d])+(0|o.words[r.length+d-1]);for(h=Math.min(h/a|0,67108863),o._(r,h,d);0!==o.negative;)h--,o.negative=0,o._(r,1,d),o.isZero()||(o.negative^=1);s&&(s.words[d]=h)}return s&&s.q(),o.q(),"div"!==t&&0!==n&&o.iushrn(n),{div:s||null,mod:o}},i.prototype.divmod=function(e,t,o){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(r=s.div.neg()),"div"!==t&&(a=s.mod.neg(),o&&0!==a.negative&&a.iadd(e)),{div:r,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(r=s.div.neg()),{div:r,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),o&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this.$(e,t);var r,a,s},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,o=e.ushrn(1),i=e.andln(1),r=n.cmp(o);return r<0||1===i&&0===r?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var o=(1<<26)%e,i=0,r=this.length-1;r>=0;r--)i=(o*i+(0|this.words[r]))%e;return t?-i:i},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var o=0,i=this.length-1;i>=0;i--){var r=(0|this.words[i])+67108864*o;this.words[i]=r/e|0,o=r%e}return this.q(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,o=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r=new i(1),a=new i(0),s=new i(0),c=new i(1),u=0;t.isEven()&&o.isEven();)t.iushrn(1),o.iushrn(1),++u;for(var l=o.clone(),d=t.clone();!t.isZero();){for(var h=0,f=1;0===(t.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(r.isOdd()||a.isOdd())&&(r.iadd(l),a.isub(d)),r.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(o.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(o.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(l),c.isub(d)),s.iushrn(1),c.iushrn(1);t.cmp(o)>=0?(t.isub(o),r.isub(s),a.isub(c)):(o.isub(t),s.isub(r),c.isub(a))}return{a:s,b:c,gcd:o.iushln(u)}},i.prototype.ee=function(e){n(0===e.negative),n(!e.isZero());var t=this,o=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r,a=new i(1),s=new i(0),c=o.clone();t.cmpn(1)>0&&o.cmpn(1)>0;){for(var u=0,l=1;0===(t.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(t.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var d=0,h=1;0===(o.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(o.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(o)>=0?(t.isub(o),a.isub(s)):(o.isub(t),s.isub(a))}return(r=0===t.cmpn(1)?a:s).cmpn(0)<0&&r.iadd(e),r},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var o=0;t.isEven()&&n.isEven();o++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var r=t;t=n,n=r}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(o)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return!(1&this.words[0])},i.prototype.isOdd=function(){return!(1&~this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,o=(e-t)/26,i=1<<t;if(this.length<=o)return this.J(o+1),this.words[o]|=i,this;for(var r=i,a=o;0!==r&&a<this.length;a++){var s=0|this.words[a];r=(s+=r)>>>26,s&=67108863,this.words[a]=s}return 0!==r&&(this.words[a]=r,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,o=e<0;if(0!==this.negative&&!o)return-1;if(0===this.negative&&o)return 1;if(this.q(),this.length>1)t=1;else{o&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},i.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var o=0|this.words[n],i=0|e.words[n];if(o!==i){o<i?t=-1:o>i&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new E(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this).te(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype.te=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this.te(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red.ne(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red.ne(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red.oe(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red.oe(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red.oe(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red.oe(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red.oe(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red.oe(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this.ie()}function v(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function T(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=i.re(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function x(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r.ee(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype.ie=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var o=t<this.n?-1:n.ucmp(this.p);return 0===o?(n.words[0]=0,n.length=1):o>0?n.isub(this.p):void 0!==n.strip?n.strip():n.q(),n},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},o(v,y),v.prototype.split=function(e,t){for(var n=4194303,o=Math.min(e.length,9),i=0;i<o;i++)t.words[i]=e.words[i];if(t.length=o,e.length<=9)return e.words[0]=0,void(e.length=1);var r=e.words[9];for(t.words[t.length++]=r&n,i=10;i<e.length;i++){var a=0|e.words[i];e.words[i-10]=(a&n)<<4|r>>>22,r=a}r>>>=22,e.words[i-10]=r,0===r&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var o=0|e.words[n];t+=977*o,e.words[n]=67108863&t,t=64*o+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},o(A,y),o(k,y),o(T,y),T.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var o=19*(0|e.words[n])+t,i=67108863&o;o>>>=26,e.words[n]=i,t=o}return 0!==t&&(e.words[e.length++]=t),e},i.re=function(e){if(b[e])return b[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new A;else if("p192"===e)t=new k;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new T}return b[e]=t,t},E.prototype.oe=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},E.prototype.ne=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e).te(this):(u(e,e.umod(this.m).te(this)),e)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e).te(this)},E.prototype.add=function(e,t){this.ne(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n.te(this)},E.prototype.iadd=function(e,t){this.ne(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},E.prototype.sub=function(e,t){this.ne(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n.te(this)},E.prototype.isub=function(e,t){this.ne(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},E.prototype.shl=function(e,t){return this.oe(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this.ne(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this.ne(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var o=this.m.add(new i(1)).iushrn(2);return this.pow(e,o)}for(var r=this.m.subn(1),a=0;!r.isZero()&&0===r.andln(1);)a++,r.iushrn(1);n(!r.isZero());var s=new i(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new i(2*l*l).toRed(this);0!==this.pow(l,u).cmp(c);)l.redIAdd(c);for(var d=this.pow(l,r),h=this.pow(e,r.addn(1).iushrn(1)),f=this.pow(e,r),p=a;0!==f.cmp(s);){for(var m=f,w=0;0!==m.cmp(s);w++)m=m.redSqr();n(w<p);var g=this.pow(d,new i(1).iushln(p-w-1));h=h.redMul(g),d=g.redSqr(),f=f.redMul(d),p=w}return h},E.prototype.invm=function(e){var t=e.ee(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},E.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new i(1).toRed(this),n[1]=e;for(var o=2;o<n.length;o++)n[o]=this.mul(n[o-1],e);var r=n[0],a=0,s=0,c=t.bitLength()%26;for(0===c&&(c=26),o=t.length-1;o>=0;o--){for(var u=t.words[o],l=c-1;l>=0;l--){var d=u>>l&1;r!==n[0]&&(r=this.sqr(r)),0!==d||0!==a?(a<<=1,a|=d,(4===++s||0===o&&0===l)&&(r=this.mul(r,n[a]),s=0,a=0)):s=0}c=26}return r},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new x(e)},o(x,E),x.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},x.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},x.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),o=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(o).iushrn(this.shift),r=i;return i.cmp(this.m)>=0?r=i.isub(this.m):i.cmpn(0)<0&&(r=i.iadd(this.m)),r.te(this)},x.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0).te(this);var n=e.mul(t),o=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=n.isub(o).iushrn(this.shift),a=r;return r.cmp(this.m)>=0?a=r.isub(this.m):r.cmpn(0)<0&&(a=r.iadd(this.m)),a.te(this)},x.prototype.invm=function(e){return this.imod(e.ee(this.m).mul(this.r2)).te(this)}}($i,nr)),$i.exports}const ir=Ii(or());var rr,ar,sr,cr,ur,lr={exports:{}};function dr(){if(ur)return cr;ur=1;var e=function(){if(sr)return ar;sr=1;var e=(rr||(rr=1,function(e,t){var n=Oi(),o=n.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function r(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=r),r.prototype=Object.create(o.prototype),i(o,r),r.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},r.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=o(e);return void 0!==t?"string"==typeof n?i.fill(t,n):i.fill(t):i.fill(0),i},r.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},r.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}}(lr,lr.exports)),lr.exports).Buffer;return ar=function(t){if(t.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),o=0;o<n.length;o++)n[o]=255;for(var i=0;i<t.length;i++){var r=t.charAt(i),a=r.charCodeAt(0);if(255!==n[a])throw new TypeError(r+" is ambiguous");n[a]=i}var s=t.length,c=t.charAt(0),u=Math.log(s)/Math.log(256),l=Math.log(256)/Math.log(s);function d(t){if("string"!=typeof t)throw new TypeError("Expected String");if(0===t.length)return e.alloc(0);for(var o=0,i=0,r=0;t[o]===c;)i++,o++;for(var a=(t.length-o)*u+1>>>0,l=new Uint8Array(a);o<t.length;){var d=t.charCodeAt(o);if(d>255)return;var h=n[d];if(255===h)return;for(var f=0,p=a-1;(0!==h||f<r)&&-1!==p;p--,f++)h+=s*l[p]>>>0,l[p]=h%256>>>0,h=h/256>>>0;if(0!==h)throw new Error("Non-zero carry");r=f,o++}for(var m=a-r;m!==a&&0===l[m];)m++;var w=e.allocUnsafe(i+(a-m));w.fill(0,0,i);for(var g=i;m!==a;)w[g++]=l[m++];return w}return{encode:function(n){if((Array.isArray(n)||n instanceof Uint8Array)&&(n=e.from(n)),!e.isBuffer(n))throw new TypeError("Expected Buffer");if(0===n.length)return"";for(var o=0,i=0,r=0,a=n.length;r!==a&&0===n[r];)r++,o++;for(var u=(a-r)*l+1>>>0,d=new Uint8Array(u);r!==a;){for(var h=n[r],f=0,p=u-1;(0!==h||f<i)&&-1!==p;p--,f++)h+=256*d[p]>>>0,d[p]=h%s>>>0,h=h/s>>>0;if(0!==h)throw new Error("Non-zero carry");i=f,r++}for(var m=u-i;m!==u&&0===d[m];)m++;for(var w=c.repeat(o);m<u;++m)w+=t.charAt(d[m]);return w},decodeUnsafe:d,decode:function(e){var t=d(e);if(t)return t;throw new Error("Non-base"+s+" character")}}}}();return cr=e("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")}const hr=Ii(dr());var fr={};function pr(e,t,n){return t<=e&&e<=n}function mr(e){if(void 0===e)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function wr(e){this.tokens=[].slice.call(e)}wr.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():-1},prepend:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.unshift(t.pop());else this.tokens.unshift(e)},push:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.push(t.shift());else this.tokens.push(e)}};var gr=-1;function br(e,t){if(e)throw TypeError("Decoder error");return t||65533}var yr="utf-8";function vr(e,t){if(!(this instanceof vr))return new vr(e,t);if((e=void 0!==e?String(e).toLowerCase():yr)!==yr)throw new Error("Encoding not supported. Only utf-8 is supported");t=mr(t),this.ae=!1,this.se=!1,this.ce=null,this.ue=Boolean(t.fatal),this.le=Boolean(t.ignoreBOM),Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this.ue}),Object.defineProperty(this,"ignoreBOM",{value:this.le})}function Ar(e,t){if(!(this instanceof Ar))return new Ar(e,t);if((e=void 0!==e?String(e).toLowerCase():yr)!==yr)throw new Error("Encoding not supported. Only utf-8 is supported");t=mr(t),this.ae=!1,this.de=null,this.he={fatal:Boolean(t.fatal)},Object.defineProperty(this,"encoding",{value:"utf-8"})}function kr(e){var t=e.fatal,n=0,o=0,i=0,r=128,a=191;this.handler=function(e,s){if(-1===s&&0!==i)return i=0,br(t);if(-1===s)return gr;if(0===i){if(pr(s,0,127))return s;if(pr(s,194,223))i=1,n=s-192;else if(pr(s,224,239))224===s&&(r=160),237===s&&(a=159),i=2,n=s-224;else{if(!pr(s,240,244))return br(t);240===s&&(r=144),244===s&&(a=143),i=3,n=s-240}return n<<=6*i,null}if(!pr(s,r,a))return n=i=o=0,r=128,a=191,e.prepend(s),br(t);if(r=128,a=191,n+=s-128<<6*(i-(o+=1)),o!==i)return null;var c=n;return n=i=o=0,c}}function Tr(e){e.fatal,this.handler=function(e,t){if(-1===t)return gr;if(pr(t,0,127))return t;var n,o;pr(t,128,2047)?(n=1,o=192):pr(t,2048,65535)?(n=2,o=224):pr(t,65536,1114111)&&(n=3,o=240);for(var i=[(t>>6*n)+o];n>0;){var r=t>>6*(n-1);i.push(128|63&r),n-=1}return i}}vr.prototype={decode:function(e,t){var n;n="object"==typeof e&&e instanceof ArrayBuffer?new Uint8Array(e):"object"==typeof e&&"buffer"in e&&e.buffer instanceof ArrayBuffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(0),t=mr(t),this.ae||(this.ce=new kr({fatal:this.ue}),this.se=!1),this.ae=Boolean(t.stream);for(var o,i=new wr(n),r=[];!i.endOfStream()&&(o=this.ce.handler(i,i.read()))!==gr;)null!==o&&(Array.isArray(o)?r.push.apply(r,o):r.push(o));if(!this.ae){do{if((o=this.ce.handler(i,i.read()))===gr)break;null!==o&&(Array.isArray(o)?r.push.apply(r,o):r.push(o))}while(!i.endOfStream());this.ce=null}return r.length&&(-1===["utf-8"].indexOf(this.encoding)||this.le||this.se||(65279===r[0]?(this.se=!0,r.shift()):this.se=!0)),function(e){for(var t="",n=0;n<e.length;++n){var o=e[n];o<=65535?t+=String.fromCharCode(o):(o-=65536,t+=String.fromCharCode(55296+(o>>10),56320+(1023&o)))}return t}(r)}},Ar.prototype={encode:function(e,t){e=e?String(e):"",t=mr(t),this.ae||(this.de=new Tr(this.he)),this.ae=Boolean(t.stream);for(var n,o=[],i=new wr(function(e){for(var t=String(e),n=t.length,o=0,i=[];o<n;){var r=t.charCodeAt(o);if(r<55296||r>57343)i.push(r);else if(56320<=r&&r<=57343)i.push(65533);else if(55296<=r&&r<=56319)if(o===n-1)i.push(65533);else{var a=e.charCodeAt(o+1);if(56320<=a&&a<=57343){var s=1023&r,c=1023&a;i.push(65536+(s<<10)+c),o+=1}else i.push(65533)}o+=1}return i}(e));!i.endOfStream()&&(n=this.de.handler(i,i.read()))!==gr;)Array.isArray(n)?o.push.apply(o,n):o.push(n);if(!this.ae){for(;(n=this.de.handler(i,i.read()))!==gr;)Array.isArray(n)?o.push.apply(o,n):o.push(n);this.de=null}return new Uint8Array(o)}};const Er=Si(Object.freeze(Object.defineProperty({__proto__:null,TextDecoder:vr,TextEncoder:Ar},Symbol.toStringTag,{value:"Module"})));var xr,Cr,Ir=function(){if(xr)return fr;xr=1;var e=fr&&fr.fe||(Object.create?function(e,t,n,o){void 0===o&&(o=n),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),t=fr&&fr.pe||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=fr&&fr.me||function(e,t,n,o){var i,r=arguments.length,a=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(r<3?i(a):r>3?i(t,n,a):i(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a},o=fr&&fr.we||function(n){if(n&&n.S)return n;var o={};if(null!=n)for(var i in n)"default"!==i&&Object.hasOwnProperty.call(n,i)&&e(o,n,i);return t(o,n),o},i=fr&&fr.ge||function(e){return e&&e.S?e:{default:e}};Object.defineProperty(fr,"S",{value:!0}),fr.deserializeUnchecked=fr.deserialize=fr.serialize=fr.BinaryReader=fr.BinaryWriter=fr.BorshError=fr.baseDecode=fr.baseEncode=void 0;const r=i(or()),a=i(dr()),s=o(Er),c=new("function"!=typeof TextDecoder?s.TextDecoder:TextDecoder)("utf-8",{fatal:!0});fr.baseEncode=function(e){return"string"==typeof e&&(e=Buffer.from(e,"utf8")),a.default.encode(Buffer.from(e))},fr.baseDecode=function(e){return Buffer.from(a.default.decode(e))};const u=1024;class l extends Error{constructor(e){super(e),this.fieldPath=[],this.originalMessage=e}addToFieldPath(e){this.fieldPath.splice(0,0,e),this.message=this.originalMessage+": "+this.fieldPath.join(".")}}fr.BorshError=l;class d{constructor(){this.buf=Buffer.alloc(u),this.length=0}maybeResize(){this.buf.length<16+this.length&&(this.buf=Buffer.concat([this.buf,Buffer.alloc(u)]))}writeU8(e){this.maybeResize(),this.buf.writeUInt8(e,this.length),this.length+=1}writeU16(e){this.maybeResize(),this.buf.writeUInt16LE(e,this.length),this.length+=2}writeU32(e){this.maybeResize(),this.buf.writeUInt32LE(e,this.length),this.length+=4}writeU64(e){this.maybeResize(),this.writeBuffer(Buffer.from(new r.default(e).toArray("le",8)))}writeU128(e){this.maybeResize(),this.writeBuffer(Buffer.from(new r.default(e).toArray("le",16)))}writeU256(e){this.maybeResize(),this.writeBuffer(Buffer.from(new r.default(e).toArray("le",32)))}writeU512(e){this.maybeResize(),this.writeBuffer(Buffer.from(new r.default(e).toArray("le",64)))}writeBuffer(e){this.buf=Buffer.concat([Buffer.from(this.buf.subarray(0,this.length)),e,Buffer.alloc(u)]),this.length+=e.length}writeString(e){this.maybeResize();const t=Buffer.from(e,"utf8");this.writeU32(t.length),this.writeBuffer(t)}writeFixedArray(e){this.writeBuffer(Buffer.from(e))}writeArray(e,t){this.maybeResize(),this.writeU32(e.length);for(const n of e)this.maybeResize(),t(n)}toArray(){return this.buf.subarray(0,this.length)}}function h(e,t,n){const o=n.value;n.value=function(...e){try{return o.apply(this,e)}catch(t){if(t instanceof RangeError){const e=t.code;if(["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(e)>=0)throw new l("Reached the end of buffer when deserializing")}throw t}}}fr.BinaryWriter=d;class f{constructor(e){this.buf=e,this.offset=0}readU8(){const e=this.buf.readUInt8(this.offset);return this.offset+=1,e}readU16(){const e=this.buf.readUInt16LE(this.offset);return this.offset+=2,e}readU32(){const e=this.buf.readUInt32LE(this.offset);return this.offset+=4,e}readU64(){const e=this.readBuffer(8);return new r.default(e,"le")}readU128(){const e=this.readBuffer(16);return new r.default(e,"le")}readU256(){const e=this.readBuffer(32);return new r.default(e,"le")}readU512(){const e=this.readBuffer(64);return new r.default(e,"le")}readBuffer(e){if(this.offset+e>this.buf.length)throw new l(`Expected buffer length ${e} isn't within bounds`);const t=this.buf.slice(this.offset,this.offset+e);return this.offset+=e,t}readString(){const e=this.readU32(),t=this.readBuffer(e);try{return c.decode(t)}catch(n){throw new l(`Error decoding UTF-8 string: ${n}`)}}readFixedArray(e){return new Uint8Array(this.readBuffer(e))}readArray(e){const t=this.readU32(),n=Array();for(let o=0;o<t;++o)n.push(e());return n}}function p(e){return e.charAt(0).toUpperCase()+e.slice(1)}function m(e,t,n,o,i){try{if("string"==typeof o)i[`write${p(o)}`](n);else if(o instanceof Array)if("number"==typeof o[0]){if(n.length!==o[0])throw new l(`Expecting byte array of length ${o[0]}, but got ${n.length} bytes`);i.writeFixedArray(n)}else if(2===o.length&&"number"==typeof o[1]){if(n.length!==o[1])throw new l(`Expecting byte array of length ${o[1]}, but got ${n.length} bytes`);for(let t=0;t<o[1];t++)m(e,null,n[t],o[0],i)}else i.writeArray(n,n=>{m(e,t,n,o[0],i)});else if(void 0!==o.kind)switch(o.kind){case"option":null==n?i.writeU8(0):(i.writeU8(1),m(e,t,n,o.type,i));break;case"map":i.writeU32(n.size),n.forEach((n,r)=>{m(e,t,r,o.key,i),m(e,t,n,o.value,i)});break;default:throw new l(`FieldType ${o} unrecognized`)}else w(e,n,i)}catch(r){throw r instanceof l&&r.addToFieldPath(t),r}}function w(e,t,n){if("function"==typeof t.borshSerialize)return void t.borshSerialize(n);const o=e.get(t.constructor);if(!o)throw new l(`Class ${t.constructor.name} is missing in schema`);if("struct"===o.kind)o.fields.map(([o,i])=>{m(e,o,t[o],i,n)});else{if("enum"!==o.kind)throw new l(`Unexpected schema kind: ${o.kind} for ${t.constructor.name}`);{const i=t[o.field];for(let r=0;r<o.values.length;++r){const[a,s]=o.values[r];if(a===i){n.writeU8(r),m(e,a,t[a],s,n);break}}}}}function g(e,t,n,o){try{if("string"==typeof n)return o[`read${p(n)}`]();if(n instanceof Array){if("number"==typeof n[0])return o.readFixedArray(n[0]);if("number"==typeof n[1]){const t=[];for(let i=0;i<n[1];i++)t.push(g(e,null,n[0],o));return t}return o.readArray(()=>g(e,t,n[0],o))}if("option"===n.kind)return o.readU8()?g(e,t,n.type,o):void 0;if("map"===n.kind){let i=new Map;const r=o.readU32();for(let a=0;a<r;a++){const r=g(e,t,n.key,o),a=g(e,t,n.value,o);i.set(r,a)}return i}return b(e,n,o)}catch(i){throw i instanceof l&&i.addToFieldPath(t),i}}function b(e,t,n){if("function"==typeof t.borshDeserialize)return t.borshDeserialize(n);const o=e.get(t);if(!o)throw new l(`Class ${t.name} is missing in schema`);if("struct"===o.kind){const o={};for(const[i,r]of e.get(t).fields)o[i]=g(e,i,r,n);return new t(o)}if("enum"===o.kind){const i=n.readU8();if(i>=o.values.length)throw new l(`Enum index: ${i} is out of range`);const[r,a]=o.values[i],s=g(e,r,a,n);return new t({[r]:s})}throw new l(`Unexpected schema kind: ${o.kind} for ${t.constructor.name}`)}return n([h],f.prototype,"readU8",null),n([h],f.prototype,"readU16",null),n([h],f.prototype,"readU32",null),n([h],f.prototype,"readU64",null),n([h],f.prototype,"readU128",null),n([h],f.prototype,"readU256",null),n([h],f.prototype,"readU512",null),n([h],f.prototype,"readString",null),n([h],f.prototype,"readFixedArray",null),n([h],f.prototype,"readArray",null),fr.BinaryReader=f,fr.serialize=function(e,t,n=d){const o=new n;return w(e,t,o),o.toArray()},fr.deserialize=function(e,t,n,o=f){const i=new o(n),r=b(e,t,i);if(i.offset<n.length)throw new l(`Unexpected ${n.length-i.offset} bytes after deserialized data`);return r},fr.deserializeUnchecked=function(e,t,n,o=f){return b(e,t,new o(n))},fr}(),Sr={},Nr=function(){if(Cr)return Sr;Cr=1,Object.defineProperty(Sr,"S",{value:!0}),Sr.s16=Sr.s8=Sr.nu64be=Sr.u48be=Sr.u40be=Sr.u32be=Sr.u24be=Sr.u16be=Sr.nu64=Sr.u48=Sr.u40=Sr.u32=Sr.u24=Sr.u16=Sr.u8=Sr.offset=Sr.greedy=Sr.Constant=Sr.UTF8=Sr.CString=Sr.Blob=Sr.Boolean=Sr.BitField=Sr.BitStructure=Sr.VariantLayout=Sr.Union=Sr.UnionLayoutDiscriminator=Sr.UnionDiscriminator=Sr.Structure=Sr.Sequence=Sr.DoubleBE=Sr.Double=Sr.FloatBE=Sr.Float=Sr.NearInt64BE=Sr.NearInt64=Sr.NearUInt64BE=Sr.NearUInt64=Sr.IntBE=Sr.Int=Sr.UIntBE=Sr.UInt=Sr.OffsetLayout=Sr.GreedyCount=Sr.ExternalLayout=Sr.bindConstructorLayout=Sr.nameWithProperty=Sr.Layout=Sr.uint8ArrayToBuffer=Sr.checkUint8Array=void 0,Sr.constant=Sr.utf8=Sr.cstr=Sr.blob=Sr.unionLayoutDiscriminator=Sr.union=Sr.seq=Sr.bits=Sr.struct=Sr.f64be=Sr.f64=Sr.f32be=Sr.f32=Sr.ns64be=Sr.s48be=Sr.s40be=Sr.s32be=Sr.s24be=Sr.s16be=Sr.ns64=Sr.s48=Sr.s40=Sr.s32=Sr.s24=void 0;const e=Oi();function t(e){if(!(e instanceof Uint8Array))throw new TypeError("b must be a Uint8Array")}function n(n){return t(n),e.Buffer.from(n.buffer,n.byteOffset,n.length)}Sr.checkUint8Array=t,Sr.uint8ArrayToBuffer=n;let o=class{constructor(e,t){if(!Number.isInteger(e))throw new TypeError("span must be an integer");this.span=e,this.property=t}makeDestinationObject(){return{}}getSpan(e,t){if(0>this.span)throw new RangeError("indeterminate span");return this.span}replicate(e){const t=Object.create(this.constructor.prototype);return Object.assign(t,this),t.property=e,t}fromArray(e){}};function i(e,t){return t.property?e+"["+t.property+"]":e}Sr.Layout=o,Sr.nameWithProperty=i,Sr.bindConstructorLayout=function(e,t){if("function"!=typeof e)throw new TypeError("Class must be constructor");if(Object.prototype.hasOwnProperty.call(e,"layout_"))throw new Error("Class is already bound to a layout");if(!(t&&t instanceof o))throw new TypeError("layout must be a Layout");if(Object.prototype.hasOwnProperty.call(t,"boundConstructor_"))throw new Error("layout is already bound to a constructor");e.layout_=t,t.boundConstructor_=e,t.makeDestinationObject=()=>new e,Object.defineProperty(e.prototype,"encode",{value(e,n){return t.encode(this,e,n)},writable:!0}),Object.defineProperty(e,"decode",{value:(e,n)=>t.decode(e,n),writable:!0})};class r extends o{isCount(){throw new Error("ExternalLayout is abstract")}}Sr.ExternalLayout=r;class a extends r{constructor(e=1,t){if(!Number.isInteger(e)||0>=e)throw new TypeError("elementSpan must be a (positive) integer");super(-1,t),this.elementSpan=e}isCount(){return!0}decode(e,n=0){t(e);const o=e.length-n;return Math.floor(o/this.elementSpan)}encode(e,t,n){return 0}}Sr.GreedyCount=a;class s extends r{constructor(e,t=0,n){if(!(e instanceof o))throw new TypeError("layout must be a Layout");if(!Number.isInteger(t))throw new TypeError("offset must be integer or undefined");super(e.span,n||e.property),this.layout=e,this.offset=t}isCount(){return this.layout instanceof c||this.layout instanceof u}decode(e,t=0){return this.layout.decode(e,t+this.offset)}encode(e,t,n=0){return this.layout.encode(e,t,n+this.offset)}}Sr.OffsetLayout=s;class c extends o{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return n(e).readUIntLE(t,this.span)}encode(e,t,o=0){return n(t).writeUIntLE(e,o,this.span),this.span}}Sr.UInt=c;class u extends o{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return n(e).readUIntBE(t,this.span)}encode(e,t,o=0){return n(t).writeUIntBE(e,o,this.span),this.span}}Sr.UIntBE=u;class l extends o{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return n(e).readIntLE(t,this.span)}encode(e,t,o=0){return n(t).writeIntLE(e,o,this.span),this.span}}Sr.Int=l;class d extends o{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return n(e).readIntBE(t,this.span)}encode(e,t,o=0){return n(t).writeIntBE(e,o,this.span),this.span}}Sr.IntBE=d;const h=Math.pow(2,32);function f(e){const t=Math.floor(e/h);return{hi32:t,lo32:e-t*h}}function p(e,t){return e*h+t}class m extends o{constructor(e){super(8,e)}decode(e,t=0){const o=n(e),i=o.readUInt32LE(t);return p(o.readUInt32LE(t+4),i)}encode(e,t,o=0){const i=f(e),r=n(t);return r.writeUInt32LE(i.lo32,o),r.writeUInt32LE(i.hi32,o+4),8}}Sr.NearUInt64=m;class w extends o{constructor(e){super(8,e)}decode(e,t=0){const o=n(e);return p(o.readUInt32BE(t),o.readUInt32BE(t+4))}encode(e,t,o=0){const i=f(e),r=n(t);return r.writeUInt32BE(i.hi32,o),r.writeUInt32BE(i.lo32,o+4),8}}Sr.NearUInt64BE=w;class g extends o{constructor(e){super(8,e)}decode(e,t=0){const o=n(e),i=o.readUInt32LE(t);return p(o.readInt32LE(t+4),i)}encode(e,t,o=0){const i=f(e),r=n(t);return r.writeUInt32LE(i.lo32,o),r.writeInt32LE(i.hi32,o+4),8}}Sr.NearInt64=g;class b extends o{constructor(e){super(8,e)}decode(e,t=0){const o=n(e);return p(o.readInt32BE(t),o.readUInt32BE(t+4))}encode(e,t,o=0){const i=f(e),r=n(t);return r.writeInt32BE(i.hi32,o),r.writeUInt32BE(i.lo32,o+4),8}}Sr.NearInt64BE=b;class y extends o{constructor(e){super(4,e)}decode(e,t=0){return n(e).readFloatLE(t)}encode(e,t,o=0){return n(t).writeFloatLE(e,o),4}}Sr.Float=y;class v extends o{constructor(e){super(4,e)}decode(e,t=0){return n(e).readFloatBE(t)}encode(e,t,o=0){return n(t).writeFloatBE(e,o),4}}Sr.FloatBE=v;class A extends o{constructor(e){super(8,e)}decode(e,t=0){return n(e).readDoubleLE(t)}encode(e,t,o=0){return n(t).writeDoubleLE(e,o),8}}Sr.Double=A;class k extends o{constructor(e){super(8,e)}decode(e,t=0){return n(e).readDoubleBE(t)}encode(e,t,o=0){return n(t).writeDoubleBE(e,o),8}}Sr.DoubleBE=k;class T extends o{constructor(e,t,n){if(!(e instanceof o))throw new TypeError("elementLayout must be a Layout");if(!(t instanceof r&&t.isCount()||Number.isInteger(t)&&0<=t))throw new TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let i=-1;!(t instanceof r)&&0<e.span&&(i=t*e.span),super(i,n),this.elementLayout=e,this.count=t}getSpan(e,t=0){if(0<=this.span)return this.span;let n=0,o=this.count;if(o instanceof r&&(o=o.decode(e,t)),0<this.elementLayout.span)n=o*this.elementLayout.span;else{let i=0;for(;i<o;)n+=this.elementLayout.getSpan(e,t+n),++i}return n}decode(e,t=0){const n=[];let o=0,i=this.count;for(i instanceof r&&(i=i.decode(e,t));o<i;)n.push(this.elementLayout.decode(e,t)),t+=this.elementLayout.getSpan(e,t),o+=1;return n}encode(e,t,n=0){const o=this.elementLayout,i=e.reduce((e,i)=>e+o.encode(i,t,n+e),0);return this.count instanceof r&&this.count.encode(e.length,t,n),i}}Sr.Sequence=T;class E extends o{constructor(e,t,n){if(!Array.isArray(e)||!e.reduce((e,t)=>e&&t instanceof o,!0))throw new TypeError("fields must be array of Layout instances");"boolean"==typeof t&&void 0===n&&(n=t,t=void 0);for(const o of e)if(0>o.span&&void 0===o.property)throw new Error("fields cannot contain unnamed variable-length layout");let i=-1;try{i=e.reduce((e,t)=>e+t.getSpan(),0)}catch(r){}super(i,t),this.fields=e,this.decodePrefixes=!!n}getSpan(e,t=0){if(0<=this.span)return this.span;let n=0;try{n=this.fields.reduce((n,o)=>{const i=o.getSpan(e,t);return t+=i,n+i},0)}catch(o){throw new RangeError("indeterminate span")}return n}decode(e,n=0){t(e);const o=this.makeDestinationObject();for(const t of this.fields)if(void 0!==t.property&&(o[t.property]=t.decode(e,n)),n+=t.getSpan(e,n),this.decodePrefixes&&e.length===n)break;return o}encode(e,t,n=0){const o=n;let i=0,r=0;for(const a of this.fields){let o=a.span;if(r=0<o?o:0,void 0!==a.property){const i=e[a.property];void 0!==i&&(r=a.encode(i,t,n),0>o&&(o=a.getSpan(t,n)))}i=n,n+=o}return i+r-o}fromArray(e){const t=this.makeDestinationObject();for(const n of this.fields)void 0!==n.property&&0<e.length&&(t[n.property]=e.shift());return t}layoutFor(e){if("string"!=typeof e)throw new TypeError("property must be string");for(const t of this.fields)if(t.property===e)return t}offsetOf(e){if("string"!=typeof e)throw new TypeError("property must be string");let t=0;for(const n of this.fields){if(n.property===e)return t;0>n.span?t=-1:0<=t&&(t+=n.span)}}}Sr.Structure=E;class x{constructor(e){this.property=e}decode(e,t){throw new Error("UnionDiscriminator is abstract")}encode(e,t,n){throw new Error("UnionDiscriminator is abstract")}}Sr.UnionDiscriminator=x;class C extends x{constructor(e,t){if(!(e instanceof r&&e.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");super(t||e.property||"variant"),this.layout=e}decode(e,t){return this.layout.decode(e,t)}encode(e,t,n){return this.layout.encode(e,t,n)}}Sr.UnionLayoutDiscriminator=C;class I extends o{constructor(e,t,n){let i;if(e instanceof c||e instanceof u)i=new C(new s(e));else if(e instanceof r&&e.isCount())i=new C(e);else{if(!(e instanceof x))throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");i=e}if(void 0===t&&(t=null),!(null===t||t instanceof o))throw new TypeError("defaultLayout must be null or a Layout");if(null!==t){if(0>t.span)throw new Error("defaultLayout must have constant span");void 0===t.property&&(t=t.replicate("content"))}let a=-1;t&&(a=t.span,0<=a&&(e instanceof c||e instanceof u)&&(a+=i.layout.span)),super(a,n),this.discriminator=i,this.usesPrefixDiscriminator=e instanceof c||e instanceof u,this.defaultLayout=t,this.registry={};let l=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(e){return l(e)},this.configGetSourceVariant=function(e){l=e.bind(this)}}getSpan(e,t=0){if(0<=this.span)return this.span;const n=this.getVariant(e,t);if(!n)throw new Error("unable to determine span for unrecognized variant");return n.getSpan(e,t)}defaultGetSourceVariant(e){if(Object.prototype.hasOwnProperty.call(e,this.discriminator.property)){if(this.defaultLayout&&this.defaultLayout.property&&Object.prototype.hasOwnProperty.call(e,this.defaultLayout.property))return;const t=this.registry[e[this.discriminator.property]];if(t&&(!t.layout||t.property&&Object.prototype.hasOwnProperty.call(e,t.property)))return t}else for(const t in this.registry){const n=this.registry[t];if(n.property&&Object.prototype.hasOwnProperty.call(e,n.property))return n}throw new Error("unable to infer src variant")}decode(e,t=0){let n;const o=this.discriminator,i=o.decode(e,t),r=this.registry[i];if(void 0===r){const r=this.defaultLayout;let a=0;this.usesPrefixDiscriminator&&(a=o.layout.span),n=this.makeDestinationObject(),n[o.property]=i,n[r.property]=r.decode(e,t+a)}else n=r.decode(e,t);return n}encode(e,t,n=0){const o=this.getSourceVariant(e);if(void 0===o){const o=this.discriminator,i=this.defaultLayout;let r=0;return this.usesPrefixDiscriminator&&(r=o.layout.span),o.encode(e[o.property],t,n),r+i.encode(e[i.property],t,n+r)}return o.encode(e,t,n)}addVariant(e,t,n){const o=new S(this,e,t,n);return this.registry[e]=o,o}getVariant(e,t=0){let n;return n=e instanceof Uint8Array?this.discriminator.decode(e,t):e,this.registry[n]}}Sr.Union=I;class S extends o{constructor(e,t,n,i){if(!(e instanceof I))throw new TypeError("union must be a Union");if(!Number.isInteger(t)||0>t)throw new TypeError("variant must be a (non-negative) integer");if("string"==typeof n&&void 0===i&&(i=n,n=null),n){if(!(n instanceof o))throw new TypeError("layout must be a Layout");if(null!==e.defaultLayout&&0<=n.span&&n.span>e.defaultLayout.span)throw new Error("variant span exceeds span of containing union");if("string"!=typeof i)throw new TypeError("variant must have a String property")}let r=e.span;0>e.span&&(r=n?n.span:0,0<=r&&e.usesPrefixDiscriminator&&(r+=e.discriminator.layout.span)),super(r,i),this.union=e,this.variant=t,this.layout=n||null}getSpan(e,t=0){if(0<=this.span)return this.span;let n=0;this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span);let o=0;return this.layout&&(o=this.layout.getSpan(e,t+n)),n+o}decode(e,t=0){const n=this.makeDestinationObject();if(this!==this.union.getVariant(e,t))throw new Error("variant mismatch");let o=0;return this.union.usesPrefixDiscriminator&&(o=this.union.discriminator.layout.span),this.layout?n[this.property]=this.layout.decode(e,t+o):this.property?n[this.property]=!0:this.union.usesPrefixDiscriminator&&(n[this.union.discriminator.property]=this.variant),n}encode(e,t,n=0){let o=0;if(this.union.usesPrefixDiscriminator&&(o=this.union.discriminator.layout.span),this.layout&&!Object.prototype.hasOwnProperty.call(e,this.property))throw new TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,t,n);let i=o;if(this.layout&&(this.layout.encode(e[this.property],t,n+o),i+=this.layout.getSpan(t,n+o),0<=this.union.span&&i>this.union.span))throw new Error("encoded variant overruns containing union");return i}fromArray(e){if(this.layout)return this.layout.fromArray(e)}}function N(e){return 0>e&&(e+=4294967296),e}Sr.VariantLayout=S;class B extends o{constructor(e,t,n){if(!(e instanceof c||e instanceof u))throw new TypeError("word must be a UInt or UIntBE layout");if("string"==typeof t&&void 0===n&&(n=t,t=!1),4<e.span)throw new RangeError("word cannot exceed 32 bits");super(e.span,n),this.word=e,this.msb=!!t,this.fields=[];let o=0;this.be=function(e){return o=N(e),this},this.ye=function(){return o}}decode(e,t=0){const n=this.makeDestinationObject(),o=this.word.decode(e,t);this.be(o);for(const i of this.fields)void 0!==i.property&&(n[i.property]=i.decode(e));return n}encode(e,t,n=0){const o=this.word.decode(t,n);this.be(o);for(const i of this.fields)if(void 0!==i.property){const t=e[i.property];void 0!==t&&i.encode(t)}return this.word.encode(this.ye(),t,n)}addField(e,t){const n=new M(this,e,t);return this.fields.push(n),n}addBoolean(e){const t=new U(this,e);return this.fields.push(t),t}fieldFor(e){if("string"!=typeof e)throw new TypeError("property must be string");for(const t of this.fields)if(t.property===e)return t}}Sr.BitStructure=B;class M{constructor(e,t,n){if(!(e instanceof B))throw new TypeError("container must be a BitStructure");if(!Number.isInteger(t)||0>=t)throw new TypeError("bits must be positive integer");const o=8*e.span,i=e.fields.reduce((e,t)=>e+t.bits,0);if(t+i>o)throw new Error("bits too long for span remainder ("+(o-i)+" of "+o+" remain)");this.container=e,this.bits=t,this.valueMask=(1<<t)-1,32===t&&(this.valueMask=4294967295),this.start=i,this.container.msb&&(this.start=o-i-t),this.wordMask=N(this.valueMask<<this.start),this.property=n}decode(e,t){return N(this.container.ye()&this.wordMask)>>>this.start}encode(e){if("number"!=typeof e||!Number.isInteger(e)||e!==N(e&this.valueMask))throw new TypeError(i("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);const t=this.container.ye(),n=N(e<<this.start);this.container.be(N(t&~this.wordMask)|n)}}Sr.BitField=M;class U extends M{constructor(e,t){super(e,1,t)}decode(e,t){return!!super.decode(e,t)}encode(e){"boolean"==typeof e&&(e=+e),super.encode(e)}}Sr.Boolean=U;class R extends o{constructor(e,t){if(!(e instanceof r&&e.isCount()||Number.isInteger(e)&&0<=e))throw new TypeError("length must be positive integer or an unsigned integer ExternalLayout");let n=-1;e instanceof r||(n=e),super(n,t),this.length=e}getSpan(e,t){let n=this.span;return 0>n&&(n=this.length.decode(e,t)),n}decode(e,t=0){let o=this.span;return 0>o&&(o=this.length.decode(e,t)),n(e).slice(t,t+o)}encode(e,t,o){let a=this.length;if(this.length instanceof r&&(a=e.length),!(e instanceof Uint8Array&&a===e.length))throw new TypeError(i("Blob.encode",this)+" requires (length "+a+") Uint8Array as src");if(o+a>t.length)throw new RangeError("encoding overruns Uint8Array");const s=n(e);return n(t).write(s.toString("hex"),o,a,"hex"),this.length instanceof r&&this.length.encode(a,t,o),a}}Sr.Blob=R;class P extends o{constructor(e){super(-1,e)}getSpan(e,n=0){t(e);let o=n;for(;o<e.length&&0!==e[o];)o+=1;return 1+o-n}decode(e,t=0){const o=this.getSpan(e,t);return n(e).slice(t,t+o-1).toString("utf-8")}encode(t,o,i=0){"string"!=typeof t&&(t=String(t));const r=e.Buffer.from(t,"utf8"),a=r.length;if(i+a>o.length)throw new RangeError("encoding overruns Buffer");const s=n(o);return r.copy(s,i),s[i+a]=0,a+1}}Sr.CString=P;class O extends o{constructor(e,t){if("string"==typeof e&&void 0===t&&(t=e,e=void 0),void 0===e)e=-1;else if(!Number.isInteger(e))throw new TypeError("maxSpan must be an integer");super(-1,t),this.maxSpan=e}getSpan(e,n=0){return t(e),e.length-n}decode(e,t=0){const o=this.getSpan(e,t);if(0<=this.maxSpan&&this.maxSpan<o)throw new RangeError("text length exceeds maxSpan");return n(e).slice(t,t+o).toString("utf-8")}encode(t,o,i=0){"string"!=typeof t&&(t=String(t));const r=e.Buffer.from(t,"utf8"),a=r.length;if(0<=this.maxSpan&&this.maxSpan<a)throw new RangeError("text length exceeds maxSpan");if(i+a>o.length)throw new RangeError("encoding overruns Buffer");return r.copy(n(o),i),a}}Sr.UTF8=O;class L extends o{constructor(e,t){super(0,t),this.value=e}decode(e,t){return this.value}encode(e,t,n){return 0}}return Sr.Constant=L,Sr.greedy=(e,t)=>new a(e,t),Sr.offset=(e,t,n)=>new s(e,t,n),Sr.u8=e=>new c(1,e),Sr.u16=e=>new c(2,e),Sr.u24=e=>new c(3,e),Sr.u32=e=>new c(4,e),Sr.u40=e=>new c(5,e),Sr.u48=e=>new c(6,e),Sr.nu64=e=>new m(e),Sr.u16be=e=>new u(2,e),Sr.u24be=e=>new u(3,e),Sr.u32be=e=>new u(4,e),Sr.u40be=e=>new u(5,e),Sr.u48be=e=>new u(6,e),Sr.nu64be=e=>new w(e),Sr.s8=e=>new l(1,e),Sr.s16=e=>new l(2,e),Sr.s24=e=>new l(3,e),Sr.s32=e=>new l(4,e),Sr.s40=e=>new l(5,e),Sr.s48=e=>new l(6,e),Sr.ns64=e=>new g(e),Sr.s16be=e=>new d(2,e),Sr.s24be=e=>new d(3,e),Sr.s32be=e=>new d(4,e),Sr.s40be=e=>new d(5,e),Sr.s48be=e=>new d(6,e),Sr.ns64be=e=>new b(e),Sr.f32=e=>new y(e),Sr.f32be=e=>new v(e),Sr.f64=e=>new A(e),Sr.f64be=e=>new k(e),Sr.struct=(e,t,n)=>new E(e,t,n),Sr.bits=(e,t,n)=>new B(e,t,n),Sr.seq=(e,t,n)=>new T(e,t,n),Sr.union=(e,t,n)=>new I(e,t,n),Sr.unionLayoutDiscriminator=(e,t)=>new C(e,t),Sr.blob=(e,t)=>new R(e,t),Sr.cstr=e=>new P(e),Sr.utf8=(e,t)=>new O(e,t),Sr.constant=(e,t)=>new L(e,t),Sr}(),Br=1,Mr=2,Ur=3,Rr=4,Pr=5,Or=6,Lr=7,Dr=8,Fr=9,qr=10,Hr=-32700,Vr=-32603,Wr=-32602,Gr=-32601,Jr=-32600,Yr=-32016,zr=-32015,jr=-32014,Xr=-32013,Qr=-32012,Kr=-32011,Zr=-32010,_r=-32009,$r=-32008,ea=-32007,ta=-32006,na=-32005,oa=-32004,ia=-32003,ra=-32002,aa=-32001,sa=28e5,ca=2800001,ua=2800002,la=2800003,da=2800004,ha=2800005,fa=2800006,pa=2800007,ma=2800008,wa=2800009,ga=2800010,ba=2800011,ya=323e4,va=32300001,Aa=3230002,ka=3230003,Ta=3230004,Ea=361e4,xa=3610001,Ca=3610002,Ia=3610003,Sa=3610004,Na=3610005,Ba=3610006,Ma=3610007,Ua=3611e3,Ra=3704e3,Pa=3704001,Oa=3704002,La=3704003,Da=3704004,Fa=4128e3,qa=4128001,Ha=4128002,Va=4615e3,Wa=4615001,Ga=4615002,Ja=4615003,Ya=4615004,za=4615005,ja=4615006,Xa=4615007,Qa=4615008,Ka=4615009,Za=4615010,_a=4615011,$a=4615012,es=4615013,ts=4615014,ns=4615015,os=4615016,is=4615017,rs=4615018,as=4615019,ss=4615020,cs=4615021,us=4615022,ls=4615023,ds=4615024,hs=4615025,fs=4615026,ps=4615027,ms=4615028,ws=4615029,gs=4615030,bs=4615031,ys=4615032,vs=4615033,As=4615034,ks=4615035,Ts=4615036,Es=4615037,xs=4615038,Cs=4615039,Is=4615040,Ss=4615041,Ns=4615042,Bs=4615043,Ms=4615044,Us=4615045,Rs=4615046,Ps=4615047,Os=4615048,Ls=4615049,Ds=4615050,Fs=4615051,qs=4615052,Hs=4615053,Vs=4615054,Ws=5508e3,Gs=5508001,Js=5508002,Ys=5508003,zs=5508004,js=5508005,Xs=5508006,Qs=5508007,Ks=5508008,Zs=5508009,_s=5508010,$s=5508011,ec=5663e3,tc=5663001,nc=5663002,oc=5663003,ic=5663004,rc=5663005,ac=5663006,sc=5663007,cc=5663008,uc=5663009,lc=5663010,dc=5663011,hc=5663012,fc=5663013,pc=5663014,mc=5663015,wc=5663016,gc=5663017,bc=5663018,yc=5663019,vc=5663020,Ac=705e4,kc=7050001,Tc=7050002,Ec=7050003,xc=7050004,Cc=7050005,Ic=7050006,Sc=7050007,Nc=7050008,Bc=7050009,Mc=7050010,Uc=7050011,Rc=7050012,Pc=7050013,Oc=7050014,Lc=7050015,Dc=7050016,Fc=7050017,qc=7050018,Hc=7050019,Vc=7050020,Wc=7050021,Gc=7050022,Jc=7050023,Yc=7050024,zc=7050025,jc=7050026,Xc=7050027,Qc=7050028,Kc=7050029,Zc=7050030,_c=7050031,$c=7050032,eu=7050033,tu=7050034,nu=7050035,ou=7050036,iu=8078e3,ru=8078001,au=8078002,su=8078003,cu=8078004,uu=8078005,lu=8078006,du=8078007,hu=8078008,fu=8078009,pu=8078010,mu=8078011,wu=8078012,gu=8078013,bu=8078014,yu=8078015,vu=8078016,Au=8078017,ku=8078018,Tu=8078019,Eu=8078020,xu=8078021,Cu=8078022,Iu=81e5,Su=8100001,Nu=8100002,Bu=8100003,Mu=819e4,Uu=8190001,Ru=8190002,Pu=8190003,Ou=8190004,Lu=99e5,Du=9900001,Fu=9900002,qu=9900003,Hu=9900004;function Vu(e){return Array.isArray(e)?"%5B"+e.map(Vu).join("%2C%20")+"%5D":"bigint"==typeof e?`${e}n`:encodeURIComponent(String(null!=e&&null===Object.getPrototypeOf(e)?{...e}:e))}function Wu([e,t]){return`${e}=${Vu(t)}`}var Gu={[ya]:"Account not found at address: $address",[Ta]:"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",[ka]:"Expected decoded account at address: $address",[Aa]:"Failed to decode account data at address: $address",[va]:"Accounts not found at addresses: $addresses",[wa]:"Unable to find a viable program address bump seed.",[ua]:"$putativeAddress is not a base58-encoded address.",[sa]:"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",[la]:"The `CryptoKey` must be an `Ed25519` public key.",[ba]:"$putativeOffCurveAddress is not a base58-encoded off-curve address.",[ma]:"Invalid seeds; point must fall off the Ed25519 curve.",[da]:"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",[fa]:"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",[pa]:"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",[ha]:"Expected program derived address bump to be in the range [0, 255], got: $bump.",[ga]:"Program address cannot end with PDA marker.",[ca]:"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",[Rr]:"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.",[Br]:"The network has progressed past the last block for which this transaction could have been committed.",[iu]:"Codec [$codecDescription] cannot decode empty byte arrays.",[Cu]:"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",[Eu]:"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",[uu]:"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",[lu]:"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",[cu]:"Encoder and decoder must either both be fixed-size or variable-size.",[hu]:"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",[au]:"Expected a fixed-size codec, got a variable-size one.",[gu]:"Codec [$codecDescription] expected a positive byte length, got $bytesLength.",[su]:"Expected a variable-size codec, got a fixed-size one.",[Tu]:"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].",[ru]:"Codec [$codecDescription] expected $expected bytes, got $bytesLength.",[ku]:"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",[fu]:"Invalid discriminated union variant. Expected one of [$variants], got $value.",[pu]:"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",[yu]:"Invalid literal union variant. Expected one of [$variants], got $value.",[du]:"Expected [$codecDescription] to have $expected items, got $actual.",[wu]:"Invalid value $value for base $base with alphabet $alphabet.",[vu]:"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",[mu]:"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",[bu]:"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",[xu]:"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",[Au]:"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",[Ua]:"No random values implementation could be found.",[Ka]:"instruction requires an uninitialized account",[ls]:"instruction tries to borrow reference for an account which is already borrowed",[ds]:"instruction left account with an outstanding borrowed reference",[cs]:"program other than the account's owner changed the size of the account data",[za]:"account data too small for instruction",[us]:"instruction expected an executable account",[Rs]:"An account does not have enough lamports to be rent-exempt",[Os]:"Program arithmetic overflowed",[Us]:"Failed to serialize or deserialize account data: $encodedData",[Vs]:"Builtin programs must consume compute units",[ys]:"Cross-program invocation call depth too deep",[xs]:"Computational budget exceeded",[fs]:"custom program error: #$code",[is]:"instruction contains duplicate accounts",[hs]:"instruction modifications of multiply-passed account differ",[gs]:"executable accounts must be rent exempt",[ms]:"instruction changed executable accounts data",[ws]:"instruction changed the balance of an executable account",[rs]:"instruction changed executable bit of an account",[ts]:"instruction modified data of an account it does not own",[es]:"instruction spent from the balance of an account it does not own",[Wa]:"generic instruction error",[Ds]:"Provided owner is not allowed",[Bs]:"Account is immutable",[Ms]:"Incorrect authority provided",[Xa]:"incorrect program id for instruction",[ja]:"insufficient funds for instruction",[Ya]:"invalid account data for instruction",[Ps]:"Invalid account owner",[Ga]:"invalid program argument",[ps]:"program returned invalid error code",[Ja]:"invalid instruction data",[Es]:"Failed to reallocate account data",[Ts]:"Provided seeds do not result in a valid address",[Fs]:"Accounts data allocations exceeded the maximum allowed per transaction",[qs]:"Max accounts exceeded",[Hs]:"Max instruction trace length exceeded",[ks]:"Length of the seed is too long for address generation",[vs]:"An account required by the instruction is missing",[Qa]:"missing required signature for instruction",[$a]:"instruction illegally modified the program id of an account",[ss]:"insufficient account keys for instruction",[Cs]:"Cross-program invocation with unauthorized signer or writable account",[Is]:"Failed to create program execution environment",[Ns]:"Program failed to compile",[Ss]:"Program failed to complete",[os]:"instruction modified data of a read-only account",[ns]:"instruction changed the balance of a read-only account",[As]:"Cross-program invocation reentrancy not allowed for this instruction",[as]:"instruction modified rent epoch of an account",[_a]:"sum of account balances before and after instruction do not match",[Za]:"instruction requires an initialized account",[Va]:"",[bs]:"Unsupported program id",[Ls]:"Unsupported sysvar",[Fa]:"The instruction does not have any accounts.",[qa]:"The instruction does not have any data.",[Ha]:"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",[Pr]:"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",[Mr]:"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",[Fu]:"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[Hu]:"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",[Du]:"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[Lu]:"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[qu]:"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[Vr]:"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",[Wr]:"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",[Jr]:"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",[Gr]:"JSON-RPC error: The method does not exist / is not available ($__serverMessage)",[Hr]:"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",[Qr]:"$__serverMessage",[aa]:"$__serverMessage",[oa]:"$__serverMessage",[jr]:"$__serverMessage",[Zr]:"$__serverMessage",[_r]:"$__serverMessage",[Yr]:"Minimum context slot has not been reached",[na]:"Node is unhealthy; behind by $numSlotsBehind slots",[$r]:"No snapshot",[ra]:"Transaction simulation failed",[ea]:"$__serverMessage",[Kr]:"Transaction history is not available from this node",[ta]:"$__serverMessage",[Xr]:"Transaction signature length mismatch",[ia]:"Transaction signature verification failure",[zr]:"$__serverMessage",[Ra]:"Key pair bytes must be of length 64, got $byteLength.",[Pa]:"Expected private key bytes with length 32. Actual length: $actualLength.",[Oa]:"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",[Da]:"The provided private key does not match the provided public key.",[La]:"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",[Or]:"Lamports value must be in the range [0, 2e64-1]",[Lr]:"`$value` cannot be parsed as a `BigInt`",[qr]:"$message",[Dr]:"`$value` cannot be parsed as a `Number`",[Ur]:"No nonce account could be found at address `$nonceAccountAddress`",[Mu]:"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.",[Ru]:"WebSocket was closed before payload could be added to the send buffer",[Pu]:"WebSocket connection closed",[Ou]:"WebSocket failed to connect",[Uu]:"Failed to obtain a subscription id from the server",[Bu]:"Could not find an API plan for RPC method: `$method`",[Iu]:"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",[Nu]:"HTTP error ($statusCode): $message",[Su]:"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.",[Ws]:"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.",[Gs]:"The provided value does not implement the `KeyPairSigner` interface",[Ys]:"The provided value does not implement the `MessageModifyingSigner` interface",[zs]:"The provided value does not implement the `MessagePartialSigner` interface",[Js]:"The provided value does not implement any of the `MessageSigner` interfaces",[Xs]:"The provided value does not implement the `TransactionModifyingSigner` interface",[Qs]:"The provided value does not implement the `TransactionPartialSigner` interface",[Ks]:"The provided value does not implement the `TransactionSendingSigner` interface",[js]:"The provided value does not implement any of the `TransactionSigner` interfaces",[Zs]:"More than one `TransactionSendingSigner` was identified.",[_s]:"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",[$s]:"Wallet account signers do not support signing multiple messages/transactions in a single operation",[Ma]:"Cannot export a non-extractable key.",[xa]:"No digest implementation could be found.",[Ea]:"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",[Ca]:"This runtime does not support the generation of Ed25519 key pairs.\n\nInstall @solana/webcrypto-ed25519-polyfill and call its `install` function before generating keys in environments that do not support Ed25519.\n\nFor a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.",[Ia]:"No signature verification implementation could be found.",[Sa]:"No key generation implementation could be found.",[Na]:"No signing implementation could be found.",[Ba]:"No key export implementation could be found.",[Fr]:"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given",[Dc]:"Transaction processing left an account with an outstanding borrowed reference",[kc]:"Account in use",[Tc]:"Account loaded twice",[Ec]:"Attempt to debit an account but found no record of a prior credit.",[Jc]:"Transaction loads an address table account that doesn't exist",[Sc]:"This transaction has already been processed",[Nc]:"Blockhash not found",[Bc]:"Loader call chain is too deep",[Lc]:"Transactions are currently disabled due to cluster maintenance",[Zc]:"Transaction contains a duplicate instruction ($index) that is not allowed",[Cc]:"Insufficient funds for fee",[_c]:"Transaction results in an account ($accountIndex) with insufficient funds for rent",[Ic]:"This account may not be used to pay transaction fees",[Uc]:"Transaction contains an invalid account reference",[zc]:"Transaction loads an address table account with invalid data",[jc]:"Transaction address table lookup uses an invalid index",[Yc]:"Transaction loads an address table account with an invalid owner",[eu]:"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",[Pc]:"This program may not be used for executing instructions",[Xc]:"Transaction leaves an account with a lower balance than rent-exempt minimum",[Hc]:"Transaction loads a writable account that cannot be written",[$c]:"Transaction exceeded max loaded accounts data size cap",[Mc]:"Transaction requires a fee but has no signature present",[xc]:"Attempt to load a program that does not exist",[nu]:"Execution of the program referenced by account at index $accountIndex is temporarily restricted.",[tu]:"ResanitizationNeeded",[Oc]:"Transaction failed to sanitize accounts offsets correctly",[Rc]:"Transaction did not pass signature verification",[Gc]:"Transaction locked too many accounts",[ou]:"Sum of account balances before and after transaction do not match",[Ac]:"The transaction failed with the error `$errorName`",[qc]:"Transaction version is unsupported",[Wc]:"Transaction would exceed account data limit within the block",[Kc]:"Transaction would exceed total account data limit",[Vc]:"Transaction would exceed max account limit within the block",[Fc]:"Transaction would exceed max Block Cost Limit",[Qc]:"Transaction would exceed max Vote Cost Limit",[mc]:"Attempted to sign a transaction with an address that is not a signer for it",[lc]:"Transaction is missing an address at index: $index.",[wc]:"Transaction has no expected signers therefore it cannot be encoded",[vc]:"Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes",[nc]:"Transaction does not have a blockhash lifetime",[oc]:"Transaction is not a durable nonce transaction",[rc]:"Contents of these address lookup tables unknown: $lookupTableAddresses",[ac]:"Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved",[cc]:"No fee payer set in CompiledTransaction",[sc]:"Could not find program address at index $index",[bc]:"Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more",[yc]:"Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more",[dc]:"Transaction is missing a fee payer.",[hc]:"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.",[pc]:"Transaction first instruction is not advance nonce account instruction.",[fc]:"Transaction with no instructions cannot be durable nonce transaction.",[ec]:"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees",[tc]:"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable",[gc]:"The transaction message expected the transaction to have $signerAddressesLength signatures, got $signaturesLength.",[uc]:"Transaction is missing signatures for addresses: $addresses.",[ic]:"Transaction version must be in the range [0, 127]. `$actualVersion` given"},Ju="i",Yu="t";var zu=class extends Error{cause=this.cause;context;constructor(...[e,t]){let n,o;if(t){const{cause:e,...i}=t;e&&(o={cause:e}),Object.keys(i).length>0&&(n=i)}super(function(e,t={}){if("production"!==process.env.NODE_ENV)return function(e,t={}){const n=Gu[e];if(0===n.length)return"";let o;function i(e){if(2===o[Yu]){const i=n.slice(o[Ju]+1,e);r.push(i in t?`${t[i]}`:`$${i}`)}else 1===o[Yu]&&r.push(n.slice(o[Ju],e))}const r=[];return n.split("").forEach((e,t)=>{if(0===t)return void(o={[Ju]:0,[Yu]:"\\"===n[0]?0:"$"===n[0]?2:1});let r;switch(o[Yu]){case 0:r={[Ju]:t,[Yu]:1};break;case 1:"\\"===e?r={[Ju]:t,[Yu]:0}:"$"===e&&(r={[Ju]:t,[Yu]:2});break;case 2:"\\"===e?r={[Ju]:t,[Yu]:0}:"$"===e?r={[Ju]:t,[Yu]:2}:e.match(/\w/)||(r={[Ju]:t,[Yu]:1})}r&&(o!==r&&i(t),o=r)}),i(),r.join("")}(e,t);{let n=`Solana error #${e}; Decode this error by running \`npx @solana/errors decode -- ${e}`;return Object.keys(t).length&&(n+=` '${function(e){const t=Object.entries(e).map(Wu).join("&");return btoa(t)}(t)}'`),`${n}\``}}(e,n),o),this.context={ve:e,...n},this.name="SolanaError"}};function ju(e){return"fixedSize"in e&&"number"==typeof e.fixedSize}function Xu(e){return 1!==e?.endian}var Qu=(e={})=>function(e,t){if(ju(e)!==ju(t))throw new zu(cu);if(ju(e)&&ju(t)&&e.fixedSize!==t.fixedSize)throw new zu(uu,{decoderFixedSize:t.fixedSize,encoderFixedSize:e.fixedSize});if(!ju(e)&&!ju(t)&&e.maxSize!==t.maxSize)throw new zu(lu,{decoderMaxSize:t.maxSize,encoderMaxSize:e.maxSize});return{...t,...e,decode:t.decode,encode:e.encode,read:t.read,write:e.write}}(((e={})=>{return t={config:e,name:"u64",range:[0n,BigInt("0xffffffffffffffff")],set:(e,t,n)=>e.setBigUint64(0,BigInt(t),n),size:8},n={fixedSize:t.size,write(e,n,o){t.range&&function(e,t,n,o){if(o<t||o>n)throw new zu(mu,{codecDescription:e,max:n,min:t,value:o})}(t.name,t.range[0],t.range[1],e);const i=new ArrayBuffer(t.size);return t.set(new DataView(i),e,Xu(t.config)),n.set(new Uint8Array(i),o),o+t.size}},Object.freeze({...n,encode:e=>{const t=new Uint8Array(function(e,t){return"fixedSize"in t?t.fixedSize:t.getSizeFromValue(e)}(e,n));return n.write(e,t,0),t}});var t,n})(e),((e={})=>{return n={fixedSize:(t={config:e,get:(e,t)=>e.getBigUint64(0,t),name:"u64",size:8}).size,read(e,n=0){!function(e,t,n=0){if(t.length-n<=0)throw new zu(iu,{codecDescription:e})}(t.name,e,n),function(e,t,n,o=0){const i=n.length-o;if(i<t)throw new zu(ru,{bytesLength:i,codecDescription:e,expected:t})}(t.name,t.size,e,n);const o=new DataView(function(e,t,n){const o=e.byteOffset+(t??0),i=n??e.byteLength;return e.buffer.slice(o,o+i)}(e,n,t.size));return[t.get(o,Xu(t.config)),n+t.size]}},Object.freeze({...n,decode:(e,t=0)=>n.read(e,t)[0]});var t,n})(e));class Ku extends TypeError{constructor(e,t){let n;const{message:o,explanation:i,...r}=e,{path:a}=e,s=0===a.length?o:`At path: ${a.join(".")} -- ${o}`;super(i??s),null!=i&&(this.cause=s),Object.assign(this,r),this.name=this.constructor.name,this.failures=()=>n??(n=[e,...t()])}}function Zu(e){return"object"==typeof e&&null!=e}function _u(e){return Zu(e)&&!Array.isArray(e)}function $u(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function el(e,t,n,o){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:i,branch:r}=t,{type:a}=n,{refinement:s,message:c=`Expected a value of type \`${a}\`${s?` with refinement \`${s}\``:""}, but received: \`${$u(o)}\``}=e;return{value:o,type:a,refinement:s,key:i[i.length-1],path:i,branch:r,...e,message:c}}function*tl(e,t,n,o){var i;Zu(i=e)&&"function"==typeof i[Symbol.iterator]||(e=[e]);for(const r of e){const e=el(r,t,n,o);e&&(yield e)}}function*nl(e,t,n={}){const{path:o=[],branch:i=[e],coerce:r=!1,mask:a=!1}=n,s={path:o,branch:i,mask:a};r&&(e=t.coercer(e,s));let c="valid";for(const u of t.validator(e,s))u.explanation=n.message,c="not_valid",yield[u,void 0];for(let[u,l,d]of t.entries(e,s)){const t=nl(l,d,{path:void 0===u?o:[...o,u],branch:void 0===u?i:[...i,l],coerce:r,mask:a,message:n.message});for(const n of t)n[0]?(c=null!=n[0].refinement?"not_refined":"not_valid",yield[n[0],void 0]):r&&(l=n[1],void 0===u?e=l:e instanceof Map?e.set(u,l):e instanceof Set?e.add(l):Zu(e)&&(void 0!==l||u in e)&&(e[u]=l))}if("not_valid"!==c)for(const u of t.refiner(e,s))u.explanation=n.message,c="not_refined",yield[u,void 0];"valid"===c&&(yield[void 0,e])}let ol=class{constructor(e){const{type:t,schema:n,validator:o,refiner:i,coercer:r=e=>e,entries:a=function*(){}}=e;this.type=t,this.schema=n,this.entries=a,this.coercer=r,this.validator=o?(e,t)=>tl(o(e,t),t,this,e):()=>[],this.refiner=i?(e,t)=>tl(i(e,t),t,this,e):()=>[]}assert(e,t){return function(e,t,n){const o=al(e,t,{message:n});if(o[0])throw o[0]}(e,this,t)}create(e,t){return il(e,this,t)}is(e){return rl(e,this)}mask(e,t){return function(e,t,n){const o=al(e,t,{coerce:!0,mask:!0,message:n});if(o[0])throw o[0];return o[1]}(e,this,t)}validate(e,t={}){return al(e,this,t)}};function il(e,t,n){const o=al(e,t,{coerce:!0,message:n});if(o[0])throw o[0];return o[1]}function rl(e,t){return!al(e,t)[0]}function al(e,t,n={}){const o=nl(e,t,n),i=function(e){const{done:t,value:n}=e.next();return t?void 0:n}(o);return i[0]?[new Ku(i[0],function*(){for(const e of o)e[0]&&(yield e[0])}),void 0]:[void 0,i[1]]}function sl(e,t){return new ol({type:e,schema:null,validator:t})}function cl(e){return new ol({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[n,o]of t.entries())yield[n,o,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${$u(e)}`})}function ul(){return sl("boolean",e=>"boolean"==typeof e)}function ll(e){return sl("instance",t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${$u(t)}`)}function dl(e){const t=$u(e),n=typeof e;return new ol({type:"literal",schema:"string"===n||"number"===n||"boolean"===n?e:null,validator:n=>n===e||`Expected the literal \`${t}\`, but received: ${$u(n)}`})}function hl(e){return new ol({...e,validator:(t,n)=>null===t||e.validator(t,n),refiner:(t,n)=>null===t||e.refiner(t,n)})}function fl(){return sl("number",e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${$u(e)}`)}function pl(e){return new ol({...e,validator:(t,n)=>void 0===t||e.validator(t,n),refiner:(t,n)=>void 0===t||e.refiner(t,n)})}function ml(e,t){return new ol({type:"record",schema:null,*entries(n){if(Zu(n))for(const o in n){const i=n[o];yield[o,o,e],yield[o,i,t]}},validator:e=>_u(e)||`Expected an object, but received: ${$u(e)}`,coercer:e=>_u(e)?{...e}:e})}function wl(){return sl("string",e=>"string"==typeof e||`Expected a string, but received: ${$u(e)}`)}function gl(e){const t=sl("never",()=>!1);return new ol({type:"tuple",schema:null,*entries(n){if(Array.isArray(n)){const o=Math.max(e.length,n.length);for(let i=0;i<o;i++)yield[i,n[i],e[i]||t]}},validator:e=>Array.isArray(e)||`Expected an array, but received: ${$u(e)}`,coercer:e=>Array.isArray(e)?e.slice():e})}function bl(e){const t=Object.keys(e);return new ol({type:"type",schema:e,*entries(n){if(Zu(n))for(const o of t)yield[o,n[o],e[o]]},validator:e=>_u(e)||`Expected an object, but received: ${$u(e)}`,coercer:e=>_u(e)?{...e}:e})}function yl(e){const t=e.map(e=>e.type).join(" | ");return new ol({type:"union",schema:null,coercer(t,n){for(const o of e){const[e,i]=o.validate(t,{coerce:!0,mask:n.mask});if(!e)return i}return t},validator(n,o){const i=[];for(const t of e){const[...e]=nl(n,t,o),[r]=e;if(!r[0])return[];for(const[t]of e)t&&i.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${$u(n)}`,...i]}})}function vl(){return sl("unknown",()=>!0)}function Al(e,t,n){return new ol({...e,coercer:(o,i)=>rl(o,t)?e.coercer(n(o,i),i):e.coercer(o,i)})}var kl,Tl=new Uint8Array(16);function El(){if(!kl&&!(kl="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return kl(Tl)}const xl=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Cl(e){return"string"==typeof e&&xl.test(e)}for(var Il,Sl,Nl=[],Bl=0;Bl<256;++Bl)Nl.push((Bl+256).toString(16).substr(1));function Ml(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Nl[e[t+0]]+Nl[e[t+1]]+Nl[e[t+2]]+Nl[e[t+3]]+"-"+Nl[e[t+4]]+Nl[e[t+5]]+"-"+Nl[e[t+6]]+Nl[e[t+7]]+"-"+Nl[e[t+8]]+Nl[e[t+9]]+"-"+Nl[e[t+10]]+Nl[e[t+11]]+Nl[e[t+12]]+Nl[e[t+13]]+Nl[e[t+14]]+Nl[e[t+15]]).toLowerCase();if(!Cl(n))throw TypeError("Stringified UUID is invalid");return n}var Ul=0,Rl=0;function Pl(e){if(!Cl(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}function Ol(e,t,n){function o(e,o,i,r){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"==typeof o&&(o=Pl(o)),16!==o.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var a=new Uint8Array(16+e.length);if(a.set(o),a.set(e,o.length),(a=n(a))[6]=15&a[6]|t,a[8]=63&a[8]|128,i){r=r||0;for(var s=0;s<16;++s)i[r+s]=a[s];return i}return Ml(a)}try{o.name=e}catch(i){}return o.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",o.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",o}function Ll(e){return 14+(e+64>>>9<<4)+1}function Dl(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function Fl(e,t,n,o,i,r){return Dl((a=Dl(Dl(t,e),Dl(o,r)))<<(s=i)|a>>>32-s,n);var a,s}function ql(e,t,n,o,i,r,a){return Fl(t&n|~t&o,e,t,i,r,a)}function Hl(e,t,n,o,i,r,a){return Fl(t&o|n&~o,e,t,i,r,a)}function Vl(e,t,n,o,i,r,a){return Fl(t^n^o,e,t,i,r,a)}function Wl(e,t,n,o,i,r,a){return Fl(n^(t|~o),e,t,i,r,a)}var Gl=Ol("v3",48,function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(e){for(var t=[],n=32*e.length,o="0123456789abcdef",i=0;i<n;i+=8){var r=e[i>>5]>>>i%32&255,a=parseInt(o.charAt(r>>>4&15)+o.charAt(15&r),16);t.push(a)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[Ll(t)-1]=t;for(var n=1732584193,o=-271733879,i=-1732584194,r=271733878,a=0;a<e.length;a+=16){var s=n,c=o,u=i,l=r;n=ql(n,o,i,r,e[a],7,-680876936),r=ql(r,n,o,i,e[a+1],12,-389564586),i=ql(i,r,n,o,e[a+2],17,606105819),o=ql(o,i,r,n,e[a+3],22,-1044525330),n=ql(n,o,i,r,e[a+4],7,-176418897),r=ql(r,n,o,i,e[a+5],12,1200080426),i=ql(i,r,n,o,e[a+6],17,-1473231341),o=ql(o,i,r,n,e[a+7],22,-45705983),n=ql(n,o,i,r,e[a+8],7,1770035416),r=ql(r,n,o,i,e[a+9],12,-1958414417),i=ql(i,r,n,o,e[a+10],17,-42063),o=ql(o,i,r,n,e[a+11],22,-1990404162),n=ql(n,o,i,r,e[a+12],7,1804603682),r=ql(r,n,o,i,e[a+13],12,-40341101),i=ql(i,r,n,o,e[a+14],17,-1502002290),n=Hl(n,o=ql(o,i,r,n,e[a+15],22,1236535329),i,r,e[a+1],5,-165796510),r=Hl(r,n,o,i,e[a+6],9,-1069501632),i=Hl(i,r,n,o,e[a+11],14,643717713),o=Hl(o,i,r,n,e[a],20,-373897302),n=Hl(n,o,i,r,e[a+5],5,-701558691),r=Hl(r,n,o,i,e[a+10],9,38016083),i=Hl(i,r,n,o,e[a+15],14,-660478335),o=Hl(o,i,r,n,e[a+4],20,-405537848),n=Hl(n,o,i,r,e[a+9],5,568446438),r=Hl(r,n,o,i,e[a+14],9,-1019803690),i=Hl(i,r,n,o,e[a+3],14,-187363961),o=Hl(o,i,r,n,e[a+8],20,1163531501),n=Hl(n,o,i,r,e[a+13],5,-1444681467),r=Hl(r,n,o,i,e[a+2],9,-51403784),i=Hl(i,r,n,o,e[a+7],14,1735328473),n=Vl(n,o=Hl(o,i,r,n,e[a+12],20,-1926607734),i,r,e[a+5],4,-378558),r=Vl(r,n,o,i,e[a+8],11,-2022574463),i=Vl(i,r,n,o,e[a+11],16,1839030562),o=Vl(o,i,r,n,e[a+14],23,-35309556),n=Vl(n,o,i,r,e[a+1],4,-1530992060),r=Vl(r,n,o,i,e[a+4],11,1272893353),i=Vl(i,r,n,o,e[a+7],16,-155497632),o=Vl(o,i,r,n,e[a+10],23,-1094730640),n=Vl(n,o,i,r,e[a+13],4,681279174),r=Vl(r,n,o,i,e[a],11,-358537222),i=Vl(i,r,n,o,e[a+3],16,-722521979),o=Vl(o,i,r,n,e[a+6],23,76029189),n=Vl(n,o,i,r,e[a+9],4,-640364487),r=Vl(r,n,o,i,e[a+12],11,-421815835),i=Vl(i,r,n,o,e[a+15],16,530742520),n=Wl(n,o=Vl(o,i,r,n,e[a+2],23,-995338651),i,r,e[a],6,-198630844),r=Wl(r,n,o,i,e[a+7],10,1126891415),i=Wl(i,r,n,o,e[a+14],15,-1416354905),o=Wl(o,i,r,n,e[a+5],21,-57434055),n=Wl(n,o,i,r,e[a+12],6,1700485571),r=Wl(r,n,o,i,e[a+3],10,-1894986606),i=Wl(i,r,n,o,e[a+10],15,-1051523),o=Wl(o,i,r,n,e[a+1],21,-2054922799),n=Wl(n,o,i,r,e[a+8],6,1873313359),r=Wl(r,n,o,i,e[a+15],10,-30611744),i=Wl(i,r,n,o,e[a+6],15,-1560198380),o=Wl(o,i,r,n,e[a+13],21,1309151649),n=Wl(n,o,i,r,e[a+4],6,-145523070),r=Wl(r,n,o,i,e[a+11],10,-1120210379),i=Wl(i,r,n,o,e[a+2],15,718787259),o=Wl(o,i,r,n,e[a+9],21,-343485551),n=Dl(n,s),o=Dl(o,c),i=Dl(i,u),r=Dl(r,l)}return[n,o,i,r]}(function(e){if(0===e.length)return[];for(var t=8*e.length,n=new Uint32Array(Ll(t)),o=0;o<t;o+=8)n[o>>5]|=(255&e[o/8])<<o%32;return n}(e),8*e.length))});function Jl(e,t,n,o){switch(e){case 0:return t&n^~t&o;case 1:case 3:return t^n^o;case 2:return t&n^t&o^n&o}}function Yl(e,t){return e<<t|e>>>32-t}var zl=Ol("v5",80,function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var o=unescape(encodeURIComponent(e));e=[];for(var i=0;i<o.length;++i)e.push(o.charCodeAt(i))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var r=e.length/4+2,a=Math.ceil(r/16),s=new Array(a),c=0;c<a;++c){for(var u=new Uint32Array(16),l=0;l<16;++l)u[l]=e[64*c+4*l]<<24|e[64*c+4*l+1]<<16|e[64*c+4*l+2]<<8|e[64*c+4*l+3];s[c]=u}s[a-1][14]=8*(e.length-1)/Math.pow(2,32),s[a-1][14]=Math.floor(s[a-1][14]),s[a-1][15]=8*(e.length-1)&4294967295;for(var d=0;d<a;++d){for(var h=new Uint32Array(80),f=0;f<16;++f)h[f]=s[d][f];for(var p=16;p<80;++p)h[p]=Yl(h[p-3]^h[p-8]^h[p-14]^h[p-16],1);for(var m=n[0],w=n[1],g=n[2],b=n[3],y=n[4],v=0;v<80;++v){var A=Math.floor(v/20),k=Yl(m,5)+Jl(A,w,g,b)+y+t[A]+h[v]>>>0;y=b,b=g,g=Yl(w,30)>>>0,w=m,m=k}n[0]=n[0]+m>>>0,n[1]=n[1]+w>>>0,n[2]=n[2]+g>>>0,n[3]=n[3]+b>>>0,n[4]=n[4]+y>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]});const jl=Si(Object.freeze(Object.defineProperty({__proto__:null,NIL:"00000000-0000-0000-0000-000000000000",parse:Pl,stringify:Ml,v1:function(e,t,n){var o=t&&n||0,i=t||new Array(16),r=(e=e||{}).node||Il,a=void 0!==e.clockseq?e.clockseq:Sl;if(null==r||null==a){var s=e.random||(e.rng||El)();null==r&&(r=Il=[1|s[0],s[1],s[2],s[3],s[4],s[5]]),null==a&&(a=Sl=16383&(s[6]<<8|s[7]))}var c=void 0!==e.msecs?e.msecs:Date.now(),u=void 0!==e.nsecs?e.nsecs:Rl+1,l=c-Ul+(u-Rl)/1e4;if(l<0&&void 0===e.clockseq&&(a=a+1&16383),(l<0||c>Ul)&&void 0===e.nsecs&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Ul=c,Rl=u,Sl=a;var d=(1e4*(268435455&(c+=122192928e5))+u)%4294967296;i[o++]=d>>>24&255,i[o++]=d>>>16&255,i[o++]=d>>>8&255,i[o++]=255&d;var h=c/4294967296*1e4&268435455;i[o++]=h>>>8&255,i[o++]=255&h,i[o++]=h>>>24&15|16,i[o++]=h>>>16&255,i[o++]=a>>>8|128,i[o++]=255&a;for(var f=0;f<6;++f)i[o+f]=r[f];return t||Ml(i)},v3:Gl,v4:function(e,t,n){var o=(e=e||{}).random||(e.rng||El)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=o[i];return t}return Ml(o)},v5:zl,validate:Cl,version:function(e){if(!Cl(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},Symbol.toStringTag,{value:"Module"})));var Xl,Ql,Kl,Zl;!function(){if(Zl)return Kl;Zl=1;const e=jl.v4,t=function(){if(Ql)return Xl;Ql=1;const e=jl.v4;return Xl=function(t,n,o,i){if("string"!=typeof t)throw new TypeError(t+" must be a string");const r="number"==typeof(i=i||{}).version?i.version:2;if(1!==r&&2!==r)throw new TypeError(r+" must be 1 or 2");const a={method:t};if(2===r&&(a.jsonrpc="2.0"),n){if("object"!=typeof n&&!Array.isArray(n))throw new TypeError(n+" must be an object, array or omitted");a.params=n}if(void 0===o){const t="function"==typeof i.generator?i.generator:function(){return e()};a.id=t(a,i)}else 2===r&&null===o?i.notificationIdNull&&(a.id=null):a.id=o;return a}}(),n=function(t,o){if(!(this instanceof n))return new n(t,o);o||(o={}),this.options={reviver:void 0!==o.reviver?o.reviver:null,replacer:void 0!==o.replacer?o.replacer:null,generator:void 0!==o.generator?o.generator:function(){return e()},version:void 0!==o.version?o.version:2,notificationIdNull:"boolean"==typeof o.notificationIdNull&&o.notificationIdNull},this.callServer=t};Kl=n,n.prototype.request=function(e,n,o,i){const r=this;let a=null;const s=Array.isArray(e)&&"function"==typeof n;if(1===this.options.version&&s)throw new TypeError("JSON-RPC 1.0 does not support batching");if(s||!s&&e&&"object"==typeof e&&"function"==typeof n)i=n,a=e;else{"function"==typeof o&&(i=o,o=void 0);const r="function"==typeof i;try{a=t(e,n,o,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull})}catch(u){if(r)return void i(u);throw u}if(!r)return a}let c;try{c=JSON.stringify(a,this.options.replacer)}catch(u){return void i(u)}return this.callServer(c,function(e,t){r.Ae(e,t,i)}),a},n.prototype.Ae=function(e,t,n){if(e)return void n(e);if(!t)return void n();let o;try{o=JSON.parse(t,this.options.reviver)}catch(i){return void n(i)}if(3!==n.length)n(null,o);else{if(Array.isArray(o)){const e=function(e){return void 0!==e.error},t=function(t){return!e(t)};return void n(null,o.filter(e),o.filter(t))}n(null,o.error,o.result)}}}();var _l;function $l(e){try{return _i.ExtendedPoint.fromHex(e),!0}catch{return!1}}_l||(_l=1,function(e){var t=Object.prototype.hasOwnProperty,n="~";function o(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function r(e,t,o,r,a){if("function"!=typeof o)throw new TypeError("The listener must be a function");var s=new i(o,r||e,a),c=n?n+t:t;return e.ke[c]?e.ke[c].fn?e.ke[c]=[e.ke[c],s]:e.ke[c].push(s):(e.ke[c]=s,e.Te++),e}function a(e,t){0===--e.Te?e.ke=new o:delete e.ke[t]}function s(){this.ke=new o,this.Te=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,o,i=[];if(0===this.Te)return i;for(o in e=this.ke)t.call(e,o)&&i.push(n?o.slice(1):o);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=n?n+e:e,o=this.ke[t];if(!o)return[];if(o.fn)return[o.fn];for(var i=0,r=o.length,a=new Array(r);i<r;i++)a[i]=o[i].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,o=this.ke[t];return o?o.fn?1:o.length:0},s.prototype.emit=function(e,t,o,i,r,a){var s=n?n+e:e;if(!this.ke[s])return!1;var c,u,l=this.ke[s],d=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),d){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,o),!0;case 4:return l.fn.call(l.context,t,o,i),!0;case 5:return l.fn.call(l.context,t,o,i,r),!0;case 6:return l.fn.call(l.context,t,o,i,r,a),!0}for(u=1,c=new Array(d-1);u<d;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var h,f=l.length;for(u=0;u<f;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),d){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,o);break;case 4:l[u].fn.call(l[u].context,t,o,i);break;default:if(!c)for(h=1,c=new Array(d-1);h<d;h++)c[h-1]=arguments[h];l[u].fn.apply(l[u].context,c)}}return!0},s.prototype.on=function(e,t,n){return r(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return r(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,o,i){var r=n?n+e:e;if(!this.ke[r])return this;if(!t)return a(this,r),this;var s=this.ke[r];if(s.fn)s.fn!==t||i&&!s.once||o&&s.context!==o||a(this,r);else{for(var c=0,u=[],l=s.length;c<l;c++)(s[c].fn!==t||i&&!s[c].once||o&&s[c].context!==o)&&u.push(s[c]);u.length?this.ke[r]=1===u.length?u[0]:u:a(this,r)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this.ke[t]&&a(this,t)):(this.ke=new o,this.Te=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}({exports:{}}));class ed{constructor(e){Object.assign(this,e)}encode(){return Li.Buffer.from(Ir.serialize(td,this))}static decode(e){return Ir.deserialize(td,this,e)}static decodeUnchecked(e){return Ir.deserializeUnchecked(td,this,e)}}const td=new Map;var nd;let od=1;class id extends ed{constructor(e){if(super({}),this.Ee=void 0,function(e){return void 0!==e.Ee}(e))this.Ee=e.Ee;else{if("string"==typeof e){const t=hr.decode(e);if(32!=t.length)throw new Error("Invalid public key input");this.Ee=new ir(t)}else this.Ee=new ir(e);if(this.Ee.byteLength()>32)throw new Error("Invalid public key input")}}static unique(){const e=new id(od);return od+=1,new id(e.toBuffer())}equals(e){return this.Ee.eq(e.Ee)}toBase58(){return hr.encode(this.toBytes())}toJSON(){return this.toBase58()}toBytes(){const e=this.toBuffer();return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}toBuffer(){const e=this.Ee.toArrayLike(Li.Buffer);if(32===e.length)return e;const t=Li.Buffer.alloc(32);return e.copy(t,32-e.length),t}get[Symbol.toStringTag](){return`PublicKey(${this.toString()})`}toString(){return this.toBase58()}static async createWithSeed(e,t,n){const o=Li.Buffer.concat([e.toBuffer(),Li.Buffer.from(t),n.toBuffer()]),i=Tn(o);return new id(i)}static createProgramAddressSync(e,t){let n=Li.Buffer.alloc(0);e.forEach(function(e){if(e.length>32)throw new TypeError("Max seed length exceeded");var t;n=Li.Buffer.concat([n,(t=e,Li.Buffer.isBuffer(t)?t:t instanceof Uint8Array?Li.Buffer.from(t.buffer,t.byteOffset,t.byteLength):Li.Buffer.from(t))])}),n=Li.Buffer.concat([n,t.toBuffer(),Li.Buffer.from("ProgramDerivedAddress")]);const o=Tn(n);if($l(o))throw new Error("Invalid seeds, address must fall off the curve");return new id(o)}static async createProgramAddress(e,t){return this.createProgramAddressSync(e,t)}static findProgramAddressSync(e,t){let n,o=255;for(;0!=o;){try{const i=e.concat(Li.Buffer.from([o]));n=this.createProgramAddressSync(i,t)}catch(i){if(i instanceof TypeError)throw i;o--;continue}return[n,o]}throw new Error("Unable to find a viable program address nonce")}static async findProgramAddress(e,t){return this.findProgramAddressSync(e,t)}static isOnCurve(e){return $l(new id(e).toBytes())}}nd=id,id.default=new nd("11111111111111111111111111111111"),td.set(id,{kind:"struct",fields:[["_bn","u256"]]}),new id("BPFLoader1111111111111111111111111111111111");const rd=(e="publicKey")=>Nr.blob(32,e),ad=(e="string")=>{const t=Nr.struct([Nr.u32("length"),Nr.u32("lengthPadding"),Nr.blob(Nr.offset(Nr.u32(),-8),"chars")],e),n=t.decode.bind(t),o=t.encode.bind(t),i=t;return i.decode=(e,t)=>n(e,t).chars.toString(),i.encode=(e,t,n)=>{const i={chars:Li.Buffer.from(e,"utf8")};return o(i,t,n)},i.alloc=e=>Nr.u32().span+Nr.u32().span+Li.Buffer.from(e,"utf8").length,i};Li.Buffer.alloc(64).fill(0),new id("SysvarC1ock11111111111111111111111111111111"),new id("SysvarEpochSchedu1e111111111111111111111111"),new id("Sysvar1nstructions1111111111111111111111111"),new id("SysvarRecentB1ockHashes11111111111111111111"),new id("SysvarRent111111111111111111111111111111111"),new id("SysvarRewards111111111111111111111111111111"),new id("SysvarS1otHashes111111111111111111111111111"),new id("SysvarS1otHistory11111111111111111111111111"),new id("SysvarStakeHistory1111111111111111111111111");const sd=Nr.nu64("lamportsPerSignature");function cd(e){const t=Nr.blob(8,e),n=t.decode.bind(t),o=t.encode.bind(t),i=t,r=Qu();return i.decode=(e,t)=>{const o=n(e,t);return r.decode(o)},i.encode=(e,t,n)=>{const i=r.encode(e);return o(i,t,n)},i}Nr.struct([Nr.u32("version"),Nr.u32("state"),rd("authorizedPubkey"),rd("nonce"),Nr.struct([sd],"feeCalculator")]).span,Object.freeze({Create:{index:0,layout:Nr.struct([Nr.u32("instruction"),Nr.ns64("lamports"),Nr.ns64("space"),rd("programId")])},Assign:{index:1,layout:Nr.struct([Nr.u32("instruction"),rd("programId")])},Transfer:{index:2,layout:Nr.struct([Nr.u32("instruction"),cd("lamports")])},CreateWithSeed:{index:3,layout:Nr.struct([Nr.u32("instruction"),rd("base"),ad("seed"),Nr.ns64("lamports"),Nr.ns64("space"),rd("programId")])},AdvanceNonceAccount:{index:4,layout:Nr.struct([Nr.u32("instruction")])},WithdrawNonceAccount:{index:5,layout:Nr.struct([Nr.u32("instruction"),Nr.ns64("lamports")])},InitializeNonceAccount:{index:6,layout:Nr.struct([Nr.u32("instruction"),rd("authorized")])},AuthorizeNonceAccount:{index:7,layout:Nr.struct([Nr.u32("instruction"),rd("authorized")])},Allocate:{index:8,layout:Nr.struct([Nr.u32("instruction"),Nr.ns64("space")])},AllocateWithSeed:{index:9,layout:Nr.struct([Nr.u32("instruction"),rd("base"),ad("seed"),Nr.ns64("space"),rd("programId")])},AssignWithSeed:{index:10,layout:Nr.struct([Nr.u32("instruction"),rd("base"),ad("seed"),rd("programId")])},TransferWithSeed:{index:11,layout:Nr.struct([Nr.u32("instruction"),cd("lamports"),ad("seed"),rd("programId")])},UpgradeNonceAccount:{index:12,layout:Nr.struct([Nr.u32("instruction")])}}),new id("11111111111111111111111111111111"),new id("BPFLoader2111111111111111111111111111111111"),Nr.struct([Nr.u32("typeIndex"),cd("deactivationSlot"),Nr.nu64("lastExtendedSlot"),Nr.u8("lastExtendedStartIndex"),Nr.u8(),Nr.seq(rd(),Nr.offset(Nr.u8(),-1),"authority")]);const ud=Al(ll(id),wl(),e=>new id(e)),ld=gl([wl(),dl("base64")]),dd=Al(ll(Li.Buffer),ld,e=>Li.Buffer.from(e[0],"base64"));function hd(e){return yl([bl({jsonrpc:dl("2.0"),id:wl(),result:e}),bl({jsonrpc:dl("2.0"),id:wl(),error:bl({code:vl(),message:wl(),data:pl(sl("any",()=>!0))})})])}const fd=hd(vl());function pd(e){return Al(hd(e),fd,t=>"error"in t?t:{...t,result:il(t.result,e)})}function md(e){return pd(bl({context:bl({slot:fl()}),value:e}))}function wd(e){return bl({context:bl({slot:fl()}),value:e})}const gd=bl({foundation:fl(),foundationTerm:fl(),initial:fl(),taper:fl(),terminal:fl()});pd(cl(hl(bl({epoch:fl(),effectiveSlot:fl(),amount:fl(),postBalance:fl(),commission:pl(hl(fl()))}))));const bd=cl(bl({slot:fl(),prioritizationFee:fl()})),yd=bl({total:fl(),validator:fl(),foundation:fl(),epoch:fl()}),vd=bl({epoch:fl(),slotIndex:fl(),slotsInEpoch:fl(),absoluteSlot:fl(),blockHeight:pl(fl()),transactionCount:pl(fl())}),Ad=bl({slotsPerEpoch:fl(),leaderScheduleSlotOffset:fl(),warmup:ul(),firstNormalEpoch:fl(),firstNormalSlot:fl()}),kd=ml(wl(),cl(fl())),Td=hl(yl([bl({}),wl()])),Ed=bl({err:Td}),xd=dl("receivedSignature");bl({"solana-core":wl(),"feature-set":pl(fl())});const Cd=bl({program:wl(),programId:ud,parsed:vl()}),Id=bl({programId:ud,accounts:cl(ud),data:wl()});md(bl({err:hl(yl([bl({}),wl()])),logs:hl(cl(wl())),accounts:pl(hl(cl(hl(bl({executable:ul(),owner:wl(),lamports:fl(),data:cl(wl()),rentEpoch:pl(fl())}))))),unitsConsumed:pl(fl()),returnData:pl(hl(bl({programId:wl(),data:gl([wl(),dl("base64")])}))),innerInstructions:pl(hl(cl(bl({index:fl(),instructions:cl(yl([Cd,Id]))}))))})),md(bl({byIdentity:ml(wl(),cl(fl())),range:bl({firstSlot:fl(),lastSlot:fl()})})),pd(gd),pd(yd),pd(bd),pd(vd),pd(Ad),pd(kd),pd(fl()),md(bl({total:fl(),circulating:fl(),nonCirculating:fl(),nonCirculatingAccounts:cl(ud)}));const Sd=bl({amount:wl(),uiAmount:hl(fl()),decimals:fl(),uiAmountString:pl(wl())});md(cl(bl({address:ud,amount:wl(),uiAmount:hl(fl()),decimals:fl(),uiAmountString:pl(wl())}))),md(cl(bl({pubkey:ud,account:bl({executable:ul(),owner:ud,lamports:fl(),data:dd,rentEpoch:fl()})})));const Nd=bl({program:wl(),parsed:vl(),space:fl()});md(cl(bl({pubkey:ud,account:bl({executable:ul(),owner:ud,lamports:fl(),data:Nd,rentEpoch:fl()})}))),md(cl(bl({lamports:fl(),address:ud})));const Bd=bl({executable:ul(),owner:ud,lamports:fl(),data:dd,rentEpoch:fl()});bl({pubkey:ud,account:Bd});const Md=Al(yl([ll(Li.Buffer),Nd]),yl([ld,Nd]),e=>Array.isArray(e)?il(e,dd):e),Ud=bl({executable:ul(),owner:ud,lamports:fl(),data:Md,rentEpoch:fl()});bl({pubkey:ud,account:Ud}),bl({state:yl([dl("active"),dl("inactive"),dl("activating"),dl("deactivating")]),active:fl(),inactive:fl()}),pd(cl(bl({signature:wl(),slot:fl(),err:Td,memo:hl(wl()),blockTime:pl(hl(fl()))}))),pd(cl(bl({signature:wl(),slot:fl(),err:Td,memo:hl(wl()),blockTime:pl(hl(fl()))}))),bl({subscription:fl(),result:wd(Bd)});const Rd=bl({pubkey:ud,account:Bd});bl({subscription:fl(),result:wd(Rd)});const Pd=bl({parent:fl(),slot:fl(),root:fl()});bl({subscription:fl(),result:Pd});const Od=yl([bl({type:yl([dl("firstShredReceived"),dl("completed"),dl("optimisticConfirmation"),dl("root")]),slot:fl(),timestamp:fl()}),bl({type:dl("createdBank"),parent:fl(),slot:fl(),timestamp:fl()}),bl({type:dl("frozen"),slot:fl(),timestamp:fl(),stats:bl({numTransactionEntries:fl(),numSuccessfulTransactions:fl(),numFailedTransactions:fl(),maxTransactionsPerEntry:fl()})}),bl({type:dl("dead"),slot:fl(),timestamp:fl(),err:wl()})]);bl({subscription:fl(),result:Od}),bl({subscription:fl(),result:wd(yl([Ed,xd]))}),bl({subscription:fl(),result:fl()}),bl({pubkey:wl(),gossip:hl(wl()),tpu:hl(wl()),rpc:hl(wl()),version:hl(wl())});const Ld=bl({votePubkey:wl(),nodePubkey:wl(),activatedStake:fl(),epochVoteAccount:ul(),epochCredits:cl(gl([fl(),fl(),fl()])),commission:fl(),lastVote:fl(),rootSlot:hl(fl())});pd(bl({current:cl(Ld),delinquent:cl(Ld)}));const Dd=yl([dl("processed"),dl("confirmed"),dl("finalized")]),Fd=bl({slot:fl(),confirmations:hl(fl()),err:Td,confirmationStatus:pl(Dd)});md(cl(hl(Fd))),pd(fl());const qd=bl({accountKey:ud,writableIndexes:cl(fl()),readonlyIndexes:cl(fl())}),Hd=bl({signatures:cl(wl()),message:bl({accountKeys:cl(wl()),header:bl({numRequiredSignatures:fl(),numReadonlySignedAccounts:fl(),numReadonlyUnsignedAccounts:fl()}),instructions:cl(bl({accounts:cl(fl()),data:wl(),programIdIndex:fl()})),recentBlockhash:wl(),addressTableLookups:pl(cl(qd))})}),Vd=bl({pubkey:ud,signer:ul(),writable:ul(),source:pl(yl([dl("transaction"),dl("lookupTable")]))}),Wd=bl({accountKeys:cl(Vd),signatures:cl(wl())}),Gd=bl({parsed:vl(),program:wl(),programId:ud}),Jd=bl({accounts:cl(ud),data:wl(),programId:ud}),Yd=Al(yl([Jd,Gd]),yl([bl({parsed:vl(),program:wl(),programId:wl()}),bl({accounts:cl(wl()),data:wl(),programId:wl()})]),e=>il(e,"accounts"in e?Jd:Gd)),zd=bl({signatures:cl(wl()),message:bl({accountKeys:cl(Vd),instructions:cl(Yd),recentBlockhash:wl(),addressTableLookups:pl(hl(cl(qd)))})}),jd=bl({accountIndex:fl(),mint:wl(),owner:pl(wl()),programId:pl(wl()),uiTokenAmount:Sd}),Xd=bl({writable:cl(ud),readonly:cl(ud)}),Qd=bl({err:Td,fee:fl(),innerInstructions:pl(hl(cl(bl({index:fl(),instructions:cl(bl({accounts:cl(fl()),data:wl(),programIdIndex:fl()}))})))),preBalances:cl(fl()),postBalances:cl(fl()),logMessages:pl(hl(cl(wl()))),preTokenBalances:pl(hl(cl(jd))),postTokenBalances:pl(hl(cl(jd))),loadedAddresses:pl(Xd),computeUnitsConsumed:pl(fl()),costUnits:pl(fl())}),Kd=bl({err:Td,fee:fl(),innerInstructions:pl(hl(cl(bl({index:fl(),instructions:cl(Yd)})))),preBalances:cl(fl()),postBalances:cl(fl()),logMessages:pl(hl(cl(wl()))),preTokenBalances:pl(hl(cl(jd))),postTokenBalances:pl(hl(cl(jd))),loadedAddresses:pl(Xd),computeUnitsConsumed:pl(fl()),costUnits:pl(fl())}),Zd=yl([dl(0),dl("legacy")]),_d=bl({pubkey:wl(),lamports:fl(),postBalance:hl(fl()),rewardType:hl(wl()),commission:pl(hl(fl()))});pd(hl(bl({blockhash:wl(),previousBlockhash:wl(),parentSlot:fl(),transactions:cl(bl({transaction:Hd,meta:hl(Qd),version:pl(Zd)})),rewards:pl(cl(_d)),blockTime:hl(fl()),blockHeight:hl(fl())}))),pd(hl(bl({blockhash:wl(),previousBlockhash:wl(),parentSlot:fl(),rewards:pl(cl(_d)),blockTime:hl(fl()),blockHeight:hl(fl())}))),pd(hl(bl({blockhash:wl(),previousBlockhash:wl(),parentSlot:fl(),transactions:cl(bl({transaction:Wd,meta:hl(Qd),version:pl(Zd)})),rewards:pl(cl(_d)),blockTime:hl(fl()),blockHeight:hl(fl())}))),pd(hl(bl({blockhash:wl(),previousBlockhash:wl(),parentSlot:fl(),transactions:cl(bl({transaction:zd,meta:hl(Kd),version:pl(Zd)})),rewards:pl(cl(_d)),blockTime:hl(fl()),blockHeight:hl(fl())}))),pd(hl(bl({blockhash:wl(),previousBlockhash:wl(),parentSlot:fl(),transactions:cl(bl({transaction:Wd,meta:hl(Kd),version:pl(Zd)})),rewards:pl(cl(_d)),blockTime:hl(fl()),blockHeight:hl(fl())}))),pd(hl(bl({blockhash:wl(),previousBlockhash:wl(),parentSlot:fl(),rewards:pl(cl(_d)),blockTime:hl(fl()),blockHeight:hl(fl())}))),pd(hl(bl({blockhash:wl(),previousBlockhash:wl(),parentSlot:fl(),transactions:cl(bl({transaction:Hd,meta:hl(Qd)})),rewards:pl(cl(_d)),blockTime:hl(fl())}))),pd(hl(bl({blockhash:wl(),previousBlockhash:wl(),parentSlot:fl(),signatures:cl(wl()),blockTime:hl(fl())}))),pd(hl(bl({slot:fl(),meta:hl(Qd),blockTime:pl(hl(fl())),transaction:Hd,version:pl(Zd)}))),pd(hl(bl({slot:fl(),transaction:zd,meta:hl(Kd),blockTime:pl(hl(fl())),version:pl(Zd)}))),md(bl({blockhash:wl(),lastValidBlockHeight:fl()})),md(ul()),pd(cl(bl({slot:fl(),numTransactions:fl(),numSlots:fl(),samplePeriodSecs:fl()}))),md(hl(bl({feeCalculator:bl({lamportsPerSignature:fl()})}))),pd(wl()),pd(wl());const $d=bl({err:Td,logs:cl(wl()),signature:wl()});var eh;bl({result:wd($d),subscription:fl()}),Object.freeze({CreateLookupTable:{index:0,layout:Nr.struct([Nr.u32("instruction"),cd("recentSlot"),Nr.u8("bumpSeed")])},FreezeLookupTable:{index:1,layout:Nr.struct([Nr.u32("instruction")])},ExtendLookupTable:{index:2,layout:Nr.struct([Nr.u32("instruction"),cd(),Nr.seq(rd(),Nr.offset(Nr.u32(),-8),"addresses")])},DeactivateLookupTable:{index:3,layout:Nr.struct([Nr.u32("instruction")])},CloseLookupTable:{index:4,layout:Nr.struct([Nr.u32("instruction")])}}),new id("AddressLookupTab1e1111111111111111111111111"),Object.freeze({RequestUnits:{index:0,layout:Nr.struct([Nr.u8("instruction"),Nr.u32("units"),Nr.u32("additionalFee")])},RequestHeapFrame:{index:1,layout:Nr.struct([Nr.u8("instruction"),Nr.u32("bytes")])},SetComputeUnitLimit:{index:2,layout:Nr.struct([Nr.u8("instruction"),Nr.u32("units")])},SetComputeUnitPrice:{index:3,layout:Nr.struct([Nr.u8("instruction"),cd("microLamports")])}}),new id("ComputeBudget111111111111111111111111111111"),Nr.struct([Nr.u8("numSignatures"),Nr.u8("padding"),Nr.u16("signatureOffset"),Nr.u16("signatureInstructionIndex"),Nr.u16("publicKeyOffset"),Nr.u16("publicKeyInstructionIndex"),Nr.u16("messageDataOffset"),Nr.u16("messageDataSize"),Nr.u16("messageInstructionIndex")]),new id("Ed25519SigVerify111111111111111111111111111"),li.utils.isValidPrivateKey,Nr.struct([Nr.u8("numSignatures"),Nr.u16("signatureOffset"),Nr.u8("signatureInstructionIndex"),Nr.u16("ethAddressOffset"),Nr.u8("ethAddressInstructionIndex"),Nr.u16("messageDataOffset"),Nr.u16("messageDataSize"),Nr.u8("messageInstructionIndex"),Nr.blob(20,"ethAddress"),Nr.blob(64,"signature"),Nr.u8("recoveryId")]),new id("KeccakSecp256k11111111111111111111111111111"),new id("StakeConfig11111111111111111111111111111111");class th{constructor(e,t,n){this.unixTimestamp=void 0,this.epoch=void 0,this.custodian=void 0,this.unixTimestamp=e,this.epoch=t,this.custodian=n}}eh=th,th.default=new eh(0,0,id.default),Object.freeze({Initialize:{index:0,layout:Nr.struct([Nr.u32("instruction"),((e="authorized")=>Nr.struct([rd("staker"),rd("withdrawer")],e))(),((e="lockup")=>Nr.struct([Nr.ns64("unixTimestamp"),Nr.ns64("epoch"),rd("custodian")],e))()])},Authorize:{index:1,layout:Nr.struct([Nr.u32("instruction"),rd("newAuthorized"),Nr.u32("stakeAuthorizationType")])},Delegate:{index:2,layout:Nr.struct([Nr.u32("instruction")])},Split:{index:3,layout:Nr.struct([Nr.u32("instruction"),Nr.ns64("lamports")])},Withdraw:{index:4,layout:Nr.struct([Nr.u32("instruction"),Nr.ns64("lamports")])},Deactivate:{index:5,layout:Nr.struct([Nr.u32("instruction")])},Merge:{index:7,layout:Nr.struct([Nr.u32("instruction")])},AuthorizeWithSeed:{index:8,layout:Nr.struct([Nr.u32("instruction"),rd("newAuthorized"),Nr.u32("stakeAuthorizationType"),ad("authoritySeed"),rd("authorityOwner")])}}),new id("Stake11111111111111111111111111111111111111"),Object.freeze({InitializeAccount:{index:0,layout:Nr.struct([Nr.u32("instruction"),((e="voteInit")=>Nr.struct([rd("nodePubkey"),rd("authorizedVoter"),rd("authorizedWithdrawer"),Nr.u8("commission")],e))()])},Authorize:{index:1,layout:Nr.struct([Nr.u32("instruction"),rd("newAuthorized"),Nr.u32("voteAuthorizationType")])},Withdraw:{index:3,layout:Nr.struct([Nr.u32("instruction"),Nr.ns64("lamports")])},UpdateValidatorIdentity:{index:4,layout:Nr.struct([Nr.u32("instruction")])},AuthorizeWithSeed:{index:10,layout:Nr.struct([Nr.u32("instruction"),((e="voteAuthorizeWithSeedArgs")=>Nr.struct([Nr.u32("voteAuthorizationType"),rd("currentAuthorityDerivedKeyOwnerPubkey"),ad("currentAuthorityDerivedKeySeed"),rd("newAuthorized")],e))()])}}),new id("Vote111111111111111111111111111111111111111"),new id("Va1idator1nfo111111111111111111111111111111"),bl({name:wl(),website:pl(wl()),details:pl(wl()),iconUrl:pl(wl()),keybaseUsername:pl(wl())}),new id("Vote111111111111111111111111111111111111111"),Nr.struct([rd("nodePubkey"),rd("authorizedWithdrawer"),Nr.u8("commission"),Nr.nu64(),Nr.seq(Nr.struct([Nr.nu64("slot"),Nr.u32("confirmationCount")]),Nr.offset(Nr.u32(),-8),"votes"),Nr.u8("rootSlotValid"),Nr.nu64("rootSlot"),Nr.nu64(),Nr.seq(Nr.struct([Nr.nu64("epoch"),rd("authorizedVoter")]),Nr.offset(Nr.u32(),-8),"authorizedVoters"),Nr.struct([Nr.seq(Nr.struct([rd("authorizedPubkey"),Nr.nu64("epochOfLastAuthorizedSwitch"),Nr.nu64("targetEpoch")]),32,"buf"),Nr.nu64("idx"),Nr.u8("isEmpty")],"priorVoters"),Nr.nu64(),Nr.seq(Nr.struct([Nr.nu64("epoch"),Nr.nu64("credits"),Nr.nu64("prevCredits")]),Nr.offset(Nr.u32(),-8),"epochCredits"),Nr.struct([Nr.nu64("slot"),Nr.nu64("timestamp")],"lastTimestamp")]);const nh=e=>{const t=new Date,n=new Date(t);n.setDate(n.getDate()-1);const o=new Date(e);return o.setHours(0,0,0,0),t.setHours(0,0,0,0),n.setHours(0,0,0,0),o.getTime()===t.getTime()?"Today":o.getTime()===n.getTime()?"Yesterday":o.toLocaleDateString("en-US",{month:"short",day:"numeric",year:o.getFullYear()!==t.getFullYear()?"numeric":void 0})},oh=e=>new Promise(t=>setTimeout(t,e||0)),ih=(e,t=5,n=5)=>(e=e||"",e?.length<=t+n?e:`${e.substr(0,t)}...${e.substr(e.length-n,n)}`),rh=e=>{if(!e)return"";const t=xi[e];return t?t.chainTypeMoralis:""},ah=e=>{if(!e)return"";const t=xi[e];return t?t.chainType:""},sh={getItem(e){if("undefined"==typeof window)return null;try{return window.localStorage.getItem(e)}catch{return null}},setItem(e,t){if("undefined"!=typeof window)try{window.localStorage.setItem(e,t)}catch{}},removeItem(e){if("undefined"!=typeof window)try{window.localStorage.removeItem(e)}catch{}},get length(){if("undefined"==typeof window)return 0;try{return window.localStorage.length}catch{return 0}},key(e){if("undefined"==typeof window)return null;try{return window.localStorage.key(e)}catch{return null}}};function ch(e){if(tt(e))return!0;try{return new id(e),!0}catch{return!1}}function uh(){const e=String("keyring-chatbot-agent").trim().replace(/^['"]|['"]$/g,"").replace(/^['"]|['"]$/g,"").replace(/[;,]$/,"");return l[e||"keyring-chatbot-agent"]||l["keyring-chatbot-agent"]}const lh=Object.freeze(Object.defineProperty({__proto__:null,ellipsisAddress:ih,formatDate:nh,getChainType:ah,getChainTypeMoralis:rh,getDataPackage:uh,isValidAddress:ch,safeStorage:sh,sleep:oh},Symbol.toStringTag,{value:"Module"})),dh=n.createContext(void 0),hh=()=>{const e=n.useContext(dh);if(!e)throw new Error("useConnect must be used within ConnectProvider");return{...e,chainData:xi[e?.account?.chainId]||void 0,chainId:e.account?.chainId||void 0,chainType:ah(e.account?.chainId||void 0),chainTypeMoralis:rh(e.account?.chainId||void 0),isChainSupported:!!xi[e?.account?.chainId]?.isSupported||!1}},fh=({children:e,initialAccount:n})=>t.jsx(dh.Provider,{value:{account:n||null},children:e}),ph=({address:e,chainId:o})=>{const[i,r]=n.useState(!1),{isChainSupported:a}=hh(),{t:c}=s(),u=n.useCallback(()=>{if(!e)return;const t=e,n=()=>{r(!0),setTimeout(()=>r(!1),2e3)};try{navigator.clipboard.writeText(t).then(n).catch(()=>{const e=document.createElement("input");e.value=t,document.body.appendChild(e),e.select(),document.execCommand("copy"),e.remove(),n()})}catch{const e=document.createElement("input");e.value=t,document.body.appendChild(e),e.select(),document.execCommand("copy"),e.remove(),n()}},[e]);return t.jsx(t.Fragment,{children:ch(e||"")&&t.jsxs("div",{className:"chat-user-info",children:[t.jsxs("span",{className:"user-wallet",children:[t.jsxs("span",{style:{marginRight:8},children:[xi[o]?.customName||xi[o]?.name||`Chain ${o}`,":"]}),t.jsx("a",{title:c("viewOnExplorer"),style:{pointerEvents:a?"auto":"none"},href:xi[o]?.blockExplorers?.default?.url+"/address/"+e,target:"_blank",rel:"noopener noreferrer",children:ih(e)||"Not connected"})]}),t.jsx("button",{className:"copy-address-btn",onClick:u,"aria-label":c("copyWalletAddress"),type:"button",title:c(i?"copied":"copyAddress"),children:i?t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",children:t.jsx("path",{d:"M13.3333 4L6 11.3333L2.66667 8",stroke:"#0B3988",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M8.1 15.75H13.23C12.9638 16.4152 12.5041 16.9852 11.9105 17.3863C11.3168 17.7874 10.6165 18.0012 9.9 18H3.6C2.64522 18 1.72955 17.6207 1.05442 16.9456C0.379285 16.2704 0 15.3548 0 14.4V7.2C0.00104929 6.32332 0.321408 5.47704 0.901163 4.81944C1.48092 4.16183 2.28037 3.73792 3.15 3.627V10.8C3.15238 12.1121 3.67466 13.3698 4.60245 14.2975C5.53024 15.2253 6.78791 15.7476 8.1 15.75ZM15.75 3.825H17.658C17.6027 3.74389 17.5393 3.66852 17.469 3.6L14.4 0.531C14.3337 0.460854 14.258 0.400274 14.175 0.351V2.25C14.1769 2.66713 14.3434 3.06664 14.6384 3.3616C14.9334 3.65656 15.3329 3.8231 15.75 3.825ZM15.75 5.175C14.9747 5.17357 14.2315 4.86494 13.6833 4.31671C13.1351 3.76847 12.8264 3.02532 12.825 2.25V0H8.1C7.14522 0 6.22955 0.379285 5.55442 1.05442C4.87928 1.72955 4.5 2.64522 4.5 3.6V10.8C4.5 11.7548 4.87928 12.6704 5.55442 13.3456C6.22955 14.0207 7.14522 14.4 8.1 14.4H14.4C15.3548 14.4 16.2705 14.0207 16.9456 13.3456C17.6207 12.6704 18 11.7548 18 10.8V5.175H15.75Z",fill:"#0B3988"})})})]})})},mh="chat_widget_messages",wh=200,gh=()=>Math.random().toString(36).substring(2,12),bh="welcome-message";function yh(e){return[{id:bh,text:e,sender:"bot",timestamp:new Date}]}function vh(e){return e.map(e=>({...e,timestamp:new Date(e.timestamp)}))}function Ah(){const e=sh.getItem(mh);if(!e)return null;try{const t=JSON.parse(e);if(t&&void 0!==t.owner&&Array.isArray(t.messages))return{owner:t.owner,messages:vh(t.messages)};if(Array.isArray(t))return{owner:"",messages:vh(t)}}catch{}return null}function kh(e,t){sh.setItem(mh,JSON.stringify({owner:e,messages:t}))}const Th=n.createContext(void 0),Eh=({children:e,initialConfig:n})=>t.jsx(Th.Provider,{value:{config:n||null},children:e}),xh={send_native:{label:"actionSendNativeLabel",description:"actionSendNativeDesc",fields:[{key:"to_address",label:"fieldToAddress",type:"address",placeholder:"0x...",required:!0,validation:"address"},{key:"amount",label:"fieldAmount",type:"amount",placeholder:"0.0",required:!0,validation:"amount"}]},send_token:{label:"actionSendTokenLabel",description:"actionSendTokenDesc",fields:[{key:"contract_address",label:"fieldTokenContract",type:"address",placeholder:"0x... token contract",required:!0,validation:"address",editable:!1},{key:"token_symbol",label:"fieldTokenSymbol",type:"text",placeholder:"e.g. USDC",required:!1,editable:!1},{key:"decimals",label:"fieldDecimals",type:"number",placeholder:"18",required:!1,editable:!1},{key:"to_address",label:"fieldToAddress",type:"address",placeholder:"0x...",required:!0,validation:"address"},{key:"amount",label:"fieldAmount",type:"amount",placeholder:"0.0",required:!0,validation:"amount"}]},swap_token:{label:"actionSwapTokenLabel",description:"actionSwapTokenDesc",fields:[{key:"token_in",label:"fieldTokenIn",type:"address",placeholder:"0x... or native",required:!0,editable:!1},{key:"token_in_symbol",label:"fieldTokenInSymbol",type:"text",placeholder:"e.g. ETH",required:!1,editable:!1},{key:"token_out",label:"fieldTokenOut",type:"address",placeholder:"0x...",required:!0,editable:!1},{key:"token_out_symbol",label:"fieldTokenOutSymbol",type:"text",placeholder:"e.g. USDC",required:!1,editable:!1},{key:"token_in_decimals",label:"fieldTokenInDecimals",type:"number",placeholder:"18",required:!1,editable:!1},{key:"token_out_decimals",label:"fieldTokenOutDecimals",type:"number",placeholder:"18",required:!1,editable:!1},{key:"amount",label:"fieldAmount",type:"amount",placeholder:"0.0",required:!0,validation:"amount"}]},approve_token:{label:"actionApproveTokenLabel",description:"actionApproveTokenDesc",fields:[{key:"contract_address",label:"fieldTokenContract",type:"address",placeholder:"0x... token contract",required:!0,validation:"address",editable:!1},{key:"token_symbol",label:"fieldTokenSymbol",type:"text",placeholder:"e.g. USDC",required:!1,editable:!1},{key:"spender_address",label:"fieldSpenderAddress",type:"address",placeholder:"0x... spender contract",required:!0,validation:"address",editable:!1},{key:"amount",label:"fieldAmountUnlimited",type:"amount",placeholder:"0.0 or leave empty for max",required:!1,validation:"amount"},{key:"decimals",label:"fieldDecimals",type:"number",placeholder:"18",required:!1,editable:!1}]},wrap_native:{label:"actionWrapNativeLabel",description:"actionWrapNativeDesc",fields:[{key:"amount",label:"fieldAmount",type:"amount",placeholder:"0.0",required:!0,validation:"amount"}]},unwrap_native:{label:"actionUnwrapNativeLabel",description:"actionUnwrapNativeDesc",fields:[{key:"amount",label:"fieldAmount",type:"amount",placeholder:"0.0",required:!0,validation:"amount"}]},send_nft:{label:"actionSendNftLabel",description:"actionSendNftDesc",fields:[{key:"contract_address",label:"fieldNftContract",type:"address",placeholder:"0x... NFT contract",required:!0,validation:"address",editable:!1},{key:"token_id",label:"fieldTokenId",type:"text",placeholder:"e.g. 1234",required:!0,editable:!1},{key:"to_address",label:"fieldToAddress",type:"address",placeholder:"0x...",required:!0,validation:"address"},{key:"token_standard",label:"fieldTokenStandard",type:"text",placeholder:"ERC721 or ERC1155",required:!0,editable:!1},{key:"amount",label:"fieldAmount",type:"text",placeholder:"1",required:!0},{key:"maxAmount",label:"fieldMaxAmount",type:"text",placeholder:"",required:!1,editable:!1,hidden:!0},{key:"nft_name",label:"fieldNftName",type:"text",placeholder:"e.g. Bored Ape #1234",required:!1,editable:!1}]}};function Ch(e){if(!e||""===e?.trim())return!1;const t=parseFloat(e);return!isNaN(t)&&t>0}var Ih=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,Sh=Math.ceil,Nh=Math.floor,Bh="[BigNumber Error] ",Mh=Bh+"Number primitive has more than 15 significant digits: ",Uh=1e14,Rh=14,Ph=9007199254740991,Oh=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],Lh=1e7,Dh=1e9;function Fh(e){var t=0|e;return e>0||e===t?t:t-1}function qh(e){for(var t,n,o=1,i=e.length,r=e[0]+"";o<i;){for(t=e[o++]+"",n=Rh-t.length;n--;t="0"+t);r+=t}for(i=r.length;48===r.charCodeAt(--i););return r.slice(0,i+1||1)}function Hh(e,t){var n,o,i=e.c,r=t.c,a=e.s,s=t.s,c=e.e,u=t.e;if(!a||!s)return null;if(n=i&&!i[0],o=r&&!r[0],n||o)return n?o?0:-s:a;if(a!=s)return a;if(n=a<0,o=c==u,!i||!r)return o?0:!i^n?1:-1;if(!o)return c>u^n?1:-1;for(s=(c=i.length)<(u=r.length)?c:u,a=0;a<s;a++)if(i[a]!=r[a])return i[a]>r[a]^n?1:-1;return c==u?0:c>u^n?1:-1}function Vh(e,t,n,o){if(e<t||e>n||e!==Nh(e))throw Error(Bh+(o||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function Wh(e){var t=e.c.length-1;return Fh(e.e/Rh)==t&&e.c[t]%2!=0}function Gh(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function Jh(e,t,n){var o,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(++t>(o=e.length)){for(i=n,t-=o;--t;i+=n);e+=i}else t<o&&(e=e.slice(0,t)+"."+e.slice(t));return e}var Yh=function e(t){var n,o,i,r,a,s=A.prototype={constructor:A,toString:null,valueOf:null},c=new A(1),u=20,l=4,d=-7,h=21,f=-1e7,p=1e7,m=!1,w=1,g=0,b={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},y="0123456789abcdefghijklmnopqrstuvwxyz",v=!0;function A(e,t){var n,r,a,s,c,d,h,m,w=this;if(!(w instanceof A))return new A(e,t);if(null==t){if(e&&!0===e.xe)return w.s=e.s,void(!e.c||e.e>p?w.c=w.e=null:e.e<f?w.c=[w.e=0]:(w.e=e.e,w.c=e.c.slice()));if((d="number"==typeof e)&&0*e==0){if(w.s=1/e<0?(e=-e,-1):1,e===~~e){for(s=0,c=e;c>=10;c/=10,s++);return void(s>p?w.c=w.e=null:(w.e=s,w.c=[e]))}m=String(e)}else{if(!Ih.test(m=String(e)))return i(w,m,d);w.s=45==m.charCodeAt(0)?(m=m.slice(1),-1):1}(s=m.indexOf("."))>-1&&(m=m.replace(".","")),(c=m.search(/e/i))>0?(s<0&&(s=c),s+=+m.slice(c+1),m=m.substring(0,c)):s<0&&(s=m.length)}else{if(Vh(t,2,y.length,"Base"),10==t&&v)return x(w=new A(e),u+w.e+1,l);if(m=String(e),d="number"==typeof e){if(0*e!=0)return i(w,m,d,t);if(w.s=1/e<0?(m=m.slice(1),-1):1,A.DEBUG&&m.replace(/^0\.0*|\./,"").length>15)throw Error(Mh+e)}else w.s=45===m.charCodeAt(0)?(m=m.slice(1),-1):1;for(n=y.slice(0,t),s=c=0,h=m.length;c<h;c++)if(n.indexOf(r=m.charAt(c))<0){if("."==r){if(c>s){s=h;continue}}else if(!a&&(m==m.toUpperCase()&&(m=m.toLowerCase())||m==m.toLowerCase()&&(m=m.toUpperCase()))){a=!0,c=-1,s=0;continue}return i(w,String(e),d,t)}d=!1,(s=(m=o(m,t,10,w.s)).indexOf("."))>-1?m=m.replace(".",""):s=m.length}for(c=0;48===m.charCodeAt(c);c++);for(h=m.length;48===m.charCodeAt(--h););if(m=m.slice(c,++h)){if(h-=c,d&&A.DEBUG&&h>15&&(e>Ph||e!==Nh(e)))throw Error(Mh+w.s*e);if((s=s-c-1)>p)w.c=w.e=null;else if(s<f)w.c=[w.e=0];else{if(w.e=s,w.c=[],c=(s+1)%Rh,s<0&&(c+=Rh),c<h){for(c&&w.c.push(+m.slice(0,c)),h-=Rh;c<h;)w.c.push(+m.slice(c,c+=Rh));c=Rh-(m=m.slice(c)).length}else c-=h;for(;c--;m+="0");w.c.push(+m)}}else w.c=[w.e=0]}function k(e,t,n,o){var i,r,a,s,c;if(null==n?n=l:Vh(n,0,8),!e.c)return e.toString();if(i=e.c[0],a=e.e,null==t)c=qh(e.c),c=1==o||2==o&&(a<=d||a>=h)?Gh(c,a):Jh(c,a,"0");else if(r=(e=x(new A(e),t,n)).e,s=(c=qh(e.c)).length,1==o||2==o&&(t<=r||r<=d)){for(;s<t;c+="0",s++);c=Gh(c,r)}else if(t-=a+(2===o&&r>a),c=Jh(c,r,"0"),r+1>s){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=r-s)>0)for(r+1==s&&(c+=".");t--;c+="0");return e.s<0&&i?"-"+c:c}function T(e,t){for(var n,o,i=1,r=new A(e[0]);i<e.length;i++)(!(o=new A(e[i])).s||(n=Hh(r,o))===t||0===n&&r.s===t)&&(r=o);return r}function E(e,t,n){for(var o=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,o++);return(n=o+n*Rh-1)>p?e.c=e.e=null:n<f?e.c=[e.e=0]:(e.e=n,e.c=t),e}function x(e,t,n,o){var i,r,a,s,c,u,l,d=e.c,h=Oh;if(d){e:{for(i=1,s=d[0];s>=10;s/=10,i++);if((r=t-i)<0)r+=Rh,a=t,c=d[u=0],l=Nh(c/h[i-a-1]%10);else if((u=Sh((r+1)/Rh))>=d.length){if(!o)break e;for(;d.length<=u;d.push(0));c=l=0,i=1,a=(r%=Rh)-Rh+1}else{for(c=s=d[u],i=1;s>=10;s/=10,i++);l=(a=(r%=Rh)-Rh+i)<0?0:Nh(c/h[i-a-1]%10)}if(o=o||t<0||null!=d[u+1]||(a<0?c:c%h[i-a-1]),o=n<4?(l||o)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||o||6==n&&(r>0?a>0?c/h[i-a]:0:d[u-1])%10&1||n==(e.s<0?8:7)),t<1||!d[0])return d.length=0,o?(t-=e.e+1,d[0]=h[(Rh-t%Rh)%Rh],e.e=-t||0):d[0]=e.e=0,e;if(0==r?(d.length=u,s=1,u--):(d.length=u+1,s=h[Rh-r],d[u]=a>0?Nh(c/h[i-a]%h[a])*s:0),o)for(;;){if(0==u){for(r=1,a=d[0];a>=10;a/=10,r++);for(a=d[0]+=s,s=1;a>=10;a/=10,s++);r!=s&&(e.e++,d[0]==Uh&&(d[0]=1));break}if(d[u]+=s,d[u]!=Uh)break;d[u--]=0,s=1}for(r=d.length;0===d[--r];d.pop());}e.e>p?e.c=e.e=null:e.e<f&&(e.c=[e.e=0])}return e}function C(e){var t,n=e.e;return null===n?e.toString():(t=qh(e.c),t=n<=d||n>=h?Gh(t,n):Jh(t,n,"0"),e.s<0?"-"+t:t)}return A.clone=e,A.ROUND_UP=0,A.ROUND_DOWN=1,A.ROUND_CEIL=2,A.ROUND_FLOOR=3,A.ROUND_HALF_UP=4,A.ROUND_HALF_DOWN=5,A.ROUND_HALF_EVEN=6,A.ROUND_HALF_CEIL=7,A.ROUND_HALF_FLOOR=8,A.EUCLID=9,A.config=A.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(Bh+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(Vh(n=e[t],0,Dh,t),u=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(Vh(n=e[t],0,8,t),l=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(Vh(n[0],-Dh,0,t),Vh(n[1],0,Dh,t),d=n[0],h=n[1]):(Vh(n,-Dh,Dh,t),d=-(h=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)Vh(n[0],-Dh,-1,t),Vh(n[1],1,Dh,t),f=n[0],p=n[1];else{if(Vh(n,-Dh,Dh,t),!n)throw Error(Bh+t+" cannot be zero: "+n);f=-(p=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(Bh+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw m=!n,Error(Bh+"crypto unavailable");m=n}else m=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(Vh(n=e[t],0,9,t),w=n),e.hasOwnProperty(t="POW_PRECISION")&&(Vh(n=e[t],0,Dh,t),g=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(Bh+t+" not an object: "+n);b=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(Bh+t+" invalid: "+n);v="0123456789"==n.slice(0,10),y=n}}return{DECIMAL_PLACES:u,ROUNDING_MODE:l,EXPONENTIAL_AT:[d,h],RANGE:[f,p],CRYPTO:m,MODULO_MODE:w,POW_PRECISION:g,FORMAT:b,ALPHABET:y}},A.isBigNumber=function(e){if(!e||!0!==e.xe)return!1;if(!A.DEBUG)return!0;var t,n,o=e.c,i=e.e,r=e.s;e:if("[object Array]"=={}.toString.call(o)){if((1===r||-1===r)&&i>=-Dh&&i<=Dh&&i===Nh(i)){if(0===o[0]){if(0===i&&1===o.length)return!0;break e}if((t=(i+1)%Rh)<1&&(t+=Rh),String(o[0]).length==t){for(t=0;t<o.length;t++)if((n=o[t])<0||n>=Uh||n!==Nh(n))break e;if(0!==n)return!0}}}else if(null===o&&null===i&&(null===r||1===r||-1===r))return!0;throw Error(Bh+"Invalid BigNumber: "+e)},A.maximum=A.max=function(){return T(arguments,-1)},A.minimum=A.min=function(){return T(arguments,1)},A.random=(r=9007199254740992,a=Math.random()*r&2097151?function(){return Nh(Math.random()*r)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,o,i,r,s=0,l=[],d=new A(c);if(null==e?e=u:Vh(e,0,Dh),i=Sh(e/Rh),m)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));s<i;)(r=131072*t[s]+(t[s+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[s]=n[0],t[s+1]=n[1]):(l.push(r%1e14),s+=2);s=i/2}else{if(!crypto.randomBytes)throw m=!1,Error(Bh+"crypto unavailable");for(t=crypto.randomBytes(i*=7);s<i;)(r=281474976710656*(31&t[s])+1099511627776*t[s+1]+4294967296*t[s+2]+16777216*t[s+3]+(t[s+4]<<16)+(t[s+5]<<8)+t[s+6])>=9e15?crypto.randomBytes(7).copy(t,s):(l.push(r%1e14),s+=7);s=i/7}if(!m)for(;s<i;)(r=a())<9e15&&(l[s++]=r%1e14);for(i=l[--s],e%=Rh,i&&e&&(r=Oh[Rh-e],l[s]=Nh(i/r)*r);0===l[s];l.pop(),s--);if(s<0)l=[o=0];else{for(o=-1;0===l[0];l.splice(0,1),o-=Rh);for(s=1,r=l[0];r>=10;r/=10,s++);s<Rh&&(o-=Rh-s)}return d.e=o,d.c=l,d}),A.sum=function(){for(var e=1,t=arguments,n=new A(t[0]);e<t.length;)n=n.plus(t[e++]);return n},o=function(){var e="0123456789";function t(e,t,n,o){for(var i,r,a=[0],s=0,c=e.length;s<c;){for(r=a.length;r--;a[r]*=t);for(a[0]+=o.indexOf(e.charAt(s++)),i=0;i<a.length;i++)a[i]>n-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/n|0,a[i]%=n)}return a.reverse()}return function(o,i,r,a,s){var c,d,h,f,p,m,w,b,v=o.indexOf("."),k=u,T=l;for(v>=0&&(f=g,g=0,o=o.replace(".",""),m=(b=new A(i)).pow(o.length-v),g=f,b.c=t(Jh(qh(m.c),m.e,"0"),10,r,e),b.e=b.c.length),h=f=(w=t(o,i,r,s?(c=y,e):(c=e,y))).length;0==w[--f];w.pop());if(!w[0])return c.charAt(0);if(v<0?--h:(m.c=w,m.e=h,m.s=a,w=(m=n(m,b,k,T,r)).c,p=m.r,h=m.e),v=w[d=h+k+1],f=r/2,p=p||d<0||null!=w[d+1],p=T<4?(null!=v||p)&&(0==T||T==(m.s<0?3:2)):v>f||v==f&&(4==T||p||6==T&&1&w[d-1]||T==(m.s<0?8:7)),d<1||!w[0])o=p?Jh(c.charAt(1),-k,c.charAt(0)):c.charAt(0);else{if(w.length=d,p)for(--r;++w[--d]>r;)w[d]=0,d||(++h,w=[1].concat(w));for(f=w.length;!w[--f];);for(v=0,o="";v<=f;o+=c.charAt(w[v++]));o=Jh(o,h,c.charAt(0))}return o}}(),n=function(){function e(e,t,n){var o,i,r,a,s=0,c=e.length,u=t%Lh,l=t/Lh|0;for(e=e.slice();c--;)s=((i=u*(r=e[c]%Lh)+(o=l*r+(a=e[c]/Lh|0)*u)%Lh*Lh+s)/n|0)+(o/Lh|0)+l*a,e[c]=i%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,o){var i,r;if(n!=o)r=n>o?1:-1;else for(i=r=0;i<n;i++)if(e[i]!=t[i]){r=e[i]>t[i]?1:-1;break}return r}function n(e,t,n,o){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*o+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(o,i,r,a,s){var c,u,l,d,h,f,p,m,w,g,b,y,v,k,T,E,C,I=o.s==i.s?1:-1,S=o.c,N=i.c;if(!(S&&S[0]&&N&&N[0]))return new A(o.s&&i.s&&(S?!N||S[0]!=N[0]:N)?S&&0==S[0]||!N?0*I:I/0:NaN);for(w=(m=new A(I)).c=[],I=r+(u=o.e-i.e)+1,s||(s=Uh,u=Fh(o.e/Rh)-Fh(i.e/Rh),I=I/Rh|0),l=0;N[l]==(S[l]||0);l++);if(N[l]>(S[l]||0)&&u--,I<0)w.push(1),d=!0;else{for(k=S.length,E=N.length,l=0,I+=2,(h=Nh(s/(N[0]+1)))>1&&(N=e(N,h,s),S=e(S,h,s),E=N.length,k=S.length),v=E,b=(g=S.slice(0,E)).length;b<E;g[b++]=0);C=N.slice(),C=[0].concat(C),T=N[0],N[1]>=s/2&&T++;do{if(h=0,(c=t(N,g,E,b))<0){if(y=g[0],E!=b&&(y=y*s+(g[1]||0)),(h=Nh(y/T))>1)for(h>=s&&(h=s-1),p=(f=e(N,h,s)).length,b=g.length;1==t(f,g,p,b);)h--,n(f,E<p?C:N,p,s),p=f.length,c=1;else 0==h&&(c=h=1),p=(f=N.slice()).length;if(p<b&&(f=[0].concat(f)),n(g,f,b,s),b=g.length,-1==c)for(;t(N,g,E,b)<1;)h++,n(g,E<b?C:N,b,s),b=g.length}else 0===c&&(h++,g=[0]);w[l++]=h,g[0]?g[b++]=S[v]||0:(g=[S[v]],b=1)}while((v++<k||null!=g[0])&&I--);d=null!=g[0],w[0]||w.splice(0,1)}if(s==Uh){for(l=1,I=w[0];I>=10;I/=10,l++);x(m,r+(m.e=l+u*Rh-1)+1,a,d)}else m.e=u,m.r=+d;return m}}(),i=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,n=/^\.([^.]+)$/,o=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(r,a,s,c){var u,l=s?a:a.replace(i,"");if(o.test(l))r.s=isNaN(l)?null:l<0?-1:1;else{if(!s&&(l=l.replace(e,function(e,t,n){return u="x"==(n=n.toLowerCase())?16:"b"==n?2:8,c&&c!=u?e:t}),c&&(u=c,l=l.replace(t,"$1").replace(n,"0.$1")),a!=l))return new A(l,u);if(A.DEBUG)throw Error(Bh+"Not a"+(c?" base "+c:"")+" number: "+a);r.s=null}r.c=r.e=null}}(),s.absoluteValue=s.abs=function(){var e=new A(this);return e.s<0&&(e.s=1),e},s.comparedTo=function(e,t){return Hh(this,new A(e,t))},s.decimalPlaces=s.dp=function(e,t){var n,o,i,r=this;if(null!=e)return Vh(e,0,Dh),null==t?t=l:Vh(t,0,8),x(new A(r),e+r.e+1,t);if(!(n=r.c))return null;if(o=((i=n.length-1)-Fh(this.e/Rh))*Rh,i=n[i])for(;i%10==0;i/=10,o--);return o<0&&(o=0),o},s.dividedBy=s.div=function(e,t){return n(this,new A(e,t),u,l)},s.dividedToIntegerBy=s.idiv=function(e,t){return n(this,new A(e,t),0,1)},s.exponentiatedBy=s.pow=function(e,t){var n,o,i,r,a,s,u,d,h=this;if((e=new A(e)).c&&!e.isInteger())throw Error(Bh+"Exponent not an integer: "+C(e));if(null!=t&&(t=new A(t)),a=e.e>14,!h.c||!h.c[0]||1==h.c[0]&&!h.e&&1==h.c.length||!e.c||!e.c[0])return d=new A(Math.pow(+C(h),a?e.s*(2-Wh(e)):+C(e))),t?d.mod(t):d;if(s=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new A(NaN);(o=!s&&h.isInteger()&&t.isInteger())&&(h=h.mod(t))}else{if(e.e>9&&(h.e>0||h.e<-1||(0==h.e?h.c[0]>1||a&&h.c[1]>=24e7:h.c[0]<8e13||a&&h.c[0]<=9999975e7)))return r=h.s<0&&Wh(e)?-0:0,h.e>-1&&(r=1/r),new A(s?1/r:r);g&&(r=Sh(g/Rh+2))}for(a?(n=new A(.5),s&&(e.s=1),u=Wh(e)):u=(i=Math.abs(+C(e)))%2,d=new A(c);;){if(u){if(!(d=d.times(h)).c)break;r?d.c.length>r&&(d.c.length=r):o&&(d=d.mod(t))}if(i){if(0===(i=Nh(i/2)))break;u=i%2}else if(x(e=e.times(n),e.e+1,1),e.e>14)u=Wh(e);else{if(0===(i=+C(e)))break;u=i%2}h=h.times(h),r?h.c&&h.c.length>r&&(h.c.length=r):o&&(h=h.mod(t))}return o?d:(s&&(d=c.div(d)),t?d.mod(t):r?x(d,g,l,void 0):d)},s.integerValue=function(e){var t=new A(this);return null==e?e=l:Vh(e,0,8),x(t,t.e+1,e)},s.isEqualTo=s.eq=function(e,t){return 0===Hh(this,new A(e,t))},s.isFinite=function(){return!!this.c},s.isGreaterThan=s.gt=function(e,t){return Hh(this,new A(e,t))>0},s.isGreaterThanOrEqualTo=s.gte=function(e,t){return 1===(t=Hh(this,new A(e,t)))||0===t},s.isInteger=function(){return!!this.c&&Fh(this.e/Rh)>this.c.length-2},s.isLessThan=s.lt=function(e,t){return Hh(this,new A(e,t))<0},s.isLessThanOrEqualTo=s.lte=function(e,t){return-1===(t=Hh(this,new A(e,t)))||0===t},s.isNaN=function(){return!this.s},s.isNegative=function(){return this.s<0},s.isPositive=function(){return this.s>0},s.isZero=function(){return!!this.c&&0==this.c[0]},s.minus=function(e,t){var n,o,i,r,a=this,s=a.s;if(t=(e=new A(e,t)).s,!s||!t)return new A(NaN);if(s!=t)return e.s=-t,a.plus(e);var c=a.e/Rh,u=e.e/Rh,d=a.c,h=e.c;if(!c||!u){if(!d||!h)return d?(e.s=-t,e):new A(h?a:NaN);if(!d[0]||!h[0])return h[0]?(e.s=-t,e):new A(d[0]?a:3==l?-0:0)}if(c=Fh(c),u=Fh(u),d=d.slice(),s=c-u){for((r=s<0)?(s=-s,i=d):(u=c,i=h),i.reverse(),t=s;t--;i.push(0));i.reverse()}else for(o=(r=(s=d.length)<(t=h.length))?s:t,s=t=0;t<o;t++)if(d[t]!=h[t]){r=d[t]<h[t];break}if(r&&(i=d,d=h,h=i,e.s=-e.s),(t=(o=h.length)-(n=d.length))>0)for(;t--;d[n++]=0);for(t=Uh-1;o>s;){if(d[--o]<h[o]){for(n=o;n&&!d[--n];d[n]=t);--d[n],d[o]+=Uh}d[o]-=h[o]}for(;0==d[0];d.splice(0,1),--u);return d[0]?E(e,d,u):(e.s=3==l?-1:1,e.c=[e.e=0],e)},s.modulo=s.mod=function(e,t){var o,i,r=this;return e=new A(e,t),!r.c||!e.s||e.c&&!e.c[0]?new A(NaN):!e.c||r.c&&!r.c[0]?new A(r):(9==w?(i=e.s,e.s=1,o=n(r,e,0,3),e.s=i,o.s*=i):o=n(r,e,0,w),(e=r.minus(o.times(e))).c[0]||1!=w||(e.s=r.s),e)},s.multipliedBy=s.times=function(e,t){var n,o,i,r,a,s,c,u,l,d,h,f,p,m,w,g=this,b=g.c,y=(e=new A(e,t)).c;if(!(b&&y&&b[0]&&y[0]))return!g.s||!e.s||b&&!b[0]&&!y||y&&!y[0]&&!b?e.c=e.e=e.s=null:(e.s*=g.s,b&&y?(e.c=[0],e.e=0):e.c=e.e=null),e;for(o=Fh(g.e/Rh)+Fh(e.e/Rh),e.s*=g.s,(c=b.length)<(d=y.length)&&(p=b,b=y,y=p,i=c,c=d,d=i),i=c+d,p=[];i--;p.push(0));for(m=Uh,w=Lh,i=d;--i>=0;){for(n=0,h=y[i]%w,f=y[i]/w|0,r=i+(a=c);r>i;)n=((u=h*(u=b[--a]%w)+(s=f*u+(l=b[a]/w|0)*h)%w*w+p[r]+n)/m|0)+(s/w|0)+f*l,p[r--]=u%m;p[r]=n}return n?++o:p.splice(0,1),E(e,p,o)},s.negated=function(){var e=new A(this);return e.s=-e.s||null,e},s.plus=function(e,t){var n,o=this,i=o.s;if(t=(e=new A(e,t)).s,!i||!t)return new A(NaN);if(i!=t)return e.s=-t,o.minus(e);var r=o.e/Rh,a=e.e/Rh,s=o.c,c=e.c;if(!r||!a){if(!s||!c)return new A(i/0);if(!s[0]||!c[0])return c[0]?e:new A(s[0]?o:0*i)}if(r=Fh(r),a=Fh(a),s=s.slice(),i=r-a){for(i>0?(a=r,n=c):(i=-i,n=s),n.reverse();i--;n.push(0));n.reverse()}for((i=s.length)-(t=c.length)<0&&(n=c,c=s,s=n,t=i),i=0;t;)i=(s[--t]=s[t]+c[t]+i)/Uh|0,s[t]=Uh===s[t]?0:s[t]%Uh;return i&&(s=[i].concat(s),++a),E(e,s,a)},s.precision=s.sd=function(e,t){var n,o,i,r=this;if(null!=e&&e!==!!e)return Vh(e,1,Dh),null==t?t=l:Vh(t,0,8),x(new A(r),e,t);if(!(n=r.c))return null;if(o=(i=n.length-1)*Rh+1,i=n[i]){for(;i%10==0;i/=10,o--);for(i=n[0];i>=10;i/=10,o++);}return e&&r.e+1>o&&(o=r.e+1),o},s.shiftedBy=function(e){return Vh(e,-9007199254740991,Ph),this.times("1e"+e)},s.squareRoot=s.sqrt=function(){var e,t,o,i,r,a=this,s=a.c,c=a.s,d=a.e,h=u+4,f=new A("0.5");if(1!==c||!s||!s[0])return new A(!c||c<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(c=Math.sqrt(+C(a)))||c==1/0?(((t=qh(s)).length+d)%2==0&&(t+="0"),c=Math.sqrt(+t),d=Fh((d+1)/2)-(d<0||d%2),o=new A(t=c==1/0?"5e"+d:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+d)):o=new A(c+""),o.c[0])for((c=(d=o.e)+h)<3&&(c=0);;)if(r=o,o=f.times(r.plus(n(a,r,h,1))),qh(r.c).slice(0,c)===(t=qh(o.c)).slice(0,c)){if(o.e<d&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(x(o,o.e+u+2,1),e=!o.times(o).eq(a));break}if(!i&&(x(r,r.e+u+2,0),r.times(r).eq(a))){o=r;break}h+=4,c+=4,i=1}return x(o,o.e+u+1,l,e)},s.toExponential=function(e,t){return null!=e&&(Vh(e,0,Dh),e++),k(this,e,t,1)},s.toFixed=function(e,t){return null!=e&&(Vh(e,0,Dh),e=e+this.e+1),k(this,e,t)},s.toFormat=function(e,t,n){var o,i=this;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=b;else if("object"!=typeof n)throw Error(Bh+"Argument not an object: "+n);if(o=i.toFixed(e,t),i.c){var r,a=o.split("."),s=+n.groupSize,c=+n.secondaryGroupSize,u=n.groupSeparator||"",l=a[0],d=a[1],h=i.s<0,f=h?l.slice(1):l,p=f.length;if(c&&(r=s,s=c,c=r,p-=r),s>0&&p>0){for(r=p%s||s,l=f.substr(0,r);r<p;r+=s)l+=u+f.substr(r,s);c>0&&(l+=u+f.slice(r)),h&&(l="-"+l)}o=d?l+(n.decimalSeparator||"")+((c=+n.fractionGroupSize)?d.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):d):l}return(n.prefix||"")+o+(n.suffix||"")},s.toFraction=function(e){var t,o,i,r,a,s,u,d,h,f,m,w,g=this,b=g.c;if(null!=e&&(!(u=new A(e)).isInteger()&&(u.c||1!==u.s)||u.lt(c)))throw Error(Bh+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+C(u));if(!b)return new A(g);for(t=new A(c),h=o=new A(c),i=d=new A(c),w=qh(b),a=t.e=w.length-g.e-1,t.c[0]=Oh[(s=a%Rh)<0?Rh+s:s],e=!e||u.comparedTo(t)>0?a>0?t:h:u,s=p,p=1/0,u=new A(w),d.c[0]=0;f=n(u,t,0,1),1!=(r=o.plus(f.times(i))).comparedTo(e);)o=i,i=r,h=d.plus(f.times(r=h)),d=r,t=u.minus(f.times(r=t)),u=r;return r=n(e.minus(o),i,0,1),d=d.plus(r.times(h)),o=o.plus(r.times(i)),d.s=h.s=g.s,m=n(h,i,a*=2,l).minus(g).abs().comparedTo(n(d,o,a,l).minus(g).abs())<1?[h,i]:[d,o],p=s,m},s.toNumber=function(){return+C(this)},s.toPrecision=function(e,t){return null!=e&&Vh(e,1,Dh),k(this,e,t,2)},s.toString=function(e){var t,n=this,i=n.s,r=n.e;return null===r?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=r<=d||r>=h?Gh(qh(n.c),r):Jh(qh(n.c),r,"0"):10===e&&v?t=Jh(qh((n=x(new A(n),u+r+1,l)).c),n.e,"0"):(Vh(e,2,y.length,"Base"),t=o(Jh(qh(n.c),r,"0"),10,e,i,!0)),i<0&&n.c[0]&&(t="-"+t)),t},s.valueOf=s.toJSON=function(){return C(this)},s.xe=!0,s[Symbol.toStringTag]="BigNumber",s[Symbol.for("nodejs.util.inspect.custom")]=s.valueOf,null!=t&&A.set(t),A}();const zh=({action:e,initialValues:o,onSubmit:i,onCancel:r,isSubmitting:a=!1,tokenInfo:c,nftInfo:u,disabled:l=!1})=>{const{t:d,ti:h}=s(),f=xh[e],[p,m]=n.useState(()=>{if(!f)return{};const e={};return f.fields.forEach(t=>{e[t.key]=o[t.key]||""}),e}),[w]=n.useState(()=>["send_native","send_token","swap_token"].includes(e)&&!c&&p.contract_address?d("formTokenNotFound"):null),[g,b]=n.useState(()=>{const t={};if(["send_native","send_token","swap_token"].includes(e)&&c){const e=parseFloat(c.balanceFormatted||"0");if(e<=0)t.amount=h("formNoBalance",{symbol:c.symbol??""});else{const n=o.amount?.trim();n&&Ch(n)&&parseFloat(n)>e&&(t.amount=h("formInsufficientBalance",{balance:c.balanceFormatted,symbol:c.symbol??""}))}}return t}),y=n.useCallback((e,t)=>{m(n=>({...n,[e]:t})),g[e]&&b(t=>{const n={...t};return delete n[e],n})},[g]),v=n.useCallback(()=>{if(!f)return!1;const t={};if(f.fields.forEach(n=>{const o=p[n.key]?.trim()||"";!n.required||o||"send_nft"===e&&"amount"===n.key?o&&("address"!==n.validation||tt(o)||(t[n.key]=d("formInvalidAddress")),"amount"!==n.validation||Ch(o)||(t[n.key]=d("formMustBePositive")),"amount"===n.key&&o&&Ch(o)&&c?.balanceFormatted&&parseFloat(o)>parseFloat(c.balanceFormatted)&&(t[n.key]=h("formInsufficientBalance",{balance:c.balanceFormatted,symbol:c.symbol??""})),"positive_number"===n.validation&&(isNaN(Number(o))||Number(o)<0)&&(t[n.key]=d("formMustBeValidNumber"))):t[n.key]=h("formFieldRequired",{field:d(n.label)})}),"send_nft"===e&&"ERC1155"===p.token_standard?.toUpperCase()){const e=p.amount?.trim();if(e)if(!/^\d+$/.test(e)||parseInt(e,10)<1)t.amount=d("formMustBePositiveInteger");else{const n=parseInt(o.maxAmount||"0",10);n>0&&parseInt(e,10)>n&&(t.amount=h("formAmountExceedsNft",{max:String(n)}))}else t.amount=h("formFieldRequired",{field:d("fieldAmount")})}return b(t),0===Object.keys(t).length},[f,p,c,e,o,d,h]),A=n.useCallback(()=>{v()&&i(e,p)},[v,i,e,p]);return f?t.jsxs("div",{className:"action-form",children:[t.jsx("div",{className:"action-form-title",children:t.jsx("span",{children:d(f.label)})}),w&&t.jsxs("div",{className:"action-form-general-error",children:["⚠️ ",w]}),c&&t.jsx("div",{className:"action-form-token-info",children:t.jsxs("div",{className:"token-info-row",children:[c.logo&&t.jsx("img",{src:c.logo,alt:c.symbol,className:"token-info-logo",width:20,height:20}),t.jsxs("div",{className:"token-info-details",children:[t.jsxs("span",{className:"token-info-name",children:[c.name," (",c.symbol,")"]}),t.jsxs("span",{className:"token-info-balance",children:[d("spendable"),": ",Yh(c.balanceFormatted).decimalPlaces(8,Yh.ROUND_DOWN).toFormat()," ",c.symbol,void 0!==c.usdValue&&t.jsxs("span",{className:"token-info-usd",children:[" ","≈ $",c.usdValue.toFixed(2)]})]})]})]})}),u?.image&&t.jsx("div",{className:"action-form-nft-info",children:t.jsx("img",{src:u.image,alt:u.name,className:"nft-info-image",onError:e=>{e.target.style.display="none"}})}),t.jsx("div",{className:"action-form-fields",children:f.fields.map(n=>n.hidden||"amount"===n.key&&"send_nft"===e&&"ERC1155"!==p.token_standard?.toUpperCase()||["decimals"].includes(n.key)&&"send_token"===e&&o.decimals?null:t.jsxs("div",{className:"action-form-field",children:[t.jsxs("div",{className:"action-form-field-header",children:[t.jsxs("div",{className:"action-form-field-label",children:[d(n.label),n.required&&" *"]}),"amount"===n.key&&c&&"send_nft"!==e&&t.jsxs("div",{className:"action-form-pct-btns",children:[[25,50,75].map(e=>t.jsxs("button",{type:"button",className:"action-form-pct-btn",onClick:()=>y("amount",Yh(c.balanceFormatted).multipliedBy(e).dividedBy(100).decimalPlaces(c.decimals,Yh.ROUND_DOWN).toFixed()),disabled:a||l,children:[e,"%"]},e)),t.jsx("button",{type:"button",className:"action-form-pct-btn action-form-max-btn",onClick:()=>y("amount",c.balanceFormatted),disabled:a||l,children:d("formMax")})]}),"amount"===n.key&&"send_nft"===e&&u&&t.jsx("div",{className:"action-form-pct-btns",children:t.jsx("button",{type:"button",className:"action-form-pct-btn action-form-max-btn",onClick:()=>y("amount",o.maxAmount||""),disabled:a||l,children:d("formMax")})})]}),(()=>{const e=!1===n.editable&&!!o[n.key]||l,i=a||e,r=[g[n.key]?"error":"",e?"readonly":""].filter(Boolean).join(" ");return"address"===n.type?t.jsx("textarea",{rows:2,placeholder:n.placeholder,value:p[n.key]||"",onChange:e=>y(n.key,e.target.value),className:r,disabled:i||l}):t.jsx("input",{type:"number"===n.type?"number":"text",placeholder:n.placeholder,value:p[n.key]||"",onChange:e=>y(n.key,e.target.value),className:r,disabled:i||l})})(),g[n.key]&&t.jsx("span",{className:"field-error",children:g[n.key]})]},n.key))}),!l&&t.jsxs("div",{className:"action-form-actions",children:[t.jsx("button",{className:"message-button",onClick:r,type:"button",disabled:a,children:d("formCancel")}),t.jsx("button",{className:"message-button",onClick:A,type:"button",disabled:a,children:d(a?"formProcessing":"formExecute")})]})]}):null},jh=({scrollContainerRef:e,threshold:o=200})=>{const[i,r]=n.useState(!1);return n.useEffect(()=>{const t=e.current;if(!t)return;const n=()=>{const{scrollTop:e,scrollHeight:n,clientHeight:i}=t;r(n-e-i>o)};return t.addEventListener("scroll",n,{passive:!0}),n(),()=>{t.removeEventListener("scroll",n)}},[e,o]),i?t.jsx("button",{className:"scroll-to-bottom-btn",onClick:()=>{e.current?.scrollTo({top:e.current.scrollHeight,behavior:"smooth"})},"aria-label":"Scroll to bottom",type:"button",children:t.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:t.jsx("path",{d:"M9 3V15M9 15L4 10M9 15L14 10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}):null};var Xh,Qh,Kh={},Zh={exports:{}},_h=Zh.exports;var $h=function(){if(Qh)return Kh;Qh=1,Object.defineProperty(Kh,"S",{value:!0});var e,t,o,i=n,r=(e=i)&&"object"==typeof e&&"default"in e?e.default:e,a=(Xh||(Xh=1,t=Zh,o=Zh.exports,function(e,n){var i="function",r="undefined",a="object",s="string",c="major",u="model",l="name",d="type",h="vendor",f="version",p="architecture",m="console",w="mobile",g="tablet",b="smarttv",y="wearable",v="embedded",A="Amazon",k="Apple",T="ASUS",E="BlackBerry",x="Browser",C="Chrome",I="Firefox",S="Google",N="Honor",B="Huawei",M="LG",U="Microsoft",R="Motorola",P="Nvidia",O="OnePlus",L="Opera",D="OPPO",F="Samsung",q="Sharp",H="Sony",V="Xiaomi",W="Zebra",G="Facebook",J="Chromium OS",Y="Mac OS",z=" Browser",j=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},X=function(e,t){return typeof e===s&&-1!==Q(t).indexOf(Q(e))},Q=function(e){return e.toLowerCase()},K=function(e,t){if(typeof e===s)return e=e.replace(/^\s\s*/,""),typeof t===r?e:e.substring(0,500)},Z=function(e,t){for(var o,r,s,c,u,l,d=0;d<t.length&&!u;){var h=t[d],f=t[d+1];for(o=r=0;o<h.length&&!u&&h[o];)if(u=h[o++].exec(e))for(s=0;s<f.length;s++)l=u[++r],typeof(c=f[s])===a&&c.length>0?2===c.length?typeof c[1]==i?this[c[0]]=c[1].call(this,l):this[c[0]]=c[1]:3===c.length?typeof c[1]!==i||c[1].exec&&c[1].test?this[c[0]]=l?l.replace(c[1],c[2]):n:this[c[0]]=l?c[1].call(this,l,c[2]):n:4===c.length&&(this[c[0]]=l?c[3].call(this,l.replace(c[1],c[2])):n):this[c]=l||n;d+=2}},_=function(e,t){for(var o in t)if(typeof t[o]===a&&t[o].length>0){for(var i=0;i<t[o].length;i++)if(X(t[o][i],e))return"?"===o?n:o}else if(X(t[o],e))return"?"===o?n:o;return t.hasOwnProperty("*")?t["*"]:e},$={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"},ee={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[f,[l,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[f,[l,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[l,f],[/opios[\/ ]+([\w\.]+)/i],[f,[l,L+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[f,[l,L+" GX"]],[/\bopr\/([\w\.]+)/i],[f,[l,L]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[f,[l,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[f,[l,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/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|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[l,f],[/quark(?:pc)?\/([-\w\.]+)/i],[f,[l,"Quark"]],[/\bddg\/([\w\.]+)/i],[f,[l,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[f,[l,"UC"+x]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[f,[l,"WeChat"]],[/konqueror\/([\w\.]+)/i],[f,[l,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[f,[l,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[f,[l,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[f,[l,"Smart Lenovo "+x]],[/(avast|avg)\/([\w\.]+)/i],[[l,/(.+)/,"$1 Secure "+x],f],[/\bfocus\/([\w\.]+)/i],[f,[l,I+" Focus"]],[/\bopt\/([\w\.]+)/i],[f,[l,L+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[f,[l,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[f,[l,"Dolphin"]],[/coast\/([\w\.]+)/i],[f,[l,L+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[f,[l,"MIUI"+z]],[/fxios\/([\w\.-]+)/i],[f,[l,I]],[/\bqihoobrowser\/?([\w\.]*)/i],[f,[l,"360"]],[/\b(qq)\/([\w\.]+)/i],[[l,/(.+)/,"$1Browser"],f],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[l,/(.+)/,"$1"+z],f],[/samsungbrowser\/([\w\.]+)/i],[f,[l,F+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[f,[l,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[l,"Sogou Mobile"],f],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[l,f],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[l],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[f,l],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[l,G],f],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\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],[l,f],[/\bgsa\/([\w\.]+) .*safari\//i],[f,[l,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[f,[l,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[f,[l,C+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[l,C+" WebView"],f],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[f,[l,"Android "+x]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[l,f],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[f,[l,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[f,l],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[l,[f,_,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[l,f],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[l,"Netscape"],f],[/(wolvic|librewolf)\/([\w\.]+)/i],[l,f],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[f,[l,I+" 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,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[l,[f,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[l,[f,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[p,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[p,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[p,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[p,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[p,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[p,/ower/,"",Q]],[/ sun4\w[;\)]/i],[[p,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[p,Q]]],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],[u,[h,F],[d,g]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[u,[h,F],[d,w]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[u,[h,k],[d,w]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[h,k],[d,g]],[/(macintosh);/i],[u,[h,k]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[h,q],[d,w]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[u,[h,N],[d,g]],[/honor([-\w ]+)[;\)]/i],[u,[h,N],[d,w]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[u,[h,B],[d,g]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[h,B],[d,w]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[u,/_/g," "],[h,V],[d,g]],[/\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,/ ([\w ]+) miui\/v?\d/i],[[u,/_/g," "],[h,V],[d,w]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[u,[h,D],[d,w]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[u,[h,_,{OnePlus:["304","403","203"],"*":D}],[d,g]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[h,"Vivo"],[d,w]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[u,[h,"Realme"],[d,w]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[u,[h,R],[d,w]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[h,R],[d,g]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[h,M],[d,g]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[h,M],[d,w]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[u,[h,"Lenovo"],[d,g]],[/(nokia) (t[12][01])/i],[h,u,[d,g]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[u,/_/g," "],[d,w],[h,"Nokia"]],[/(pixel (c|tablet))\b/i],[u,[h,S],[d,g]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[h,S],[d,w]],[/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],[u,[h,H],[d,w]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[h,H],[d,g]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[h,O],[d,w]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[h,A],[d,g]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[h,A],[d,w]],[/(playbook);[-\w\),; ]+(rim)/i],[u,h,[d,g]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[h,E],[d,w]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[h,T],[d,g]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[h,T],[d,w]],[/(nexus 9)/i],[u,[h,"HTC"],[d,g]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[u,/_/g," "],[d,w]],[/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],[u,[h,"TCL"],[d,g]],[/(itel) ((\w+))/i],[[h,Q],u,[d,_,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[h,"Acer"],[d,g]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[h,"Meizu"],[d,w]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[u,[h,"Ulefone"],[d,w]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[u,[h,"Energizer"],[d,w]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[u,[h,"Cat"],[d,w]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[u,[h,"Smartfren"],[d,w]],[/droid.+; (a(?:015|06[35]|142p?))/i],[u,[h,"Nothing"],[d,w]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[u,[h,"Archos"],[d,g]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[u,[h,"Archos"],[d,w]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[h,u,[d,g]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[h,u,[d,w]],[/(kobo)\s(ereader|touch)/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],[h,u,[d,g]],[/(surface duo)/i],[u,[h,U],[d,g]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[h,"Fairphone"],[d,w]],[/(u304aa)/i],[u,[h,"AT&T"],[d,w]],[/\bsie-(\w*)/i],[u,[h,"Siemens"],[d,w]],[/\b(rct\w+) b/i],[u,[h,"RCA"],[d,g]],[/\b(venue[\d ]{2,7}) b/i],[u,[h,"Dell"],[d,g]],[/\b(q(?:mv|ta)\w+) b/i],[u,[h,"Verizon"],[d,g]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[h,"Barnes & Noble"],[d,g]],[/\b(tm\d{3}\w+) b/i],[u,[h,"NuVision"],[d,g]],[/\b(k88) b/i],[u,[h,"ZTE"],[d,g]],[/\b(nx\d{3}j) b/i],[u,[h,"ZTE"],[d,w]],[/\b(gen\d{3}) b.+49h/i],[u,[h,"Swiss"],[d,w]],[/\b(zur\d{3}) b/i],[u,[h,"Swiss"],[d,g]],[/\b((zeki)?tb.*\b) b/i],[u,[h,"Zeki"],[d,g]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],u,[d,g]],[/\b(ns-?\w{0,9}) b/i],[u,[h,"Insignia"],[d,g]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[h,"NextBook"],[d,g]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],u,[d,w]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],u,[d,w]],[/\b(ph-1) /i],[u,[h,"Essential"],[d,w]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[h,"Envizen"],[d,g]],[/\b(trio[-\w\. ]+) b/i],[u,[h,"MachSpeed"],[d,g]],[/\btu_(1491) b/i],[u,[h,"Rotor"],[d,g]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[u,[h,P],[d,g]],[/(sprint) (\w+)/i],[h,u,[d,w]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[h,U],[d,w]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[h,W],[d,g]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[h,W],[d,w]],[/smart-tv.+(samsung)/i],[h,[d,b]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[h,F],[d,b]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,M],[d,b]],[/(apple) ?tv/i],[h,[u,k+" TV"],[d,b]],[/crkey/i],[[u,C+"cast"],[h,S],[d,b]],[/droid.+aft(\w+)( bui|\))/i],[u,[h,A],[d,b]],[/(shield \w+ tv)/i],[u,[h,P],[d,b]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[u,[h,q],[d,b]],[/(bravia[\w ]+)( bui|\))/i],[u,[h,H],[d,b]],[/(mi(tv|box)-?\w+) bui/i],[u,[h,V],[d,b]],[/Hbbtv.*(technisat) (.*);/i],[h,u,[d,b]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[h,K],[u,K],[d,b]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[u,[d,b]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,b]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,u,[d,m]],[/droid.+; (shield)( bui|\))/i],[u,[h,P],[d,m]],[/(playstation \w+)/i],[u,[h,H],[d,m]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[h,U],[d,m]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[u,[h,F],[d,y]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[h,u,[d,y]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[u,[h,D],[d,y]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[u,[h,k],[d,y]],[/(opwwe\d{3})/i],[u,[h,O],[d,y]],[/(moto 360)/i],[u,[h,R],[d,y]],[/(smartwatch 3)/i],[u,[h,H],[d,y]],[/(g watch r)/i],[u,[h,M],[d,y]],[/droid.+; (wt63?0{2,3})\)/i],[u,[h,W],[d,y]],[/droid.+; (glass) \d/i],[u,[h,S],[d,y]],[/(pico) (4|neo3(?: link|pro)?)/i],[h,u,[d,y]],[/; (quest( \d| pro)?)/i],[u,[h,G],[d,y]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[d,v]],[/(aeobc)\b/i],[u,[h,A],[d,v]],[/(homepod).+mac os/i],[u,[h,k],[d,v]],[/windows iot/i],[[d,v]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[u,[d,w]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[d,g]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,g]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,w]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[u,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[f,[l,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[l,f],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[l,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[l,f],[/ladybird\//i],[[l,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[f,l]],os:[[/microsoft (windows) (vista|xp)/i],[l,f],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[l,[f,_,$]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[f,_,$],[l,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[f,/_/g,"."],[l,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[l,Y],[f,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[f,l],[/(ubuntu) ([\w\.]+) like android/i],[[l,/(.+)/,"$1 Touch"],f],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[l,f],[/\(bb(10);/i],[f,[l,E]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[f,[l,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[f,[l,I+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[f,[l,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[f,[l,"watchOS"]],[/crkey\/([\d\.]+)/i],[f,[l,C+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[l,J],f],[/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)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[l,f],[/(sunos) ?([\w\.\d]*)/i],[[l,"Solaris"],f],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[l,f]]},te=function(t,o){if(typeof t===a&&(o=t,t=n),!(this instanceof te))return new te(t,o).getResult();var m=typeof e!==r&&e.navigator?e.navigator:n,b=t||(m&&m.userAgent?m.userAgent:""),y=m&&m.userAgentData?m.userAgentData:n,v=o?function(e,t){var n={};for(var o in e)t[o]&&t[o].length%2==0?n[o]=t[o].concat(e[o]):n[o]=e[o];return n}(ee,o):ee,A=m&&m.userAgent==b;return this.getBrowser=function(){var e,t={};return t[l]=n,t[f]=n,Z.call(t,b,v.browser),t[c]=typeof(e=t[f])===s?e.replace(/[^\d\.]/g,"").split(".")[0]:n,A&&m&&m.brave&&typeof m.brave.isBrave==i&&(t[l]="Brave"),t},this.getCPU=function(){var e={};return e[p]=n,Z.call(e,b,v.cpu),e},this.getDevice=function(){var e={};return e[h]=n,e[u]=n,e[d]=n,Z.call(e,b,v.device),A&&!e[d]&&y&&y.mobile&&(e[d]=w),A&&"Macintosh"==e[u]&&m&&typeof m.standalone!==r&&m.maxTouchPoints&&m.maxTouchPoints>2&&(e[u]="iPad",e[d]=g),e},this.getEngine=function(){var e={};return e[l]=n,e[f]=n,Z.call(e,b,v.engine),e},this.getOS=function(){var e={};return e[l]=n,e[f]=n,Z.call(e,b,v.os),A&&!e[l]&&y&&y.platform&&"Unknown"!=y.platform&&(e[l]=y.platform.replace(/chrome os/i,J).replace(/macos/i,Y)),e},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 b},this.setUA=function(e){return b=typeof e===s&&e.length>500?K(e,500):e,this},this.setUA(b),this};te.VERSION="1.0.41",te.BROWSER=j([l,f,c]),te.CPU=j([p]),te.DEVICE=j([u,h,d,m,w,b,g,y,v]),te.ENGINE=te.OS=j([l,f]),t.exports&&(o=t.exports=te),o.UAParser=te;var ne=typeof e!==r&&(e.jQuery||e.Zepto);if(ne&&!ne.ua){var oe=new te;ne.ua=oe.getResult(),ne.ua.get=function(){return oe.getUA()},ne.ua.set=function(e){oe.setUA(e);var t=oe.getResult();for(var n in t)ne.ua[n]=t[n]}}}("object"==typeof window?window:_h)),Zh.exports),s=new a,c=s.getBrowser(),u=s.getCPU(),l=s.getDevice(),d=s.getEngine(),h=s.getOS(),f=s.getUA(),p=function(e){return s.setUA(e)},m=function(e){if(e){var t=new a(e);return{UA:t,browser:t.getBrowser(),cpu:t.getCPU(),device:t.getDevice(),engine:t.getEngine(),os:t.getOS(),ua:t.getUA(),setUserAgent:function(e){return t.setUA(e)}}}},w=Object.freeze({ClientUAInstance:s,browser:c,cpu:u,device:l,engine:d,os:h,ua:f,setUa:p,parseUserAgent:m});function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function b(e){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(){return v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},v.apply(this,arguments)}function A(e){return(A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function k(e,t){return(k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function T(e,t){if(null==e)return{};var n,o,i=function(e,t){if(null==e)return{};var n,o,i={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function E(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var C="mobile",I="tablet",S="smarttv",N="console",B="wearable",M="embedded",U=void 0,R={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"},P={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},O={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},L=function(e){return e||(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none")},D=function(){return!("undefined"==typeof window||!window.navigator&&!navigator)&&(window.navigator||navigator)},F=function(e){var t=D();return t&&t.platform&&(-1!==t.platform.indexOf(e)||"MacIntel"===t.platform&&t.maxTouchPoints>1&&!window.MSStream)},q=function(e){return e.type===C},H=function(e){return e.type===I},V=function(e){var t=e.type;return t===C||t===I},W=function(e){return e.type===S},G=function(e){return e.type===U},J=function(e){return e.type===B},Y=function(e){return e.type===N},z=function(e){return e.type===M},j=function(e){var t=e.vendor;return L(t)},X=function(e){var t=e.model;return L(t)},Q=function(e){var t=e.type;return L(t,"browser")},K=function(e){return e.name===P.Android},Z=function(e){return e.name===P.Windows},_=function(e){return e.name===P.MAC_OS},$=function(e){return e.name===P.WindowsPhone},ee=function(e){return e.name===P.IOS},te=function(e){var t=e.version;return L(t)},ne=function(e){var t=e.name;return L(t)},oe=function(e){return e.name===R.Chrome},ie=function(e){return e.name===R.Firefox},re=function(e){return e.name===R.Chromium},ae=function(e){return e.name===R.Edge},se=function(e){return e.name===R.Yandex},ce=function(e){var t=e.name;return t===R.Safari||t===R.MobileSafari},ue=function(e){return e.name===R.MobileSafari},le=function(e){return e.name===R.Opera},de=function(e){var t=e.name;return t===R.InternetExplorer||t===R.Ie},he=function(e){return e.name===R.MIUI},fe=function(e){return e.name===R.SamsungBrowser},pe=function(e){var t=e.version;return L(t)},me=function(e){var t=e.major;return L(t)},we=function(e){var t=e.name;return L(t)},ge=function(e){var t=e.name;return L(t)},be=function(e){var t=e.version;return L(t)},ye=function(){var e=D(),t=e&&e.userAgent&&e.userAgent.toLowerCase();return"string"==typeof t&&/electron/.test(t)},ve=function(e){return"string"==typeof e&&-1!==e.indexOf("Edg/")},Ae=function(){var e=D();return e&&(/iPad|iPhone|iPod/.test(e.platform)||"MacIntel"===e.platform&&e.maxTouchPoints>1)&&!window.MSStream},ke=function(){return F("iPad")},Te=function(){return F("iPhone")},Ee=function(){return F("iPod")},xe=function(e){return L(e)};function Ce(e){var t=e||w,n=t.device,o=t.browser,i=t.os,r=t.engine,a=t.ua;return{isSmartTV:W(n),isConsole:Y(n),isWearable:J(n),isEmbedded:z(n),isMobileSafari:ue(o)||ke(),isChromium:re(o),isMobile:V(n)||ke(),isMobileOnly:q(n),isTablet:H(n)||ke(),isBrowser:G(n),isDesktop:G(n),isAndroid:K(i),isWinPhone:$(i),isIOS:ee(i)||ke(),isChrome:oe(o),isFirefox:ie(o),isSafari:ce(o),isOpera:le(o),isIE:de(o),osVersion:te(i),osName:ne(i),fullBrowserVersion:pe(o),browserVersion:me(o),browserName:we(o),mobileVendor:j(n),mobileModel:X(n),engineName:ge(r),engineVersion:be(r),getUA:xe(a),isEdge:ae(o)||ve(a),isYandex:se(o),deviceType:Q(n),isIOS13:Ae(),isIPad13:ke(),isIPhone13:Te(),isIPod13:Ee(),isElectron:ye(),isEdgeChromium:ve(a),isLegacyEdge:ae(o)&&!ve(a),isWindows:Z(i),isMacOs:_(i),isMIUI:he(o),isSamsungBrowser:fe(o)}}var Ie=W(l),Se=Y(l),Ne=J(l),Be=z(l),Me=ue(c)||ke(),Ue=re(c),Re=V(l)||ke(),Pe=q(l),Oe=H(l)||ke(),Le=G(l),De=G(l),Fe=K(h),qe=$(h),He=ee(h)||ke(),Ve=oe(c),We=ie(c),Ge=ce(c),Je=le(c),Ye=de(c),ze=te(h),je=ne(h),Xe=pe(c),Qe=me(c),Ke=we(c),Ze=j(l),_e=X(l),$e=ge(d),et=be(d),tt=xe(f),nt=ae(c)||ve(f),ot=se(c),it=Q(l),rt=Ae(),at=ke(),st=Te(),ct=Ee(),ut=ye(),lt=ve(f),dt=ae(c)&&!ve(f),ht=Z(h),ft=_(h),pt=he(c),mt=fe(c);function wt(e){var t=e||window.navigator.userAgent;return m(t)}return Kh.AndroidView=function(e){var t=e.renderWithFragment,n=e.children,o=T(e,["renderWithFragment","children"]);return Fe?t?r.createElement(i.Fragment,null,n):r.createElement("div",o,n):null},Kh.BrowserTypes=R,Kh.BrowserView=function(e){var t=e.renderWithFragment,n=e.children,o=T(e,["renderWithFragment","children"]);return Le?t?r.createElement(i.Fragment,null,n):r.createElement("div",o,n):null},Kh.ConsoleView=function(e){var t=e.renderWithFragment,n=e.children,o=T(e,["renderWithFragment","children"]);return Se?t?r.createElement(i.Fragment,null,n):r.createElement("div",o,n):null},Kh.CustomView=function(e){var t=e.renderWithFragment,n=e.children;e.viewClassName,e.style;var o=e.condition,a=T(e,["renderWithFragment","children","viewClassName","style","condition"]);return o?t?r.createElement(i.Fragment,null,n):r.createElement("div",a,n):null},Kh.IEView=function(e){var t=e.renderWithFragment,n=e.children,o=T(e,["renderWithFragment","children"]);return Ye?t?r.createElement(i.Fragment,null,n):r.createElement("div",o,n):null},Kh.IOSView=function(e){var t=e.renderWithFragment,n=e.children,o=T(e,["renderWithFragment","children"]);return He?t?r.createElement(i.Fragment,null,n):r.createElement("div",o,n):null},Kh.MobileOnlyView=function(e){var t=e.renderWithFragment,n=e.children;e.viewClassName,e.style;var o=T(e,["renderWithFragment","children","viewClassName","style"]);return Pe?t?r.createElement(i.Fragment,null,n):r.createElement("div",o,n):null},Kh.MobileView=function(e){var t=e.renderWithFragment,n=e.children,o=T(e,["renderWithFragment","children"]);return Re?t?r.createElement(i.Fragment,null,n):r.createElement("div",o,n):null},Kh.OsTypes=P,Kh.SmartTVView=function(e){var t=e.renderWithFragment,n=e.children,o=T(e,["renderWithFragment","children"]);return Ie?t?r.createElement(i.Fragment,null,n):r.createElement("div",o,n):null},Kh.TabletView=function(e){var t=e.renderWithFragment,n=e.children,o=T(e,["renderWithFragment","children"]);return Oe?t?r.createElement(i.Fragment,null,n):r.createElement("div",o,n):null},Kh.WearableView=function(e){var t=e.renderWithFragment,n=e.children,o=T(e,["renderWithFragment","children"]);return Ne?t?r.createElement(i.Fragment,null,n):r.createElement("div",o,n):null},Kh.WinPhoneView=function(e){var t=e.renderWithFragment,n=e.children,o=T(e,["renderWithFragment","children"]);return qe?t?r.createElement(i.Fragment,null,n):r.createElement("div",o,n):null},Kh.browserName=Ke,Kh.browserVersion=Qe,Kh.deviceDetect=function(e){var t=e?m(e):w,n=t.device,o=t.browser,i=t.engine,r=t.os,a=t.ua,s=function(e){switch(e){case C:return{isMobile:!0};case I:return{isTablet:!0};case S:return{isSmartTV:!0};case N:return{isConsole:!0};case B:return{isWearable:!0};case U:return{isBrowser:!0};case M:return{isEmbedded:!0};default:return O}}(n.type),c=s.isBrowser,u=s.isMobile,l=s.isTablet,d=s.isSmartTV,h=s.isConsole,f=s.isWearable,p=s.isEmbedded;return c?function(e,t,n,o,i){return{isBrowser:e,browserMajorVersion:L(t.major),browserFullVersion:L(t.version),browserName:L(t.name),engineName:L(n.name),engineVersion:L(n.version),osName:L(o.name),osVersion:L(o.version),userAgent:L(i)}}(c,o,i,r,a):d?function(e,t,n,o){return{isSmartTV:e,engineName:L(t.name),engineVersion:L(t.version),osName:L(n.name),osVersion:L(n.version),userAgent:L(o)}}(d,i,r,a):h?function(e,t,n,o){return{isConsole:e,engineName:L(t.name),engineVersion:L(t.version),osName:L(n.name),osVersion:L(n.version),userAgent:L(o)}}(h,i,r,a):u||l?function(e,t,n,o){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach(function(t){y(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e,{vendor:L(t.vendor),model:L(t.model),os:L(n.name),osVersion:L(n.version),ua:L(o)})}(s,n,r,a):f?function(e,t,n,o){return{isWearable:e,engineName:L(t.name),engineVersion:L(t.version),osName:L(n.name),osVersion:L(n.version),userAgent:L(o)}}(f,i,r,a):p?function(e,t,n,o,i){return{isEmbedded:e,vendor:L(t.vendor),model:L(t.model),engineName:L(n.name),engineVersion:L(n.version),osName:L(o.name),osVersion:L(o.version),userAgent:L(i)}}(p,n,i,r,a):void 0},Kh.deviceType=it,Kh.engineName=$e,Kh.engineVersion=et,Kh.fullBrowserVersion=Xe,Kh.getSelectorsByUserAgent=function(e){if(e&&"string"==typeof e){var t=m(e);return Ce({device:t.device,browser:t.browser,os:t.os,engine:t.engine,ua:t.ua})}},Kh.getUA=tt,Kh.isAndroid=Fe,Kh.isBrowser=Le,Kh.isChrome=Ve,Kh.isChromium=Ue,Kh.isConsole=Se,Kh.isDesktop=De,Kh.isEdge=nt,Kh.isEdgeChromium=lt,Kh.isElectron=ut,Kh.isEmbedded=Be,Kh.isFirefox=We,Kh.isIE=Ye,Kh.isIOS=He,Kh.isIOS13=rt,Kh.isIPad13=at,Kh.isIPhone13=st,Kh.isIPod13=ct,Kh.isLegacyEdge=dt,Kh.isMIUI=pt,Kh.isMacOs=ft,Kh.isMobile=Re,Kh.isMobileOnly=Pe,Kh.isMobileSafari=Me,Kh.isOpera=Je,Kh.isSafari=Ge,Kh.isSamsungBrowser=mt,Kh.isSmartTV=Ie,Kh.isTablet=Oe,Kh.isWearable=Ne,Kh.isWinPhone=qe,Kh.isWindows=ht,Kh.isYandex=ot,Kh.mobileModel=_e,Kh.mobileVendor=Ze,Kh.osName=je,Kh.osVersion=ze,Kh.parseUserAgent=m,Kh.setUserAgent=function(e){return p(e)},Kh.useDeviceData=wt,Kh.useDeviceSelectors=function(e){var t=wt(e||window.navigator.userAgent);return[Ce(t),t]},Kh.useMobileOrientation=function(){var e,t,n=(e=i.useState(function(){var e=window.innerWidth>window.innerHeight?90:0;return{isPortrait:0===e,isLandscape:90===e,orientation:0===e?"portrait":"landscape"}}),t=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,i,r=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(o=n.next()).done)&&(r.push(o.value),!t||r.length!==t);a=!0);}catch(c){s=!0,i=c}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0],r=n[1],a=i.useCallback(function(){var e=window.innerWidth>window.innerHeight?90:0,t={isPortrait:0===e,isLandscape:90===e,orientation:0===e?"portrait":"landscape"};o.orientation!==t.orientation&&r(t)},[o.orientation]);return i.useEffect(function(){return void 0!==("undefined"==typeof window?"undefined":b(window))&&Re&&(a(),window.addEventListener("load",a,!1),window.addEventListener("resize",a,!1)),function(){window.removeEventListener("resize",a,!1),window.removeEventListener("load",a,!1)}},[a]),o},Kh.withOrientationChange=function(e){return function(t){function n(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(t=function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return E(e)}(this,A(n).call(this,e))).isEventListenerAdded=!1,t.handleOrientationChange=t.handleOrientationChange.bind(E(t)),t.onOrientationChange=t.onOrientationChange.bind(E(t)),t.onPageLoad=t.onPageLoad.bind(E(t)),t.state={isLandscape:!1,isPortrait:!1},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&k(e,t)}(n,t),o=n,(i=[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var e=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:0===e,isLandscape:90===e})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){void 0!==("undefined"==typeof window?"undefined":b(window))&&Re&&(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 r.createElement(e,v({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(o.prototype,i),n;var o,i}(r.Component)},Kh}();let ef=null;function tf(e){ef=e}const nf="dataBuyToken",of={srcTokenAddress:"",descTokenAddress:"",amount:"",srcTokenDecimals:18,descTokenDecimals:18};class rf{baseUrl;constructor(e){this.baseUrl=e}buildUrl(e,t){const n=new URL(e,this.baseUrl);return t&&Object.entries(t).forEach(([e,t])=>{null!=t&&n.searchParams.append(e,String(t))}),n.toString()}async get(e,t={}){const n=this.buildUrl(e,t.query),o=await fetch(n,{method:"GET",headers:t.headers||{},signal:t.signal});if(!o.ok){let e=null;try{e=await o.json()}catch{try{const t=await o.text();t&&(e={message:t})}catch{}}const t=new Error(e?.message||e?.errorMessage||`HTTP ${o.status}: ${o.statusText}`);throw t.status=o.status,t.statusText=o.statusText,e&&(t.data=e),t}return{data:await o.json(),status:o.status}}async post(e,t,n={}){const o=this.buildUrl(e,n.query),i=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",...n.headers},body:JSON.stringify(t),signal:n.signal});if(!i.ok){let e=null;try{e=await i.json()}catch{try{const t=await i.text();t&&(e={message:t})}catch{}}const t=new Error(e?.message||e?.errorMessage||`HTTP ${i.status}: ${i.statusText}`);throw t.status=i.status,t.statusText=i.statusText,e&&(t.data=e),t}return{data:await i.json(),status:i.status}}}const af=new class extends rf{constructor(){super("https://wallet-api.pantograph.app")}async getTokensDetails(e,t="base"){try{if(!e||!Array.isArray(e)||0===e.length)throw new Error("Addresses must be a non-empty array");const n=e.join(","),o=await this.get(`/keyrings/tokens/${t}/v2`,{query:{addresses:n}});return Array.isArray(o.data)&&(o.data=o.data.filter((e,t,n)=>t===n.findIndex(t=>t.address.toLowerCase()===e.address.toLowerCase())),Array.isArray(e)&&e.length>0&&(o.data=o.data.filter(t=>e.some(e=>e.toLowerCase()===t.address.toLowerCase())),o.data.sort((t,n)=>e.findIndex(e=>e.toLowerCase()===t.address.toLowerCase())-e.findIndex(e=>e.toLowerCase()===n.address.toLowerCase())))),o}catch(n){throw n}}async getTokenDetail(e,t="base"){try{if(!e)throw new Error("Address is required");const n=await this.getTokensDetails([e],t);return{data:n.data[0]||null,status:n.status}}catch(n){throw n}}async getTopGainers(e="base",t="24h",n=3){try{return await this.get(`/token-list/top-gainers/${e}`,{query:{duration:t,limit:n}})}catch(o){throw o}}async searchTokensByKey(e,t){try{if(!e)throw new Error("key is required");const n=await this.get("/token-list",{query:{chainId:t,key:e}});let o=n.data;return o=Object.values(o).flat(),Array.isArray(o)&&(o=o.map(e=>({...e,decimals:null!=e.decimals?Number(e.decimals):18,price:null!=e.price?Number(e.price):void 0}))),n.data=o,n}catch(n){throw n}}};function sf(e,t){return new Promise(n=>{const o=setTimeout(n,e);t?.addEventListener("abort",()=>{clearTimeout(o),n()},{once:!0})})}const cf=uh()?.webAppUrl||"https://nft.keyring.app",uf=new rf("https://wallet-api.pantograph.app"),lf=cf,df=new rf(lf);async function hf(e){const{address:t,chain:n="base",token_addresses:o,exclude_spam:i,exclude_unverified_contracts:r}=e;if(!t)throw new Error("Address is required");let a="Unknown error";for(let u=1;u<=5;u++)try{const e={chain:n,exclude_spam:i??!1,exclude_unverified_contracts:r??!1};o&&(e.token_addresses=o);const a=(await df.get(`api/moralis/proxy/wallets/${encodeURIComponent(t)}/tokens`,{query:e})).data;if(a?.result?.length>0){a.result=a.result.filter(e=>new Yh(e?.balance||0).gt(0)),a.result=a.result.map(e=>({...e,token_address:"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"===e.token_address?fi:e.token_address}));try{if(a.result.length>0){const e=Ci(n)??n,t=a.result.map(e=>e.token_address),o=await uf.get(`/keyrings/tokens/${e}/v2`,{query:{addresses:t.join(",")}});if(Array.isArray(o.data)){const e=new Map;for(const t of o.data)t.address&&e.set(t.address.toLowerCase(),{price:null!=t.price?parseFloat(String(t.price)):NaN,icon_image:t.icon_image});a.result=a.result.map(t=>{const n=e.get(t.token_address.toLowerCase());if(!n)return t;const o={...t};return n.icon_image&&(o.logo=n.icon_image,o.thumbnail=n.icon_image),isNaN(n.price)||(o.usd_price=n.price,o.usd_value=Yh(t.balance_formatted||"0").multipliedBy(n.price).toNumber()),o}),a.result=a.result.filter(e=>null==e.usd_value||new Yh(e.usd_value).gte(.01))}}}catch(s){}}return{success:!0,data:a}}catch(c){a=c instanceof Error?c.message:"Unknown error",u<5&&await sf(1e3)}return{success:!1,error:a}}async function ff(e){const{address:t,chain:n="base",signal:o}=e;if(!t)throw new Error("Token address is required");let i="Unknown error";for(let a=1;a<=5;a++){if(o?.aborted)return{success:!1,error:"Request cancelled"};try{const e=Ci(n)??n,r=await uf.get(`/keyrings/tokens/${e}/v2`,{query:{addresses:t},signal:o}),s=t===fi,c=(Array.isArray(r.data)?r.data:[]).find(e=>e.address?.toLowerCase()===t.toLowerCase()||s&&""===e.address)??null;if(c)return{success:!0,data:{token_address:c.address??t,name:c.name??"",symbol:c.symbol??"",decimals:null!=c.decimals?Number(c.decimals):18,logo:c.icon_image||c.logo,thumbnail:c.icon_image||c.logo,usd_price:null!=c.price?parseFloat(c.price):void 0,usd_price_24hr_percent_change:c.price_change_percentage_24h??void 0,usd_price_24hr_usd_change:c.price_change_24h??void 0}};const[u,l]=await Promise.allSettled([df.get("api/moralis/proxy/erc20/metadata",{query:{chain:n,addresses:[t]},signal:o}),df.get(`api/moralis/proxy/erc20/${encodeURIComponent(t)}/price`,{query:{chain:n,include:"percent_change"},signal:o})]),d="fulfilled"===u.status?u.value.data:[];if(!d||0===d.length){if(i="Token metadata not found",a<5&&await sf(1e3,o),o?.aborted)return{success:!1,error:"Request cancelled"};continue}const h=d[0],f="fulfilled"===l.status?l.value.data:void 0;return{success:!0,data:{token_address:h.token_address,name:h.name,symbol:h.symbol,decimals:h.decimals,logo:h.logo||h.thumbnail,thumbnail:h.thumbnail,usd_price:f?.usdPrice??void 0,usd_price_24hr_percent_change:f?.["24hrPercentChange"]?parseFloat(f["24hrPercentChange"]):void 0,usd_price_24hr_usd_change:f?.usdPriceChange24hr??void 0}}}catch(r){if(o?.aborted)return{success:!1,error:"Request cancelled"};if(i=r instanceof Error?r.message:"Unknown error",a<5&&await sf(1e3,o),o?.aborted)return{success:!1,error:"Request cancelled"}}}return{success:!1,error:i}}async function pf(e){const{prompt:t,model:n="gpt-4.1-mini",stream:o=!1,systemPrompt:i,signal:r}=e;if(!t)throw new Error("Prompt is required");const a=new rf(lf),s=i?`${i}\n\n---\n\n Current User's question: ${t}`:t;let c="Unknown error";for(let l=1;l<=5;l++){if(r?.aborted)return{success:!1,error:"Request cancelled"};try{const e=(await a.post("api/moralis-cortex/proxy/chat",{prompt:s,model:n,stream:o},{headers:{Accept:"application/json","Content-Type":"application/json"},signal:r})).data;if(!e?.text?.trim()){if(c="Empty response from Cortex AI",l<5&&await sf(1e3,r),r?.aborted)return{success:!1,error:"Request cancelled"};continue}return{success:!0,data:e}}catch(u){if(r?.aborted)return{success:!1,error:"Request cancelled"};if(c=u instanceof Error?u.message:"Unknown error",l<5&&await sf(1e3,r),r?.aborted)return{success:!1,error:"Request cancelled"}}}return{success:!1,error:c}}async function mf(e){const{address:t,chain:n="base",limit:o=100,exclude_spam:i=!0,cursor:r,signal:a}=e;if(!t)throw new Error("Address is required");let s="Unknown error";for(let u=1;u<=5;u++){if(a?.aborted)return{success:!1,error:"Request cancelled"};try{const e={chain:n,format:"decimal",limit:o,exclude_spam:i,media_items:!0,normalizeMetadata:!0};r&&(e.cursor=r);return{success:!0,data:(await df.get(`api/moralis/proxy/${encodeURIComponent(t)}/nft`,{query:e,signal:a})).data}}catch(c){if(a?.aborted)return{success:!1,error:"Request cancelled"};if(s=c instanceof Error?c.message:"Unknown error",u<5&&await sf(1e3,a),a?.aborted)return{success:!1,error:"Request cancelled"}}}return{success:!1,error:s}}const wf=Object.freeze(Object.defineProperty({__proto__:null,chatWithCortex:pf,getNftContractMetadata:async function(e){const{address:t,chain:n="base"}=e;if(!t)throw new Error("Contract address is required");try{return{success:!0,data:(await df.get(`api/moralis/proxy/nft/${encodeURIComponent(t)}/metadata`,{query:{chain:n}})).data}}catch(o){return{success:!1,error:o instanceof Error?o.message:"Unknown error"}}},getTokenMetadata:ff,getWalletNFTs:mf,getWalletTokenBalances:hf,moralisApi:df},Symbol.toStringTag,{value:"Module"})),gf=new rf("https://dln.debridge.finance");async function bf(e){const{chainId:t,tokenIn:n,tokenInAmount:o,tokenOut:i,accesstoken:r,slippage:a="auto",tokenOutRecipient:s}=e;if(!(t&&n&&o&&i))throw new Error("Missing required parameters: chainId, tokenIn, tokenInAmount, tokenOut");try{const e=await fetch("https://exchange-api.keyring.app/admin/setting?configs=others",{method:"GET"}),c=await e.json(),u=c?.others||{},l=u?.AFFILIATE_FEE_PERENT,d=u?.AFFILIATE_FEE_RECIPIENT,h=await gf.get("/v1.0/chain/transaction",{query:{chainId:String(t),tokenIn:n,tokenInAmount:o,tokenOut:i,slippage:String(a),tokenOutRecipient:s,accesstoken:r,affiliateFeePercent:l,affiliateFeeRecipient:d}});if(h.data?.error)throw new Error(`DeBridge API Error: ${h.data.error}`);return{success:!0,data:h.data}}catch(c){let e=c instanceof Error?c.message:"Unknown error";const t=c;t.data?.errorMessage?e=t.data.errorMessage:t.response?.data?.errorMessage?e=t.response.data.errorMessage:t.data?.message?e=t.data.message:t.response?.data?.message&&(e=t.response.data.message);const n=t.status||t.response?.status||t.statusCode||t.data?.status;return{success:!1,error:c instanceof Error?c.message:"Unknown error",status:n,errorMessage:e,errorCode:t.data?.errorCode,errorId:t.data?.errorId}}}const yf={1:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",10:"0x4200000000000000000000000000000000000006",56:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",137:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",8453:"0x4200000000000000000000000000000000000006",42161:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"},vf=[{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"}]}],Af=[{name:"deposit",type:"function",stateMutability:"payable",inputs:[],outputs:[]},{name:"withdraw",type:"function",stateMutability:"nonpayable",inputs:[{name:"wad",type:"uint256"}],outputs:[]}],kf=[{name:"safeTransferFrom",type:"function",stateMutability:"nonpayable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]}],Tf=[{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 Ef(e,t){if(t)return t;const n=xi[e];return n?.rpcUrls?.default?.http?.[0]}function xf(e){const{action:t,parameters:n,fromAddress:o,chainId:i}=e;switch(t){case"send_native":return function(e,t,n){const{to_address:o,amount:i}=e;if(!o)throw new Error("Recipient address is required");if(!i)throw new Error("Amount is required");return{from:t,to:o,data:"0x",value:hi(Yh(i).decimalPlaces(18,Yh.ROUND_DOWN).toFixed(),18).toString(),chainId:n,description:`Send ${i} native token to ${o}`}}(n,o,i);case"send_token":return function(e,t,n){const{contract_address:o,to_address:i,amount:r,decimals:a,token_symbol:s}=e;if(!o)throw new Error("Token contract address is required");if(!i)throw new Error("Recipient address is required");if(!r)throw new Error("Amount is required");const c=parseInt(a)||18,u=hi(Yh(r).decimalPlaces(c,Yh.ROUND_DOWN).toFixed(),c);return{from:t,to:o,data:wt({abi:vf,functionName:"transfer",args:[i,u]}),value:"0",chainId:n,description:`Send ${r} ${s||"tokens"} to ${i}`}}(n,o,i);case"approve_token":return function(e,t,n){const{contract_address:o,spender_address:i,amount:r,decimals:a,token_symbol:s}=e;if(!o)throw new Error("Token contract address is required");if(!i)throw new Error("Spender address is required");const c=parseInt(a)||18,u=r&&""!==r?.trim()?hi(Yh(r).decimalPlaces(c,Yh.ROUND_DOWN).toFixed(),c):_t;return{from:t,to:o,data:wt({abi:vf,functionName:"approve",args:[i,u]}),value:"0",chainId:n,description:`Approve ${r||"unlimited"} ${s||"tokens"} for ${i}`}}(n,o,i);case"wrap_native":return function(e,t,n){const{amount:o}=e;if(!o)throw new Error("Amount is required");const i=yf[n];if(!i)throw new Error(`WETH not supported on chain ${n}`);const r=hi(Yh(o).decimalPlaces(18,Yh.ROUND_DOWN).toFixed(),18).toString();return{from:t,to:i,data:wt({abi:Af,functionName:"deposit"}),value:r,chainId:n,description:`Wrap ${o} native token`}}(n,o,i);case"unwrap_native":return function(e,t,n){const{amount:o}=e;if(!o)throw new Error("Amount is required");const i=yf[n];if(!i)throw new Error(`WETH not supported on chain ${n}`);const r=hi(Yh(o).decimalPlaces(18,Yh.ROUND_DOWN).toFixed(),18);return{from:t,to:i,data:wt({abi:Af,functionName:"withdraw",args:[r]}),value:"0",chainId:n,description:`Unwrap ${o} WETH`}}(n,o,i);case"send_nft":return function(e,t,n){const{contract_address:o,token_id:i,to_address:r,token_standard:a,amount:s,nft_name:c}=e;if(!o)throw new Error("NFT contract address is required");if(!i)throw new Error("Token ID is required");if(!r)throw new Error("Recipient address is required");const u=(a||"ERC721").toUpperCase(),l=BigInt(i);let d,h;if("ERC1155"===u){const e=BigInt(s||"1");d=wt({abi:Tf,functionName:"safeTransferFrom",args:[t,r,l,e,"0x"]}),h=`Send ${e>1n?e.toString()+"x ":""}${c||"NFT"} (ERC1155 #${i}) to ${r}`}else d=wt({abi:kf,functionName:"safeTransferFrom",args:[t,r,l]}),h=`Send ${c||"NFT"} (ERC721 #${i}) to ${r}`;return{from:t,to:o,data:d,value:"0",chainId:n,description:h}}(n,o,i);default:throw new Error(`Action "${t}" does not produce a transaction`)}}async function Cf(e){const{transactionHash:t,chainId:n,pollingInterval:o=3e3,timeout:i=12e4,rpcUrl:r}=e,a=Ef(n,r);if(!a)throw new Error(`No RPC endpoint for chain ${n}`);const s=Date.now();for(;Date.now()-s<i;){try{const e=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_getTransactionReceipt",params:[t]})}),n=await e.json();if(n.result){const e=n.result;return{status:"0x1"===e.status?"success":"fail",blockNumber:e.blockNumber,gasUsed:e.gasUsed,effectiveGasPrice:e.effectiveGasPrice}}}catch(c){}await new Promise(e=>setTimeout(e,o))}throw new Error(`Transaction ${t} was not mined within ${i/1e3}s`)}async function If(e){const{tokenAddress:t,ownerAddress:n,spenderAddress:o,chainId:i,rpcUrl:r}=e,a=Ef(i,r);if(!a)return BigInt(0);try{const e=wt({abi:vf,functionName:"allowance",args:[n,o]}),i=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_call",params:[{to:t,data:e},"latest"]})}),r=await i.json();return r.result&&"0x"!==r.result?BigInt(r.result):BigInt(0)}catch(s){return BigInt(0)}}function Sf(e){const{tokenAddress:t,spenderAddress:n,fromAddress:o,chainId:i,tokenSymbol:r,amount:a}=e,s=a&&BigInt(a)>0n?BigInt(a):_t;return{from:o,to:t,data:wt({abi:vf,functionName:"approve",args:[n,s]}),value:"0",chainId:i,description:`Approve ${r||"token"} for swap`}}async function Nf(e){const{address:t,chainId:n,rpcUrl:o}=e,i=Ef(n,o);if(!i)return new Yh(0);try{const e=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_getBalance",params:[t,"latest"]})}),n=await e.json();return n.result&&"0x"!==n.result?new Yh(BigInt(n.result).toString()):new Yh(0)}catch(r){return new Yh(0)}}async function Bf(e){const{from:t,to:n,data:o,value:i,chainId:r,rpcUrl:a}=e,s=Ef(r,a);if(!s)return new Yh(0);try{const[e,r]=await Promise.all([fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_estimateGas",params:[{from:t,to:n,data:o,...i&&"0"!==i?{value:i}:{}}]})}),fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:2,method:"eth_gasPrice",params:[]})})]),[a,c]=await Promise.all([e.json(),r.json()]),u=a.result?new Yh(BigInt(a.result).toString()):new Yh(0),l=c.result?new Yh(BigInt(c.result).toString()):new Yh(0);return u.times(l).times(1.1)}catch(c){return new Yh(0)}}async function Mf(e){const{chainId:t,rpcUrl:n}=e,o=Ef(t,n);if(!o)return new Yh(0);try{const e=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_gasPrice",params:[]})}),t=await e.json();return t.result&&"0x"!==t.result?new Yh(BigInt(t.result).toString()):new Yh(0)}catch(i){return new Yh(0)}}const Uf=Object.freeze(Object.defineProperty({__proto__:null,buildApproveForSwap:Sf,buildTransaction:xf,checkAllowance:If,estimateTransactionFee:Bf,getGasPrice:Mf,getNativeBalance:Nf,getRpcUrl:Ef,isTransactionAction:function(e){return["send_native","send_token","approve_token","wrap_native","unwrap_native","send_nft"].includes(e)},waitForTransactionReceipt:Cf},Symbol.toStringTag,{value:"Module"})),Rf="gemini-2.5-flash-lite";let Pf=null,Of=null;const Lf=uh()?.webAppUrl||"https://nft.keyring.app",Df=["faq","pool","general","crypto"],Ff=new class extends rf{enableGoogleSearch=!0;constructor(){super(Lf)}getRuleLanguage(e){return e?`**LANGUAGE ADHERENCE**: You MUST respond ONLY in the language specified as: "${e||"the language of the user's current question"}". Ignore any language bias from context or history. If no language is explicitly provided, detect and follow the current question's language.`:'\n **LANGUAGE ADHERENCE**:\n - **DETECT** the language of the section labeled "CURRENT USER QUESTION" below.\n - **RESPOND ONLY** in that same language.\n - **IGNORE** any language bias from the context or history.\n '}async generateContent(e,t,n){try{const o=`\nBelow is the system context and conversation history. Use it for context but prioritize the instructions at the end.\n---\nSYSTEM CONTEXT & HISTORY:\n${t}\n---\n\n---\nCURRENT USER QUESTION:\n${e}\n---\n\n---\n### MANDATORY RULES:\n1. ${this.getRuleLanguage(n)}\n2. **HISTORY CLEANING**:\n - If any assistant response in the conversation history says it **"doesn't know"**, **"doesn't have data"**, **"cannot find info"**, or similar, you MUST **IGNORE that specific history segment**. \n - Do not let previous data failures prevent you from answering the CURRENT USER QUESTION if the information is available now or in your core knowledge.\n3. **BREVITY**: Keep your answer extremely concise (under 3000 characters).\n4. **DATA INTEGRITY**: Do not mention data gaps or historical missing info; just answer based on available info.\n---\n`,i="/api/gemini-cortex/proxy",r={model:Rf,data:{contents:[{parts:[{text:o}]}],tools:[{googleSearch:{}}]}};this.enableGoogleSearch||delete r.data.tools;const a=await this.post(i,r);return a?.data?.data?.candidates?.[0]?.content?.parts?.[0]?.text||a?.data?.candidates?.[0]?.content?.parts?.[0]?.text}catch(o){if((o?.message?.includes("search_grounding_request_per_project_per_day")||o?.data?.error?.message?.includes("search_grounding_request_per_project_per_day"))&&this.enableGoogleSearch)return this.enableGoogleSearch=!1,await this.generateContent(e,t,n);throw o}}async checkInfoQuestion(e,t){try{const o=await async function(){if(null!==Pf)return Pf;const e=await async function(){if(Of)return Of;const e=uh(),t=[],n=e?.faqInternal;n&&Array.isArray(n.data)&&t.push(...n.data);const o=e?.faqUrl||"";if(o)try{const e=await fetch(o),n=await e.json();Array.isArray(n?.data)&&t.push(...n.data)}catch(i){}return Of=t,t}();return 0===e.length?(Pf="",""):(Pf=e.map((e,t)=>{const n=Object.keys(e.question),o=n.map(t=>e.question[t]?.trim()).filter(Boolean),i=n.map(t=>e.answer[t]?.trim()).filter(Boolean),r=o.join(" | ")||"",a=i[0]||"";return r?`[${t}] Q: ${r}\n A: ${a}`:""}).filter(Boolean).join("\n"),Pf)}(),i=t+`---\nCURRENT USER QUESTION:\n${e}\n---`+(o?`\n\n## FAQ KNOWLEDGE BASE\n${o}\n\n`:"\n\n")+'Classify this question. Return ONLY a JSON object — no markdown, no explanation.\n\n## OUTPUT FORMAT\n{\n "model": "faq" | "pool" | "general" | "crypto",\n "language": "<ISO 639-1 code>",\n "faqAnswer": "<string>" | null\n}\n\n## FIELD DEFINITIONS\n- **model**: The AI pipeline route for this question (see classification steps below).\n- **language**: ISO 639-1 code detected from CURRENT USER QUESTION text only (en, vi, ja, zh, ko, es, fr, id, th, ru, etc.).\n- **faqAnswer**: Translated FAQ answer when model="faq"; always null otherwise.\n\n## CLASSIFICATION STEPS (follow in order)\n\n**Step 1 — Detect language**: Detect from CURRENT USER QUESTION text ONLY. Ignore language from history, system prompt, or FAQ data.\n\n**Step 2 — Check FAQ FIRST**: Compare the CURRENT USER QUESTION against the FAQ KNOWLEDGE BASE above. Match by MEANING, not exact words — if the user asks in any language but a FAQ entry covers the same topic, it counts as a match. If the question semantically matches a FAQ entry:\n - Set model = "faq"\n - Set faqAnswer = the FAQ answer, translated/rewritten naturally into the user\'s detected language. Never output Vietnamese when language is "en".\n - STOP here, do not proceed further.\n\n**Step 3 — Check Pool (only if Step 2 did not match)**: Set model = "pool" ONLY when the user wants LIVE/REAL-TIME pool data that FAQ cannot answer:\n - Search/list/show actual pools with live data\n - Personal LP positions ("my pools", "my positions", "my liquidity")\n - Trending pools, pool by address/id, compare actual pool data\n - Live APR/TVL/volume numbers for specific pools\n - Send/transfer an LP position NFT ("send position 12345", "transfer my position to 0x...", "gửi position", "chuyển LP position")\n **NOT pool**: "show my NFTs", "view my NFTs", "what NFTs do I have", "xem NFT" — these are regular NFT collection queries → use "crypto".\n Use "general" or "crypto" for: token prices, swap/send/buy regular tokens, general wallet questions, educational pool questions already in FAQ, viewing/sending regular NFTs (non-LP-position).\n\n**Step 4 — Check if non-crypto (only if Steps 2 and 3 did not match)**: Set model = "general" ONLY if the question is completely unrelated to crypto, DeFi, NFT, wallet, blockchain, tokens, greetings, or financial topics (e.g. pure cooking, sports, unrelated coding).\n\n**Step 5 — Default**: Set model = "crypto" for everything crypto-related (tokens, DeFi, NFT, wallet, blockchain, greetings, chains, gas, smart contracts, send/swap/bridge/buy).\n\n## VALIDATION RULES\n- model="faq" requires faqAnswer != null\n- model != "faq" requires faqAnswer = null\n- If FAQ KNOWLEDGE BASE is empty, model must NOT be "faq"\n\nReturn only the JSON object.',r="/api/gemini-cortex/proxy",a={model:Rf,data:{contents:[{parts:[{text:i}]}],generationConfig:{responseMimeType:"application/json"}}},s=await this.post(r,a),c=s?.data?.data?.candidates?.[0]?.content?.parts?.[0]?.text||s?.data?.candidates?.[0]?.content?.parts?.[0]?.text;let u={model:"crypto",language:"en",faqAnswer:null};try{let e=c?.trim()||"";e.startsWith("```json")?e=e.replace(/^```json\s*/,"").replace(/\s*```$/,""):e.startsWith("```")&&(e=e.replace(/^```\s*/,"").replace(/\s*```$/,""));const t=e.match(/\{[\s\S]*\}/);t&&(u=function(e){const t=Df.includes(e?.model)?e.model:"crypto",n="string"==typeof e?.language&&e.language.trim().length>0?e.language.trim().toLowerCase():"en",o="string"==typeof e?.faqAnswer&&e.faqAnswer.trim().length>0?e.faqAnswer.trim():null;return"faq"!==t||o?"faq"!==t?{model:t,language:n,faqAnswer:null}:{model:t,language:n,faqAnswer:o}:{model:"crypto",language:n,faqAnswer:null}}(JSON.parse(t[0])))}catch(n){}return u}catch(o){throw o}}async checkIsQuestionActionWeb3(e,t){try{const n=t+`---\nCURRENT USER QUESTION:\n${e}\n---\n\n #### Analyze this question and determine its category.\nIMPORTANT: The following topics should ALWAYS be classified as "yes" (action-oriented):\n- Greetings (in ANY language): hello, hi, xin chào, bonjour, etc.\n- Action phrases (in ANY language): send token, swap token, buy token, bridge token, send nft, burn nft, mint nft.\n- Wallet/Account questions (in ANY language): account, wallet, address, balance, portfolio, holdings\n- Registration/Sign-up questions (in ANY language): register, sign up, create account, create wallet, new account, new wallet, registration\n- Wallet access questions (in ANY language): open wallet, open account, start wallet, launch wallet, access wallet, access account\n\nIMPORTANT: The user may ask in their native language, so recognize the MEANING, not just specific words.\n\nOtherwise, respond with ONLY the word "no" (lowercase, nothing else).\nDo not provide any explanation or additional text.`,o="/api/gemini-cortex/proxy",i={model:Rf,data:{contents:[{parts:[{text:n}]}]}},r=await this.post(o,i),a=r?.data?.data?.candidates?.[0]?.content?.parts?.[0]?.text||r?.data?.candidates?.[0]?.content?.parts?.[0]?.text;return a?.toLowerCase()?.startsWith("yes")}catch(n){throw n}}},qf=uh()?.webAppUrl||"https://nft.keyring.app";function Hf(e){const t=e.poolDayData?.[0];return!!t&&0!==parseFloat(t.volumeToken0||"0")&&0!==parseFloat(t.volumeToken1||"0")&&0!==parseFloat(t.volumeUSD||"0")}const Vf={ethereum:"https://gateway.thegraph.com/api/subgraphs/id/5zvR82QoaXYFyDEKLZ9t6v9adgnptxYpKpSbxtgVENFV",arbitrum:"https://gateway.thegraph.com/api/subgraphs/id/FbCGRftH4a3yZugY7TnbYgPJVEv2LvMT6oF1fxPe9aJM",polygon:"https://gateway.thegraph.com/api/subgraphs/id/3hCPRGf4z88VC5rsBKU5AA9FBBq5nF3jbKJG7VZCbhjm",bsc:"https://gateway.thegraph.com/api/subgraphs/id/GcKPSgHoY42xNYVAkSPDhXSzi6aJDRQSKqBSXezL47gV",base:"https://gateway.thegraph.com/api/subgraphs/id/43Hwfi3dJSoGpyas9VwNoDAv55yjgGrPpNSmbQZArzMG",optimism:"https://gateway.thegraph.com/api/subgraphs/id/Cghf4LfVqPiFw6fp6Y5X5Ubc8UpmUhSfJL82zwiBFLaj",avalanche:"https://gateway.thegraph.com/api/subgraphs/id/GVH9h9KZ9CqheUEL93qMbq7QwgoBu32QXQDPR6bev4Eo"},Wf={eth:"ethereum",ethereum:"ethereum",mainnet:"ethereum",1:"ethereum",arb:"arbitrum",arbitrum:"arbitrum",42161:"arbitrum",polygon:"polygon",matic:"polygon",137:"polygon",bsc:"bsc",bnb:"bsc",56:"bsc",base:"base",8453:"base",optimism:"optimism",10:"optimism",avax:"avalanche",avalanche:"avalanche",43114:"avalanche"},Gf={100:.01,500:.05,3e3:.3,1e4:1};function Jf(e){return e&&Wf[e.toLowerCase()]||"ethereum"}function Yf(e){const t=e.toLowerCase();return t in Wf||t in Vf}async function zf(e,t,n={},o){const i=function(e){const t=Jf(e);return Vf[t]||null}(e);if(!i)throw new Error(`No subgraph available for chain: ${e}`);const r=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer 4c67ac7a75b21befbd28dc9120c709f1"},body:JSON.stringify({query:t,variables:n}),signal:o});if(!r.ok)throw new Error(`Subgraph query failed: HTTP ${r.status}`);const a=await r.json();if(a.errors)throw new Error(`Subgraph error: ${a.errors[0]?.message||"Unknown"}`);return a.data}function jf(e){return!isFinite(e)||isNaN(e)||e>1e11?0:e}function Xf(e,t){const n=Number(e.feeTier||0),o=Gf[n]??n/1e4,i=jf(parseFloat(e.totalValueLockedUSD||"0")),r=e.poolDayData?.[0],a=parseFloat(r?.volumeUSD||"0"),s=parseFloat(r?.feesUSD||"0");let c=null;return i>0&&s>0&&(c=parseFloat((365*s*100/i).toFixed(2))),{pair:`${e.token0.symbol}/${e.token1.symbol}`,poolAddress:e.id,token0:{symbol:e.token0.symbol,address:e.token0.id},token1:{symbol:e.token1.symbol,address:e.token1.id},tvl:i,volume24h:a,apr:c,fee:o,liquidity:e.liquidity||"0",chain:Jf(t)}}let Qf=null,Kf=0;const Zf={ethereum:"ethereum","arbitrum one":"arbitrum",arbitrum:"arbitrum",polygon:"polygon",bsc:"bsc",base:"base",optimism:"optimism","avalanche c-chain":"avalanche",avalanche:"avalanche"};async function _f(){const e=Date.now();if(Qf&&e-Kf<3e5)return Qf;try{const t=await fetch("https://yields.llama.fi/pools");if(!t.ok)throw new Error(`DefiLlama HTTP ${t.status}`);const n=((await t.json()).data||[]).filter(e=>"uniswap-v3"===e.project);return Qf=n,Kf=e,n}catch(t){return Qf??[]}}function $f(e){if(!e)return null;const t=e.match(/^([\d.]+)%/);return t?Math.round(1e4*parseFloat(t[1])):null}function ep(e,t){return t.length?e.map(e=>{const n=e.chain.toLowerCase(),o=Math.round(1e4*e.fee),i=e.token0.address.toLowerCase(),r=e.token1.address.toLowerCase(),a=t.filter(e=>Zf[e.chain.toLowerCase()]===n);let s=a.find(e=>{if(!e.underlyingTokens||e.underlyingTokens.length<2)return!1;const t=e.underlyingTokens.map(e=>e.toLowerCase());if(!t.includes(i)||!t.includes(r))return!1;const n=$f(e.poolMeta);return null===n||n===o});if(!s){const t=[e.token0.symbol.toUpperCase(),e.token1.symbol.toUpperCase()].sort().join("-");s=a.find(e=>{if([...e.symbol.split("-").map(e=>e.toUpperCase())].sort().join("-")!==t)return!1;const n=$f(e.poolMeta);return null===n||n===o})}if(s){const t=s.apyBase??s.apyBase??s.apy??null,n=s.tvlUsd??null,o=s.volumeUsd1d??null;return{...e,...null!==t&&{apr:parseFloat(t.toFixed(2))},...null!==n&&{tvl:jf(n)},...null!==o&&{volume24h:jf(o)}}}return e}):e}async function tp(e){const{tokens:t,chain:n,sortBy:o,filters:i,signal:r}=e,a=Jf(n),s=t.map(e=>{const t=e.toUpperCase(),n=new Set([t]);return t.startsWith("W")||n.add("W"+t),t.startsWith("W")&&t.length>1&&n.add(t.slice(1)),[...n]}),c=['totalValueLockedUSD_gt: "20000"','liquidity_gt: "0", volumeUSD_gt: "0"'];i?.feeTier&&c.push(`feeTier: "${i.feeTier}"`);let u="totalValueLockedUSD";"volume"===o?u="volumeUSD":"fee"===o?u="feeTier":"liquidity"===o&&(u="liquidity");const l="fee"===o?"asc":"desc",d=e=>1===e.length?`symbol: "${e[0]}"`:`symbol_in: [${e.map(e=>`"${e}"`).join(", ")}]`,h=(e,t)=>`{\n pools(\n first: ${t}\n orderBy: ${u}\n orderDirection: ${l}\n where: { ${[...c,...e].join(", ")} }\n ) {\n \n id\n token0 { id symbol name }\n token1 { id symbol name }\n feeTier\n liquidity\n totalValueLockedUSD\n volumeUSD\n poolDayData(first: 1, orderBy: date, orderDirection: desc) {\n volumeUSD\n feesUSD\n tvlUSD\n date\n liquidity\n feesUSD\n pool\n sqrtPrice\n volumeToken0\n volumeToken1\n }\n \n }\n }`;let f;if(s.length>0){const e=100;let t,n;s.length>=2?(t=h([`token0_: { ${d(s[0])} }`,`token1_: { ${d(s[1])} }`],e),n=h([`token0_: { ${d(s[1])} }`,`token1_: { ${d(s[0])} }`],e)):(t=h([`token0_: { ${d(s[0])} }`],e),n=h([`token1_: { ${d(s[0])} }`],e));const[o,i]=await Promise.allSettled([zf(a,t,{},r),zf(a,n,{},r)]),c="fulfilled"===o.status?(o.value?.pools||[]).filter(Hf).map(e=>Xf(e,a)):[],u="fulfilled"===i.status?(i.value?.pools||[]).filter(Hf).map(e=>Xf(e,a)):[],l=new Set(c.map(e=>e.poolAddress));f=[...c,...u.filter(e=>!l.has(e.poolAddress))]}else{const e=await zf(a,h([],100),{},r);f=(e?.pools||[]).filter(Hf).map(e=>Xf(e,a))}const p=await _f();return p.length>0&&(f=ep(f,p)),i?.minTVL&&(f=f.filter(e=>e.tvl>=i.minTVL)),i?.maxTVL&&(f=f.filter(e=>e.tvl<=i.maxTVL)),i?.minAPR&&(f=f.filter(e=>null!==e.apr&&e.apr>=i.minAPR)),i?.maxAPR&&(f=f.filter(e=>null!==e.apr&&e.apr<=i.maxAPR)),"apr"===o?f.sort((e,t)=>(t.apr??0)-(e.apr??0)):"liquidity"===o&&f.sort((e,t)=>{const n=BigInt(t.liquidity||"0")-BigInt(e.liquidity||"0");return n>0n?1:n<0n?-1:0}),f}async function np(e){const{poolId:t,chain:n,signal:o}=e,i=Jf(n),r=`{\n position(id: "${t}") {\n pool {\n \n id\n token0 { id symbol name }\n token1 { id symbol name }\n feeTier\n liquidity\n totalValueLockedUSD\n volumeUSD\n poolDayData(first: 1, orderBy: date, orderDirection: desc) {\n volumeUSD\n feesUSD\n tvlUSD\n date\n liquidity\n feesUSD\n pool\n sqrtPrice\n volumeToken0\n volumeToken1\n }\n \n }\n }\n }`,a=await zf(i,r,{},o);return a?.position?.pool?Xf(a.position.pool,i):null}async function op(e){const{chain:t,signal:n}=e,o=Jf(t),i=await zf(o,'{\n pools(\n first: 100\n orderBy: volumeUSD\n orderDirection: desc\n where: { totalValueLockedUSD_gt: "20000", liquidity_gt: "0", volumeUSD_gt: "0" }\n ) {\n \n id\n token0 { id symbol name }\n token1 { id symbol name }\n feeTier\n liquidity\n totalValueLockedUSD\n volumeUSD\n poolDayData(first: 1, orderBy: date, orderDirection: desc) {\n volumeUSD\n feesUSD\n tvlUSD\n date\n liquidity\n feesUSD\n pool\n sqrtPrice\n volumeToken0\n volumeToken1\n }\n \n }\n }',{},n);return(i?.pools||[]).filter(Hf).map(e=>Xf(e,o))}const ip=new rf(qf),rp=[{alias:"op",token:"OP",chain:"optimism"},{alias:"arb",token:"ARB",chain:"arbitrum"},{alias:"eth",token:"ETH",chain:"ethereum"},{alias:"bnb",token:"BNB",chain:"bsc"},{alias:"matic",token:"MATIC",chain:"polygon"}];function ap(e){return e instanceof Error&&("AbortError"===e.name||e.message.toLowerCase().includes("aborted")||e.message.toLowerCase().includes("canceled"))}function sp(e,t){return new Promise((n,o)=>{if(t?.aborted)return void o(new Error("Aborted"));const i=setTimeout(()=>{t?.removeEventListener("abort",r),n()},e),r=()=>{clearTimeout(i),t?.removeEventListener("abort",r),o(new Error("Aborted"))};t?.addEventListener("abort",r,{once:!0})})}function cp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function up(e,t,n){const o=cp(t),i=cp(n);return new RegExp(`\\b(?:on|in|at|from|to|across|via|using|tr[eê]n|tai|tại)\\s+${o}\\b`,"i").test(e)||new RegExp(`\\b(?:on|in|at|from|to|across|via|using|tr[eê]n|tai|tại)\\s+${i}\\b`,"i").test(e)||new RegExp(`\\b${o}\\s+(?:chain|network)\\b`,"i").test(e)||new RegExp(`\\b${i}\\s+(?:chain|network)\\b`,"i").test(e)}const lp=uh()?.linkAddLiquidity,dp=`You are a knowledgeable DeFi assistant helping users find the best liquidity pools.\n\nYou will receive structured pool data and must answer the user's question in a helpful, natural, conversational tone — like an expert friend explaining DeFi, not a robot listing data.\n\nGuidelines:\n- Respond in the exact language of LANGUAGE.\n- Use ONLY the provided pool data. Never invent or estimate numbers.\n- Intelligently select and highlight the most relevant pools for the user's question. You don't need to list all pools — pick the ones that best answer what they asked.\n- When recommending pools, briefly explain WHY they stand out (e.g. high APR, deep liquidity, low fee, well-known pair).\n- Include key metrics naturally in your answer: TVL, 24h volume, APR, fee tier.\n- Use the provided uniswapUrl for each pool you mention. Do NOT construct URLs yourself.\n- If position data is available, include the provided uniswapPositionUrl for each position.\n- If UNSUPPORTED_CHAINS is present (not "none"), start your response with the UNSUPPORTED_CHAIN_NOTICE (provided below, already translated to LANGUAGE), then continue naturally.\n- If POOLS_FOUND is 0 and POSITIONS_FOUND is 0 and UNSUPPORTED_CHAINS is "none", start your response with the UNISWAP_V3_NOTICE (provided below, already translated to LANGUAGE), then continue with your helpful response.\n- If no suitable data is available, acknowledge it naturally and suggest how to refine the search.\n- Keep the response focused and easy to read. Use markdown (bold, bullet points) to structure when helpful, but keep the tone warm and human.\n${lp&&`- If the user mentions adding liquidity / adding a pool / adding a position (including phrases like "add liquidity", "add pool", "add position", "create pool", "create pair", "thêm thanh khoản", "thêm pool", "thêm position"), keep your normal answer content and append this exact link at the end of the response: ${lp}`}\n- Never output raw JSON or data dumps.`;function hp(e){return 0===e?"$0":e>=1e9?`$${(e/1e9).toFixed(2)}B`:e>=1e6?`$${(e/1e6).toFixed(2)}M`:e>=1e3?`$${(e/1e3).toFixed(2)}K`:`$${e.toFixed(2)}`}const fp={ethereum:"ethereum",arbitrum:"arbitrum",polygon:"polygon",bsc:"bnb",base:"base",optimism:"optimism",avalanche:"avalanche"};async function pp(e,t,n){const o=mp(t);try{const a=e.data.pools.length,s=e.data.positions?.length??0;let c="";if(e.chatHistory&&e.chatHistory.length>0){c="\n\nCONVERSATION HISTORY (last messages for context):\n";for(const t of e.chatHistory){c+=`${"user"===t.role?"User":"Assistant"}: ${t.content.length>400?t.content.slice(0,400)+"...":t.content}\n`}c+="---"}const u=`${dp}${c}\n\nLANGUAGE: ${t||"en"}\nINTENT: ${e.parsed.intent}\nQUESTION: ${e.question}\nPOOLS_FOUND: ${a}\nPOSITIONS_FOUND: ${s}\nUNSUPPORTED_CHAINS: ${e.parsed.unsupportedChains&&e.parsed.unsupportedChains.length>0?e.parsed.unsupportedChains.join(", "):"none"}\nUNSUPPORTED_CHAIN_NOTICE: ${o.unsupportedChain}\nUNISWAP_V3_NOTICE: ${o.uniswapV3Only}\n\nPARSED_QUERY:\n${JSON.stringify({...e.parsed,limit:void 0},null,2)}\n\nPOOL_DATA:\n${i=e.data.pools,JSON.stringify(i.map(e=>{return{...e,tvl:hp(e.tvl),volume24h:hp(e.volume24h),apr:null!==e.apr?`${e.apr}%`:null,liquidity:e.liquidity,uniswapUrl:(t=e,`https://app.uniswap.org/explore/pools/${fp[t.chain]||t.chain}/${t.poolAddress}`)};var t}),null,2)}${e.data.positions&&e.data.positions.length>0?`\n\nUSER_POSITIONS:\n${JSON.stringify(e.data.positions.map(e=>{return{...e,uniswapPositionUrl:(t=e,`https://app.uniswap.org/positions/v3/${fp[t.chain]||t.chain}/${t.positionId}`)};var t}),null,2)}`:""}\n\nGenerate the final response for the end user now.`,l=5,d=1e3;let h=null,f=null;for(let e=1;e<=l;e++)try{h=await ip.post("api/moralis-cortex/proxy/chat",{prompt:u,model:"gpt-4.1-mini",stream:!1},{headers:{Accept:"application/json","Content-Type":"application/json"},signal:n}),f=null;break}catch(r){if(f=r,ap(r))throw r;e<l&&await sp(d,n)}if(f)throw f;const p=h?.data?.text?.trim();if(p)return p}catch(r){}var i;return function(e,t){const n=e.data?.pools||[],o=e.data?.positions||[],i=mp(t);return 0===n.length&&0===o.length?e.parsed.unsupportedChains&&e.parsed.unsupportedChains.length>0?i.unsupportedChain:`${i.uniswapV3Only} No pool data found for this query.`:["I cannot generate the final AI response right now. Here is the raw pool data:","```json",JSON.stringify({intent:e.parsed.intent,tokens:e.parsed.tokens,chains:e.parsed.chains,pools:n},null,2),"```"].join("\n")}(e,t)}function mp(e){const t=e||"en";return{unsupportedChain:i("poolUnsupportedChain",t),uniswapV3Only:i("poolUniswapV3Only",t)}}async function wp(e){const{question:t,language:n,currentChain:o,walletAddress:i,chatHistory:r,signal:a}=e,s=await async function(e,t){try{const o=`You are a DeFi Pool Query Parser. You understand ALL languages.\n\nConvert the user question into a structured JSON object. Return ONLY valid JSON — no explanation, no markdown.\n\n## OUTPUT FORMAT\n{\n "intent": string,\n "tokens": string[],\n "chains": string[],\n "poolAddress": string | null,\n "poolId": string | null,\n "walletAddress": string | null,\n "toAddress": string | null,\n "filters": {\n "minTVL": number | null,\n "maxTVL": number | null,\n "minAPR": number | null,\n "maxAPR": number | null,\n "feeTier": number | null\n },\n "sortBy": string | null,\n "limit": number | null\n}\n\n## INTENT TYPES\n- "search_pool" — find/list/show pools, optionally filtered by token(s) or chain\n- "best_pool" — best pool by TVL, volume, etc.\n- "compare_pool" — compare multiple pools or fee tiers\n- "pool_detail" — specific pool by address, pool id, or exact token pair\n- "trending_pool" — hot/trending/most active pools\n- "new_pool" — recently created pools\n- "high_apr_pool" — highest APR/yield pools\n- "low_fee_pool" — lowest fee pools\n- "safe_pool" — high TVL/low risk/stable pools\n- "general_pool_info" — educational questions (what is a pool, how pools work)\n- "user_positions" — user's own LP positions ("my pools", "my positions", "my liquidity")\n- "position_detail" — specific position by numeric id ("position 962961", "position id 12345", "tell me about position 962961")\n- "send_position" — user wants to send/transfer their LP position NFT to another address ("send position 12345 to 0x...", "transfer my position", "gửi position", "chuyển LP position")\n- "unknown" — truly unrelated to pools\n\n## TOKEN EXTRACTION\n- Extract token symbols mentioned: ETH, USDC, BTC, LINK, ARB, OP, etc.\n- Normalize wrapped variants: WETH→ETH, WBTC→BTC\n- "stablecoin pool" → tokens: ["USDC", "USDT"]\n- No tokens mentioned → tokens: []\n- One token mentioned → tokens: ["TOKEN"] (single-token search is valid)\n- Two tokens mentioned → tokens: ["TOKEN_A", "TOKEN_B"]\n\n## CHAIN vs TOKEN DISAMBIGUATION (CRITICAL)\nSome short names can be EITHER a chain name OR a token symbol.\nAmbiguous aliases: OP, ARB, ETH, BNB, MATIC\n\n**Rule: Use chain only with EXPLICIT chain context.**\nExplicit chain context = prepositions like "on", "in", "from", "across", "trên", "tại" + alias, OR alias + "chain"/"network".\n\nExamples:\n- "show me pool OP" → tokens: ["OP"], chains: [] (OP = token)\n- "show me pools on OP" → tokens: [], chains: ["optimism"] (on OP = chain)\n- "find ETH pools" → tokens: ["ETH"], chains: [] (ETH = token)\n- "find pools on ETH" → tokens: [], chains: ["ethereum"] (on ETH = chain)\n- "OP/USDC pool on ARB" → tokens: ["OP", "USDC"], chains: ["arbitrum"] (OP = token, on ARB = chain)\n- "show me pools on OP and ARB" → tokens: [], chains: ["optimism", "arbitrum"]\n- "ETH/USDC trên Arbitrum" → tokens: ["ETH", "USDC"], chains: ["arbitrum"]\n\nChain canonical names: ethereum, arbitrum, polygon, bsc, base, optimism, avalanche\n\n## SORT RULES\n- "best", "top", "largest", "highest TVL" → "tvl"\n- "most active", "highest volume" → "volume"\n- "highest yield", "best APR", "largest APR" → "apr"\n- "cheapest", "lowest fee" → "fee"\n- "highest liquidity", "most liquid", "deepest liquidity" → "liquidity"\n- Not specified → null\n\n## LIMIT\n- Default: 5 | "top 10" → 10 | "top 3" → 3 | Max: 20\n\n## ADDRESS / ID DETECTION\n- Hex address (0x...) with pool context → poolAddress, intent "pool_detail"\n- Numeric id ("pool id 962961", "position 12345", "position id 962961") → poolId as string, intent "position_detail"\n- "my pools"/"my positions"/"my liquidity" → intent "user_positions", walletAddress null\n- Hex address with position context → walletAddress, intent "user_positions"\n- "send/transfer position <id> to <0x...>" → poolId as string, toAddress as the recipient 0x address, intent "send_position"\n- "send position" / "transfer my position" without an id → poolId: null, toAddress: null, intent "send_position"\n\n## user_positions CHAIN RULES\n- No chain specified → chains: [] (system uses connected chain)\n- Chains specified → add all to chains array\n- "all chains" → chains: []\n\n## EXAMPLES\n"Show me ETH/USDC pools on Base" → {"intent":"search_pool","tokens":["ETH","USDC"],"chains":["base"],"poolAddress":null,"poolId":null,"walletAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":5}\n"Show me pool OP" → {"intent":"search_pool","tokens":["OP"],"chains":[],"poolAddress":null,"poolId":null,"walletAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":5}\n"Show me pools on OP" → {"intent":"search_pool","tokens":[],"chains":["optimism"],"poolAddress":null,"poolId":null,"walletAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":5}\n"OP/USDC pool on ARB" → {"intent":"search_pool","tokens":["OP","USDC"],"chains":["arbitrum"],"poolAddress":null,"poolId":null,"walletAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":5}\n"What are trending pools?" → {"intent":"trending_pool","tokens":[],"chains":[],"poolAddress":null,"poolId":null,"walletAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":"volume","limit":5}\n"Best pool for ETH with high APR" → {"intent":"high_apr_pool","tokens":["ETH"],"chains":[],"poolAddress":null,"poolId":null,"walletAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":"apr","limit":5}\n"Pool la gi?" → {"intent":"general_pool_info","tokens":[],"chains":[],"poolAddress":null,"poolId":null,"walletAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":5}\n"Show me pools" → {"intent":"search_pool","tokens":[],"chains":[],"poolAddress":null,"poolId":null,"walletAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":"tvl","limit":5}\n"Show my pools" → {"intent":"user_positions","tokens":[],"chains":[],"poolAddress":null,"poolId":null,"walletAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":20}\n"Pool của tôi trên Arbitrum" → {"intent":"user_positions","tokens":[],"chains":["arbitrum"],"poolAddress":null,"poolId":null,"walletAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":20}\n"Show my liquidity on OP and ARB" → {"intent":"user_positions","tokens":[],"chains":["optimism","arbitrum"],"poolAddress":null,"poolId":null,"walletAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":20}\n"Tell me about pool id 962961" → {"intent":"position_detail","tokens":[],"chains":[],"poolAddress":null,"poolId":"962961","walletAddress":null,"toAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":1}\n"Position 12345 on Arbitrum" → {"intent":"position_detail","tokens":[],"chains":["arbitrum"],"poolAddress":null,"poolId":"12345","walletAddress":null,"toAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":1}\n"find ETH pools" → {"intent":"search_pool","tokens":["ETH"],"chains":[],"poolAddress":null,"poolId":null,"walletAddress":null,"toAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":"tvl","limit":5}\n"Send position 962961 to 0xAbC123..." → {"intent":"send_position","tokens":[],"chains":[],"poolAddress":null,"poolId":"962961","walletAddress":null,"toAddress":"0xAbC123...","filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":1}\n"Transfer my LP position to 0xdef..." → {"intent":"send_position","tokens":[],"chains":[],"poolAddress":null,"poolId":null,"walletAddress":null,"toAddress":"0xdef...","filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":1}\n"Gửi position 12345" → {"intent":"send_position","tokens":[],"chains":[],"poolAddress":null,"poolId":"12345","walletAddress":null,"toAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":1}\n"Send position" → {"intent":"send_position","tokens":[],"chains":[],"poolAddress":null,"poolId":null,"walletAddress":null,"toAddress":null,"filters":{"minTVL":null,"maxTVL":null,"minAPR":null,"maxAPR":null,"feeTier":null},"sortBy":null,"limit":1}\n\n## RULES\n- ALWAYS return valid JSON\n- NEVER hallucinate addresses\n- Detect intent from ANY language\n- When in doubt between intents, prefer "search_pool" over "unknown"\n\n---\nUser question: "${e}"`;let i=null,r=null;for(let e=1;e<=5;e++)try{i=await ip.post("/api/gemini-cortex/proxy",{model:"gemini-2.5-flash-lite",data:{contents:[{parts:[{text:o}]}],generationConfig:{responseMimeType:"application/json"}}},{signal:t}),r=null;break}catch(n){if(r=n,ap(n))throw n;e<5&&await sp(1e3,t)}if(!i)throw r instanceof Error?r:new Error("Pool parser API failed after retries");const a=i?.data?.data?.candidates?.[0]?.content?.parts?.[0]?.text||i?.data?.candidates?.[0]?.content?.parts?.[0]?.text;if(!a)return null;let s=a.trim();s.startsWith("```json")?s=s.replace(/^```json\s*/,"").replace(/\s*```$/,""):s.startsWith("```")&&(s=s.replace(/^```\s*/,"").replace(/\s*```$/,""));const c=s.match(/\{[\s\S]*\}/);if(!c)return null;const u=function(e,t){const n=e.toLowerCase();if("user_positions"!==t.intent)for(const{alias:i,token:r,chain:a}of rp)new RegExp(`\\b${cp(i)}\\b`,"i").test(n)&&(up(n,i,a)?(t.chains.includes(a)||t.chains.push(a),t.tokens=t.tokens.filter(e=>e.toUpperCase()!==r)):(t.tokens.some(e=>e.toUpperCase()===r)||t.tokens.push(r),t.chains=t.chains.filter(e=>e!==a)));const o=t.chains.filter(e=>!Yf(e));return o.length>0&&(t.unsupportedChains=o),t.tokens=[...new Set(t.tokens.map(e=>e.toUpperCase()))],t.chains=[...new Set(t.chains.filter(e=>Yf(e)).map(e=>Jf(e)))],t}(e,JSON.parse(c[0]));return(!u.limit||u.limit<1)&&(u.limit=5),u.limit>20&&(u.limit=20),Array.isArray(u.chains)||(u.chains=[]),void 0===u.poolId&&(u.poolId=null),void 0===u.walletAddress&&(u.walletAddress=null),void 0===u.toAddress&&(u.toAddress=null),u}catch(n){return null}}(t,a);if(!s)return null;if("unknown"===s.intent&&(s.intent="general_pool_info"),i&&!s.walletAddress&&(s.walletAddress=i),"send_position"===s.intent)return{response:"",parsed:s,pools:[],positions:[],sendPositionData:{positionId:s.poolId||""}};let c=[],u=[];if("position_detail"===s.intent&&s.poolId){const e=s.chains&&s.chains.length>0?s.chains:o?[o]:["ethereum"],t=await Promise.allSettled(e.map(e=>async function(e){const{positionId:t,chain:n,signal:o}=e,i=Jf(n),r=`{\n position(id: "${t}") {\n id\n liquidity\n depositedToken0\n depositedToken1\n withdrawnToken0\n withdrawnToken1\n collectedFeesToken0\n collectedFeesToken1\n pool {\n \n id\n token0 { id symbol name }\n token1 { id symbol name }\n feeTier\n liquidity\n totalValueLockedUSD\n volumeUSD\n poolDayData(first: 1, orderBy: date, orderDirection: desc) {\n volumeUSD\n feesUSD\n tvlUSD\n date\n liquidity\n feesUSD\n pool\n sqrtPrice\n volumeToken0\n volumeToken1\n }\n \n }\n }\n }`,a=await zf(i,r,{},o);if(!a?.position?.pool)return null;const s=a.position,c=Xf(s.pool,i),u=Number(s.pool?.feeTier||0),l=Gf[u]??u/1e4;return{position:{positionId:s.id,poolAddress:s.pool?.id||"",pair:`${s.pool?.token0?.symbol}/${s.pool?.token1?.symbol}`,token0:{symbol:s.pool?.token0?.symbol||"",address:s.pool?.token0?.id||""},token1:{symbol:s.pool?.token1?.symbol||"",address:s.pool?.token1?.id||""},fee:l,chain:i,liquidity:s.liquidity,depositedToken0:s.depositedToken0,depositedToken1:s.depositedToken1,withdrawnToken0:s.withdrawnToken0,withdrawnToken1:s.withdrawnToken1,collectedFeesToken0:s.collectedFeesToken0,collectedFeesToken1:s.collectedFeesToken1},pool:c}}({positionId:s.poolId,chain:Jf(e),signal:a})));for(const n of t)if("fulfilled"===n.status&&n.value){u.push(n.value.position);const e=n.value.pool.poolAddress;c.some(t=>t.poolAddress===e)||c.push(n.value.pool)}}else if("user_positions"===s.intent){if(s.walletAddress){const e=s.chains&&s.chains.length>0?s.chains:o?[o]:[];u=await async function(e){const{walletAddress:t,chains:n,signal:o}=e,i=n&&n.length>0?n:Object.keys(Vf),r=await Promise.allSettled(i.map(e=>async function(e,t,n){const o=`{\n positions(\n where: { owner: "${e.toLowerCase()}" }\n orderBy: id\n orderDirection: desc\n first: 100\n ) {\n id\n liquidity\n depositedToken0\n depositedToken1\n withdrawnToken0\n withdrawnToken1\n collectedFeesToken0\n collectedFeesToken1\n pool {\n id\n feeTier\n token0 { id symbol }\n token1 { id symbol }\n }\n }\n }`,i=await zf(t,o,{},n);return(i?.positions||[]).map(e=>{const n=Number(e.pool?.feeTier||0),o=Gf[n]??n/1e4;return{positionId:e.id,poolAddress:e.pool?.id||"",pair:`${e.pool?.token0?.symbol}/${e.pool?.token1?.symbol}`,token0:{symbol:e.pool?.token0?.symbol||"",address:e.pool?.token0?.id||""},token1:{symbol:e.pool?.token1?.symbol||"",address:e.pool?.token1?.id||""},fee:o,chain:t,liquidity:e.liquidity,depositedToken0:e.depositedToken0,depositedToken1:e.depositedToken1,withdrawnToken0:e.withdrawnToken0,withdrawnToken1:e.withdrawnToken1,collectedFeesToken0:e.collectedFeesToken0,collectedFeesToken1:e.collectedFeesToken1}})}(t,e,o)));return r.filter(e=>"fulfilled"===e.status).flatMap(e=>e.value)}({walletAddress:s.walletAddress,chains:e,signal:a})}}else c=await async function(e,t,n){try{const o=e.chains&&e.chains.length>0?e.chains:[t||"ethereum"],i=await Promise.allSettled(o.map(t=>async function(e,t,n){switch(e.intent){case"pool_detail":if(e.poolAddress){const o=await async function(e){const{poolAddress:t,chain:n,signal:o}=e,i=Jf(n),r=`{\n pool(id: "${t.toLowerCase()}") {\n \n id\n token0 { id symbol name }\n token1 { id symbol name }\n feeTier\n liquidity\n totalValueLockedUSD\n volumeUSD\n poolDayData(first: 1, orderBy: date, orderDirection: desc) {\n volumeUSD\n feesUSD\n tvlUSD\n date\n liquidity\n feesUSD\n pool\n sqrtPrice\n volumeToken0\n volumeToken1\n }\n \n }\n }`,a=await zf(i,r,{},o);return a?.pool?Xf(a.pool,i):null}({poolAddress:e.poolAddress,chain:t,signal:n});return o?[o]:[]}if(e.poolId){const o=await np({poolId:e.poolId,chain:t,signal:n});return o?[o]:[]}return tp({tokens:e.tokens,chain:t,sortBy:e.sortBy,filters:e.filters,signal:n});case"trending_pool":return op({chain:t,signal:n});case"best_pool":case"safe_pool":return tp({tokens:e.tokens,chain:t,sortBy:"tvl",filters:e.filters,signal:n});case"high_apr_pool":return tp({tokens:e.tokens,chain:t,sortBy:"apr",filters:e.filters,signal:n});case"low_fee_pool":return tp({tokens:e.tokens,chain:t,sortBy:"fee",filters:e.filters,signal:n});case"general_pool_info":return e.tokens.length>0?tp({tokens:e.tokens,chain:t,sortBy:"tvl",filters:e.filters,signal:n}):op({chain:t,signal:n});case"position_detail":if(e.poolId){const o=await np({poolId:e.poolId,chain:t,signal:n});return o?[o]:[]}return[];default:return tp({tokens:e.tokens,chain:t,sortBy:e.sortBy||"tvl",filters:e.filters,signal:n})}}(e,t,n)));let r=i.filter(e=>"fulfilled"===e.status).flatMap(e=>e.value);const a=await _f();return a.length>0&&(r=ep(r,a)),"apr"===e.sortBy&&r.sort((e,t)=>(t.apr??0)-(e.apr??0)),r}catch(o){return[]}}(s,o,a);const l={question:t,parsed:s,chatHistory:r,data:{pools:c,positions:u.length>0?u:void 0}};return{response:await pp(l,n,a),parsed:s,pools:c,positions:u}}const gp=e=>e?`**CRITICAL - LANGUAGE**: Respond in the specified language: "${e||"detect from current question"}". Do NOT follow language from conversation history.`:"**CRITICAL - LANGUAGE**: You MUST detect the language of the user's CURRENT question and respond ONLY in that exact language. Ignore the language of previous messages in conversation history — only the current question matters. If the current question is in English, respond in English. If in Vietnamese, respond in Vietnamese. NEVER default to Chinese or any other language.";function bp(e,t,n){if(!e)return e;const o=e.toLowerCase().trim();if("max"===o||"all"===o)return t||e;const i=o.match(/^(\d+(?:\.\d+)?)%$/);if(i){const e=parseFloat(i[1])/100;return((parseFloat(t)||0)*e).toFixed(8).replace(/\.?0+$/,"")||"0"}const r=o.match(/^\$?(\d+(?:\.\d+)?)\$?$/),a=o.startsWith("$")||o.endsWith("$")||/\d(usd|dollar|dollars|đô|đồng)$/.test(o);if(r&&a){const t=parseFloat(r[1]);return n&&n>0?(t/n).toFixed(8).replace(/\.?0+$/,"")||"0":e}const s=o.match(/^(\d+(?:\.\d+)?)\s*(?:usd|dollar|dollars|đô|đồng)$/);if(s){const t=parseFloat(s[1]);return n&&n>0?(t/n).toFixed(8).replace(/\.?0+$/,"")||"0":e}return e}function yp(e){try{let t=e?.trim()||"";return t.startsWith("```json")?t=t.replace(/^```json\s*/,"").replace(/\s*```$/,""):t.startsWith("```")&&(t=t.replace(/^```\s*/,"").replace(/\s*```$/,"")),JSON.parse(function(e){const t=e.indexOf("{");if(-1===t)return e;let n=0,o=!1,i=!1;for(let r=t;r<e.length;r++){const a=e[r];if(i)i=!1;else if("\\"===a&&o)i=!0;else if('"'!==a){if(!o)if("{"===a)n++;else if("}"===a&&(n--,0===n))return e.slice(t,r+1)}else o=!o}return e}(t))}catch{return null}}function vp(e){const n=[],o=/!\[([^\]]*)\]\(([^)]+)\)|\[([^\]]*)\]\(([^)]+)\)|(https?:\/\/[^\s<>]+)|\*\*(.+?)\*\*|__(.+?)__|\*(.+?)\*|_(.+?)_|~~(.+?)~~|`([^`]+)`/g;let i,r=0;for(;null!==(i=o.exec(e));)i.index>r&&n.push(e.slice(r,i.index)),void 0!==i[1]||void 0!==i[2]?n.push(t.jsx("img",{src:i[2],alt:i[1],className:"mc-image",onError:e=>{e.target.src="data:image/svg+xml,%3csvg%20width='180'%20height='180'%20viewBox='0%200%20180%20180'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20opacity='0.1'%3e%3cpath%20d='M102.392%20118.157L102.417%20109.35L89.7594%20102.042C89.5768%20101.937%2089.3953%20101.826%2089.2149%20101.71L89.1861%20101.692C89.012%20101.581%2088.839%20101.47%2088.666%20101.346C88.6061%20101.305%2088.5473%20101.262%2088.4874%20101.22C88.3765%20101.139%2088.259%20101.057%2088.1459%20100.972C88.0749%20100.919%2088.0051%20100.861%2087.9352%20100.811C87.8321%20100.733%2087.73%20100.653%2087.6291%20100.571C87.5552%20100.51%2087.4813%20100.449%2087.4073%20100.387C87.3098%20100.306%2087.2125%20100.224%2087.1157%20100.141C87.0418%20100.075%2086.9678%20100.009%2086.8939%2099.9421C86.7985%2099.8578%2086.7039%2099.772%2086.61%2099.6848C86.5346%2099.6149%2086.4592%2099.5462%2086.3882%2099.4752C86.2929%2099.3843%2086.1986%2099.2922%2086.1044%2099.2002C86.0356%2099.1325%2085.9657%2099.0649%2085.897%2098.9961C85.7983%2098.8963%2085.7007%2098.7954%2085.6031%2098.6934C85.541%2098.628%2085.4778%2098.5637%2085.4168%2098.4982C85.3059%2098.3763%2085.195%2098.2521%2085.0786%2098.1267L84.9533%2097.9881C84.7995%2097.8137%2084.648%2097.6366%2084.4986%2097.457C84.4643%2097.4159%2084.4321%2097.3738%2084.3977%2097.3328C84.2868%2097.1919%2084.1671%2097.05%2084.054%2096.9069C83.9172%2096.7325%2083.7826%2096.5558%2083.6503%2096.3769L83.5827%2096.2881C83.3675%2095.9965%2083.1591%2095.6971%2082.955%2095.3943L82.8441%2095.228C82.5876%2094.8421%2082.341%2094.4495%2082.1045%2094.0503L82.0135%2093.8984C81.8487%2093.616%2081.6886%2093.3306%2081.5334%2093.0423C81.4768%2092.937%2081.4225%2092.8316%2081.3681%2092.7263C81.3138%2092.6209%2081.2572%2092.5045%2081.1952%2092.3936C81.1164%2092.2361%2081.0399%2092.0787%2080.9634%2091.9201C80.939%2091.8691%2080.9135%2091.8181%2080.8891%2091.7671C80.793%2091.5623%2080.6995%2091.3564%2080.6085%2091.1494C80.5852%2091.095%2080.562%2091.0385%2080.5398%2090.9875C80.4732%2090.8337%2080.4082%2090.6792%2080.3446%2090.524L80.2592%2090.3121C80.2008%2090.1643%2080.1435%2090.0164%2080.0873%2089.8686C80.0629%2089.8043%2080.0385%2089.7388%2080.0141%2089.6745C79.9454%2089.486%2079.8789%2089.2971%2079.8145%2089.1079L79.789%2089.0347C79.7151%2088.8218%2079.6471%2088.6088%2079.585%2088.3959C79.5639%2088.3283%2079.5451%2088.2606%2079.5262%2088.193C79.483%2088.0444%2079.4397%2087.8958%2079.3998%2087.7494C79.3776%2087.6685%2079.3566%2087.5875%2079.3355%2087.5066C79.3%2087.3691%2079.2656%2087.2319%2079.2324%2087.0952C79.2131%2087.0138%2079.1943%2086.9325%2079.1758%2086.8512C79.1436%2086.7104%2079.1137%2086.5695%2079.0849%2086.4298C79.0693%2086.3555%2079.0538%2086.2801%2079.0394%2086.208C79.0047%2086.0276%2078.9725%2085.848%2078.9429%2085.6691C78.9429%2085.638%2078.9318%2085.607%2078.9274%2085.5759C78.8941%2085.366%2078.8646%2085.1564%2078.8387%2084.9472C78.832%2084.8906%2078.8265%2084.8363%2078.8198%2084.7775C78.8028%2084.6259%2078.7873%2084.4748%2078.7733%2084.3239C78.7666%2084.253%2078.7622%2084.182%2078.7566%2084.1121C78.7455%2083.9702%2078.7378%2083.8294%2078.7311%2083.6885C78.7311%2083.622%2078.7245%2083.5544%2078.7222%2083.4878C78.7156%2083.2882%2078.71%2083.0897%2078.7112%2082.8934L78.7466%2069.3645L77.6377%2068.7258L71.9567%2065.45C70.7912%2064.7503%2069.5073%2064.2703%2068.1686%2064.0339V64.0417C68.1597%2064.1105%2068.1542%2064.1825%2068.1464%2064.2513C68.1387%2064.32%2068.1298%2064.4021%2068.1231%2064.4797C68.1231%2064.5119%2068.1165%2064.5418%2068.1132%2064.574C68.1043%2064.676%2068.0999%2064.7802%2068.0943%2064.8845C68.0943%2064.941%2068.0865%2064.9954%2068.0843%2065.0541V65.0952C68.0769%2065.2704%2068.0729%2065.4482%2068.0721%2065.6286V65.6607L68.0078%2089.1023C68.0078%2089.2679%2068.01%2089.4339%2068.0145%2089.6002C68.0145%2089.6324%2068.0145%2089.6634%2068.0145%2089.6956C68.0145%2089.7632%2068.0211%2089.832%2068.0244%2089.8996C68.0278%2089.9673%2068.03%2090.056%2068.0355%2090.1347C68.0355%2090.1957%2068.0455%2090.2578%2068.05%2090.3199C68.0544%2090.382%2068.061%2090.463%2068.0677%2090.535C68.0677%2090.5805%2068.0743%2090.6271%2068.0788%2090.6725C68.0888%2090.7757%2068.1021%2090.8799%2068.1132%2090.9842C68.1198%2091.0418%2068.1254%2091.095%2068.132%2091.1583L68.1387%2091.2137C68.1623%2091.3985%2068.1886%2091.5833%2068.2174%2091.7682V91.7837C68.2174%2091.8147%2068.2285%2091.8469%2068.234%2091.8779C68.2584%2092.0277%2068.2839%2092.1774%2068.3117%2092.3282C68.3172%2092.357%2068.3239%2092.3858%2068.3294%2092.4147C68.3438%2092.4901%2068.3604%2092.5655%2068.376%2092.6365C68.3915%2092.7074%2068.4104%2092.8128%2068.4292%2092.9004C68.4403%2092.9525%2068.4536%2093.0046%2068.4658%2093.0556C68.4843%2093.1362%2068.5031%2093.2172%2068.5224%2093.2985C68.5368%2093.3595%2068.5501%2093.4205%2068.5645%2093.4803C68.5789%2093.5402%2068.6055%2093.6345%2068.6255%2093.711C68.6454%2093.7875%2068.6676%2093.8729%2068.6887%2093.9527C68.6998%2093.9916%2068.7087%2094.0304%2068.7186%2094.0636C68.7486%2094.1745%2068.7818%2094.2854%2068.8151%2094.3963C68.8351%2094.464%2068.8539%2094.5316%2068.8739%2094.5993L68.8894%2094.6547C68.9478%2094.8462%2069.0092%2095.0376%2069.0735%2095.2291V95.2391L69.099%2095.3123C69.1533%2095.4731%2069.2099%2095.6339%2069.2676%2095.7947C69.2775%2095.8224%2069.2886%2095.8501%2069.2986%2095.8778C69.3219%2095.9422%2069.3463%2096.0054%2069.3707%2096.0697C69.4039%2096.1595%2069.4372%2096.2482%2069.4716%2096.338C69.4949%2096.3979%2069.5193%2096.4567%2069.5437%2096.5166L69.628%2096.7262C69.649%2096.7761%2069.6679%2096.8271%2069.6889%2096.877C69.7322%2096.9812%2069.7777%2097.0855%2069.8231%2097.1897C69.8464%2097.244%2069.8686%2097.3006%2069.893%2097.3516L69.9174%2097.4082C69.9972%2097.5878%2070.0789%2097.7671%2070.1625%2097.946L70.1735%2097.9704C70.1979%2098.0214%2070.2234%2098.0724%2070.2478%2098.1234C70.3133%2098.2598%2070.3776%2098.3973%2070.4452%2098.5326L70.4785%2098.5969C70.5351%2098.7078%2070.5894%2098.8187%2070.6515%2098.9296C70.6981%2099.0194%2070.7424%2099.1093%2070.7901%2099.198L70.8167%2099.2456C70.9712%2099.534%2071.1313%2099.8193%2071.2969%20100.102C71.3113%20100.126%2071.3235%20100.151%2071.3379%20100.175C71.3523%20100.199%2071.3723%20100.227%2071.3878%20100.254C71.6244%20100.653%2071.8709%20101.045%2072.1275%20101.431C72.1419%20101.452%2072.1541%20101.475%2072.1685%20101.497C72.1829%20101.519%2072.2173%20101.564%2072.2406%20101.6C72.4446%20101.902%2072.652%20102.201%2072.8682%20102.493L72.9314%20102.575C73.0645%20102.754%2073.1994%20102.931%2073.3362%20103.107L73.3595%20103.137C73.4704%20103.272%2073.5746%20103.405%2073.6833%20103.537L73.7798%20103.656L73.7875%20103.665C73.9287%20103.835%2074.0718%20104.002%2074.2167%20104.167L74.2344%20104.187L74.3597%20104.326C74.4551%20104.437%2074.5516%20104.541%2074.6481%20104.646L74.698%20104.698C74.7601%20104.764%2074.8222%20104.828%2074.8843%20104.893C74.9464%20104.959%2075.0284%20105.046%2075.106%20105.122L75.1814%20105.197C75.2502%20105.266%2075.319%20105.334%2075.3888%20105.401C75.4587%20105.469%2075.5108%20105.524%2075.5729%20105.583L75.6727%20105.676C75.747%20105.747%2075.8224%20105.817%2075.8945%20105.886C75.9488%20105.936%2076.0054%20105.987%2076.0564%20106.036L76.1784%20106.146L76.4002%20106.345C76.4478%20106.386%2076.4944%20106.429%2076.5432%20106.469C76.592%20106.509%2076.643%20106.55%2076.6918%20106.59L76.9136%20106.774C76.9535%20106.806%2076.9923%20106.84%2077.0322%20106.872C77.0943%20106.921%2077.1576%20106.967%2077.2197%20107.015C77.2818%20107.062%2077.3594%20107.126%2077.4292%20107.174L77.5168%20107.241C77.6011%20107.303%2077.6876%20107.362%2077.7719%20107.423C77.8307%20107.465%2077.8894%20107.508%2077.9493%20107.549L77.997%20107.584C78.1523%20107.69%2078.3086%20107.794%2078.4661%20107.894L78.4905%20107.91C78.6357%20108.002%2078.7821%20108.092%2078.9341%20108.178L79.0449%20108.241L98.4999%20119.478C98.6175%20119.546%2098.7346%20119.611%2098.8515%20119.674L98.9867%20119.744L99.1653%20119.836C99.2119%20119.859%2099.2584%20119.885%2099.3039%20119.908C99.3793%20119.946%2099.4547%20119.979%2099.5257%20120.019L99.6832%20120.093L99.7464%20120.123C99.8942%20120.19%20100.042%20120.252%20100.19%20120.311L100.208%20120.317C100.35%20120.374%20100.492%20120.428%20100.633%20120.477L100.693%20120.497L100.856%20120.55C100.93%20120.575%20101.004%20120.6%20101.078%20120.622L101.189%20120.655L101.385%20120.709C101.434%20120.722%20101.484%20120.738%20101.532%20120.75C101.579%20120.762%20101.643%20120.773%20101.693%20120.785L101.888%20120.829L101.986%20120.851L102.085%20120.867C102.158%20120.553%20102.219%20120.227%20102.266%20119.886C102.346%20119.313%20102.388%20118.736%20102.392%20118.157Z'%20fill='url(%23paint0_linear_302_6100)'/%3e%3cpath%20d='M91.4307%2064.3019L78.0005%2056.5472L75.8214%2055.2885L71.9957%2053.0796C59.9427%2046.1222%2050.1032%2051.73%2050.0633%2065.5794L50.0001%2087.9076C49.9613%20101.769%2059.7365%20118.694%2071.7894%20125.652L91.2244%20136.872C103.276%20143.831%20113.117%20138.227%20113.156%20124.373L113.183%20114.546V113.668L113.217%20102.041C113.259%2088.1926%20103.482%2071.2604%2091.4307%2064.3019ZM102.419%20108.881V109.349L102.395%20118.156C102.394%20118.733%20102.355%20119.309%20102.278%20119.881C102.232%20120.222%20102.167%20120.547%20102.097%20120.863C100.943%20125.853%2096.5184%20127.534%2091.2621%20124.5L71.8249%20113.283C65.708%20109.753%2060.7478%20101.16%2060.7678%2094.1275L60.831%2071.7949C60.8454%2066.777%2063.3948%2063.8927%2067.0787%2063.9382C67.4454%2063.9447%2067.8112%2063.9777%2068.1732%2064.0369C69.5103%2064.2737%2070.7927%2064.7537%2071.9568%2065.453L77.6312%2068.7232L78.7401%2069.3619L91.3974%2076.6697C97.512%2080.205%20102.476%2088.7947%20102.452%2095.8275L102.419%20108.881Z'%20fill='url(%23paint1_linear_302_6100)'/%3e%3cpath%20d='M129.993%2090.9695C129.993%2090.9063%20129.987%2090.842%20129.985%2090.7788C129.985%2090.648%20129.972%2090.516%20129.966%2090.3851C129.958%2090.2288%20129.953%2090.0746%20129.944%2089.9172C129.936%2089.7952%20129.924%2089.671%20129.914%2089.5479C129.904%2089.4248%20129.892%2089.2707%20129.88%2089.1309C129.873%2089.04%20129.867%2088.9491%20129.858%2088.8582C129.838%2088.6519%20129.813%2088.4445%20129.789%2088.2383C129.776%2088.1274%20129.766%2088.0165%20129.752%2087.9056C129.752%2087.869%20129.744%2087.8324%20129.739%2087.7947C129.694%2087.431%20129.642%2087.0658%20129.583%2086.6991L129.578%2086.6669C129.568%2086.6037%20129.555%2086.5405%20129.544%2086.4773C129.497%2086.1845%20129.448%2085.8918%20129.392%2085.5979C129.381%2085.5391%20129.368%2085.4815%20129.357%2085.4227C129.328%2085.2752%20129.297%2085.1277%20129.267%2084.9791C129.232%2084.805%20129.199%2084.632%20129.156%2084.459C129.134%2084.3559%20129.107%2084.2528%20129.084%2084.1497C129.048%2083.99%20129.011%2083.8303%20128.973%2083.6706C128.944%2083.5519%20128.92%2083.4333%20128.89%2083.3146C128.852%2083.1627%20128.809%2083.0097%20128.77%2082.8566C128.731%2082.7036%20128.688%2082.5395%20128.645%2082.3809C128.625%2082.3055%20128.606%2082.2301%20128.585%2082.1591C128.524%2081.9373%20128.458%2081.7222%20128.393%2081.5038C128.354%2081.3729%20128.318%2081.2409%20128.282%2081.1101C128.271%2081.0746%20128.262%2081.0391%20128.251%2080.9992C128.135%2080.6214%20128.014%2080.244%20127.889%2079.867L127.881%2079.8448C127.863%2079.7927%20127.844%2079.7417%20127.827%2079.6896C127.716%2079.3768%20127.613%2079.063%20127.494%2078.7503C127.474%2078.6948%20127.452%2078.6394%20127.432%2078.584C127.385%2078.4564%20127.336%2078.3289%20127.288%2078.2014C127.222%2078.0273%20127.159%2077.8532%20127.091%2077.6791C127.046%2077.5615%20126.997%2077.4451%20126.949%2077.3275C126.894%2077.1886%20126.838%2077.0499%20126.782%2076.9117C126.742%2076.813%20126.704%2076.7143%20126.663%2076.6167C126.577%2076.4094%20126.487%2076.2042%20126.398%2075.9979C126.353%2075.8871%20126.308%2075.7861%20126.262%2075.6797L126.215%2075.5688C126.059%2075.2147%20125.898%2074.8617%20125.733%2074.5098L125.711%2074.4632C125.661%2074.3523%20125.608%2074.2525%20125.558%2074.146C125.431%2073.881%20125.305%2073.616%20125.174%2073.3532C125.153%2073.311%20125.13%2073.2689%20125.109%2073.2256C124.998%2073.0038%20124.887%2072.7821%20124.768%2072.5669C124.677%2072.3906%20124.589%2072.2143%20124.495%2072.0391C124.478%2072.0069%20124.459%2071.9759%20124.441%2071.9426C124.136%2071.3756%20123.821%2070.8137%20123.495%2070.257C123.467%2070.2094%20123.443%2070.1617%20123.415%2070.114C123.333%2069.9743%20123.247%2069.8379%20123.164%2069.6992C123.024%2069.4675%20122.885%2069.2357%20122.742%2069.0062C122.618%2068.8066%20122.492%2068.6092%20122.365%2068.4118C122.22%2068.19%20122.076%2067.9604%20121.927%2067.7364C121.877%2067.6599%20121.829%2067.5823%20121.778%2067.5069C121.727%2067.4315%20121.682%2067.3727%20121.635%2067.304C121.233%2066.7085%20120.824%2066.1196%20120.4%2065.5441L120.395%2065.5352C120.354%2065.4787%20120.309%2065.4243%20120.268%2065.3689C120.006%2065.017%20119.741%2064.6688%20119.472%2064.3243L119.425%2064.2633C119.215%2063.996%20119%2063.7343%20118.786%2063.4715C118.722%2063.395%20118.661%2063.3163%20118.598%2063.2398L118.584%2063.222C118.306%2062.8879%20118.024%2062.5581%20117.739%2062.2328L117.702%2062.1929C117.621%2062.0998%20117.537%2062.0111%20117.455%2061.919C117.266%2061.7083%20117.078%2061.4954%20116.886%2061.2892L116.788%2061.1871C116.666%2061.0563%20116.542%2060.9288%20116.418%2060.799C116.276%2060.6504%20116.135%2060.4985%20115.991%2060.3554C115.942%2060.3055%20115.891%2060.2579%20115.841%2060.208C115.706%2060.0716%20115.57%2059.9385%20115.433%2059.8043C115.297%2059.6701%20115.193%2059.5626%20115.071%2059.445C115.005%2059.3829%20114.939%2059.323%20114.873%2059.2609C114.726%2059.1212%20114.577%2058.9837%20114.43%2058.8473C114.319%2058.7497%20114.219%2058.6488%20114.112%2058.5523C114.034%2058.4814%20113.953%2058.4137%20113.873%2058.3427C113.725%2058.2104%20113.575%2058.0796%20113.424%2057.9502C113.33%2057.8692%20113.238%2057.7849%20113.142%2057.7051C113.047%2057.6253%20112.946%2057.5465%20112.848%2057.4656C112.7%2057.3443%20112.553%2057.2242%20112.405%2057.1052C112.326%2057.042%20112.248%2056.9754%20112.169%2056.9122C112.045%2056.8157%20111.921%2056.7248%20111.798%2056.6294C111.675%2056.5341%20111.523%2056.4176%20111.386%2056.3145C111.328%2056.2713%20111.275%2056.2258%20111.213%2056.1826C111.045%2056.0595%20110.88%2055.943%20110.707%2055.8233C110.596%2055.7412%20110.476%2055.6569%20110.36%2055.5771L110.265%2055.5094C109.958%2055.2995%20109.651%2055.0958%20109.341%2054.8984H109.334L109.288%2054.8696C109%2054.6877%20108.711%2054.5092%20108.42%2054.3384L108.206%2054.2142L88.7824%2042.9941C88.551%2042.8603%2088.3204%2042.7313%2088.0904%2042.6071C88.0017%2042.5594%2087.9141%2042.5162%2087.8254%2042.4696L87.4717%2042.2866C87.3807%2042.24%2087.2887%2042.1901%2087.1989%2042.1447C87.0492%2042.0704%2086.9017%2042.0049%2086.7553%2041.9351C86.6511%2041.8863%2086.5479%2041.8353%2086.4448%2041.7887L86.3195%2041.7299C86.0238%2041.5991%2085.7332%2041.476%2085.4479%2041.3607L85.4035%2041.344C85.1252%2041.2331%2084.8491%2041.1289%2084.5729%2041.0313L84.4465%2040.9847C84.3356%2040.9481%2084.2336%2040.9149%2084.1271%2040.8805C83.9819%2040.8328%2083.8366%2040.7818%2083.6924%2040.7385C83.6159%2040.7153%2083.5405%2040.6975%2083.464%2040.6753C83.3354%2040.6376%2083.2078%2040.6033%2083.0792%2040.5644C82.9827%2040.5389%2082.8851%2040.5079%2082.7898%2040.4846C82.6944%2040.4613%2082.5802%2040.4436%2082.4737%2040.4192C82.3462%2040.3903%2082.2176%2040.3604%2082.0912%2040.3327C82.0268%2040.3194%2081.9603%2040.3016%2081.896%2040.2894C81.7729%2040.265%2081.6531%2040.2506%2081.53%2040.2295C81.3826%2040.204%2081.234%2040.1774%2081.0865%2040.1564C81.0388%2040.1508%2080.9878%2040.1397%2080.939%2040.1331C80.8148%2040.1109%2080.6928%2040.1109%2080.5697%2040.0954C80.4122%2040.0776%2080.2548%2040.0599%2080.0995%2040.0477C80.0563%2040.0477%2080.0108%2040.0377%2079.9676%2040.0344C79.8567%2040.0266%2079.7558%2040.0288%2079.6482%2040.0233C79.4608%2040.0144%2079.2756%2040.0067%2079.0893%2040C79.0394%2040%2078.9884%2040%2078.9385%2040C78.8575%2040%2078.7799%2040.01%2078.699%2040.0111C78.4661%2040.0111%2078.2354%2040.0266%2078.0081%2040.0432C77.9405%2040.0432%2077.8706%2040.0432%2077.8041%2040.0532C77.7054%2040.0621%2077.61%2040.0765%2077.5124%2040.0876L77.3017%2040.1109C77.0455%2040.1453%2076.7916%2040.1841%2076.5421%2040.2351L76.5144%2040.244C76.4401%2040.2595%2076.368%2040.2794%2076.2926%2040.2961C76.0897%2040.3415%2075.8878%2040.3892%2075.6904%2040.4447C75.5895%2040.4735%2075.4919%2040.5068%2075.3921%2040.5389C75.2646%2040.5789%2075.1349%2040.6143%2075.0085%2040.6598C74.9752%2040.6709%2074.9441%2040.6875%2074.912%2040.6986C74.7146%2040.7707%2074.5239%2040.8517%2074.332%2040.9348C74.2389%2040.9747%2074.1435%2041.0113%2074.0526%2041.0535C73.7731%2041.1843%2073.4981%2041.3252%2073.2331%2041.4793L62.5375%2047.6893C62.8036%2047.5351%2063.0775%2047.3943%2063.3559%2047.2635C63.4479%2047.2202%2063.5433%2047.1847%2063.6364%2047.1437C63.8272%2047.0605%2064.019%2046.9796%2064.2153%2046.9075C64.3727%2046.8498%2064.5335%2046.7966%2064.6954%2046.7478C64.7952%2046.7168%2064.8928%2046.6824%2064.9937%2046.6536C65.1911%2046.5981%2065.3941%2046.5504%2065.5959%2046.505C65.6691%2046.4883%2065.7412%2046.4684%2065.8177%2046.4528C66.0761%2046.4007%2066.3389%2046.3586%2066.605%2046.3231C66.6749%2046.3142%2066.7458%2046.3065%2066.8157%2046.2987C66.9798%2046.2798%2067.1484%2046.2665%2067.3114%2046.2543C67.5387%2046.2366%2067.7694%2046.2266%2068.0023%2046.2211C68.132%2046.2211%2068.2606%2046.2133%2068.3915%2046.2144C68.5756%2046.2144%2068.763%2046.2244%2068.946%2046.2333C69.0957%2046.2399%2069.2454%2046.2455%2069.3973%2046.2577C69.5492%2046.2699%2069.71%2046.2887%2069.8675%2046.3054C70.0249%2046.322%2070.2112%2046.3431%2070.3865%2046.3675C70.5328%2046.3885%2070.6803%2046.4151%2070.83%2046.4406C71.0163%2046.4728%2071.2026%2046.505%2071.3911%2046.5449C71.5176%2046.5715%2071.6462%2046.6003%2071.7737%2046.6303C71.9748%2046.6768%2072.177%2046.7271%2072.3803%2046.7811C72.5078%2046.8155%2072.6365%2046.8498%2072.764%2046.892C72.9858%2046.9552%2073.2076%2047.025%2073.4293%2047.0971C73.5402%2047.1315%2073.6411%2047.1648%2073.7476%2047.2014C74.0625%2047.3123%2074.3786%2047.4231%2074.698%2047.5529L74.7423%2047.5695C75.075%2047.7026%2075.4077%2047.8479%2075.7403%2047.9998C75.8435%2048.0464%2075.9466%2048.0974%2076.0508%2048.1462C76.2896%2048.2585%2076.5295%2048.3757%2076.7705%2048.4977C76.8881%2048.5576%2077.006%2048.6186%2077.1243%2048.6807C77.4414%2048.8481%2077.7597%2049.0189%2078.0802%2049.2041L97.5219%2060.4253C97.8834%2060.6338%2098.2427%2060.8515%2098.5997%2061.0785L98.6507%2061.1095C98.9945%2061.3313%2099.3361%2061.5531%2099.6754%2061.7915C99.7918%2061.8724%2099.9072%2061.9567%20100.022%2062.0388C100.244%2062.1996%20100.476%2062.3626%20100.701%2062.53C100.839%2062.6332%20100.975%2062.7385%20101.113%2062.8439C101.316%2062.9999%20101.518%2063.1588%20101.72%2063.3207C101.868%2063.439%20102.016%2063.5588%20102.164%2063.68C102.357%2063.8397%20102.549%2064.0016%20102.739%2064.1657C102.887%2064.2951%20103.035%2064.4256%20103.183%2064.5572C103.37%2064.7228%20103.555%2064.8909%20103.737%2065.0617C103.886%2065.1981%20104.035%2065.3356%20104.181%2065.4753C104.369%2065.6539%20104.557%2065.8357%20104.743%2066.0187C104.878%2066.1518%20105.015%2066.2849%20105.149%2066.4202C105.343%2066.6153%20105.534%2066.8149%20105.726%2067.0145C105.85%2067.1443%20105.974%2067.2718%20106.097%2067.4038C106.319%2067.6433%20106.541%2067.8884%20106.763%2068.1334C106.845%2068.2255%20106.929%2068.3153%20107.011%2068.4085C107.313%2068.7522%20107.612%2069.1015%20107.907%2069.4564C107.97%2069.5329%20108.031%2069.6116%20108.094%2069.6882C108.325%2069.9698%20108.556%2070.2526%20108.781%2070.5409C109.05%2070.8847%20109.315%2071.2329%20109.576%2071.5855C109.619%2071.6443%20109.665%2071.6964%20109.709%2071.7607C110.133%2072.3363%20110.543%2072.9251%20110.944%2073.5195C111.042%2073.6637%20111.141%2073.8078%20111.236%2073.9531C111.383%2074.1749%20111.529%2074.4022%20111.674%2074.6284C111.8%2074.8258%20111.927%2075.0232%20112.051%2075.2228C112.194%2075.4524%20112.333%2075.6841%20112.472%2075.9159C112.583%2076.1011%20112.694%2076.2863%20112.805%2076.4703C113.13%2077.027%20113.446%2077.5893%20113.751%2078.157C113.862%2078.3633%20113.973%2078.5706%20114.076%2078.7769C114.179%2078.9832%20114.307%2079.2205%20114.417%2079.4423C114.57%2079.7472%20114.72%2080.0544%20114.867%2080.3616C114.918%2080.4725%20114.97%2080.5723%20115.02%2080.6787C115.209%2081.0816%20115.394%2081.4882%20115.574%2081.8985C115.621%2082.0094%20115.666%2082.1126%20115.712%2082.2201C115.842%2082.5232%20115.97%2082.8274%20116.095%2083.1328C116.152%2083.2718%20116.208%2083.4104%20116.263%2083.5486C116.379%2083.8399%20116.49%2084.1315%20116.595%2084.4236C116.643%2084.5511%20116.692%2084.6786%20116.74%2084.8061C116.874%2085.1758%20117.004%2085.5454%20117.129%2085.9151C117.147%2085.9661%20117.165%2086.0182%20117.183%2086.0692C117.324%2086.4891%20117.457%2086.909%20117.585%2087.3289C117.624%2087.4609%20117.661%2087.5929%20117.695%2087.7248C117.782%2088.0176%20117.866%2088.3103%20117.945%2088.6031C117.988%2088.7628%20118.029%2088.9225%20118.071%2089.0833C118.142%2089.3531%20118.209%2089.6229%20118.273%2089.8928C118.312%2090.0532%20118.349%2090.2133%20118.384%2090.3729C118.447%2090.6494%20118.506%2090.9259%20118.561%2091.2024C118.591%2091.3499%20118.622%2091.4974%20118.651%2091.646C118.719%2091.9986%20118.782%2092.3502%20118.839%2092.7006C118.849%2092.7638%20118.862%2092.827%20118.872%2092.8902C118.938%2093.3042%20118.996%2093.7167%20119.046%2094.1278C119.061%2094.2387%20119.07%2094.3496%20119.084%2094.4604C119.118%2094.7562%20119.148%2095.0537%20119.175%2095.3531C119.187%2095.4929%20119.198%2095.6315%20119.208%2095.7701C119.229%2096.0495%20119.246%2096.3279%20119.259%2096.6051C119.266%2096.7371%20119.272%2096.869%20119.278%2097.001C119.292%2097.3936%20119.301%2097.7839%20119.3%2098.172L119.237%20120.505C119.237%20120.912%20119.225%20121.31%20119.207%20121.702C119.207%20121.813%20119.192%20121.924%20119.187%20122.035C119.171%20122.304%20119.154%20122.572%20119.129%20122.835C119.116%20122.986%20119.099%20123.135%20119.083%20123.285C119.058%20123.507%20119.033%20123.728%20119.003%20123.95C118.981%20124.11%20118.957%20124.266%20118.932%20124.423C118.9%20124.624%20118.866%20124.822%20118.829%20125.018C118.795%20125.193%20118.761%20125.367%20118.725%20125.538C118.688%20125.71%20118.648%20125.884%20118.605%20126.06C118.556%20126.262%20118.504%20126.461%20118.449%20126.657C118.406%20126.811%20118.363%20126.964%20118.316%20127.115C118.244%20127.349%20118.168%20127.577%20118.088%20127.804C118.044%20127.928%20118.001%20128.053%20117.956%20128.175C117.811%20128.557%20117.657%20128.928%20117.488%20129.284C117.357%20129.561%20117.221%20129.832%20117.077%20130.092C117.061%20130.121%20117.042%20130.148%20117.027%20130.177C116.895%20130.412%20116.758%20130.64%20116.616%20130.862C116.582%20130.915%20116.545%20130.966%20116.506%20131.02C116.386%20131.199%20116.263%20131.375%20116.136%20131.546C116.084%20131.616%20116.031%20131.686%20115.978%20131.755C115.855%20131.913%20115.729%20132.067%20115.6%20132.216C115.552%20132.273%20115.504%20132.327%20115.455%20132.385C115.279%20132.582%20115.097%20132.774%20114.91%20132.956C114.881%20132.983%20114.85%20133.01%20114.821%20133.038C114.66%20133.191%20114.495%20133.339%20114.327%20133.481C114.264%20133.533%20114.2%20133.584%20114.137%20133.635C113.989%20133.753%20113.841%20133.866%20113.693%20133.975C113.63%20134.02%20113.568%20134.067%20113.504%20134.11C113.292%20134.255%20113.077%20134.395%20112.855%20134.524L123.549%20128.314C123.771%20128.185%20123.986%20128.045%20124.199%20127.9C124.264%20127.857%20124.326%20127.81%20124.388%20127.765C124.539%20127.656%20124.687%20127.543%20124.831%20127.425C124.895%20127.374%20124.959%20127.323%20125.021%20127.271C125.19%20127.129%20125.356%20126.982%20125.518%20126.828C125.547%20126.801%20125.577%20126.776%20125.604%20126.748C125.792%20126.566%20125.974%20126.374%20126.15%20126.177C126.199%20126.121%20126.246%20126.066%20126.295%20126.007C126.424%20125.859%20126.55%20125.706%20126.673%20125.546C126.727%20125.477%20126.784%20125.407%20126.832%20125.337C126.958%20125.167%20127.081%20124.991%20127.2%20124.812C127.236%20124.759%20127.272%20124.707%20127.311%20124.653L127.344%20124.604C127.475%20124.399%20127.598%20124.186%20127.72%20123.971C127.737%20123.941%20127.756%20123.915%20127.772%20123.885C127.911%20123.633%20128.044%20123.375%20128.17%20123.108L128.184%20123.076C128.352%20122.72%20128.506%20122.349%20128.652%20121.967C128.665%20121.933%20128.68%20121.902%20128.694%20121.868C128.726%20121.78%20128.753%20121.686%20128.784%20121.597C128.863%20121.375%20128.941%20121.141%20129.013%20120.907C129.033%20120.843%20129.056%20120.783%20129.075%20120.719C129.101%20120.632%20129.121%20120.539%20129.145%20120.451C129.2%20120.255%20129.252%20120.056%20129.301%20119.854C129.321%20119.769%20129.347%20119.691%20129.366%20119.605C129.385%20119.52%20129.401%20119.423%20129.42%20119.334C129.457%20119.161%20129.492%20118.987%20129.525%20118.811C129.543%20118.719%20129.564%20118.631%20129.581%20118.537C129.598%20118.444%20129.612%20118.323%20129.629%20118.218C129.653%20118.062%20129.677%20117.904%20129.7%20117.745C129.711%20117.661%20129.726%20117.582%20129.736%20117.497C129.753%20117.362%20129.764%20117.221%20129.779%20117.085C129.795%20116.948%20129.813%20116.785%20129.826%20116.632C129.832%20116.57%20129.84%20116.51%20129.845%20116.448C129.861%20116.249%20129.87%20116.041%20129.883%20115.837C129.889%20115.726%20129.898%20115.615%20129.904%20115.505C129.904%20115.477%20129.904%20115.45%20129.904%20115.422C129.918%20115.077%20129.927%20114.726%20129.928%20114.37V114.308L129.991%2091.9753C130.002%2091.6331%20130.003%2091.2978%20129.993%2090.9695Z'%20fill='%230B0E11'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_302_6100'%20x1='68.0078'%20y1='92.449'%20x2='102.417'%20y2='92.449'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23313131'/%3e%3cstop%20offset='1'%20stop-color='%230B0E11'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_302_6100'%20x1='50.0001'%20y1='94.977'%20x2='113.22'%20y2='94.977'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%234E4E4E'/%3e%3cstop%20offset='1'%20stop-color='%230B0E11'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e"}},i.index)):void 0!==i[3]?n.push(t.jsx("a",{href:i[4],target:"_blank",rel:"noopener noreferrer",className:"mc-link",children:i[3]},i.index)):void 0!==i[5]?n.push(t.jsx("a",{href:i[5],target:"_blank",rel:"noopener noreferrer",className:"mc-link",children:i[5]},i.index)):void 0!==i[6]?n.push(t.jsx("strong",{children:vp(i[6])},i.index)):void 0!==i[7]?n.push(t.jsx("strong",{children:vp(i[7])},i.index)):void 0!==i[8]?n.push(t.jsx("em",{children:vp(i[8])},i.index)):void 0!==i[9]?n.push(t.jsx("em",{children:vp(i[9])},i.index)):void 0!==i[10]?n.push(t.jsx("del",{children:vp(i[10])},i.index)):void 0!==i[11]&&n.push(t.jsx("code",{className:"mc-inline-code",children:i[11]},i.index)),r=i.index+i[0].length;return r<e.length&&n.push(e.slice(r)),n.length>0?n:[e]}const Ap=({content:e})=>{const n=e.split("\n"),o=[];let i=0;for(;i<n.length;){const e=n[i];if(e.trimStart().startsWith("```")){const r=e.trimStart().slice(3)?.trim(),a=[];for(i++;i<n.length&&!n[i].trimStart().startsWith("```");)a.push(n[i]),i++;o.push(t.jsxs("div",{className:"mc-codeblock",children:[r&&t.jsx("div",{className:"mc-codeblock-lang",children:r}),t.jsx("pre",{children:t.jsx("code",{children:a.join("\n")})})]},`code-${i}`)),i++;continue}if(/^(\s*[-*_]\s*){3,}$/.test(e)){o.push(t.jsx("hr",{className:"mc-hr"},`hr-${i}`)),i++;continue}const r=e.match(/^(#{1,3})\s+(.+)/);if(r){const e=r[1].length,n=r[2];o.push(t.jsx("div",{className:`mc-heading mc-h${e}`,children:vp(n)},`h-${i}`)),i++;continue}if(e.trimStart().startsWith("> ")){const e=[];for(;i<n.length&&n[i].trimStart().startsWith("> ");)e.push(n[i].replace(/^\s*>\s?/,"")),i++;o.push(t.jsx("div",{className:"mc-blockquote",children:e.map((e,n)=>t.jsx("div",{children:vp(e)},n))},`bq-${i}`));continue}""!==e?.trim()?(o.push(t.jsx("div",{className:"mc-line",children:vp(e)},`line-${i}`)),i++):(o.push(t.jsx("div",{className:"mc-empty-line"},`empty-${i}`)),i++)}return t.jsx("div",{className:"message-content",children:o})},kp=({isOpen:e,onClose:o,onTransaction:i,position:r="bottom-right",modalChatStyle:a={},chatTitle:c,welcomeMessage:u,customSuggestions:l,additionalSuggestions:d,chatIcon:h})=>{const{t:f,ti:p}=s(),{messages:m,addMessage:w,updateMessageAction:g,updateMessageActionParameters:b,updateMessageText:y,clearMessages:v,clearMessagesById:A,updateMessageType:k}=function({customWelcomeMessage:e}={}){const{account:t}=hh(),{t:o}=s(),i=(r=t?.address,a=t?.chainId,r&&a?`${r}_${a}`:"");var r,a;const c=n.useMemo(()=>yh(e||o("welcomeMessage")),[o,e]),[u,l]=n.useState(()=>i||"pending"),[d,h]=n.useState(()=>{const t=Ah();return i?t&&t.owner===i?t.messages:yh(e||o("welcomeMessage")):t?.messages??yh(e||o("welcomeMessage"))});if("pending"===u&&i){const e=Ah();e&&e.owner===i?h(e.messages):kh(i,d),l(i)}else"pending"!==u&&i&&u!==i&&(h(c),kh(i,c),l(i));const f=n.useMemo(()=>d.map(t=>t.id===bh?{...t,text:e||o("welcomeMessage")}:t),[d,o,e]);n.useEffect(()=>{"pending"!==u&&kh(u,d)},[d,u]),n.useEffect(()=>{const e=[];for(let t=0;t<sh.length;t++){const n=sh.key(t);n&&n.startsWith(mh+"_")&&e.push(n)}e.forEach(e=>sh.removeItem(e))},[]);const p=n.useCallback(()=>{h(c),kh(i,c)},[i,c]),m=n.useCallback(e=>{h(t=>{const n=t.filter(t=>!e.includes(t.id));return n.length>wh?n.slice(n.length-wh):n})},[]);return{messages:f,setMessages:h,addMessage:(e,t,n,o,i,r="web3")=>{const a=n?d.find(e=>e.id===n):void 0,s={id:gh(),text:e,sender:t,timestamp:new Date,typeChat:r,...a&&{replyTo:{id:a.id,text:a.text,sender:a.sender}},...o&&{buttons:o},...i&&{actionData:i}};return h(e=>{const t=[...e,s];return t.length>wh?t.slice(t.length-wh):t}),s},updateMessageAction:(e,t)=>{h(n=>n.map(n=>n.id===e&&n.actionData?{...n,actionData:{...n.actionData,status:t}}:n))},updateMessageActionParameters:(e,t)=>{h(n=>n.map(n=>n.id===e&&n.actionData?{...n,actionData:{...n.actionData,parameters:{...n.actionData.parameters,...t}}}:n))},updateMessageText:(e,t)=>{h(n=>n.map(n=>n.id===e?{...n,text:t}:n))},getMessageById:e=>d.find(t=>t.id===e),clearMessages:p,clearMessagesById:m,updateMessageType:(e,t)=>{h(n=>n.map(n=>n.id===e?{...n,typeChat:t}:n))}}}({customWelcomeMessage:u}),[T,E]=n.useState(""),[x,C]=n.useState(!1),[I,S]=n.useState(!0),[N,B]=n.useState(null),[M,U]=n.useState({}),R=n.useRef(null),P=n.useRef(null),O=n.useRef(null),L=n.useRef(null),D=n.useRef(!1),F=n.useRef(I),{modal:q}=uh();n.useEffect(()=>{F.current=I},[I]);const{account:H,chainData:V,chainType:W,chainTypeMoralis:G,chainId:J,isChainSupported:Y}=hh(),{config:z}=(()=>{const e=n.useContext(Th);if(!e)throw new Error("useConfig must be used within ConfigProvider");return e})(),j=J&&z?.rpcUrls?.[J]||void 0,X=n.useCallback(()=>{v(),E(""),B(null),C(!1),S(!0)},[v]);n.useEffect(()=>(tf(X),()=>{tf(null)}),[X]);const Q=n.useCallback(e=>{B(e),$h.isDesktop&&O.current?.focus()},[]),{getDataBuyToken:K,updateDataBuyToken:Z}=function(){const e=n.useCallback(()=>{const e=sh.getItem(nf);if(e)try{return JSON.parse(e)}catch{return{...of}}return{...of}},[]),t=n.useCallback(e=>{sh.setItem(nf,JSON.stringify(e))},[]),o=n.useCallback(n=>{const o=e();t({...o,...n})},[e,t]);return{getDataBuyToken:e,setDataBuyToken:t,updateDataBuyToken:o}}(),{showTrendingTokens:_,showMyNFTs:$,showMyBalances:ee}=function(e){const{addMessage:t,setIsTyping:o,chainData:i,chainType:r,account:a,chainTypeMoralis:s,t:c,ti:u}=e;return{showTrendingTokens:n.useCallback(async()=>{try{o(!0);const e=i?.tokenTrendingDefault||[],[n,a]=await Promise.allSettled([af.getTopGainers(r,"24h",5),af.getTokensDetails(e,r)]);let s=[];"fulfilled"===n.status&&n.value?.data&&(s=[...n.value.data]),"fulfilled"===a.status&&a.value?.data&&(s=[...a.value.data,...s]),s=s.filter((e,t,n)=>t===n.findIndex(t=>t.address.toLowerCase()===e.address.toLowerCase()));const l=s.map(e=>({id:e?.symbol,text:e?.symbol,value:u("buttonBuyToken",{name:e.name,symbol:e?.symbol||""}),action:"click_buy_item_token_button",extraData:{tokenAddress:e?.address||"",symbol:e?.symbol||"",decimals:e?.decimals||18}}));await oh(1e3),o(!1),t(u("trendingTokensHeader",{chain:i?.name||"Unknown"}),"bot");const d=s.map((e,t)=>`${t+1}. ${e.name} (${e?.auditGoplus?.token_symbol||e.symbol||"Unknown"})\n$${Yh(e?.price||0).decimalPlaces(4).toFormat()} (${e.price_change_percentage_24h||e.priceChange}%)\n\n---\n`).join("\n");t(`${d}${c("trendingTokensQuestion")}`,"bot",void 0,l)}catch(e){t(c("trendingTokensError"),"bot")}finally{o(!1)}},[t,o,i,r,c,u]),showMyNFTs:n.useCallback(async()=>{try{const{getDataPackage:e}=await Promise.resolve().then(()=>lh),n=e()?.linkViewNft;t(n?u("viewNftViaWebsiteWithLink",{link:n}):c("viewNftViaWebsite"),"bot"),o(!1)}catch(e){o(!1),t(c("nftFetchError"),"bot")}},[t,o,c,u]),showMyBalances:n.useCallback(async()=>{try{o(!0);const e=await hf({address:a?.address||"",chain:s});if(e?.success&&e?.data?.result&&e.data.result.length>0){const n=e.data.result.map((e,t)=>{const n=void 0!==e.usd_value?` ≈ $${Yh(e.usd_value).decimalPlaces(2).toFormat()}`:"";return`${t+1}. **${e.name}** (${e.symbol})\n Balance: ${e.balance_formatted}${n}`}).join("\n\n");await oh(500),o(!1),t(u("viewBalancesHeader",{chain:i?.name||"this chain",list:n}),"bot")}else o(!1),t(c("viewBalancesEmpty"),"bot")}catch(e){o(!1),t(c("viewBalancesFetchError"),"bot")}},[a?.address,s,t,o,i?.name,c,u])}}({addMessage:w,setIsTyping:C,chainData:V,chainType:W,account:H,chainTypeMoralis:G,t:f,ti:p}),{onClickItemTokenToBuy:te,onClickItemUserBalanceToBuy:ne,showPreviewToBuy:oe}=function(e){const{getDataBuyToken:t,updateDataBuyToken:o,addMessage:i,setIsTyping:r,account:a,chainData:s,chainTypeMoralis:c,chainId:u,rpcUrl:l,t:d,ti:h}=e;return{onClickItemTokenToBuy:n.useCallback(async(e,t)=>{o({descTokenAddress:e,descTokenDecimals:t||18});try{r(!0);const e=await hf({address:a?.address||"",chain:c});if(e?.success&&e?.data?.result){const t=e.data.result;if(t?.length>0){const e=t.map(e=>({id:e.token_address,text:`${e.name}: ${e.balance_formatted} ${e.symbol} ($${Yh(e.usd_value||0).decimalPlaces(2).toFormat()||"0"})`,value:h("buttonBuyWith",{symbol:e.symbol}),action:"click_balance_item_user_to_buy_button",fullWidth:!0,extraData:{tokenAddress:e.token_address,symbol:e.symbol,balance:e.balance_formatted,usdValue:e.usd_value,decimals:e.decimals}}));i(h("walletBalanceSpendable",{chain:s?.name||"unknown"}),"bot",void 0,e)}else i(h("walletNoTokensFound",{chain:s?.name||"unknown"}),"bot")}else i(d("walletFetchFailed"),"bot")}catch(n){i(d("walletFetchError"),"bot")}finally{r(!1)}},[o,a?.address,c,i,r,s?.name,d,h]),onClickItemUserBalanceToBuy:n.useCallback(async(e,t,n,r)=>{o({srcTokenAddress:e,srcTokenDecimals:r||18});let a=n||"0";if(e===fi)try{const e=await Mf({chainId:u,rpcUrl:l});if(e.isGreaterThan(0)){const t=e.times(1e6),o=new Yh(hi(n,r||18).toString()).minus(t);a=o.isGreaterThan(0)?Yh(Et(BigInt(o.toFixed(0)),18)).toFixed():"0"}}catch(c){}const s=[25,50,75,100].map(n=>({id:`percent-${n}`,text:`${n}%`,value:h("buttonUsePercent",{percent:String(n),symbol:t}),action:"select_percent",extraData:{percent:n,tokenAddress:e,tokenSymbol:t,tokenDecimals:r||18,tokenBalance:a}}));Yh(a).isZero()?i(h("insufficientFeeToken",{symbol:t}),"bot"):i(h("selectAmountOf",{symbol:t,balance:a}),"bot",void 0,s)},[i,u,l,o,h]),showPreviewToBuy:n.useCallback(async(e,n,r,c)=>{const f={amount:Yh(n).times(e).dividedBy(100).toFixed()};void 0!==r&&(f.srcTokenAddress=r),void 0!==c&&(f.srcTokenDecimals=c),o(f);const p=t(),m=hi(p.amount,p.srcTokenDecimals||18).toString(),w=await bf({chainId:u,tokenIn:p.srcTokenAddress,tokenInAmount:m,tokenOut:p.descTokenAddress,tokenOutRecipient:a?.address||"",slippage:"auto",accesstoken:"d6c45897b8f6"});if(w.success&&w.data){const e=w.data,t=e.tokenIn,n=e.tokenOut,o=Yh(Et(BigInt(t.amount||0),t.decimals)).decimalPlaces(8).toFormat(),r=Yh(Et(BigInt(n.amount||0),n.decimals)).decimalPlaces(8).toFormat();let c=!1;if(p.srcTokenAddress!==fi&&""!==p.srcTokenAddress&&a?.address&&e.tx?.to)try{const t=await If({tokenAddress:p.srcTokenAddress,ownerAddress:a.address,spenderAddress:e.tx.to,chainId:u,rpcUrl:l});c=Yh(t.toString()).isLessThan(m)}catch(g){c=!0}const f=e.estimatedTransactionFee?.total?Yh(e.estimatedTransactionFee.total):Yh(0);let b=Yh(0);if(c&&a?.address)try{const t=Sf({tokenAddress:p.srcTokenAddress,spenderAddress:e.tx?.to||"",fromAddress:a.address,chainId:u,amount:m});b=await Bf({from:a.address,to:t.to,data:t.data,chainId:u,rpcUrl:l})}catch(g){}const y=f.plus(b),v=s?.nativeCurrency?.symbol||"native";let A="",k=!1;if(a?.address&&y.isGreaterThan(0))try{const e=await Nf({address:a.address,chainId:u,rpcUrl:l});if(e.isLessThan(y)){k=!0;const t=Yh(Et(BigInt(e.toFixed(0)),18)).decimalPlaces(8).toFormat(),n=Yh(Et(BigInt(y.toFixed(0)),18)).decimalPlaces(8).toFormat();A=h("swapFeeWarning",{symbol:v,balance:t,needed:n})}}catch(g){}const T=`From: ${o} ${t.symbol}\n⬇️\nTo: ${r} ${n.symbol}\n\n`+A+"\n";if(k)i(T,"bot");else if(c){const n=[{id:"approve-for-swap",text:h("swapApproveButton",{symbol:t.symbol}),value:h("swapApproveValue",{symbol:t.symbol}),action:"approve_for_swap",fullWidth:!0,extraData:{tokenAddress:p.srcTokenAddress,spenderAddress:e.tx.to,tokenSymbol:t.symbol,amountInWei:m,tx:e.tx}}];i(T+h("swapNeedApprove",{symbol:t.symbol}),"bot",void 0,n)}else{const t=[{id:"confirm-swap",text:d("swapConfirmButton"),value:d("swapConfirmValue"),action:"confirm_swap",extraData:{tx:e.tx}}];i(T+d("swapReadyToProceed"),"bot",void 0,t)}}else i(h("swapEstimationError",{error:w.errorMessage||w.error||"Unknown error"}),"bot")},[t,o,i,u,a?.address,s?.nativeCurrency?.symbol,l,d,h])}}({getDataBuyToken:K,updateDataBuyToken:Z,addMessage:w,setIsTyping:C,account:H,chainData:V,chainTypeMoralis:G,chainId:J,rpcUrl:j,t:f,ti:p}),{handleSendMessage:ie}=function(e){const{inputValue:t,setInputValue:o,isTyping:i,setIsTyping:r,replyingTo:a,setReplyingTo:s,setShowSuggestions:c,inputRef:u,messages:l,addMessage:d,updateMessageType:h,account:f,chainData:p,chainType:m,chainTypeMoralis:w,chainId:g,isChainSupported:b,rpcUrl:y,t:v,ti:A,updateDataBuyToken:k,showTrendingTokens:T,showMyNFTs:E,showMyBalances:x,onClickItemTokenToBuy:C,onClickItemUserBalanceToBuy:I,showPreviewToBuy:S}=e;return{handleSendMessage:n.useCallback(async e=>{const n=e??t?.trim();if(!n||i)return;const N=a,B=d(n,"user",a?.id);o(""),s(null),r(!0),c(!1);try{const e=l.slice(-10);let t="",o="";if(e.length>0){t="\n\n## CONVERSATION HISTORY:\n";for(const n of e)"user"===n.sender?t+=`User: ${n.text}\n`:t+=`Assistant: ${n.text.length>400?n.text.substring(0,400)+"...":n.text}\n`;t+="\n---\n"}let i,a,s=n;N&&(s=`[Replying to ${"user"===N.sender?"my previous":"your"} message: "${N.text}"]\n\n${s}`);try{const i=await Ff.checkInfoQuestion(n,t);if(i.language&&(o=i.language),"faq"===i.model&&i.faqAnswer)return r(!1),void d(i.faqAnswer,"bot",B.id);if("pool"===i.model&&b)try{const t=await wp({question:n,language:o||"en",currentChain:w||m||void 0,walletAddress:f?.address||void 0,chatHistory:e.map(e=>({role:"user"===e.sender?"user":"assistant",content:e.text})),signal:void 0});if(t){if(r(!1),"send_position"===t.parsed.intent){const e=t.parsed.poolId;if(!e)return void d(v("sendPositionNoId"),"bot",B.id);if(!f?.address)return void d(v("walletNotConnected"),"bot",B.id);try{r(!0);const n=await mf({address:f.address,chain:w,limit:100,exclude_spam:!1});if(n?.success&&n?.data?.result){const o=n.data.result.find(t=>t.token_id===e);if(o){const n=o.normalized_metadata?.name||o.name||`LP Position #${e}`,i=o.normalized_metadata?.image||o.media?.original_media_url||"",r={contract_address:o.token_address,token_id:o.token_id,to_address:t.parsed.toAddress||"",token_standard:o.contract_type||"ERC721",amount:"1",maxAmount:o.amount||"1",nft_name:n};d(A("nftSendReview",{name:n,standard:o.contract_type||"ERC721",tokenId:o.token_id}),"bot",B.id,void 0,{action:"send_nft",parameters:r,status:"pending",nftInfo:{name:n,image:i||void 0,tokenId:o.token_id,contractAddress:o.token_address,tokenStandard:o.contract_type||"ERC721"}})}else d(A("sendPositionNotFound",{id:e,chain:p?.name||w||m||"this chain"}),"bot",B.id)}else d(v("nftNoCollection"),"bot",B.id)}catch(M){d(v("sendPositionFetchError"),"bot",B.id)}finally{r(!1)}return}return void d(t.response,"bot",B.id)}}catch(U){}if("general"===i.model){h(B.id,"normal");const e=l.filter(e=>"normal"===e.typeChat);let t="";if(e.slice(-20).length>0){t="\n\n## CONVERSATION HISTORY:\n";for(const n of e.slice(-20))"user"===n.sender?t+=`User: ${n.text}\n`:t+=`Assistant: ${n.text.length>400?n.text.substring(0,400)+"...":n.text}\n\n`}const n=await Ff.generateContent(s,t,o),i=yp(n);return r(!1),void d(i?.message||n,"bot",void 0,void 0,void 0,"normal")}}catch(R){}if(f?.address&&b)try{const[e,t]=await Promise.allSettled([hf({address:f.address,chain:w}),mf({address:f.address,chain:w,limit:100,exclude_spam:!0})]);"fulfilled"===e.status&&e.value?.success&&e.value?.data?.result&&(i=e.value.data.result.map(e=>({symbol:e.symbol,name:e.name,balance_formatted:e.balance_formatted,usd_value:e.usd_value,native_token:e.native_token,token_address:e.token_address,price:e.usd_price}))),"fulfilled"===t.status&&t.value?.success&&t.value?.data?.result&&(a=t.value.data.result.map(e=>({name:e.normalized_metadata?.name||e.name||`#${e.token_id}`,token_address:e.token_address,token_id:e.token_id,contract_type:e.contract_type||"",amount:e.amount||"1"})))}catch{}const c=function(e){const{walletAddress:t,chainName:n,chainId:o,nativeSymbol:i,walletTokens:r,walletNfts:a,language:s}=e;if(!t)return`You are a Web3 wallet assistant for the crypto EVM wallet app.\nThe user is currently NOT connected to any wallet.\n\n## YOUR ROLE:\n- You are a friendly, knowledgeable assistant that can talk about ANY topic naturally\n- You can freely answer general questions, discuss crypto tokens, prices, market info, provide token details, etc. — these do NOT require a wallet connection\n- ONLY ask the user to connect their wallet when their request explicitly requires their personal wallet/address, such as:\n - Sending tokens or NFTs\n - Swapping tokens\n - Approving token spending\n - Wrapping/unwrapping tokens\n - Checking THEIR OWN balance ("what is MY balance?", "how much ETH do I have?")\n - Viewing THEIR OWN NFT collection\n - Any action that reads or writes to THEIR wallet address\n- For all other requests (token info, prices, general crypto questions, market data, etc.), respond normally and helpfully\n- ${gp(s)}\n- **LANGUAGE DETECTION — CRYPTO TICKERS**: Crypto token symbols and tickers (ETH, BTC, USDC, BNB, MATIC, SOL, etc.) are NOT language indicators. They are proper nouns used in ALL languages. Detect the language from the surrounding non-ticker text only. Example: "ETHの現在の価格は?" → Japanese (the surrounding text は Japanese characters). "ETH의 가격은?" → Korean. "Giá ETH là bao nhiêu?" → Vietnamese. NEVER treat a ticker symbol as evidence of English.\n\n## RESPONSE FORMAT:\nAlways respond with a valid JSON object:\n{"action":"chat","message":"<your friendly response to the user>", "suggested_actions":[{"label":"<short button text>","prompt":"<message sent when clicked>"}]}\n\n## RULES:\n- suggested_actions: include when your message offers the user interactive choices or asks a follow-up question. NEVER include suggested_actions that ask the user to connect their wallet (e.g., "Connect wallet", "Connect now", etc.) — the app handles wallet connection separately\n- **CRITICAL**: NEVER include any "Buy" actions (e.g., "Buy USDC", "Buy ETH", "Purchase token", etc.) in suggested_actions. The app handles Buy buttons separately. Only include non-buy actions in suggested_actions (e.g., "Send token", "Swap token", "Check balance", "Show my NFTs").\n- For wallet-required actions, politely explain the user needs to connect their wallet first, and put this in the "message" field\n- ALWAYS respond with raw JSON only, never wrap in \`\`\`json code blocks\n- ${gp(s)}`;if(t&&!xi[o]?.isSupported)return`You are a Web3 wallet assistant for the crypto EVM wallet app.\n The user's wallet address is: ${t}\n The user is selected on (chainId: ${o}) an UNSUPPORTED chain.\n\n ## YOUR ROLE:\n - You are a friendly, knowledgeable assistant that can talk about ANY topic naturally\n - You can freely answer general questions, discuss crypto tokens, prices, market info, token details, etc. — these do NOT require a supported chain\n - **BLOCKED on unsupported chain** — if the user asks for any of the following, politely inform them that chain (chainId: ${o}) is not currently supported and the action cannot be performed:\n - Checking THEIR OWN balance ("what is my balance?", "how much ETH do I have?")\n - Sending tokens or NFTs\n - Swapping or buying tokens\n - Approving token spending\n - Wrapping/unwrapping tokens\n - Viewing or transferring their NFT collection\n - Any action that reads or writes to their wallet on the current chain\n - **ALLOWED on unsupported chain** — respond normally and helpfully for:\n - General questions (weather, coding, history, math, etc.)\n - Token information, prices, market data, token details\n - Any query that does NOT require interacting with the user's wallet on the current chain\n - ${gp(s)}\n - **LANGUAGE DETECTION — CRYPTO TICKERS**: Crypto token symbols and tickers (ETH, BTC, USDC, BNB, MATIC, SOL, etc.) are NOT language indicators. They are proper nouns used in ALL languages. Detect the language from the surrounding non-ticker text only. Example: "ETHの現在の価格は?" → Japanese. "ETH의 가격은?" → Korean. "Giá ETH là bao nhiêu?" → Vietnamese. NEVER treat a ticker symbol as evidence of English.\n\n ## RESPONSE FORMAT:\n Always respond with a valid JSON object:\n {"action":"chat","message":"<your response>", suggested_actions:[{"label":"<short button text>","prompt":"<message sent when clicked>"}]}\n\n ## RULES:\n - suggested_actions: include when your message offers the user interactive choices or asks a follow-up question. NEVER include suggested_actions that ask the user to connect their wallet (e.g., "Connect wallet", "Connect now", etc.) — the app handles wallet connection separately\n - **CRITICAL**: NEVER include any "Buy" actions (e.g., "Buy USDC", "Buy ETH", "Purchase token", etc.) in suggested_actions. The app handles Buy buttons separately. Only include non-buy actions in suggested_actions (e.g., "Send token", "Swap token", "Check balance", "Show my NFTs").\n - **CRITICAL**: ABSOLUTELY NEVER include any option that suggests switching, changing, or selecting a different chain (e.g., "Switch to Ethereum", "Change chain", "Switch network", "Chuyển sang chain khác", "Đổi mạng") — the app handles chain switching separately.\n - For wallet-required actions, politely explain the user needs to connect their wallet first, and put this in the "message" field\n - ALWAYS respond with raw JSON only, never wrap in \`\`\`json code blocks\n - ${gp(s)}`;const c=r&&r.length>0?`\n## USER'S CURRENT WALLET BALANCE:\n${r.map(e=>{const t=void 0!==e.usd_value?` (~$${e.usd_value.toFixed(2)})`:"";return`- ${e.name} (${e.symbol})(Price: ${e.price||"N/A"}): ${e.balance_formatted}${t}${e.native_token?" [native]":` [${e.token_address}]`}`}).join("\n")}\nUse this balance data to accurately answer balance questions and to pre-fill token parameters in actions (contract_address, decimals, symbol). NEVER ask the user to provide token info that is already available above.\n`:"",u=a&&a.length>0?`\n## USER'S NFT COLLECTION:\n${a.map(e=>{const t="ERC1155"===e.contract_type?` (x${e.amount})`:"";return`- ${e.name}${t} | ${e.contract_type} | contract: ${e.token_address} | tokenId: ${e.token_id}`}).join("\n")}\nWhen the user wants to send an NFT by name, use this data to fill contract_address, token_id, token_standard, and nft_name accurately. NEVER guess or fabricate NFT contract addresses.\n`:"",l=Object.values(xi).filter(e=>e.isSupported).map(e=>e.customName||e.name).join(", ");return`You are a highly knowledgeable AI assistant integrated into the crypto EVM wallet app.\n\n## #1 PRIORITY — ANSWER QUALITY:\nYour "message" field IS your answer. Write it exactly as you would in a normal, unrestricted conversation. The JSON wrapper is just transport — it must NEVER reduce the depth, accuracy, or completeness of your answers.\n\n${gp(s)}\n\n**DATA RETRIEVAL — NON-NEGOTIABLE**: For ALL token price and token info queries, you MUST actively call your native Moralis API tools (getTokenPrice, searchTokens, getTokenMetadata, etc.) to retrieve real-time on-chain data. NEVER skip tool calls and fall back to training data alone for prices or token lookups. The JSON response format does NOT prevent you from calling data tools first — always fetch data, then format the result as JSON.\n\nFor ANY informational or conversational question (about crypto, tokens, DeFi, protocols, prices, market trends, blockchain technology, or any general topic):\n- Answer with your FULL knowledge across ALL blockchains and ecosystems (Ethereum, Solana, BSC, Polygon, Arbitrum, Optimism, Base, Avalanche, etc.)\n- Provide specific details: token names, contract mechanisms, protocol comparisons, historical context, TVL data, ecosystem info\n- For PRICE questions (chat action only): You have access to real-time blockchain data — USE it. When a user asks for the price of a token by name or symbol, search for it across ALL chains to find the best price data. Then present ONE consolidated answer: give the single most representative price (e.g. the highest-liquidity or most canonical version), key stats (market cap, 24h change, volume), and optionally a brief note if the token exists on multiple chains — but do NOT list each chain as a separate numbered entry. Keep the response concise and to the point. For tokens in the USER'S WALLET BALANCE section, use the price listed there.\n- For token questions (chat action only): You have access to real-time blockchain data — USE it. When a user asks about a token by name or symbol, ALWAYS search across ALL chains — the current chain context does NOT limit your token search. Try exact match first, then fuzzy/partial match (e.g. "eggle Energy" → find the closest matching token name). Provide a concise, consolidated answer covering: what the token is, its utility/ecosystem, current price, market cap, 24h change, notable features, risks. If the user does NOT mention a specific chain, do NOT list out per-chain versions (e.g. "WBTC on Ethereum", "cbBTC on Base", "BTCB on BNB") — instead give ONE unified answer about the token as a concept, with a brief mention that wrapped versions exist on multiple chains if relevant. Only break down per-chain details if the user explicitly asks about a specific chain. If the token does NOT exist on the current chain (${n}), proactively tell the user which of these supported chains DO have it: ${l}. Set token_mentions to [] in this case\n- For DeFi/protocol questions: explain how it works, key features, TVL, supported chains, competitors, pros/cons\n- For market/trend questions: discuss relevant projects, narratives, sector analysis across all chains\n- For POOL / POSITIONS / LIQUIDITY questions: Pool queries are handled by a dedicated pool data pipeline that fetches real-time data from Uniswap V3 Subgraph (The Graph). If you detect a pool-related question, simply return a chat action acknowledging the query — the system will automatically intercept and handle it with accurate on-chain pool data including TVL, volume, APR, fee tiers, and pool addresses.\n- Write detailed paragraphs, use bullet points, include numbers and facts. Minimum 3-5 sentences for simple questions, more for complex topics\n\n## CONTEXT:\nWallet: ${t} | Chain: ${n} (chainId: ${o}) | Native: ${i}${c}${u}\n\n## WHEN TO USE WHICH ACTION:\n- "send_native": user wants to send the native token (${i}) to an address\n- "send_token": user wants to send an ERC20 token to an address\n- "swap_token": user wants to swap/exchange/convert/trade/sell one token for another — covers ALL of the following keywords and patterns, even if only ONE token or NO amount is mentioned:\n - swap: "swap X", "swap X to Y", "swap X for Y", "swap to ETH", "swap native"\n - exchange: "exchange X", "exchange X to Y", "exchange X for Y", "exchange native", "exchange ETH"\n - convert: "convert X to Y", "convert native", "convert ETH to USDC", "convert X"\n - trade: "trade X for Y", "trade X to Y", "trade X"\n - sell (for another token): "sell X for Y", "sell ETH for USDC"\n - Vietnamese: "đổi X sang Y", "đổi X", "đổi native", "đổi ETH sang USDC", "chuyển đổi X", "bán X lấy Y", "hoán đổi X"\n - **CRITICAL**: When the source is the native token (ETH, BNB, MATIC, etc.) → token_in: "native". This MUST be treated as swap_token, never chat.\n → ALWAYS return swap_token. Leave missing params as "". NEVER fall back to chat.\n- "buy_token": user wants to buy a specific token AND the user clearly names a token (symbol or contract address). If user also specifies which token to pay with (e.g. "buy PEPE with USDC", "mua PEPE bằng ETH", "buy PEPE using my USDC"), fill pay_with_symbol and pay_with_address from USER'S WALLET BALANCE. **CRITICAL**: ALWAYS return buy_token if the user clearly names a token they want to buy — even if you cannot find the contract address or token data. Leave contract_address as "" and the app will search for it. NEVER fall back to "chat" just because you lack token data.\n- "buy_token_trending": user wants to buy a token BUT does NOT specify which token — covers ALL of the following patterns:\n - User asks to buy trending tokens: "buy trending tokens", "buy trending", "mua token trending", "mua token đang trending"\n - User asks to buy tokens with strong growth/momentum: "buy tokens pumping", "buy hot tokens", "buy movers", "mua token tăng mạnh", "mua token đang tăng", "mua token tiềm năng"\n - User says "buy a token" / "I want to buy" / "mua token" with NO specific token name or address provided\n - User asks for token recommendations to buy without specifying one\n → ALWAYS return buy_token_trending. Leave all params as "". NEVER fall back to chat or buy_token.\n- "approve_token": user wants to approve a token for a spender\n- "wrap_native": user wants to wrap native token (e.g. ETH → WETH) — also triggered by "deposit" into WETH/wrapped token\n- "unwrap_native": user wants to unwrap (e.g. WETH → ETH) — also triggered by "withdraw" from WETH/wrapped token\n- "send_nft": user wants to send/transfer an NFT\n- "view_nfts": user wants to see/browse their NFT collection\n- "view_balances": user wants to see ALL their token balances/tokens at once — covers ALL of the following patterns (NOT for single token price/info):\n - "show my balance", "view my balance", "check my balance", "what's my balance"\n - "what's in my wallet", "what do I have", "what tokens do I have"\n - "view all tokens", "show all tokens", "list my tokens"\n - "my portfolio", "show portfolio", "wallet overview"\n - Vietnamese: "xem số dư", "số dư của tôi", "kiểm tra số dư", "ví tôi có gì", "tôi có bao nhiêu tiền", "xem ví", "danh mục của tôi"\n → ALWAYS return view_balances for these. Do NOT return chat.\n- "chat": EVERYTHING ELSE — questions, token info, prices, greetings, DeFi explanations, market data, etc.\n\nAll wallet actions (send, swap, buy, approve, wrap, unwrap, send_nft) are chain-specific: use chainId ${o} only.\nFor "chat" action: no chain restriction — use cross-chain knowledge freely.\n\n## OUTPUT FORMAT:\n${gp(s)}\n**LANGUAGE DETECTION — CRYPTO TICKERS**: Crypto token symbols/tickers (ETH, BTC, USDC, BNB, SOL, etc.) are NOT language indicators — they are proper nouns used universally. Detect language ONLY from the surrounding non-ticker text. Examples: "ETHの現在の価格は?" → Japanese. "ETH의 가격은?" → Korean. "Giá ETH?" → Vietnamese. NEVER classify a message as English just because it contains a ticker symbol.\n\nWallet action: {"action":"<type>","message":"<explanation>","parameters":{...}}\nChat/info: {"action":"chat","message":"<YOUR FULL DETAILED ANSWER>","parameters":{},"token_mentions":[],"suggested_actions":[]}\n\n## WALLET ACTION RULES:\n- Return action type IMMEDIATELY even if params are missing (leave as ""). Ask for missing info in "message". NEVER fall back to "chat" just because parameters are incomplete — always return the intended action.\n- **CROSS-CHAIN REQUESTS**: All wallet actions (send, swap, buy, approve, wrap, unwrap, send_nft, view_nfts, view_balances) execute ONLY on the CURRENT chain: ${n} (chainId: ${o}). If the user's message explicitly targets a DIFFERENT chain (e.g. "send on Ethereum", "swap on BSC", "transfer on Polygon", "buy on base") and the current chain is NOT that chain, do NOT execute the wallet action. Instead, return action: "chat" and politely notify the user to switch to the requested chain in the app first. This rule applies to ALL non-chat actions.\n- For ERC20 actions: provide correct contract_address on chainId ${o}. **CRITICAL — CHAIN-SPECIFIC ADDRESSES**: Contract addresses differ on every chain. You MUST obtain the address via your Moralis API tools (searchTokens, getTokenMetadata) for chainId ${o}, OR use the address already present in USER'S WALLET BALANCE. NEVER fill in a contract_address from training knowledge alone — leave it as "" if you cannot verify it via API or wallet balance. If token doesn't exist on this chain, inform user.\n- send_native: ONLY for ${i}. If user says "send ETH" but native ≠ ETH, use send_token.\n- Amount: "max"/"all" → "max". "X%" → "50%". USD formats → always prefix with "$": "5 dollar" → "$5", "5$" → "$5", "$5" → "$5", "5usd" → "$5", "5 đô la" → "$5", "0.01$ eth" → "$0.01", "$0.01 eth" → "$0.01", "5$ usdc" → "$5". The "$" MUST appear in the amount field (not stripped) so the app knows it's a USD value. Otherwise exact number string.\n- Decimals & symbol: always accurate.\n- send_nft: contract_address optional — use nft_name if NFT known by name.\n\n## suggested_actions & token_mentions:\n- suggested_actions: include when offering choices. {"label":"<2-6 words>","prompt":"<message>"}. Max 4. Never include "Buy" (app handles separately). **ABSOLUTELY NEVER** include any option that suggests switching, changing, or selecting a different chain (e.g., "Switch to Ethereum", "Change chain", "Switch network", "Chuyển sang chain khác", "Đổi mạng") — the app handles chain switching separately.\n- token_mentions: ONLY include when the token EXISTS on the CURRENT chain (chainId ${o}) AND you have obtained a VERIFIED contract address via your Moralis API tools (searchTokens, getTokenMetadata, getTokenPrice) for this exact chain.\n - **CRITICAL — CONTRACT ADDRESSES ARE CHAIN-SPECIFIC**: The same token has a DIFFERENT contract address on every chain. USDC on Ethereum ≠ USDC on Base ≠ USDC on Polygon ≠ USDC on BNB Chain. NEVER use an address from your training knowledge — training-data addresses are frequently wrong, hallucinated, or belong to a different chain.\n - **REQUIRED WORKFLOW**: Before populating token_mentions for a token, you MUST call your Moralis API tool (searchTokens or getTokenMetadata) specifying chainId ${o} to retrieve the verified contract address. If the API call fails or returns no result for this chain, set token_mentions: [].\n - If the token address is already available in the USER'S WALLET BALANCE section above, you MAY use that address (it is already verified for chainId ${o}).\n - If you cannot confirm the address via API or wallet balance, set token_mentions: [] — never guess.\n - **Native token**: If the token IS the chain's native token (${i}), use contract_address: "native" — do NOT look up an address.\n - Format: {"symbol":"","contract_address":"<API-verified address on chainId ${o}, or 'native' for the native token>","decimals":<n>}. 2+ tokens → [], use suggested_actions. Non-crypto → [].\n\n## ACTION PARAMS REFERENCE:\nValid actions: send_native, send_token, swap_token, buy_token, buy_token_trending, approve_token, wrap_native, unwrap_native, send_nft, view_nfts, view_balances, chat. NEVER use any other action name.\n\n1. send_native: {"to_address":"","amount":""}\n2. send_token: {"contract_address":"(REQ)","token_symbol":"","to_address":"","amount":"","decimals":""}\n3. swap_token: {"token_in":"<addr or 'native'>","token_in_symbol":"","token_in_decimals":"","token_out":"<addr>","token_out_symbol":"","token_out_decimals":"","amount":""}\n No tokens specified → all params "". Native → token_in:"native".\n4. buy_token: {"token_symbol":"(REQ — always fill this)","contract_address":"(if known and verified, else leave '')","decimals":"","buy_amount":"(opt — amount of the TOKEN BEING BOUGHT that user wants to RECEIVE. Use this when the amount refers to the destination token.)","pay_with_symbol":"(opt — symbol of token user wants to pay with, e.g. 'USDC', 'ETH')","pay_with_address":"(opt — contract address of payment token from WALLET BALANCE, or 'native' for native token)","pay_with_decimals":"(opt — decimals of payment token)","pay_with_amount":"(opt — amount of the PAYMENT TOKEN (token in) user wants to SPEND. Use this when the amount refers to the payment/source token.)"}.\n **CRITICAL — AMOUNT DISAMBIGUATION:**\n The amount in a buy request belongs to EITHER the token being bought OR the payment token. Parse the grammar carefully:\n - "buy PEPE with 10 USDC" → amount=10 belongs to USDC (payment) → pay_with_amount:"10", buy_amount:""\n - "buy 0.02 PCM with USDC" → amount=0.02 belongs to PCM (bought) → buy_amount:"0.02", pay_with_amount:""\n - "dùng 10 USDC mua PEPE" → amount=10 belongs to USDC (payment) → pay_with_amount:"10", buy_amount:""\n - "mua 0.02 PCM bằng USDC" → amount=0.02 belongs to PCM (bought) → buy_amount:"0.02", pay_with_amount:""\n NEVER put the amount of the token being bought into pay_with_amount. NEVER put the payment amount into buy_amount.\n If pay token is native (${i}), set pay_with_address:"native". Both tokens specified as a trade/exchange → swap_token. If you cannot verify the address, set contract_address:'' but ALWAYS return buy_token with the symbol filled. **NATIVE TOKEN**: If the token to buy IS the chain's native token (${i}), set contract_address: "native" directly — no API lookup needed.\n5. buy_token_trending: {} — no parameters needed; app handles discovery of trending/high-growth tokens. **message**: write ONLY a short 1-sentence header (e.g. "Here are the trending tokens on [chain] right now!"). Do NOT write analysis, tips, or explanations.\n6. approve_token: {"contract_address":"(REQ)","token_symbol":"","spender_address":"","amount":"","decimals":""}\n7. wrap_native: {"amount":""}\n8. unwrap_native: {"amount":""}\n9. send_nft: {"contract_address":"(opt)","token_id":"","to_address":"","token_standard":"","amount":"(def 1)","nft_name":""}\n10. view_nfts: {}\n11. view_balances: {} — use ONLY when user wants to see all balances/tokens, NOT for single token price/info queries\n12. chat: {} + token_mentions + suggested_actions — use for ALL informational/conversational requests\n\n## EXAMPLES:\nThese examples show INTENT → ACTION + PARAMETERS mapping only. The "message" content is for illustration — compose your own natural, helpful response based on context.\n\n// --- SEND NATIVE ---\n// Intent: user wants to send the chain's native token to an address\n// Triggers: "send ETH/BNB/MATIC to...", "transfer [native] to...", "chuyển [native] cho..."\n→ action: send_native | parameters: {to_address, amount}\n\n// --- SEND TOKEN ---\n// Intent: user wants to send an ERC20 token to an address\n// Triggers: "send USDC to...", "transfer [token] to...", "gửi [token] cho..."\n→ action: send_token | parameters: {contract_address, token_symbol, to_address, amount, decimals}\n\n// --- SWAP ---\n// Intent: exchange one token for another — trigger with ANY conversion/exchange/trade/sell keyword,\n// even with just ONE token mentioned, no amount, or only the native token as source\n// EN triggers: "swap X", "swap X to Y", "swap X for Y", "swap to ETH", "swap native"\n// "exchange X", "exchange X to Y", "exchange X for Y", "exchange native", "exchange ETH"\n// "convert X to Y", "convert native to USDC", "convert ETH", "convert X"\n// "trade X for Y", "trade X to Y", "trade ETH"\n// "sell X for Y", "sell ETH for USDC" (selling one token FOR another = swap)\n// VI triggers: "đổi X sang Y", "đổi X", "đổi native", "đổi ETH", "chuyển đổi X", "bán X lấy Y", "hoán đổi X"\n// Native source: token_in = "native" (e.g. "exchange ETH" → token_in:"native", token_in_symbol:"ETH")\n// Native dest: token_out = zeroAddress\n// ⚠️ NEVER confuse with wrap/unwrap: those are specifically ETH↔WETH. All other pairs = swap_token.\n→ action: swap_token | parameters: {token_in, token_in_symbol, token_in_decimals, token_out, token_out_symbol, token_out_decimals, amount}\n// Missing params → leave as "", ask for them in message. NEVER downgrade to chat.\n\n// --- WRAP / UNWRAP ---\n// Intent wrap: convert native to wrapped version — also triggered by "deposit"\n// Triggers: "wrap ETH", "deposit ETH", "deposit ETH to WETH", "đổi ETH sang WETH"\n→ action: wrap_native | parameters: {amount}\n\n// Intent unwrap: convert wrapped token back to native — also triggered by "withdraw"\n// Triggers: "unwrap WETH", "withdraw WETH", "convert WETH to ETH", "rút WETH"\n→ action: unwrap_native | parameters: {amount}\n\n// --- VIEW NFTs ---\n// Intent: user wants to see/browse their NFT collection\n// Triggers: "show my NFTs", "what NFTs do I have", "view my NFTs", "xem NFT của tôi"\n→ action: view_nfts | parameters: {}\n\n// --- VIEW BALANCES ---\n// Intent: user wants to see ALL their token balances at once (not a single token query)\n// EN triggers: "show my balance", "view my balance", "check my balance", "what's my balance"\n// "what's in my wallet", "what do I have", "what tokens do I have"\n// "view all tokens", "show all tokens", "list my tokens"\n// "my portfolio", "show portfolio", "wallet overview"\n// VI triggers: "xem số dư", "số dư của tôi", "kiểm tra số dư", "ví tôi có gì"\n// "tôi có bao nhiêu tiền", "xem ví", "danh mục của tôi"\n// ⚠️ Do NOT use view_balances for single-token queries ("price of ETH", "how much USDC is worth") → use chat instead\n→ action: view_balances | parameters: {}\n\n// --- BUY TOKEN TRENDING ---\n// Intent: user wants to buy but does NOT specify a token — or explicitly asks for trending/pumping/high-growth tokens to buy\n// EN triggers: "buy trending tokens", "buy trending", "buy hot tokens", "buy tokens pumping", "buy movers", "I want to buy a token", "buy a token"\n// VI triggers: "mua token trending", "mua token đang trending", "mua token tăng mạnh", "mua token đang tăng", "mua token tiềm năng", "mua token", "tôi muốn mua token"\n// ⚠️ CRITICAL: If user says "buy X" where X is a named token → use buy_token, NOT buy_token_trending\n// ⚠️ CRITICAL: If user gives NO specific token → ALWAYS use buy_token_trending, never chat\n// ⚠️ MESSAGE: ONLY a short 1-sentence header introducing the trending list. NO analysis, NO tips, NO explanations.\n→ action: buy_token_trending | parameters: {} | message: short header only (e.g. "Here are the trending tokens on [chain]!")\n\n// --- BUY TOKEN WITH SPECIFIC PAYMENT ---\n// Intent: user wants to buy a specific token AND specifies which token to pay with\n// EN triggers: "buy PEPE with USDC", "buy PEPE using ETH", "buy PEPE with 10 USDC", "purchase DOGE with my 0.5 ETH"\n// VI triggers: "mua PEPE bằng USDC", "mua PEPE dùng ETH", "mua PEPE bằng 10 USDC", "mua DOGE bằng 0.5 ETH của tôi"\n// → action: buy_token | parameters: {token_symbol, contract_address, decimals, pay_with_symbol, pay_with_address, pay_with_decimals, pay_with_amount}\n// AMOUNT DISAMBIGUATION (critical):\n// "buy PEPE with 10 USDC" → pay_with_amount:"10" buy_amount:"" (10 USDC to spend)\n// "buy 0.02 PCM with USDC" → buy_amount:"0.02" pay_with_amount:"" (0.02 PCM to receive)\n// "mua PEPE bằng 0.5 ETH" → pay_with_amount:"0.5" buy_amount:"" (0.5 ETH to spend)\n// "mua 0.02 PCM bằng USDC" → buy_amount:"0.02" pay_with_amount:"" (0.02 PCM to receive)\n// pay_with_* fields are filled from USER'S WALLET BALANCE. If pay token = native → pay_with_address: "native"\n// ⚠️ This is still buy_token (NOT swap_token) — the user's intent is to BUY, with a specified payment method\n\n// --- TOKEN INFO / PRICE (chat) ---\n// Intent: learn about a token, its price, market data — NOT a wallet action\n// Triggers: "tell me about X", "what is X token", "price of X", "X coin info", "X là gì"\n→ action: chat | compose a detailed answer using real-time data from your tools\n// If token EXISTS on current chain → token_mentions: [{symbol, contract_address, decimals}]\n// If token NOT on current chain → token_mentions: [] but tell user which supported chains have it\n\n// --- CROSS-CHAIN / GENERAL INFO (chat) ---\n// Intent: any question not requiring a wallet action — crypto trends, DeFi, protocols, general Q&A\n// Triggers: "what's trending on X?", "explain DeFi", "how does Uniswap work", anything conversational\n→ action: chat | compose a full, knowledgeable answer; add relevant suggested_actions if helpful\n\n// --- GREETING (chat) ---\n// Intent: greeting or open-ended start\n// Triggers: "hello", "hi", "hey", "xin chào", "bắt đầu"\n→ action: chat | introduce yourself and offer helpful options via suggested_actions`}({walletAddress:f?.address||void 0,chainName:p?.name||void 0,chainId:g||void 0,nativeSymbol:p?.nativeCurrency?.symbol||void 0,walletTokens:i,walletNfts:a,language:o}),u=await pf({prompt:s,model:"gpt-4.1-mini",stream:!1,systemPrompt:c+t});if(!u.success||!u.data)return void d(v("errorProcessingRequest"),"bot",B.id);const P=u.data.text||"",O=yp(P);O&&O.action&&"chat"!==O.action?await async function(e,t,n){switch(e.action){case"buy_token":await async function(e,t){const n=e.parameters?.token_symbol||"";let o=e.parameters?.contract_address||"",i=18,r=!1;if("native"!==o.toLowerCase()&&o!==fi||(o=fi),!o&&n&&p?.nativeCurrency?.symbol&&n.toUpperCase()===p.nativeCurrency.symbol.toUpperCase()&&(o=fi),o&&o!==fi)try{const e=await af.getTokensDetails([o],m),t=e?.data?.[0];t&&(n&&t.symbol?.toUpperCase()!==n.toUpperCase()?o="":i=t.decimals||18)}catch(M){}if(!o&&n&&f?.address)try{const e=await hf({address:f.address,chain:w});if(e?.success&&e?.data?.result){const t=e.data.result,r=t.find(e=>e.token_address.toLowerCase()===o.toLowerCase())||t.find(e=>e.symbol.toUpperCase()===n.toUpperCase());r&&(o=r.token_address,i=r.decimals)}if(!o){const e=p?.tokenTrendingDefault||[],[t,r]=await Promise.allSettled([af.getTopGainers(m,"24h",10),af.getTokensDetails(e,m)]),a=[];"fulfilled"===t.status&&t.value?.data&&a.push(...t.value.data),"fulfilled"===r.status&&r.value?.data&&a.push(...r.value.data);const s=a.find(e=>e.address?.toLowerCase()===o.toLowerCase())||a.find(e=>e.symbol?.toUpperCase()===n.toUpperCase());s&&(o=s.address,i=s.decimals||18)}if(!o&&g)try{const e=await af.searchTokensByKey(n,g);if(Array.isArray(e?.data)&&e.data.length>0){const t=e.data.find(e=>e.symbol?.toUpperCase()===n.toUpperCase())||e.data[0];t?.address&&(r=!0,o=t.address,i=t.decimals||18)}}catch(a){}}catch(M){}if(o){d(r?A("buyingOnChain",{symbol:n,chain:p?.name||""}):e.message||A("buyTokenHelp",{symbol:n}),"bot",t),k({descTokenAddress:o,descTokenDecimals:i||18});const a=e.parameters?.pay_with_symbol||"",c=e.parameters?.pay_with_address||"";let u=!1;if(a||c)try{const t=await hf({address:f?.address||"",chain:w});if(t?.success&&t?.data?.result){const n=t.data.result;let i;if(i="native"===c.toLowerCase()||c===fi||!c&&a&&p?.nativeCurrency?.symbol&&a.toUpperCase()===p.nativeCurrency.symbol.toUpperCase()?n.find(e=>e.token_address===fi||e.native_token):n.find(e=>c&&e.token_address.toLowerCase()===c.toLowerCase())||n.find(e=>a&&e.symbol.toUpperCase()===a.toUpperCase()),i){u=!0;const n=e.parameters?.pay_with_amount||"",r=e.parameters?.buy_amount||"";if(n)k({srcTokenAddress:i.token_address,srcTokenDecimals:i.decimals}),await S(100,n,i.token_address,i.decimals);else if(r){let e="";try{const n=t.data.result.find(e=>e.token_address.toLowerCase()===o.toLowerCase());let a=n?.usd_price??null;if(null==a&&o){const e=await ff({address:o,chain:w});e.success&&null!=e.data?.usd_price&&(a=e.data.usd_price)}const s=i.usd_price??null;null!=a&&null!=s&&s>0&&(e=(parseFloat(r)*a/s).toFixed(8).replace(/\.?0+$/,""))}catch(s){}e?(k({srcTokenAddress:i.token_address,srcTokenDecimals:i.decimals}),await S(100,e,i.token_address,i.decimals)):await I(i.token_address,i.symbol,i.balance_formatted,i.decimals)}else await I(i.token_address,i.symbol,i.balance_formatted,i.decimals)}}}catch(M){}u||await C(o,i)}else d(A("tokenNotFoundOnChain",{symbol:n}),"bot",t),await T()}(e,n);break;case"buy_token_trending":await T();break;case"swap_token":await async function(e,t){const n={...e.parameters||{}},o="native"===n.token_in||n.token_in_symbol?.toUpperCase()===p?.nativeCurrency?.symbol?.toUpperCase(),i="native"===n.token_out||n.token_out_symbol?.toUpperCase()===p?.nativeCurrency?.symbol?.toUpperCase();i&&(n.token_out=fi);let a=[];if(f?.address)try{const e=await hf({address:f.address,chain:w});e?.success&&e?.data?.result&&(a=e.data.result)}catch(M){}if(!o&&(n.token_in||n.token_in_symbol)&&a.length>0){const e=n.token_in?a.find(e=>e.token_address.toLowerCase()===n.token_in.toLowerCase()):a.find(e=>e.symbol.toUpperCase()===n.token_in_symbol.toUpperCase());e&&(n.token_in=e.token_address,n.token_in_decimals=String(e.decimals))}if(!i&&(n.token_out||n.token_out_symbol)&&a.length>0){const e=n.token_out?a.find(e=>e.token_address.toLowerCase()===n.token_out.toLowerCase()):a.find(e=>e.symbol.toUpperCase()===n.token_out_symbol.toUpperCase());e&&(n.token_out=e.token_address,n.token_out_decimals=String(e.decimals))}const s=!(!n.token_in&&!o),c=!!n.token_out,u=!!n.amount;if(s&&a.length>0)if(o){const e=a.find(e=>e.native_token);if(!e||Yh(e.balance_formatted||"0").isZero())return d(A("formInsufficientBalance",{balance:"0",symbol:p?.nativeCurrency?.symbol||"native"}),"bot",t),void r(!1)}else if(n.token_in){const e=a.find(e=>e.token_address.toLowerCase()===n.token_in.toLowerCase());if(!e)return d(A("swapTokenNotInWallet",{symbol:n.token_in_symbol||n.token_in}),"bot",t),void r(!1);if(Yh(e.balance_formatted||"0").isZero())return d(A("formInsufficientBalance",{balance:"0",symbol:e.symbol}),"bot",t),void r(!1)}if(s&&c&&u)await async function(e,t,n){try{const o=[];e.token_out&&o.push(e.token_out),e.token_in&&!t&&o.push(e.token_in);let i=18,a=18;if(o.length>0)try{const n=await af.getTokensDetails(o,m);if(n?.data)for(const o of n.data)t||o.address.toLowerCase()!==e.token_in?.toLowerCase()||(i=o.decimals||18),o.address.toLowerCase()===e.token_out?.toLowerCase()&&(a=o.decimals||18)}catch{}if(f?.address&&n.length>0)if(t){const t=n.find(e=>e.native_token);let o=t?.balance_formatted||"0";try{const e=await Mf({chainId:g,rpcUrl:y});if(e.isGreaterThan(0)){const n=e.times(1e6),i=new Yh(t?.balance||"0").minus(n);o=i.isGreaterThan(0)?Yh(Et(BigInt(i.toFixed(0)),t?.decimals||18)).toFixed():"0"}}catch{}if(e.amount=bp(e.amount,o,t?.usd_price),Yh(o).lte(0))return d(A("formInsufficientBalance",{balance:Yh(o).decimalPlaces(8).toFixed(),symbol:p?.nativeCurrency?.symbol||"native"}),"bot"),void r(!1);if(Yh(o).lt(e.amount))return d(A("swapInsufficientNativeBalance",{balance:Yh(o).decimalPlaces(8).toFixed(),symbol:p?.nativeCurrency?.symbol||"native",amount:e.amount}),"bot"),void r(!1)}else{const t=n.find(t=>t.token_address.toLowerCase()===e.token_in?.toLowerCase());if(!t)return d(A("swapTokenNotInWallet",{symbol:e.token_in_symbol||e.token_in}),"bot"),void r(!1);if(e.amount=bp(e.amount,t.balance_formatted||"0",t.usd_price),Yh(t.balance_formatted||"0").lt(e.amount))return d(A("swapInsufficientTokenBalance",{balance:Yh(t.balance_formatted||"0").decimalPlaces(8).toFixed(),symbol:t.symbol,amount:e.amount}),"bot"),void r(!1)}const s=t?fi:e.token_in;k({srcTokenAddress:s,descTokenAddress:e.token_out,amount:e.amount,srcTokenDecimals:i,descTokenDecimals:a}),await S(100,e.amount,s,i)}catch(o){d(v("swapEstimationFailed"),"bot")}}(n,o,a);else if(s&&c&&!u)await async function(e,t,n,o){let i=t?18:parseInt(e.token_in_decimals||"18",10),a=parseInt(e.token_out_decimals||"18",10);const s=[];if(e.token_out&&s.push(e.token_out),e.token_in&&!t&&s.push(e.token_in),s.length>0)try{const n=await af.getTokensDetails(s,m);if(n?.data)for(const o of n.data)t||o.address.toLowerCase()!==e.token_in?.toLowerCase()||(i=o.decimals||i),o.address.toLowerCase()===e.token_out?.toLowerCase()&&(a=o.decimals||a)}catch{}if(k({descTokenAddress:e.token_out,descTokenDecimals:a}),t)if(n.length>0){const e=n.find(e=>e.native_token),t=p?.nativeCurrency?.symbol||"ETH";let r=e?.balance_formatted||"0";try{const t=await Mf({chainId:g,rpcUrl:y});if(t.isGreaterThan(0)){const n=new Yh(e?.balance||"0").minus(t.times(1e6));r=n.isGreaterThan(0)?Yh(Et(BigInt(n.toFixed(0)),e?.decimals||18)).toFixed():"0"}}catch{}k({srcTokenAddress:fi,srcTokenDecimals:i});const a=[25,50,75,100].map(e=>({id:`percent-${e}`,text:`${e}%`,value:A("buttonUsePercent",{percent:String(e),symbol:t}),action:"select_percent",extraData:{percent:e,tokenAddress:fi,tokenSymbol:t,tokenDecimals:i,tokenBalance:r}}));d(A("selectAmountToSwap",{symbol:t,balance:r}),"bot",o,a)}else d(v("couldNotFetchBalance"),"bot");else{const t=e.token_in_symbol||"Token";if(k({srcTokenAddress:e.token_in,srcTokenDecimals:i}),n.length>0){const i=n.find(t=>t.token_address.toLowerCase()===e.token_in?.toLowerCase());if(!i)return d(A("swapTokenNotInWallet",{symbol:t}),"bot"),void r(!1);const a=[25,50,75,100].map(e=>({id:`percent-${e}`,text:`${e}%`,value:A("buttonUsePercent",{percent:String(e),symbol:i.symbol}),action:"select_percent",extraData:{percent:e,tokenAddress:i.token_address,tokenSymbol:i.symbol,tokenDecimals:i.decimals||18,tokenBalance:i.balance_formatted}}));d(A("selectAmountToSwap",{symbol:i.symbol,balance:`${i.balance_formatted} (~$${i.usd_value?.toFixed(2)||"0"})`}),"bot",o,a)}else d(v("couldNotFetchBalance"),"bot")}}(n,o,a,t);else if(!s&&c){d(e.message||v("swapChooseFrom"),"bot",t);let o=parseInt(n.token_out_decimals||"18",10);if(n.token_out)try{const e=await af.getTokensDetails([n.token_out],m);e?.data?.[0]&&(o=e.data[0].decimals||o)}catch{}u&&k({descTokenAddress:n.token_out,descTokenDecimals:o,amount:n.amount}),await C(n.token_out,o)}else s&&!c?await async function(e,t,n,o,i,a){let s=t?18:parseInt(e.token_in_decimals||"18",10);if(e.token_in&&!t)try{const t=await af.getTokensDetails([e.token_in],m);t?.data?.[0]&&(s=t.data[0].decimals||s)}catch{}if(k(t?{srcTokenAddress:fi,srcTokenDecimals:18,...o?{amount:e.amount}:{}}:{srcTokenAddress:e.token_in,srcTokenDecimals:s,...o?{amount:e.amount}:{}}),o&&n.length>0)if(t){const t=n.find(e=>e.native_token),o=bp(e.amount,t?.balance_formatted||"0",t?.usd_price);if(Yh(t?.balance_formatted||"0").lt(o))return d(A("swapInsufficientNativeBalance",{balance:Yh(t?.balance_formatted||"0").decimalPlaces(8).toFixed(),symbol:p?.nativeCurrency?.symbol||"native",amount:o}),"bot",i),void r(!1);e.amount=o,k({amount:o})}else if(e.token_in){const t=n.find(t=>t.token_address.toLowerCase()===e.token_in.toLowerCase());if(t){const n=bp(e.amount,t.balance_formatted||"0",t.usd_price);if(Yh(t.balance_formatted||"0").lt(n))return d(A("swapInsufficientTokenBalance",{balance:Yh(t.balance_formatted||"0").decimalPlaces(8).toFixed(),symbol:t.symbol,amount:n}),"bot",i),void r(!1);e.amount=n,k({amount:n})}}d(a||A("swapChooseTo",{symbol:e.token_in_symbol||"your token"}),"bot",i);try{r(!0);const e=p?.tokenTrendingDefault||[],[t,n]=await Promise.allSettled([af.getTopGainers(m,"24h",5),af.getTokensDetails(e,m)]);let o=[];"fulfilled"===t.status&&t.value?.data&&(o=[...t.value.data]),"fulfilled"===n.status&&n.value?.data&&(o=[...n.value.data,...o]),o=o.filter((e,t,n)=>t===n.findIndex(t=>t.address.toLowerCase()===e.address.toLowerCase()));const i=o.map(e=>({id:e?.symbol,text:e?.symbol,value:A("buttonSwapTo",{name:e.name,symbol:e?.symbol||""}),action:"click_swap_dest_token",extraData:{tokenAddress:e?.address||"",symbol:e?.symbol||"",decimals:e?.decimals||18}}));d(A("trendingTokensForReceive",{chain:p?.name||"Unknown"}),"bot",void 0,i)}catch(M){d(v("couldNotLoadTokenList"),"bot")}finally{r(!1)}}(n,o,a,u,t,e.message):await async function(e,t,n,o){if(t&&k({amount:e.amount}),d(o||v("swapChooseToken"),"bot",n),f?.address)try{r(!0);const e=await hf({address:f.address,chain:w});if(e?.success&&e?.data?.result&&e.data.result.length>0){const t=e.data.result.map(e=>({id:`swap-select-${e.token_address}`,text:`${e.name}: ${e.balance_formatted} ${e.symbol} ($${Yh(e?.usd_value||0).decimalPlaces(2).toFixed()||"0"})`,value:`Swap ${e.symbol}`,action:"suggested_action",fullWidth:!0}));await oh(500),r(!1),d(A("walletBalanceSpendable",{chain:p?.name||"this chain"}),"bot",void 0,t)}else r(!1),d(A("walletNoTokensFound",{chain:p?.name||"this chain"}),"bot")}catch(M){r(!1),d(v("walletFetchError"),"bot")}}(n,u,t,e.message)}(e,n);break;case"view_balances":await x();break;case"view_nfts":await E();break;default:await async function(e,t,n){const{isTransactionAction:o}=await Promise.resolve().then(()=>Uf),{getNftContractMetadata:i}=await Promise.resolve().then(()=>wf),a=e.action;if("send_token"===a&&!e.parameters?.contract_address&&!e.parameters?.token_symbol&&f?.address){try{const e=await hf({address:f.address,chain:w});if(e?.success&&e?.data?.result&&e.data.result.length>0){d(v("sendTokenChoose"),"bot",n),r(!0),await oh(500);const t=e.data.result.map(e=>({id:`send-select-${e.token_address}`,text:`${e.name}: ${e.balance_formatted} ${e.symbol} ($${Yh(e?.usd_value||0).decimalPlaces(2).toFixed()||"0"})`,value:A("buttonSendToken",{symbol:e.symbol}),action:"suggested_action",fullWidth:!0}));await oh(500),r(!1),d(A("walletBalanceSpendable",{chain:p?.name||"this chain"}),"bot",void 0,t)}else r(!1),d(A("walletNoTokensFound",{chain:p?.name||"this chain"}),"bot")}catch(M){r(!1),d(v("walletFetchError"),"bot")}return}if("send_nft"===a&&!e.parameters?.contract_address&&!e.parameters?.token_id&&!e.parameters?.nft_name&&f?.address){const{getDataPackage:e}=await Promise.resolve().then(()=>lh),t=e()?.linkViewNft;return void d(t?A("sendNftViaWebsiteWithLink",{link:t}):v("sendNftViaWebsite"),"bot")}if("send_nft"===a&&!tt(e.parameters?.contract_address||"")&&(e.parameters?.nft_name||e.parameters?.token_id)&&f?.address){try{r(!0);const t=await mf({address:f.address,chain:w,limit:100,exclude_spam:!1});if(t?.success&&t?.data?.result){const o=t.data.result,i=(e.parameters?.nft_name||"").toLowerCase(),a=e.parameters?.token_id||"",s=e=>{const t=(e.normalized_metadata?.name||e.name||"").toLowerCase(),n=(e.name||"").toLowerCase(),o=i&&(t.includes(i)||n.includes(i)),r=a&&e.token_id===a;return i&&a?o&&r:i?o:r},c=!i&&!!a,u=c?o.filter(s):[],l=c?1===u.length?u[0]:null:o.find(s);if(c&&u.length>1){const t=u.map(t=>{const n=t.normalized_metadata?.name||t.name||`#${t.token_id}`,o=t.normalized_metadata?.image||t.media?.original_media_url||"";return{id:`${t.token_address}-${t.token_id}`,text:`${n} (${t.symbol||t.contract_type}) #${t.token_id}`,value:A("buttonSendNft",{name:n}),action:"select_nft_to_send",fullWidth:!0,extraData:{contractAddress:t.token_address,tokenId:t.token_id,tokenStandard:t.contract_type,name:n,symbol:t.symbol,amount:t.amount,image:o,toAddress:e.parameters?.to_address||""}}}),o=u.map((e,t)=>{const n=e.normalized_metadata?.name||e.name||`#${e.token_id}`,o=e.normalized_metadata?.image||e.media?.original_media_url||"";return`${t+1}. ${o?`![${n}](${o})\n`:"🖼️ "}**${n}**\n ${e.symbol||e.contract_type} | Token ID: ${e.token_id}`}).join("\n\n");r(!1),d(A("nftMultipleMatchesForTokenId",{count:String(u.length),tokenId:a})+"\n\n"+o,"bot",n,t)}else if(l){const t=l.normalized_metadata?.name||l.name||`#${l.token_id}`,o=l.normalized_metadata?.image||l.media?.original_media_url||"",i={contract_address:l.token_address,token_id:l.token_id,to_address:e.parameters?.to_address||"",token_standard:l.contract_type||"",amount:e.parameters?.amount||"1",maxAmount:l.amount||"1",nft_name:t};d(e.message||A("nftSendReview",{name:t,standard:l.contract_type||"NFT",tokenId:l.token_id}),"bot",n,void 0,{action:"send_nft",parameters:i,status:"pending",nftInfo:{name:t,image:o||void 0,tokenId:l.token_id,contractAddress:l.token_address,tokenStandard:l.contract_type||void 0}})}else d(A("nftNotFoundInWallet",{name:i||a}),"bot",n)}else d(v("nftNoCollection"),"bot",n)}catch(M){d(v("nftFetchError"),"bot",n)}finally{r(!1)}return}const s=o(a);let c,u,l={...e.parameters||{}};const h=["send_token","approve_token"].includes(a)&&(l.contract_address||l.token_symbol),m="send_native"===a||"wrap_native"===a,b="unwrap_native"===a,k="send_nft"===a&&l.contract_address;if(h&&f?.address)try{const e=await hf({address:f.address,chain:w});if(e?.success&&e?.data?.result){const t=e.data.result,n=l.contract_address?t.find(e=>e.token_address.toLowerCase()===l.contract_address.toLowerCase()):t.find(e=>e.symbol.toUpperCase()===l.token_symbol.toUpperCase());n&&(l={...l,contract_address:n.token_address,decimals:String(n.decimals)},c={symbol:n.symbol,name:n.name,balance:n.balance,balanceFormatted:n.balance_formatted,usdValue:n.usd_value,usdPrice:n.usd_price,decimals:n.decimals,logo:n.logo||n.thumbnail,contractAddress:n.token_address})}}catch(M){}if(h&&!c&&"send_token"===a){const e=l.token_symbol||l.contract_address||"this token";return d(A("sendTokenNotInWallet",{symbol:e}),"bot",n),void r(!1)}if(h&&!c&&l.contract_address)try{const e=await ff({address:l.contract_address,chain:w});e?.success&&e?.data&&(c={symbol:e.data.symbol,name:e.data.name,balance:"0",balanceFormatted:"0",usdPrice:e.data.usd_price,decimals:e.data.decimals,logo:e.data.logo,contractAddress:l.contract_address},l={...l,decimals:String(e.data.decimals)})}catch(M){}if(m&&f?.address)try{const e=await hf({address:f.address,chain:w});if(e?.success&&e?.data?.result){const t=e.data.result.find(e=>e.native_token);if(t){let e=t.balance_formatted,n=t.balance;try{const{estimateTransactionFee:o}=await Promise.resolve().then(()=>Uf),i=new Yh(t.balance),r="0x"+BigInt(i.toFixed(0)).toString(16),a=await o({from:f.address,to:f.address,data:"0x",value:r,chainId:g,rpcUrl:y});if(a.isGreaterThan(0)){const o=i.minus(a);o.isGreaterThan(0)?(n=o.toFixed(0),e=Yh(Et(BigInt(o.toFixed(0)),t.decimals)).toFixed()):(n="0",e="0")}}catch{}c={symbol:t.symbol,name:t.name,balance:n,balanceFormatted:e,usdValue:t.usd_value,usdPrice:t.usd_price,decimals:t.decimals,logo:t.logo||t.thumbnail,contractAddress:fi}}else{const e=await ff({address:fi,chain:w});e?.success&&e?.data&&(c={symbol:e.data.symbol,name:e.data.name,balance:"0",balanceFormatted:"0",usdValue:0,usdPrice:e.data.usd_price,decimals:e.data.decimals,logo:e.data.logo,contractAddress:fi})}}}catch(M){}if(b&&f?.address)try{const e=await hf({address:f.address,chain:w});if(e?.success&&e?.data?.result){const t=e.data.result,n=`W${p?.nativeCurrency?.symbol||"ETH"}`,o=t.find(e=>e.symbol.toUpperCase()===n.toUpperCase());o&&(c={symbol:o.symbol,name:o.name,balance:o.balance,balanceFormatted:o.balance_formatted,usdValue:o.usd_value,usdPrice:o.usd_price,decimals:o.decimals,logo:o.logo||o.thumbnail,contractAddress:o.token_address})}}catch(M){}if(k){try{const e=await i({address:l.contract_address,chain:w});e?.success&&e?.data&&(e.data.contract_type&&(l={...l,token_standard:e.data.contract_type}),!l.nft_name&&e.data.name&&(l={...l,nft_name:e.data.name}))}catch(M){}if(f?.address)try{const e=await mf({address:f.address,chain:w,limit:100,exclude_spam:!1});if(e?.success&&e?.data?.result){const t=e.data.result.find(e=>e.token_address.toLowerCase()===l.contract_address.toLowerCase()&&e.token_id===l.token_id);if(!t){const e=l.nft_name||`#${l.token_id||l.contract_address}`;return d(A("nftNotFoundInWallet",{name:e}),"bot",n),void r(!1)}{l={...l,amount:l.amount||"1",maxAmount:t.amount||"1"};const e=t.normalized_metadata?.image||t.media?.original_media_url||"";u={name:t.normalized_metadata?.name||t.name||l.nft_name||`#${t.token_id}`,image:e||void 0,tokenId:t.token_id,contractAddress:t.token_address,tokenStandard:t.contract_type||l.token_standard||void 0}}}}catch(M){}}l.amount&&c?.balanceFormatted&&("send_token"===a||"send_native"===a||"wrap_native"===a||"unwrap_native"===a)&&(l.amount=bp(l.amount,c.balanceFormatted,c.usdPrice)),s?d(e.message||"Please review and complete the form below.","bot",n,void 0,{action:e.action,parameters:l,status:"pending",tokenInfo:c,nftInfo:u}):d(e.message||t,"bot",n)}(e,t,n)}}(O,P,B.id):O&&"chat"===O.action?await async function(e,t,n,o){const i=e.token_mentions||[],r=e.suggested_actions||[],a=[];i.length>0&&(await Promise.all(i.map(async e=>{let t=e.contract_address||"",n=e.decimals||18;if("native"===t.toLowerCase()&&(t=fi),t===fi){const t=o?.find(e=>e.native_token);return t?{symbol:e.symbol||t.symbol,contract_address:fi,decimals:18}:e.symbol?{symbol:e.symbol,contract_address:fi,decimals:18}:null}if(t&&t!==fi){const i=o?.find(n=>n.token_address.toLowerCase()===t.toLowerCase()&&n.symbol.toUpperCase()===e.symbol.toUpperCase());if(i){try{const e=await af.getTokensDetails([t],m);n=e?.data?.[0]?.decimals??n}catch{}return{symbol:e.symbol,contract_address:t,decimals:n}}try{const o=await af.getTokensDetails([t],m),i=o?.data?.[0];if(i&&i.symbol?.toUpperCase()===e.symbol.toUpperCase())return{symbol:e.symbol,contract_address:t,decimals:i.decimals??n};t=""}catch{t=""}}if(!t&&o){const i=o.find(t=>t.symbol.toUpperCase()===e.symbol.toUpperCase());if(i){t=i.token_address;try{const e=await af.getTokensDetails([t],m);n=e?.data?.[0]?.decimals??n}catch{}}}return t?{symbol:e.symbol,contract_address:t,decimals:n}:null}))).filter(e=>null!==e).forEach(e=>{a.push({id:`buy-${e.symbol}`,text:`💰 Buy ${e.symbol}`,value:A("buttonBuySymbol",{symbol:e.symbol}),action:"click_buy_item_token_button",extraData:{tokenAddress:e.contract_address,symbol:e.symbol,decimals:e.decimals},fullWidth:!0})}),r.length>0&&r.forEach((e,t)=>{a.push({id:`suggested-${t}-${e.label}`,text:e.label,value:e.prompt,action:"suggested_action",fullWidth:!0})}),a.length>0?d(e.message||t,"bot",n,a):d(e.message||t,"bot",n)}(O,P,B.id,i):d(P,"bot",B.id)}catch(R){d(v("errorProcessingRequest"),"bot",B.id)}r(!1),await oh(50),$h.isDesktop&&u.current?.focus()},[t,i,a,d,l,f?.address,b,p?.name,p?.nativeCurrency?.symbol,p?.tokenTrendingDefault,g,h,w,m,A,C,I,S,T,v,k,y,x,E])}}({inputValue:T,setInputValue:E,isTyping:x,setIsTyping:C,replyingTo:N,setReplyingTo:B,setShowSuggestions:S,inputRef:O,messages:m,addMessage:w,updateMessageType:k,account:H,chainData:V,chainType:W,chainTypeMoralis:G,chainId:J,isChainSupported:Y,rpcUrl:j,t:f,ti:p,updateDataBuyToken:Z,showTrendingTokens:_,showMyNFTs:$,showMyBalances:ee,onClickItemTokenToBuy:te,onClickItemUserBalanceToBuy:ne,showPreviewToBuy:oe}),{handleButtonClick:re}=function(e){const{addMessage:t,handleSendMessage:o,setIsTyping:i,setShowSuggestions:r,onClickItemTokenToBuy:a,onClickItemUserBalanceToBuy:s,showPreviewToBuy:c,onTransaction:u,updateMessageText:l,ti:d,t:h,account:f,chainId:p,chainData:m,chainTypeMoralis:w,rpcUrl:g,updateDataBuyToken:b,getDataBuyToken:y,inputRef:v}=e;return{handleButtonClick:n.useCallback(async(e,n,A)=>{try{if("suggested_action"===n)return r(!1),void(await o(e));if(t(e,"user"),r(!1),i(!0),n)switch(await oh(500),n){case"click_buy_item_token_button":await a(A?.tokenAddress||"",A?.decimals||18);break;case"click_balance_item_user_to_buy_button":await s(A?.tokenAddress||"",A?.symbol||"",A?.balance||"",A?.decimals||18);break;case"select_percent":await c(A?.percent||0,A?.tokenBalance||"",A?.tokenAddress||void 0,A?.tokenDecimals||void 0);break;case"confirm_swap":{if(!A?.tx||!u){t(h("txDataNotAvailable"),"bot");break}const e=A.tx,n={from:f?.address||"",to:e.to,data:e.data,value:e.value,chainId:p},o=t(h("txProcessing"),"bot");try{i(!1);const e=await u(n),t=m?.blockExplorers?.default?.url,r=e.transactionHash?t?` [View on Explorer](${t}/tx/${e.transactionHash})`:` Tx: ${e.transactionHash}`:"";if("success"===e.status&&e.transactionHash){l(o.id,h("txSubmitted")+r);try{await oh(2e3);const t=await Cf({transactionHash:e.transactionHash,chainId:p||1,rpcUrl:g});l(o.id,("success"===t.status?h("txConfirmedSwap"):h("txRevertedSwap"))+r)}catch{l(o.id,h("txTimeout")+r)}}else"success"===e.status?l(o.id,h("txSuccessfulSwap")):l(o.id,h("txFailed")+(e.error?`\nError: ${e.error}`:""))}catch(k){l(o.id,h("txFailed"))}break}case"approve_for_swap":{const e=A?.tokenAddress||"",n=A?.spenderAddress||"",o=A?.tokenSymbol||"token",r=A?.tx;if(!e||!n||!u){t(h("approvalDataNotAvailable"),"bot");break}const a=A?.amountInWei||void 0,s=Sf({tokenAddress:e,spenderAddress:n,fromAddress:f?.address||"",chainId:p,tokenSymbol:o,amount:a}),c={from:s.from,to:s.to,data:s.data,value:s.value,chainId:s.chainId};t(d("approving",{symbol:o}),"bot");try{i(!1);const e=await u(c);let n="success"===e.status;if("success"===e.status&&e.transactionHash)try{n="success"===(await Cf({transactionHash:e.transactionHash,chainId:p||1,rpcUrl:g})).status}catch{n=!0}n?(t(d("approvalSuccess",{symbol:o}),"bot"),t(h("approvalConfirmSwap"),"bot",void 0,[{id:"confirm-swap-after-approve",text:h("confirmSwapButton"),value:h("swapConfirmValue"),action:"confirm_swap",fullWidth:!0,extraData:{tx:r}}])):t(h("approvalFailed")+(e.error?`\nError: ${e.error}`:""),"bot")}catch(k){t(h("approvalFailed"),"bot")}break}case"click_swap_dest_token":{const e=A?.tokenAddress||"",n=A?.symbol||"";b({descTokenAddress:e,descTokenDecimals:A?.decimals||18});const o=y(),i=o.srcTokenAddress||"",r=i===fi,a=o.amount||"";try{const s=await hf({address:f?.address||"",chain:w});if(s?.success&&s?.data?.result){const c=s.data.result;let u,l="",w="0";if(r){const e=c.find(e=>e.native_token);l=m?.nativeCurrency?.symbol||"ETH",w=e?.balance_formatted||"0",u=e?.usd_price}else{const e=c.find(e=>e.token_address.toLowerCase()===i.toLowerCase());e&&(l=e.symbol,w=e.balance_formatted,u=e.usd_price)}if(a&&l){const n=bp(a,w,u),s=o.srcTokenDecimals||18,c=r?fi:i;b({amount:n});try{const o=hi(n,s).toString(),i=await bf({chainId:p,tokenIn:c,tokenInAmount:o,tokenOut:e,tokenOutRecipient:f?.address||"",slippage:"auto",accesstoken:"d6c45897b8f6"});if(i.success&&i.data){const e=i.data,n=e.tokenIn,a=e.tokenOut,s=Yh(Et(BigInt(n.amount||0),n.decimals)).decimalPlaces(8).toFormat(),u=Yh(Et(BigInt(a.amount||0),a.decimals)).decimalPlaces(8).toFormat();let l=!1;if(!r&&f?.address&&e.tx?.to)try{const t=await If({tokenAddress:c,ownerAddress:f.address,spenderAddress:e.tx.to,chainId:p,rpcUrl:g});l=Yh(t.toString()).isLessThan(o)}catch{l=!0}const w=e.estimatedTransactionFee?.total?Yh(e.estimatedTransactionFee.total):Yh(0);let b=Yh(0);if(l&&f?.address)try{const t=Sf({tokenAddress:c,spenderAddress:e.tx?.to||"",fromAddress:f.address,chainId:p,amount:o});b=await Bf({from:f.address,to:t.to,data:t.data,chainId:p,rpcUrl:g})}catch{}const y=w.plus(b),v=m?.nativeCurrency?.symbol||"native";let A="",k=!1;if(f?.address&&y.isGreaterThan(0))try{const e=await Nf({address:f.address,chainId:p,rpcUrl:g});e.isLessThan(y)&&(k=!0,A=d("swapFeeWarning",{symbol:v,balance:Yh(Et(BigInt(e.toFixed(0)),18)).decimalPlaces(8).toFormat(),needed:Yh(Et(BigInt(y.toFixed(0)),18)).decimalPlaces(8).toFormat()}))}catch{}const T=`From: ${s} ${n.symbol}\n⬇️\nTo: ${u} ${a.symbol}\n\n${A}\n`;k?t(T,"bot"):l?t(T+d("swapNeedApprove",{symbol:n.symbol}),"bot",void 0,[{id:"approve-for-swap",text:d("swapApproveButton",{symbol:n.symbol}),value:d("swapApproveValue",{symbol:n.symbol}),action:"approve_for_swap",fullWidth:!0,extraData:{tokenAddress:c,spenderAddress:e.tx.to,tokenSymbol:n.symbol,amountInWei:o,tx:e.tx}}]):t(T+h("swapReadyToProceed"),"bot",void 0,[{id:"confirm-swap",text:h("swapConfirmYes"),value:h("swapConfirmValue"),action:"confirm_swap",extraData:{tx:e.tx}}])}else t(d("swapEstimationError",{error:i.errorMessage||i.error||"Unknown error"}),"bot")}catch(k){t(h("swapEstimationFailed"),"bot")}}else if(l&&parseFloat(w)>0){const e=o.srcTokenDecimals||18,r=[25,50,75,100].map(t=>({id:`percent-${t}`,text:`${t}%`,value:d("buttonUsePercent",{percent:String(t),symbol:l}),action:"select_percent",extraData:{percent:t,tokenAddress:i,tokenSymbol:l,tokenDecimals:e,tokenBalance:w}}));t(d("swapSelectAmount",{from:l,to:n,balance:w}),"bot",void 0,r)}else t(h("swapNoSourceToken"),"bot")}else t(h("couldNotFetchBalance"),"bot")}catch(k){t(h("couldNotLoadBalance"),"bot")}break}case"select_nft_to_send":{const e=A?.name||"NFT",n=A?.contractAddress||"",o=A?.tokenId||"",i=A?.tokenStandard||"ERC721",r=A?.amount||"1",a=A?.image||"",s=A?.toAddress||"";t(d("nftSendReview",{name:e,standard:i,tokenId:o}),"bot",void 0,void 0,{action:"send_nft",parameters:{contract_address:n,token_id:o,to_address:s,token_standard:i,amount:r,maxAmount:r,nft_name:e},status:"pending",nftInfo:{name:e,image:a||void 0,tokenId:o,contractAddress:n,tokenStandard:i}});break}default:t(d("actionExecutedFor",{action:n,value:e}),"bot")}else await oh(500),t(d("receivedButtonValue",{value:e}),"bot");i(!1),$h.isDesktop&&v.current?.focus()}catch(T){t(h("errorProcessingRequest"),"bot"),i(!1)}},[t,o,a,s,c,u,d,f?.address,p,h,m?.blockExplorers?.default?.url,m?.nativeCurrency?.symbol,l,g,b,y,w])}}({addMessage:w,handleSendMessage:ie,setIsTyping:C,setShowSuggestions:S,onClickItemTokenToBuy:te,onClickItemUserBalanceToBuy:ne,showPreviewToBuy:oe,onTransaction:i,updateMessageText:y,ti:p,t:f,account:H,chainId:J,chainData:V,chainTypeMoralis:G,rpcUrl:j,updateDataBuyToken:Z,getDataBuyToken:K,inputRef:O}),{handleActionFormSubmit:ae}=function(e){const{updateMessageAction:t,updateMessageActionParameters:o,chainId:i,account:r,chainType:a,chainData:s,rpcUrl:c,ti:u,t:l,addMessage:d,onTransaction:h,setIsTyping:f}=e;return{handleActionFormSubmit:n.useCallback(async(e,n,p)=>{try{if(t(p,"submitted"),"swap_token"===e){let e=18;if(n.token_in&&n.token_in!==fi)try{const t=await af.getTokensDetails([n.token_in],a);t?.data?.[0]&&(e=t.data[0].decimals||18)}catch(m){}const o=hi(n.amount||"0",e).toString(),h=await bf({chainId:i,tokenIn:n.token_in||"",tokenInAmount:o,tokenOut:n.token_out||"",tokenOutRecipient:r?.address||"",slippage:"auto",accesstoken:"d6c45897b8f6"});if(!h.success||!h.data)return t(p,"pending"),void d(u("swapEstimationError",{error:h.errorMessage||h.error||"Unknown error"}),"bot");const f=h.data,w=f.tokenIn,g=f.tokenOut,b=Yh(Et(BigInt(w.amount||0),w.decimals)).decimalPlaces(8).toFormat(),y=Yh(Et(BigInt(g.amount||0),g.decimals)).decimalPlaces(8).toFormat(),v=!n.token_in||n.token_in===fi;let A=!1;if(!v&&r?.address&&f.tx?.to)try{const e=await If({tokenAddress:n.token_in,ownerAddress:r.address,spenderAddress:f.tx.to,chainId:i,rpcUrl:c});A=Yh(e.toString()).isLessThan(o)}catch(m){}const k=f.estimatedTransactionFee?.total?Yh(f.estimatedTransactionFee.total):Yh(0);let T=Yh(0);if(A&&r?.address)try{const e=Sf({tokenAddress:n.token_in,spenderAddress:f.tx?.to||"",fromAddress:r.address,chainId:i,amount:o});T=await Bf({from:r.address,to:e.to,data:e.data,chainId:i,rpcUrl:c})}catch(m){}const E=k.plus(T),x=s?.nativeCurrency?.symbol||"native";let C="",I=!1;if(r?.address&&E.isGreaterThan(0))try{const e=await Nf({address:r.address,chainId:i,rpcUrl:c});e.isLessThan(E)&&(I=!0,C=u("swapFeeWarning",{symbol:x,balance:Yh(Et(BigInt(e.toFixed(0)),18)).decimalPlaces(8).toFormat(),needed:Yh(Et(BigInt(E.toFixed(0)),18)).decimalPlaces(8).toFormat()}))}catch(m){}const S=`From: ${b} ${w.symbol}\n⬇️\nTo: ${y} ${g.symbol}\n\n${C}\n`;return void(I?(t(p,"pending"),d(S,"bot")):A?(t(p,"success"),d(S+u("swapApprovalRequired",{symbol:w.symbol}),"bot",void 0,[{id:"approve-swap-actionform",text:u("swapApproveButton",{symbol:w.symbol}),value:u("swapApproveValue",{symbol:w.symbol}),action:"approve_for_swap",extraData:{tokenAddress:n.token_in,spenderAddress:f.tx.to,tokenSymbol:w.symbol,amountInWei:o,tx:f.tx},fullWidth:!0}])):(t(p,"success"),d(S+l("swapReadyToProceed"),"bot",void 0,[{id:"confirm-swap-actionform",text:l("swapConfirmYes"),value:l("swapConfirmValue"),action:"confirm_swap",extraData:{tx:f.tx}}])))}const g=xf({action:e,parameters:n,fromAddress:r?.address||"",chainId:i||1}),b={from:g.from,to:g.to,data:g.data,value:g.value,chainId:g.chainId};if(["send_token","send_native","send_nft","wrap_native","unwrap_native","approve_token"].includes(e)&&r?.address)try{const e=s?.nativeCurrency?.symbol||"native",n=await Bf({from:g.from,to:g.to,data:g.data,value:g.value&&"0"!==g.value?`0x${BigInt(g.value).toString(16)}`:void 0,chainId:i,rpcUrl:c});if(n.isGreaterThan(0)){const o=await Nf({address:r.address,chainId:i,rpcUrl:c});if(o.isLessThan(n))return t(p,"pending"),void d(u("txInsufficientGas",{symbol:e,balance:Yh(Et(BigInt(o.toFixed(0)),18)).decimalPlaces(8).toFormat(),fee:Yh(Et(BigInt(n.toFixed(0)),18)).decimalPlaces(8).toFormat()}),"bot")}}catch(w){}if(!h)return t(p,"pending"),void d(l("txNoHandler"),"bot");f(!1);const y=await h(b);if("success"===y.status&&y.transactionHash){const r=s?.blockExplorers?.default?.url,a=r?` [View on Explorer](${r}/tx/${y.transactionHash})`:` Tx: ${y.transactionHash}`;try{if(await oh(4e3),"success"===(await Cf({transactionHash:y.transactionHash,chainId:i||1,rpcUrl:c})).status){if(t(p,"success"),o(p,n),"approve_token"===e)d(u("approvalSuccess",{symbol:n.token_symbol||n.contract_address||"Token"})+a,"bot");else if("send_nft"===e){const e=n.to_address||n.recipient||"",t=e?`${e.slice(0,6)}...${e.slice(-4)}`:"";d(u("txSuccessfulSendNft",{name:n.nft_name||n.token_symbol||"NFT",tokenId:n.token_id||"",to:t})+a,"bot")}else if("send_token"===e||"send_native"===e){const t=n.to_address||n.recipient||"",o=t?`${t.slice(0,6)}...${t.slice(-4)}`:"";d(u("send_native"===e?"txSuccessfulSendNative":"txSuccessfulSendToken",{amount:n.amount||"",symbol:n.token_symbol||("send_native"===e?s?.nativeCurrency?.symbol||"native":"Token"),to:o})+a,"bot")}else if("wrap_native"===e){const e=s?.nativeCurrency?.symbol||"native";d(u("txSuccessfulWrapNative",{amount:n.amount||"",from:e,to:`W${e}`})+a,"bot")}else if("unwrap_native"===e){const e=s?.nativeCurrency?.symbol||"native";d(u("txSuccessfulUnwrapNative",{amount:n.amount||"",from:`W${e}`,to:e})+a,"bot")}}else t(p,"pending"),d(l("txReverted")+"\n"+a,"bot")}catch{t(p,"success"),d(l("txTimeout")+"\n"+a,"bot")}}else"success"===y.status?t(p,"success"):(t(p,"pending"),d(l("txFailed")+(y.error?`\nError: ${y.error}`:""),"bot"))}catch(g){t(p,"pending"),d(u("txError",{message:g instanceof Error?g.message:"Unknown error"}),"bot")}},[t,o,i,r?.address,a,s?.nativeCurrency?.symbol,s?.blockExplorers?.default?.url,c,u,l,d,h])}}({updateMessageAction:g,updateMessageActionParameters:b,chainId:J,account:H,chainType:W,chainData:V,rpcUrl:j,ti:p,t:f,addMessage:w,onTransaction:i,setIsTyping:C}),se=n.useMemo(()=>{const e=(e=[])=>e.map(e=>({...e,id:gh(),action:async()=>{S(!1),await re(e.text,"suggested_action")}})),t=[{id:"ask",icon:"❓",text:f("suggestionAskText"),action:async()=>{S(!1),C(!0),w(f("suggestionAskUserMessage"),"user"),await oh(1e3),C(!1),w(f("suggestionAskBotReply"),"bot")}},{id:"buy",icon:"💰",text:f("suggestionBuyText"),action:async()=>{S(!1),w(f("suggestionBuyText"),"user"),tt(H?.address||"")&&Y?await _():(C(!0),await oh(1e3),tt(H?.address||"")&&!Y?w(f("walletConnectedChainUnsupported"),"bot"):w(f("walletNotConnected"),"bot"),C(!1))}}],n=l?e(l):t;return d?.length?[...n,...e(d)]:n},[l,d,re,w,H?.address,_,f,Y]),ce=n.useCallback(async(e,t,n)=>{S(!1),U(e=>({...e,[n]:!0}));try{await ae(e,t,n)}finally{U(e=>({...e,[n]:!1}))}},[ae]),ue=n.useCallback(e=>{A([e])},[A]),le=n.useCallback(e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),ie())},[ie]),de=n.useCallback(()=>{const e=window.getSelection();e&&e.toString().length>0||o()},[o]),he=e=>{if(0===e)return!0;const t=new Date(m[e].timestamp),n=new Date(m[e-1].timestamp);return t.setHours(0,0,0,0),n.setHours(0,0,0,0),t.getTime()!==n.getTime()};return n.useEffect(()=>{R.current?.scrollIntoView({behavior:"smooth"})},[m]),n.useEffect(()=>{e?(O.current&&$h.isDesktop&&O.current.focus(),R.current?.scrollIntoView({behavior:"instant"}),D.current&&L.current?Date.now()-L.current>12e5&&S(!0):S(!0),L.current=null,D.current=!1,setTimeout(()=>{R.current?.scrollIntoView({behavior:"smooth"})},50)):(L.current=Date.now(),D.current=!F.current)},[e]),n.useEffect(()=>{const t=t=>{"Escape"===t.key&&e&&o()};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[e,o]),e?t.jsx("div",{className:"chat-modal-overlay"+("bottom-left"===r?" chat-modal-overlay--left":""),onClick:de,role:"dialog","aria-modal":"true","aria-labelledby":"chat-modal-title",children:t.jsxs("div",{className:"chat-modal",style:a,onClick:e=>e.stopPropagation(),children:[t.jsxs("div",{className:"chat-modal-header",children:[t.jsxs("div",{className:"chat-modal-header-title",children:[t.jsxs("div",{className:"chat-modal-header-left",children:[t.jsx("div",{className:"keyring-logo",children:t.jsx("img",{src:h||q?.icon||"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAA8CAYAAAAdUliaAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAADAhJREFUeAHtWUtsnNUVPufOw2NAjS3UqqwyZtNVhaO2cbyoYqMKlU2xaRKIQPUMBQqllcegFgVVeBwEIZWKbQQElYfHoDYPUo1pqdpN40EgOSatxlm1KzzuhlZt5Umblsbz//dw7ut/zCOZQLLLkWb+131899zvnse9ANfkmsQE4VMIlcf6oJGaACkHICm2gU8bIJIV3HusAldZLgswLTDQG5KTQFjgmtuA+B/5X12BCEBscJNzuO/4PFwl6RowvbVnhIEuMK4soKqmAGKn+jUQWMQ9JxbhCsslAdPRu7MgvEkuOshPrEQxyFj7QsBtgDutI66Dt3Ur7l+qwRWSiwLWXK1zofxSPfb+xN7dfMnZH1xC20pKkGrM4PhnB962k+xytS8FjWyP5/f1UqJ+5rada+3Kae0n/DLfDjZ9cQOwmtYvNwFpHveenIErBbhvZSXb60Oxh/BbPR729/hIaY+gV+JG2oNKyvdnfj8+XGtuhI5/e4K5UuTWskGzJCHG9WBxwjrze+bT8huj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2I6LWF7ho/I+DSKeswpFLpzkYw5MyF1fsLnIhiePulzEuQzkVr2laEBDfjE3iqPjLdhvbaHjp8ZsJMnjpyZ5kOdHCek2/XJkwYYgjYnU+qcjyB6YsXvKOXJxYHXduXdLiXuP1np1M8VA6xEmbQM4DSfSOX0MZiHsaMyPnGitISIhvmZT53SKEcHXm4947vqgJ3MHlrJpkGUGdxgxk27Bdxjzv/QUSVNMP6lI0NL3bZ9VQA7ee3plVzSw4leiSPRU1ULupaRMv/lF4Yrl9PmVQXs5GiRqeKJwd4GbU9JOsdHw7Wvz10e0GtyTTrIJznoNVtvIOH9AAAAAElFTkSuQmCC",alt:"Keyring Logo",width:22,height:30})}),t.jsx("h3",{id:"chat-modal-title",children:c||q?.title||f("chatTitle")})]}),t.jsx("button",{className:"close-button",onClick:o,"aria-label":f("closeChat"),type:"button",children:t.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:t.jsx("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})})]}),t.jsx(ph,{address:H?.address,chainId:H?.chainId})]}),t.jsxs("div",{className:"chat-modal-messages-wrapper",children:[t.jsxs("div",{className:"chat-modal-messages",ref:P,role:"log","aria-live":"polite",children:[m.map((e,n)=>t.jsxs("div",{children:[he(n)&&t.jsx("div",{className:"date-separator",children:nh(e.timestamp)}),t.jsxs("div",{className:"message "+("user"===e.sender?"message-user":"message-bot"),role:"article",children:[t.jsx("button",{disabled:$h.isMobile,className:"message-reply-button",onClick:()=>Q(e),"aria-label":f("replyToMessage"),type:"button",children:t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:t.jsx("path",{d:"M3.5 8.5L1 6L3.5 3.5M1.5 6H10C12.2091 6 14 7.79086 14 10V13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),t.jsxs("div",{className:"message-bubble",children:[e.replyTo&&t.jsxs("div",{className:"message-reply-to",children:[t.jsxs("div",{className:"message-reply-to-label",children:[f("replyingTo")," ","user"===e.replyTo.sender?f("replyingToYou"):c||f("replyingToAgent")]}),t.jsx("div",{className:"message-reply-to-text",children:e.replyTo.text})]}),t.jsx("div",{className:"message-text",children:t.jsx(Ap,{content:e.text})}),e.buttons&&e.buttons.length>0&&t.jsx("div",{className:"message-buttons",children:e.buttons.map(e=>t.jsx("button",{className:`message-button ${e.fullWidth?"full-width":""} ${"suggested_action"===e.action?"suggested-action":""}`,onClick:()=>re(e.value,e.action,e?.extraData),type:"button",children:e.text},e.id))}),e.actionData&&("pending"===e.actionData.status||"success"===e.actionData.status||"submitted"===e.actionData.status)&&t.jsx(zh,{disabled:"success"===e.actionData.status||"submitted"===e.actionData.status,action:e.actionData.action,initialValues:e.actionData.parameters,onSubmit:(t,n)=>{ce(t,n,e.id),setTimeout(()=>{R.current?.scrollIntoView({behavior:"smooth"})},100)},onCancel:()=>ue(e.id),isSubmitting:M[e.id]||!1,tokenInfo:e.actionData.tokenInfo,nftInfo:e.actionData.nftInfo}),e.actionData&&"submitted"===e.actionData.status&&t.jsx("div",{className:"action-status action-status-submitted",children:f("txProcessing")}),e.actionData&&"fail"===e.actionData.status&&t.jsx("div",{className:"action-status action-status-fail",children:f("actionFail")}),t.jsxs("div",{className:"message-timestamp",children:[e.timestamp.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1}),"user"===e.sender&&t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"check-icon",children:t.jsx("path",{d:"M13.3333 4L6 11.3333L2.66667 8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]})]})]})]},e.id)),x&&t.jsx("div",{className:"message message-bot typing-indicator",role:"status","aria-label":f("botIsTyping"),children:t.jsxs("div",{className:"message-bubble",children:[t.jsx("span",{className:"typing-dot"}),t.jsx("span",{className:"typing-dot"}),t.jsx("span",{className:"typing-dot"})]})}),(I||1===m.length)&&t.jsxs(t.Fragment,{children:[m.length>1&&t.jsx("div",{className:"message message-bot",role:"article",children:t.jsx("div",{className:"message-bubble",children:t.jsx("div",{className:"message-text",children:f("canIHelpYou")})})}),t.jsx("div",{className:"suggestions-container",children:se.map(e=>t.jsxs("button",{className:"suggestion-button",onClick:e.action,type:"button",children:[e.icon&&t.jsx("span",{className:"suggestion-icon",children:e.icon}),t.jsx("span",{className:"suggestion-text",children:e.text})]},e.id??e.text))})]}),t.jsx("div",{ref:R})]}),t.jsx(jh,{scrollContainerRef:P})]}),t.jsxs("div",{className:"chat-modal-input",children:[N&&t.jsxs("div",{className:"reply-preview",children:[t.jsxs("div",{className:"reply-preview-content",children:[t.jsxs("div",{className:"reply-preview-label",children:[f("replyingTo")," ","user"===N.sender?f("replyingToYou"):c||f("replyingToAgent")]}),t.jsx("div",{className:"reply-preview-text",children:N.text})]}),t.jsx("button",{className:"reply-preview-close",onClick:()=>B(null),"aria-label":f("cancelReply"),type:"button",children:t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:t.jsx("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}),t.jsxs("div",{className:"chat-modal-input-row",children:[t.jsx("input",{ref:O,type:"text",placeholder:f("messagePlaceholder"),value:T,onChange:e=>E(e.target.value),onKeyPress:le,disabled:x,"aria-label":"Message input"}),t.jsx("button",{className:"send-button",onClick:()=>{ie()},"aria-label":f("sendMessage"),disabled:x||""===T?.trim(),type:"button",children:t.jsx("img",{src:"data:image/svg+xml,%3csvg%20width='36'%20height='36'%20viewBox='0%200%2036%2036'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3crect%20width='36'%20height='36'%20rx='18'%20fill='%232358B2'/%3e%3cmask%20id='mask0_1924_16177'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='11'%20y='10'%20width='17'%20height='16'%3e%3crect%20x='11.334'%20y='10'%20width='16'%20height='16'%20fill='url(%23pattern0_1924_16177)'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_1924_16177)'%3e%3crect%20x='11.334'%20y='10'%20width='16'%20height='16'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cpattern%20id='pattern0_1924_16177'%20patternContentUnits='objectBoundingBox'%20width='1'%20height='1'%3e%3cuse%20xlink:href='%23image0_1924_16177'%20transform='scale(0.00195312)'/%3e%3c/pattern%3e%3cimage%20id='image0_1924_16177'%20width='512'%20height='512'%20preserveAspectRatio='none'%20xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOgAAADoABlffMYAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAACAASURBVHic7d13uGRlme7/79M0ijnrKM6ImHAMmHXGgB7zKJhzAAMgZjFg4DfnzO8ISM4gKIKIEgwImAAjiAQRCSoCCgaCgOQcn/PHu5reNHt37121qt61qr6f6+pLbLr3vi/Seuqtp947MhNJkjRdFtUOIEmSxs8BQJKkKeQAIEnSFHIAkCRpCjkASJI0hRbXDjCoiFgMPBB40Iwf9wZimV96E/AP4PzmxwWZeeMYo0qS1DnRl48BRsSqwFrA85ofa3DHh/18JHAxcCrwmyU/MvPslqJKktR5nR0AImJ1lj7s1wJWH/G3vAw4EjgE+EFmXj7i7ydJUjWdGgAi4uXA2ykP/YdWjHITcBRlGDggMy+umEWSpNZVHwAiYmXgrcAngMdXDTO7G4ADgZ0z88TaYSRJakO1ASAi7glsAHwUWLVKiIU7FtgZ+FZm3lQ7jCRJgxr7ABARDwE+AmwI3Gus37w9fwW2AvbKzBtqh5EkaaHGNgBExKOBz1CO++80lm86ehcA2wB7ZOY1tcNIkjRfIx8Ams/rbwL8f8CdR/rN6vknsD2wS2ZeWTuMJEkrMtIBICKeCuwFrDmyb9Itl1N2BHbMzEtqh5Eka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R8QTgEODhrX3RyXAL8A1gi8w8vXYYSZJaHQAAIuKewJ7Am1r9wv10I+WtkS9k5tm1w0iStETrA8BtXzjiPZSSmruO5Bt023XAl4GtMvPc2mEkSVrWyAYAgIhYA9gPeOrIvkm3XA3sDmybmRfWDiNJ0lxGOgAARMQiYH3g88D9R/rN6rkc2BnYITMvrR1GkqQVGfkAcNs3irgP8P8DGzE5Vwj/E9ge2CUzr6wdRpKk+RrbAHDbNyyfFPgf4FUMcRNhZRdQLj/aw0peSVIfjX0AuO0bRzwK2BhYF7hLlRALdwKwG3CAlbySpD6rNgDcFiDiAcAHgXcCq1UNM7trKZ/h3z0zT6odRpKkNlQfAGaKiH8HXtH8eDawuFKUG4GjgO8C+2XmFZVySJI0Ep0aAGaKiHsBL6EMAy8HHjjib3ku8EPg+8BPMvPqEX8/SZKq6ewAMFNEBPB0ykCwOvDgGT/uz8KWCW8G/gT8fsaP07yiV5I0TXoxACxPRCymnA7MHAoeAFwPXAFcOeN/LwPOycwb66SVJKkbej8ASJKkhevr5/AlSdIQHAAkSZpCDgCSJE0hBwBJkqaQA4AkSVPo/wH9hnZgmG1pVwAAAABJRU5ErkJggg=='/%3e%3c/defs%3e%3c/svg%3e",alt:"Send",width:44,height:44})})]})]})]})}):null},Tp=({position:e,theme:o,defaultOpen:i,onOpen:r,onClose:a,onTransaction:s,chatTitle:u,welcomeMessage:l,customSuggestions:h,additionalSuggestions:f,buttonIcon:p,chatIcon:m,customChatButton:w})=>{const{account:g,chainId:b}=hh(),[y,v]=n.useState(i),A=d;n.useEffect(()=>{i&&r&&r()},[]),n.useEffect(()=>{if("undefined"==typeof window)return;const e=document.body,t=document.documentElement,n=e.style.overscrollBehavior,o=t.style.overscrollBehavior,i=e.style.overflow;return y&&(e.style.overscrollBehavior="none",t.style.overscrollBehavior="none",e.style.overflow="hidden"),()=>{e.style.overscrollBehavior=n,t.style.overscrollBehavior=o,e.style.overflow=i}},[y]);const k=n.useCallback(()=>{v(!0),r?.()},[r]),T=n.useCallback(()=>{v(!1),a?.()},[a]),E=n.useCallback(()=>{y?T():k()},[y,k,T]),x={position:"fixed",["bottom-right"===e?"right":"left"]:o.offset?.x??20,bottom:o.offset?.y??20,zIndex:o.zIndex??9999};return ch(g?.address||"")&&b?A.length>0&&!A.includes(window.location.origin)&&!window.location.href.startsWith("http://localhost")?t.jsx(t.Fragment,{}):t.jsxs("div",{style:x,role:"complementary","aria-label":"Chat widget",children:[t.jsx(c,{buttonSize:o.buttonSize,onClick:E,customIcon:p,customChatButton:w}),t.jsx(kp,{isOpen:y,onClose:T,onTransaction:s,position:e,modalChatStyle:o.modalChatStyle,chatTitle:u,welcomeMessage:l,customSuggestions:h,additionalSuggestions:f,chatIcon:m})]}):t.jsx(t.Fragment,{})};e.ChatWidget=({position:e="bottom-right",theme:n={},defaultOpen:o=!1,onOpen:i,onClose:r,account:s,onTransaction:c,language:u="en",rpcUrls:l,chatTitle:d,welcomeMessage:h,customSuggestions:f,additionalSuggestions:p,buttonIcon:m,chatIcon:w,customChatButton:g})=>{const b={position:e,theme:n,rpcUrls:l};return"undefined"==typeof window?null:t.jsx(Eh,{initialConfig:b,children:t.jsx(fh,{initialAccount:s,children:t.jsx(a,{initialLanguage:u,children:t.jsx(Tp,{position:e,theme:n,defaultOpen:o,onOpen:i,onClose:r,onTransaction:c,chatTitle:d,welcomeMessage:h,customSuggestions:f,additionalSuggestions:p,buttonIcon:m,chatIcon:w,customChatButton:g})})})})},e.clearChat=function(){ef?.()},Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});