diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5a0254a --- /dev/null +++ b/.gitignore @@ -0,0 +1,26 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* +.env + +node_modules +#dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? +.vercel diff --git a/app/.gitignore b/app/.gitignore index 18d8b35..a5e4589 100644 --- a/app/.gitignore +++ b/app/.gitignore @@ -9,7 +9,7 @@ lerna-debug.log* .env node_modules -dist +#dist dist-ssr *.local diff --git a/app/dist/assets/Arc-R3PUWRPJ-CUdEQO8X.js b/app/dist/assets/Arc-R3PUWRPJ-CUdEQO8X.js new file mode 100644 index 0000000..d246eac --- /dev/null +++ b/app/dist/assets/Arc-R3PUWRPJ-CUdEQO8X.js @@ -0,0 +1 @@ +var l='data:image/svg+xml,';export{l as default}; diff --git a/app/dist/assets/Brave-24BM36UM-C6C5mkTK.js b/app/dist/assets/Brave-24BM36UM-C6C5mkTK.js new file mode 100644 index 0000000..1485f79 --- /dev/null +++ b/app/dist/assets/Brave-24BM36UM-C6C5mkTK.js @@ -0,0 +1 @@ +var s='data:image/svg+xml,';export{s as default}; diff --git a/app/dist/assets/Browser-4R4QKTV2-D3ON1q-S.js b/app/dist/assets/Browser-4R4QKTV2-D3ON1q-S.js new file mode 100644 index 0000000..dda32a6 --- /dev/null +++ b/app/dist/assets/Browser-4R4QKTV2-D3ON1q-S.js @@ -0,0 +1 @@ +var e='data:image/svg+xml,';export{e as default}; diff --git a/app/dist/assets/Chrome-TLI42HDP-BgiVz-ma.js b/app/dist/assets/Chrome-TLI42HDP-BgiVz-ma.js new file mode 100644 index 0000000..5c4aca9 --- /dev/null +++ b/app/dist/assets/Chrome-TLI42HDP-BgiVz-ma.js @@ -0,0 +1 @@ +var t='data:image/svg+xml,';export{t as default}; diff --git a/app/dist/assets/Edge-AZ34LAFM-EBh9cG_z.js b/app/dist/assets/Edge-AZ34LAFM-EBh9cG_z.js new file mode 100644 index 0000000..807be95 --- /dev/null +++ b/app/dist/assets/Edge-AZ34LAFM-EBh9cG_z.js @@ -0,0 +1 @@ +var t='data:image/svg+xml,';export{t as default}; diff --git a/app/dist/assets/Firefox-ZDK7RHKK-5nyhB0sj.js b/app/dist/assets/Firefox-ZDK7RHKK-5nyhB0sj.js new file mode 100644 index 0000000..a684ecf --- /dev/null +++ b/app/dist/assets/Firefox-ZDK7RHKK-5nyhB0sj.js @@ -0,0 +1 @@ +var o='data:image/svg+xml,';export{o as default}; diff --git a/app/dist/assets/Linux-VYP66PDO--MOvpQUa.js b/app/dist/assets/Linux-VYP66PDO--MOvpQUa.js new file mode 100644 index 0000000..cbe7c17 --- /dev/null +++ b/app/dist/assets/Linux-VYP66PDO--MOvpQUa.js @@ -0,0 +1 @@ +var e='data:image/svg+xml,';export{e as default}; diff --git a/app/dist/assets/Macos-5QL4JBJE-DLNYPiln.js b/app/dist/assets/Macos-5QL4JBJE-DLNYPiln.js new file mode 100644 index 0000000..5c112ec --- /dev/null +++ b/app/dist/assets/Macos-5QL4JBJE-DLNYPiln.js @@ -0,0 +1 @@ +var A='data:image/svg+xml,';export{A as default}; diff --git a/app/dist/assets/Opera-BKMCKUXC-CCypmVaM.js b/app/dist/assets/Opera-BKMCKUXC-CCypmVaM.js new file mode 100644 index 0000000..a731e16 --- /dev/null +++ b/app/dist/assets/Opera-BKMCKUXC-CCypmVaM.js @@ -0,0 +1 @@ +var t='data:image/svg+xml,';export{t as default}; diff --git a/app/dist/assets/Safari-PXQIVS6N-B-Lfxb9r.js b/app/dist/assets/Safari-PXQIVS6N-B-Lfxb9r.js new file mode 100644 index 0000000..4b16f90 --- /dev/null +++ b/app/dist/assets/Safari-PXQIVS6N-B-Lfxb9r.js @@ -0,0 +1 @@ +var a='data:image/svg+xml,';export{a as default}; diff --git a/app/dist/assets/Windows-GTAT3OTE-K9Pt3pUF.js b/app/dist/assets/Windows-GTAT3OTE-K9Pt3pUF.js new file mode 100644 index 0000000..778fd6e --- /dev/null +++ b/app/dist/assets/Windows-GTAT3OTE-K9Pt3pUF.js @@ -0,0 +1 @@ +var a='data:image/svg+xml,';export{a as default}; diff --git a/app/dist/assets/ar_AR-ZRPPM56D-d2WEfzQ_.js b/app/dist/assets/ar_AR-ZRPPM56D-d2WEfzQ_.js new file mode 100644 index 0000000..745eb39 --- /dev/null +++ b/app/dist/assets/ar_AR-ZRPPM56D-d2WEfzQ_.js @@ -0,0 +1,1349 @@ +var u=`{ + "connect_wallet": { + "label": "اتصال المحفظة", + "wrong_network": { + "label": "شبكة خاطئة" + } + }, + "intro": { + "title": "ما هو المحفظة؟", + "description": "تُستخدم المحفظة لإرسال واستلام وتخزين وعرض الأصول الرقمية. إنها أيضاً طريقة جديدة لتسجيل الدخول، دون الحاجة إلى إنشاء حسابات وكلمات مرور جديدة على كل موقع.", + "digital_asset": { + "title": "دار لأصولك الرقمية", + "description": "تُستخدم المحافظ لإرسال واستلام وتخزين وعرض الأصول الرقمية مثل إيثيريوم والـ NFTs." + }, + "login": { + "title": "طريقة جديدة لتسجيل الدخول", + "description": "بدلاً من إنشاء حسابات وكلمات مرور جديدة على كل موقع، فقط قم بتوصيل محفظتك." + }, + "get": { + "label": "احصل على محفظة" + }, + "learn_more": { + "label": "تعلم المزيد" + } + }, + "sign_in": { + "label": "تحقق من حسابك", + "description": "لإنهاء الاتصال، يجب عليك توقيع رسالة في محفظتك للتحقق من أنك صاحب هذا الحساب.", + "message": { + "send": "إرسال الرسالة", + "preparing": "جارٍ تجهيز الرسالة...", + "cancel": "إلغاء", + "preparing_error": "خطأ في تجهيز الرسالة، يرجى المحاولة مرة أخرى!" + }, + "signature": { + "waiting": "انتظار التوقيع...", + "verifying": "جار التحقق من التوقيع...", + "signing_error": "خطأ في توقيع الرسالة، يرجى المحاولة مرة أخرى!", + "verifying_error": "خطأ في التحقق من التوقيع، يرجى المحاولة مرة أخرى!", + "oops_error": "عذرًا، حدث خطأ ما!" + } + }, + "connect": { + "label": "اتصل", + "title": "اتصال بالمحفظة", + "new_to_ethereum": { + "description": "جديد في محافظ Ethereum؟", + "learn_more": { + "label": "تعلم المزيد" + } + }, + "learn_more": { + "label": "أعرف أكثر" + }, + "recent": "الأخير", + "status": { + "opening": "جار فتح %{wallet}...", + "connecting": "جارٍ الاتصال", + "connect_mobile": "استمر في %{wallet}", + "not_installed": "%{wallet} غير مثبت", + "not_available": "%{wallet} غير متاح", + "confirm": "تأكيد الاتصال في الامتداد", + "confirm_mobile": "قبل طلب الاتصال في المحفظة" + }, + "secondary_action": { + "get": { + "description": "لا يوجد لديك %{wallet}؟", + "label": "احصل" + }, + "install": { + "label": "تثبيت" + }, + "retry": { + "label": "أعد المحاولة" + } + }, + "walletconnect": { + "description": { + "full": "هل تحتاج إلى النافذة الرسمية لـ WalletConnect؟", + "compact": "هل تحتاج إلى النافذة لـ WalletConnect؟" + }, + "open": { + "label": "افتح" + } + } + }, + "connect_scan": { + "title": "المسح باستخدام %{wallet}", + "fallback_title": "المسح باستخدام هاتفك" + }, + "connector_group": { + "installed": "مُثبّت", + "recommended": "موصى به", + "other": "آخر", + "popular": "شائع", + "more": "المزيد", + "others": "الآخرين" + }, + "get": { + "title": "احصل على محفظة", + "action": { + "label": "احصل" + }, + "mobile": { + "description": "محفظة الموبايل" + }, + "extension": { + "description": "ملحق المتصفح" + }, + "mobile_and_extension": { + "description": "محفظة موبايل وملحق" + }, + "mobile_and_desktop": { + "description": "محفظة الموبايل والكمبيوتر" + }, + "looking_for": { + "title": "ليست هذه هي ما تبحث عنه؟", + "mobile": { + "description": "حدد محفظة على الشاشة الرئيسية للبدء باستخدام موفر محفظة مختلف." + }, + "desktop": { + "compact_description": "حدد محفظة على الشاشة الرئيسية للبدء باستخدام موفر محفظة مختلف.", + "wide_description": "حدد محفظة على اليسار للبدء باستخدام موفر محفظة مختلف." + } + } + }, + "get_options": { + "title": "ابدأ مع %{wallet}", + "short_title": "احصل على %{wallet}", + "mobile": { + "title": "%{wallet} للجوال", + "description": "استخدم محفظة الموبايل لاستكشاف عالم Ethereum.", + "download": { + "label": "احصل على التطبيق" + } + }, + "extension": { + "title": "%{wallet} لـ %{browser}", + "description": "وصول لمحفظتك مباشرة من متصفح الويب المفضل لديك.", + "download": { + "label": "أضف إلى %{browser}" + } + }, + "desktop": { + "title": "%{wallet} لـ %{platform}", + "description": "قم بالوصول إلى محفظتك بشكل أصلي من كمبيوترك القوي.", + "download": { + "label": "أضف إلى %{platform}" + } + } + }, + "get_mobile": { + "title": "قم بالتثبيت %{wallet}", + "description": "استخدم هاتفك للتحميل على iOS أو Android", + "continue": { + "label": "استمر" + } + }, + "get_instructions": { + "mobile": { + "connect": { + "label": "اتصل" + }, + "learn_more": { + "label": "تعلم المزيد" + } + }, + "extension": { + "refresh": { + "label": "تحديث" + }, + "learn_more": { + "label": "تعلم المزيد" + } + }, + "desktop": { + "connect": { + "label": "اتصل" + }, + "learn_more": { + "label": "تعلم المزيد" + } + } + }, + "chains": { + "title": "تبديل الشبكات", + "wrong_network": "تم اكتشاف شبكة غير صحيحة، قم بالتبديل أو القطع للمتابعة.", + "confirm": "التأكيد في المحفظة", + "switching_not_supported": "محفظتك لا تدعم التبديل بين الشبكات من %{appName}. جرب التبديل بين الشبكات من داخل المحفظة بدلاً من ذلك.", + "switching_not_supported_fallback": "محفظتك لا تدعم تبديل الشبكات من هذا التطبيق. حاول تبديل الشبكات من داخل المحفظة بدلاً من ذلك.", + "disconnect": "قطع الاتصال", + "connected": "متصل" + }, + "profile": { + "disconnect": { + "label": "قطع الاتصال" + }, + "copy_address": { + "label": "نسخ العنوان", + "copied": "تم النسخ!" + }, + "explorer": { + "label": "عرض المزيد على المستكشف" + }, + "transactions": { + "description": "%{appName} ستظهر المعاملات هنا...", + "description_fallback": "سوف تظهر معاملاتك هنا...", + "recent": { + "title": "المعاملات الأخيرة" + }, + "clear": { + "label": "مسح الكل" + } + } + }, + "wallet_connectors": { + "argent": { + "qr_code": { + "step1": { + "description": "ضع أرجنت على شاشتك الرئيسية للوصول السريع إلى محفظتك.", + "title": "افتح تطبيق Argent" + }, + "step2": { + "description": "أنشئ محفظة واسم مستخدم، أو استورد محفظة موجودة بالفعل.", + "title": "إنشاء أو استيراد محفظة" + }, + "step3": { + "description": "بعد الفحص، سيظهر لك موجه الاتصال لتوصيل المحفظة الخاصة بك.", + "title": "اضغط على زر فحص الكود الشريطي" + } + } + }, + "berasig": { + "extension": { + "step1": { + "title": "قم بتثبيت إضافة BeraSig", + "description": "نوصي بتثبيت BeraSig على شريط المهام الخاص بك للوصول الأسهل إلى محفظتك." + }, + "step2": { + "title": "إنشاء محفظة", + "description": "تأكد من عمل نسخة احتياطية لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أحد." + }, + "step3": { + "title": "قم بتحديث متصفحك", + "description": "بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الامتداد." + } + } + }, + "best": { + "qr_code": { + "step1": { + "title": "افتح تطبيق Best Wallet", + "description": "أضف محفظة Best إلى شاشتك الرئيسية للوصول الأسرع إلى محفظتك." + }, + "step2": { + "title": "إنشاء أو استيراد محفظة", + "description": "أنشئ محفظة جديدة أو استورد واحدة موجودة بالفعل." + }, + "step3": { + "title": "اضغط على أيقونة الرمز الاستجابة السريعة وامسحها", + "description": "اضغط على أيقونة QR على الشاشة الرئيسية، قراءة الرمز وتأكيد الرسالة الموجهة للاتصال." + } + } + }, + "bifrost": { + "qr_code": { + "step1": { + "description": "نوصي بوضع محفظة Bifrost على الشاشة الرئيسية للوصول الأسرع.", + "title": "افتح تطبيق محفظة Bifrost" + }, + "step2": { + "description": "أنشئ أو استورد محفظة باستخدام عبارة الاستعادة الخاصة بك.", + "title": "إنشاء أو استيراد محفظة" + }, + "step3": { + "description": "بعد الفحص، سيظهر موجه الاتصال لك لتوصيل محفظتك.", + "title": "اضغط على زر المسح" + } + } + }, + "bitget": { + "qr_code": { + "step1": { + "description": "نوصي بوضع محفظة Bitget على الشاشة الرئيسية للوصول الأسرع.", + "title": "افتح تطبيق محفظة Bitget" + }, + "step2": { + "description": "تأكد من عمل نسخة احتياطية لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أحد.", + "title": "إنشاء أو استيراد محفظة" + }, + "step3": { + "description": "بعد الفحص، ستظهر لك موجه اتصال لتوصيل محفظتك.", + "title": "اضغط على زر الفحص" + } + }, + "extension": { + "step1": { + "description": "نوصي بتثبيت محفظة Bitget على شريط المهام للوصول الأسرع إلى محفظتك.", + "title": "قم بتثبيت امتداد محفظة Bitget" + }, + "step2": { + "description": "تأكد من نسخ محفظتك احتياطيًا باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص.", + "title": "أنشئ محفظة أو استورد محفظة" + }, + "step3": { + "description": "بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الامتداد.", + "title": "قم بتحديث متصفحك" + } + } + }, + "bitski": { + "extension": { + "step1": { + "description": "نوصي بتثبيت Bitski على شريط المهام الخاص بك للوصول الأسرع إلى محفظتك.", + "title": "قم بتثبيت امتداد Bitski" + }, + "step2": { + "description": "تأكد من الاحتفاظ بنسخة احتياطية من محفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص.", + "title": "إنشاء أو استيراد محفظة" + }, + "step3": { + "description": "بعد إعداد المحفظة الخاصة بك، انقر أدناه لتحديث المتصفح وتحميل الإضافة.", + "title": "تحديث المتصفح الخاص بك" + } + } + }, + "bitverse": { + "qr_code": { + "step1": { + "title": "افتح تطبيق محفظة Bitverse", + "description": "أضف محفظة Bitverse إلى شاشتك الرئيسية للوصول الأسرع إلى محفظتك." + }, + "step2": { + "title": "إنشاء أو استيراد محفظة", + "description": "أنشئ محفظة جديدة أو استورد واحدة موجودة بالفعل." + }, + "step3": { + "title": "اضغط على أيقونة الرمز الاستجابة السريعة وامسحها", + "description": "اضغط على أيقونة QR على الشاشة الرئيسية، قراءة الرمز وتأكيد الرسالة الموجهة للاتصال." + } + } + }, + "bloom": { + "desktop": { + "step1": { + "title": "افتح تطبيق محفظة Bloom", + "description": "نوصي بوضع محفظة Bloom على الشاشة الرئيسية للوصول الأسرع." + }, + "step2": { + "description": "أنشئ أو استورد محفظة باستخدام عبارة الاستعادة الخاصة بك.", + "title": "إنشاء أو استيراد محفظة" + }, + "step3": { + "description": "بعد حصولك على محفظة، انقر على Connect للاتصال عبر Bloom. ستظهر رسالة مطالبة بالاتصال في التطبيق لتأكيد الاتصال.", + "title": "انقر على Connect" + } + } + }, + "bybit": { + "qr_code": { + "step1": { + "description": "نوصي بوضع Bybit على شاشتك الرئيسية للوصول الأسرع إلى محفظتك.", + "title": "افتح تطبيق Bybit" + }, + "step2": { + "description": "يمكنك بسهولة نسخ محفظتك الاحتياطي باستخدام ميزة النسخ الاحتياطي على هاتفك.", + "title": "إنشاء أو استيراد محفظة" + }, + "step3": { + "description": "بعد الفحص، سيظهر لك موجه الاتصال لتوصيل المحفظة الخاصة بك.", + "title": "اضغط على زر المسح" + } + }, + "extension": { + "step1": { + "description": "انقر في أعلى يمين المتصفح وثبت محفظة Bybit للوصول السهل.", + "title": "قم بتثبيت امتداد محفظة Bybit" + }, + "step2": { + "description": "أنشئ محفظة جديدة أو استورد واحدة موجودة بالفعل.", + "title": "أنشئ محفظة أو استورد محفظة" + }, + "step3": { + "description": "بعد إعداد محفظة Bybit، انقر أدناه لتحديث المتصفح وتحميل الامتداد.", + "title": "قم بتحديث متصفحك" + } + } + }, + "binance": { + "qr_code": { + "step1": { + "description": "نوصي بوضع Binance على الشاشة الرئيسية للوصول السريع إلى محفظتك.", + "title": "افتح تطبيق Binance" + }, + "step2": { + "description": "يمكنك بسهولة نسخ محفظتك الاحتياطي باستخدام ميزة النسخ الاحتياطي على هاتفك.", + "title": "إنشاء أو استيراد محفظة" + }, + "step3": { + "description": "بعد الفحص، سيظهر لك موجه الاتصال لتوصيل المحفظة الخاصة بك.", + "title": "اضغط على زر WalletConnect" + } + } + }, + "coin98": { + "qr_code": { + "step1": { + "description": "نوصي بوضع محفظة Coin98 على الشاشة الرئيسية لسرعة الوصول إلى محفظتك.", + "title": "افتح تطبيق محفظة Coin98" + }, + "step2": { + "description": "يمكنك بسهولة نسخ محفظتك الاحتياطي باستخدام ميزة النسخ الاحتياطي على هاتفك.", + "title": "إنشاء أو استيراد محفظة" + }, + "step3": { + "description": "بعد الفحص، ستظهر لك مطالبة بالاتصال لتوصيل محفظتك.", + "title": "اضغط على زر WalletConnect" + } + }, + "extension": { + "step1": { + "description": "انقر في الجزء العلوي الأيمن من المتصفح وثبت Coin98 Wallet لسهولة الوصول.", + "title": "قم بتثبيت امتداد Coin98 Wallet" + }, + "step2": { + "description": "أنشئ محفظة جديدة أو استورد واحدة موجودة بالفعل.", + "title": "أنشئ محفظة أو استورد محفظة" + }, + "step3": { + "description": "بمجرد إعداد Coin98 Wallet ، انقر أدناه لتحديث المتصفح وتحميل الامتداد.", + "title": "تحديث المتصفح الخاص بك" + } + } + }, + "coinbase": { + "qr_code": { + "step1": { + "description": "نوصي بوضع Coinbase Wallet على الشاشة الرئيسية لسهولة الوصول.", + "title": "افتح تطبيق Coinbase Wallet" + }, + "step2": { + "description": "يمكنك بسهولة النسخ الاحتياطي لمحفظتك باستخدام ميزة النسخ الاحتياطي السحابي.", + "title": "إنشاء أو استيراد محفظة" + }, + "step3": { + "description": "بعد الفحص، ستظهر لك مطالبة بالاتصال لتوصيل محفظتك.", + "title": "اضغط على زر الفحص" + } + }, + "extension": { + "step1": { + "description": "نوصي بتثبيت محفظة Coinbase على شريط المهام الخاص بك للوصول الأسرع إلى محفظتك.", + "title": "تثبيت امتداد محفظة Coinbase" + }, + "step2": { + "description": "تأكد من النسخ الاحتياطي لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص.", + "title": "إنشاء أو استيراد المحفظة" + }, + "step3": { + "description": "بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الإضافة.", + "title": "تحديث المتصفح الخاص بك" + } + } + }, + "compass": { + "extension": { + "step1": { + "description": "نوصي بتثبيت محفظة Compass على شريط المهام للوصول الأسرع إلى محفظتك.", + "title": "تثبيت امتداد محفظة Compass" + }, + "step2": { + "description": "تأكد من عمل نسخة احتياطية لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أحد.", + "title": "إنشاء أو استيراد محفظة" + }, + "step3": { + "description": "بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الامتداد.", + "title": "قم بتحديث متصفحك" + } + } + }, + "core": { + "qr_code": { + "step1": { + "description": "نوصي بوضع Core على الشاشة الرئيسية للوصول السريع إلى محفظتك.", + "title": "افتح تطبيق Core" + }, + "step2": { + "description": "يمكنك بسهولة النسخ الاحتياطي لمحفظتك باستخدام ميزة النسخ الاحتياطي على هاتفك.", + "title": "إنشاء أو استيراد المحفظة" + }, + "step3": { + "description": "بعد الفحص، سيظهر لك موجه الاتصال لتوصيل محفظتك.", + "title": "اضغط على زر WalletConnect" + } + }, + "extension": { + "step1": { + "description": "نوصي بتثبيت Core على شريط المهام الخاص بك للوصول الأسرع إلى محفظتك.", + "title": "قم بتثبيت امتداد Core" + }, + "step2": { + "description": "تأكد من عمل نسخة احتياطية لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص.", + "title": "إنشاء أو استيراد محفظة" + }, + "step3": { + "description": "بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الامتداد.", + "title": "تحديث متصفحك" + } + } + }, + "fox": { + "qr_code": { + "step1": { + "description": "نوصي بوضع FoxWallet على شاشتك الرئيسية للوصول الأسرع.", + "title": "افتح تطبيق FoxWallet" + }, + "step2": { + "description": "تأكد من الاحتفاظ بنسخة احتياطية من محفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص.", + "title": "إنشاء محفظة أو استيراد محفظة" + }, + "step3": { + "description": "بعد الفحص، ستظهر لك موجه الاتصال لتتمكن من اتصال محفظتك.", + "title": "اضغط على زر الفحص" + } + } + }, + "frontier": { + "qr_code": { + "step1": { + "description": "نوصي بوضع Frontier Wallet على شاشتك الرئيسية للوصول الأسرع.", + "title": "افتح تطبيق Frontier Wallet" + }, + "step2": { + "description": "تأكد من نسخ محفظتك احتياطيا باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص.", + "title": "إنشاء أو استيراد محفظة" + }, + "step3": { + "description": "بعد الفحص، ستظهر لك موجه الاتصال لربط محفظتك.", + "title": "اضغط على زر الفحص" + } + }, + "extension": { + "step1": { + "description": "نوصي بتثبيت محفظة Frontier على شريط المهام للوصول الأسرع إلى محفظتك.", + "title": "تثبيت امتداد محفظة Frontier" + }, + "step2": { + "description": "تأكد من نسخ محفظتك احتياطيا باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص.", + "title": "إنشاء أو استيراد محفظة" + }, + "step3": { + "description": "بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الإضافة.", + "title": "قم بتحديث المتصفح الخاص بك" + } + } + }, + "im_token": { + "qr_code": { + "step1": { + "title": "افتح تطبيق imToken", + "description": "ضع تطبيق imToken على الشاشة الرئيسية للوصول الأسرع إلى محفظتك." + }, + "step2": { + "title": "إنشاء أو استيراد محفظة", + "description": "قم بإنشاء محفظة جديدة أو استيراد واحدة موجودة." + }, + "step3": { + "title": "اضغط على أيقونة الماسح الضوئي في الزاوية العليا اليمنى", + "description": "اختر الاتصال الجديد، ثم امسح الرمز الشريطي وأكد الموجه للاتصال." + } + } + }, + "iopay": { + "qr_code": { + "step1": { + "description": "نوصي بوضع ioPay على الشاشة الرئيسية للوصول السريع إلى محفظتك.", + "title": "افتح تطبيق ioPay" + }, + "step2": { + "description": "يمكنك بسهولة نسخ محفظتك الاحتياطي باستخدام ميزة النسخ الاحتياطي على هاتفك.", + "title": "إنشاء أو استيراد محفظة" + }, + "step3": { + "description": "بعد الفحص، سيظهر لك موجه الاتصال لتوصيل المحفظة الخاصة بك.", + "title": "اضغط على زر WalletConnect" + } + } + }, + "kaikas": { + "extension": { + "step1": { + "description": "نوصي بتثبيت Kaikas على شريط المهام للوصول الأسرع إلى محفظتك.", + "title": "قم بتثبيت امتداد Kaikas" + }, + "step2": { + "description": "تأكد من عمل نسخة احتياطية لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أحد.", + "title": "إنشاء أو استيراد محفظة" + }, + "step3": { + "description": "بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الامتداد.", + "title": "قم بتحديث متصفحك" + } + }, + "qr_code": { + "step1": { + "title": "افتح تطبيق Kaikas", + "description": "ضع تطبيق Kaikas على شاشتك الرئيسية للوصول الأسرع إلى محفظتك." + }, + "step2": { + "title": "إنشاء أو استيراد محفظة", + "description": "أنشئ محفظة جديدة أو استورد واحدة موجودة بالفعل." + }, + "step3": { + "title": "اضغط على أيقونة الماسح الضوئي في الزاوية العليا اليمنى", + "description": "اختر الاتصال الجديد، ثم امسح الرمز الشريطي وأكد الموجه للاتصال." + } + } + }, + "kaia": { + "extension": { + "step1": { + "description": "نوصي بتثبيت Kaia على شريط المهام الخاص بك للوصول الأسرع إلى محفظتك.", + "title": "قم بتثبيت إضافة Kaia" + }, + "step2": { + "description": "تأكد من عمل نسخة احتياطية لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أحد.", + "title": "إنشاء أو استيراد محفظة" + }, + "step3": { + "description": "بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الامتداد.", + "title": "قم بتحديث متصفحك" + } + }, + "qr_code": { + "step1": { + "title": "افتح تطبيق Kaia", + "description": "ضع تطبيق Kaia على الشاشة الرئيسية للوصول الأسرع إلى محفظتك." + }, + "step2": { + "title": "إنشاء أو استيراد محفظة", + "description": "أنشئ محفظة جديدة أو استورد واحدة موجودة بالفعل." + }, + "step3": { + "title": "اضغط على أيقونة الماسح الضوئي في الزاوية العليا اليمنى", + "description": "اختر الاتصال الجديد، ثم امسح الرمز الشريطي وأكد الموجه للاتصال." + } + } + }, + "kraken": { + "qr_code": { + "step1": { + "title": "افتح تطبيق محفظة Kraken", + "description": "أضف محفظة Kraken إلى شاشتك الرئيسية للوصول الأسرع إلى محفظتك." + }, + "step2": { + "title": "إنشاء أو استيراد محفظة", + "description": "أنشئ محفظة جديدة أو استورد واحدة موجودة بالفعل." + }, + "step3": { + "title": "اضغط على أيقونة الرمز الاستجابة السريعة وامسحها", + "description": "اضغط على أيقونة QR على الشاشة الرئيسية، قراءة الرمز وتأكيد الرسالة الموجهة للاتصال." + } + } + }, + "kresus": { + "qr_code": { + "step1": { + "title": "افتح تطبيق محفظة Kresus", + "description": "أضف محفظة Kresus إلى الشاشة الرئيسية للوصول الأسرع إلى محفظتك." + }, + "step2": { + "title": "إنشاء أو استيراد محفظة", + "description": "أنشئ محفظة جديدة أو استورد واحدة موجودة بالفعل." + }, + "step3": { + "title": "اضغط على أيقونة الرمز الاستجابة السريعة وامسحها", + "description": "اضغط على أيقونة QR على الشاشة الرئيسية، قراءة الرمز وتأكيد الرسالة الموجهة للاتصال." + } + } + }, + "magicEden": { + "extension": { + "step1": { + "title": "قم بتثبيت إضافة Magic Eden", + "description": "نوصي بتثبيت Magic Eden على شريط المهام للوصول الأسهل إلى محفظتك." + }, + "step2": { + "title": "إنشاء أو استيراد محفظة", + "description": "تأكد من نسخ محفظتك احتياطيًا باستخدام طريقة آمنة. لا تشارك عبارة الاستعادة السرية الخاصة بك مع أي شخص." + }, + "step3": { + "title": "قم بتحديث متصفحك", + "description": "بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الامتداد." + } + } + }, + "metamask": { + "qr_code": { + "step1": { + "title": "افتح تطبيق MetaMask", + "description": "نوصي بوضع MetaMask على الشاشة الرئيسية لديك للوصول بشكل أسرع." + }, + "step2": { + "title": "إنشاء أو استيراد محفظة", + "description": "تأكد من نسخ الحفاظ على محفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص." + }, + "step3": { + "title": "اضغط على زر المسح", + "description": "بعد الفحص، ستظهر لك موجه اتصال لتوصيل محفظتك." + } + }, + "extension": { + "step1": { + "title": "قم بتثبيت امتداد MetaMask", + "description": "نوصي بتثبيت MetaMask في شريط المهام للوصول الأسرع إلى محفظتك." + }, + "step2": { + "title": "إنشاء أو استيراد محفظة", + "description": "تأكد من نسخ احتياطي لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص." + }, + "step3": { + "title": "تحديث متصفحك", + "description": "بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الامتداد." + } + } + }, + "nestwallet": { + "extension": { + "step1": { + "title": "قم بتثبيت امتداد NestWallet", + "description": "نوصي بتثبيت NestWallet على شريط المهام للوصول السريع إلى محفظتك." + }, + "step2": { + "title": "إنشاء أو استيراد محفظة", + "description": "تأكد من عمل نسخة احتياطية لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أحد." + }, + "step3": { + "title": "قم بتحديث متصفحك", + "description": "بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الامتداد." + } + } + }, + "okx": { + "qr_code": { + "step1": { + "title": "افتح تطبيق محفظة OKX", + "description": "نوصي بوضع محفظة OKX على الشاشة الرئيسية للوصول الأسرع." + }, + "step2": { + "title": "إنشاء أو استيراد محفظة", + "description": "تأكد من نسخ احتياطي لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص." + }, + "step3": { + "title": "اضغط على زر المسح", + "description": "بعد الفحص، ستظهر لك مطالبة بالاتصال لتوصيل محفظتك." + } + }, + "extension": { + "step1": { + "title": "قم بتثبيت امتداد محفظة OKX", + "description": "نوصي بتثبيت محفظة OKX على شريط المهام للوصول الأسرع إلى محفظتك." + }, + "step2": { + "title": "إنشاء أو استيراد محفظة", + "description": "تأكد من حفظ نسخة احتياطية من محفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص." + }, + "step3": { + "title": "قم بتحديث المتصفح الخاص بك", + "description": "بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الإضافة." + } + } + }, + "omni": { + "qr_code": { + "step1": { + "title": "افتح تطبيق Omni", + "description": "أضف Omni إلى شاشتك الرئيسية للوصول الأسرع إلى محفظتك." + }, + "step2": { + "title": "إنشاء أو استيراد محفظة", + "description": "إنشاء محفظة جديدة أو استيراد واحدة موجودة." + }, + "step3": { + "title": "اضغط على أيقونة الرمز الاستجابة السريعة وامسحها", + "description": "اضغط على الرمز QR على الشاشة الرئيسية الخاصة بك، امسح الرمز وأكد الموافقة للاتصال." + } + } + }, + "1inch": { + "qr_code": { + "step1": { + "description": "ضع محفظة 1inch على شاشتك الرئيسية للوصول الأسرع إلى محفظتك.", + "title": "افتح تطبيق محفظة 1inch" + }, + "step2": { + "description": "أنشئ محفظة واسم مستخدم، أو استورد محفظة موجودة بالفعل.", + "title": "إنشاء أو استيراد محفظة" + }, + "step3": { + "description": "بعد الفحص، سيظهر لك موجه الاتصال لتوصيل المحفظة الخاصة بك.", + "title": "اضغط على زر فحص الكود الشريطي" + } + } + }, + "token_pocket": { + "qr_code": { + "step1": { + "title": "افتح تطبيق TokenPocket", + "description": "نوصي بوضع TokenPocket على الشاشة الرئيسية للوصول السريع." + }, + "step2": { + "title": "إنشاء أو استيراد محفظة", + "description": "تأكد من نسخ احتياطي لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص." + }, + "step3": { + "title": "اضغط على زر المسح", + "description": "بعد الفحص، ستظهر لك رسالة موجهة للاتصال بمحفظتك." + } + }, + "extension": { + "step1": { + "title": "قم بتثبيت امتداد TokenPocket", + "description": "نوصي بتثبيت TokenPocket على شريط المهام الخاص بك للوصول الأسرع إلى محفظتك." + }, + "step2": { + "title": "قم بإنشاء محفظة أو استيراد محفظة", + "description": "تأكد من الاحتفاظ بنسخة احتياطية من محفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص." + }, + "step3": { + "title": "قم بتحديث المتصفح الخاص بك", + "description": "بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الإضافة." + } + } + }, + "trust": { + "qr_code": { + "step1": { + "title": "افتح تطبيق Trust Wallet", + "description": "ضع Trust Wallet على الشاشة الرئيسية للوصول السريع إلى محفظتك." + }, + "step2": { + "title": "أنشئ محفظة أو استورد محفظة", + "description": "أنشئ محفظة جديدة أو استورد واحدة موجودة." + }, + "step3": { + "title": "اضغط على WalletConnect في الإعدادات", + "description": "اختر الاتصال الجديد، ثم امسح الرمز الشريطي QR وأكد الموجه للاتصال." + } + }, + "extension": { + "step1": { + "title": "قم بتثبيت امتداد Trust Wallet", + "description": "انقر في الجزء العلوي الأيمن من المتصفح وثبت Trust Wallet للوصول بسهولة." + }, + "step2": { + "title": "أنشئ محفظة أو استورد محفظة", + "description": "أنشئ محفظة جديدة أو استورد واحدة موجودة." + }, + "step3": { + "title": "قم بتحديث متصفحك", + "description": "بمجرد إعداد Trust Wallet، انقر أدناه لتحديث المتصفح وتحميل الإضافة." + } + } + }, + "uniswap": { + "qr_code": { + "step1": { + "title": "افتح تطبيق Uniswap", + "description": "أضف محفظة Uniswap إلى شاشة الرئيسية للوصول الأسرع إلى محفظتك." + }, + "step2": { + "title": "إنشاء أو استيراد محفظة", + "description": "قم بإنشاء محفظة جديدة أو استيراد واحدة موجودة." + }, + "step3": { + "title": "اضغط على الأيقونة QR واقرأ الرمز", + "description": "اضغط على أيقونة QR على الشاشة الرئيسية، قراءة الرمز وتأكيد الرسالة الموجهة للاتصال." + } + } + }, + "zerion": { + "qr_code": { + "step1": { + "title": "افتح تطبيق Zerion", + "description": "نوصي بوضع Zerion على شاشتك الرئيسية للوصول الأسرع." + }, + "step2": { + "title": "إنشاء أو استيراد محفظة", + "description": "تأكد من حفظ نسخة احتياطية من محفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص." + }, + "step3": { + "title": "اضغط على زر المسح", + "description": "بعد المسح، سوف يظهر لك نافذة الاتصال لتوصيل محفظتك." + } + }, + "extension": { + "step1": { + "title": "تثبيت امتداد Zerion", + "description": "نوصي بتثبيت Zerion على شريط المهام الخاص بك للوصول الأسرع إلى محفظتك." + }, + "step2": { + "title": "إنشاء أو استيراد محفظة", + "description": "تأكد من الاحتفاظ بنسخة احتياطية من محفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص." + }, + "step3": { + "title": "قم بتحديث المتصفح الخاص بك", + "description": "بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الإضافة." + } + } + }, + "rainbow": { + "qr_code": { + "step1": { + "title": "افتح تطبيق Rainbow", + "description": "نوصي بوضع Rainbow على شاشة البداية للوصول الأسرع إلى محفظتك." + }, + "step2": { + "title": "إنشاء محفظة أو استيراد محفظة", + "description": "يمكنك عمل نسخة احتياطية بسهولة لمحفظتك باستخدام ميزة النسخ الاحتياطي على هاتفك." + }, + "step3": { + "title": "اضغط على الزر الماسح الضوئي", + "description": "بعد الفحص، سيظهر لك موجه اتصال لربط محفظتك." + } + } + }, + "enkrypt": { + "extension": { + "step1": { + "description": "نوصي بتثبيت محفظة Enkrypt على شريط المهام الخاص بك للوصول الأسرع إلى محفظتك.", + "title": "تثبيت امتداد محفظة Enkrypt" + }, + "step2": { + "description": "تأكد من عمل نسخة احتياطية لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص.", + "title": "أنشئ أو استورد محفظة" + }, + "step3": { + "description": "بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الإضافة.", + "title": "حدث المتصفح الخاص بك" + } + } + }, + "frame": { + "extension": { + "step1": { + "description": "نوصي بتعليق Frame على شريط المهام للوصول السريع إلى محفظتك.", + "title": "ثبت Frame والإضافة المصاحبة" + }, + "step2": { + "description": "تأكد من النسخ الاحتياطي لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص.", + "title": "أنشئ أو استورد محفظة" + }, + "step3": { + "description": "بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الإضافة.", + "title": "حدث المتصفح الخاص بك" + } + } + }, + "one_key": { + "extension": { + "step1": { + "title": "قم بتثبيت امتداد محفظة OneKey", + "description": "نوصي بتثبيت محفظة OneKey على شريط المهام للوصول السريع إلى محفظتك." + }, + "step2": { + "title": "إنشاء أو استيراد محفظة", + "description": "تأكد من نسخ احتياطي لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص." + }, + "step3": { + "title": "تحديث المتصفح الخاص بك", + "description": "بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الامتداد." + } + } + }, + "paraswap": { + "qr_code": { + "step1": { + "title": "افتح تطبيق ParaSwap", + "description": "أضف محفظة ParaSwap إلى شاشتك الرئيسية للوصول الأسرع إلى محفظتك." + }, + "step2": { + "title": "إنشاء أو استيراد محفظة", + "description": "أنشئ محفظة جديدة أو استورد واحدة موجودة بالفعل." + }, + "step3": { + "title": "اضغط على أيقونة الرمز الاستجابة السريعة وامسحها", + "description": "اضغط على أيقونة QR على الشاشة الرئيسية، قراءة الرمز وتأكيد الرسالة الموجهة للاتصال." + } + } + }, + "phantom": { + "extension": { + "step1": { + "title": "قم بتثبيت امتداد Phantom", + "description": "نوصي بتثبيت Phantom على شريط المهام للوصول الأسهل إلى محفظتك." + }, + "step2": { + "title": "إنشاء أو استيراد محفظة", + "description": "تأكد من نسخ محفظتك احتياطيًا باستخدام طريقة آمنة. لا تشارك عبارة الاستعادة السرية الخاصة بك مع أي شخص." + }, + "step3": { + "title": "قم بتحديث المتصفح", + "description": "بمجرد إعداد المحفظة، انقر أدناه لتحديث المتصفح وتحميل الإضافة." + } + } + }, + "rabby": { + "extension": { + "step1": { + "title": "ثبت امتداد Rabby", + "description": "نوصي بتثبيت Rabby على شريط المهام للوصول الأسرع إلى محفظتك." + }, + "step2": { + "title": "أنشئ محفظة أو استورد محفظة", + "description": "تأكد من نسخ محفظتك احتياطيًا باستخدام طريقة آمنة. لا تشارك العبارة السرية مع أي شخص." + }, + "step3": { + "title": "قم بتحديث المتصفح", + "description": "بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الإضافة." + } + } + }, + "ronin": { + "qr_code": { + "step1": { + "description": "نوصي بوضع محفظة Ronin على الشاشة الرئيسية للوصول الأسرع.", + "title": "افتح تطبيق محفظة Ronin" + }, + "step2": { + "description": "تأكد من عمل نسخة احتياطية لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أحد.", + "title": "إنشاء أو استيراد محفظة" + }, + "step3": { + "description": "بعد الفحص، سيظهر لك موجه الاتصال لتوصيل المحفظة الخاصة بك.", + "title": "اضغط على زر المسح" + } + }, + "extension": { + "step1": { + "description": "نوصي بتثبيت محفظة Ronin على شريط المهام للوصول الأسرع إلى محفظتك.", + "title": "ثبّت امتداد محفظة Ronin" + }, + "step2": { + "description": "تأكد من عمل نسخة احتياطية لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أحد.", + "title": "إنشاء أو استيراد محفظة" + }, + "step3": { + "description": "بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الامتداد.", + "title": "قم بتحديث متصفحك" + } + } + }, + "ramper": { + "extension": { + "step1": { + "title": "ثبّت امتداد Ramper", + "description": "نوصي بتثبيت Ramper على شريط المهام لسهولة الوصول إلى محفظتك." + }, + "step2": { + "title": "إنشاء محفظة", + "description": "تأكد من عمل نسخة احتياطية لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أحد." + }, + "step3": { + "title": "قم بتحديث متصفحك", + "description": "بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الامتداد." + } + } + }, + "safeheron": { + "extension": { + "step1": { + "title": "قم بتثبيت إضافة النواة", + "description": "نوصي بتثبيت Safeheron على شريط المهام الخاص بك للوصول السريع إلى محفظتك." + }, + "step2": { + "title": "إنشاء أو استيراد محفظة", + "description": "تأكد من نسخ محفظتك بطريقة آمنة. لا تشارك عبارتك السرية مع أي شخص." + }, + "step3": { + "title": "تحديث المتصفح الخاص بك", + "description": "بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الإضافة." + } + } + }, + "taho": { + "extension": { + "step1": { + "title": "تثبيت إضافة Taho", + "description": "نوصي بتثبيت Taho على شريط المهام الخاص بك للوصول الأسرع إلى محفظتك." + }, + "step2": { + "title": "إنشاء محفظة أو استيراد محفظة", + "description": "تأكد من النسخ الاحتياطي لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص." + }, + "step3": { + "title": "تحديث المتصفح الخاص بك", + "description": "بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الإضافة." + } + } + }, + "wigwam": { + "extension": { + "step1": { + "title": "قم بتثبيت امتداد Wigwam", + "description": "نوصي بتعليق Wigwam على شريط المهام للوصول السريع إلى محفظتك." + }, + "step2": { + "title": "إنشاء أو استيراد محفظة", + "description": "تأكد من عمل نسخة احتياطية لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أحد." + }, + "step3": { + "title": "قم بتحديث متصفحك", + "description": "بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الامتداد." + } + } + }, + "talisman": { + "extension": { + "step1": { + "title": "تثبيت إضافة Talisman", + "description": "نوصي بتثبيت Talisman على شريط المهام الخاص بك للوصول الأسرع إلى محفظتك." + }, + "step2": { + "title": "إنشاء محفظة Ethereum أو استيرادها", + "description": "تأكد من النسخ الاحتياطي لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارة الاستعادة الخاصة بك مع أي شخص." + }, + "step3": { + "title": "قم بتحديث المستعرض الخاص بك", + "description": "بمجرد إعداد محفظتك، انقر أدناه لتحديث المستعرض وتحميل الإضافة." + } + } + }, + "xdefi": { + "extension": { + "step1": { + "title": "قم بتثبيت إضافة XDEFI Wallet", + "description": "نوصي بتثبيت XDEFI Wallet على شريط المهام للوصول الأسرع إلى محفظتك." + }, + "step2": { + "title": "أنشئ محفظة أو استورد محفظة", + "description": "تأكد من النسخ الاحتياطي لمحفظتك باستخدام طريقة آمنة. لا تشارك العبارة السرية الخاصة بك مع أي شخص." + }, + "step3": { + "title": "قم بتحديث المستعرض الخاص بك", + "description": "بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الإضافة." + } + } + }, + "zeal": { + "qr_code": { + "step1": { + "title": "افتح تطبيق Zeal", + "description": "أضف محفظة Zeal إلى الشاشة الرئيسية للوصول الأسرع إلى محفظتك." + }, + "step2": { + "title": "إنشاء أو استيراد محفظة", + "description": "أنشئ محفظة جديدة أو استورد واحدة موجودة بالفعل." + }, + "step3": { + "title": "اضغط على أيقونة الرمز الاستجابة السريعة وامسحها", + "description": "اضغط على أيقونة QR على الشاشة الرئيسية، قراءة الرمز وتأكيد الرسالة الموجهة للاتصال." + } + }, + "extension": { + "step1": { + "title": "قم بتثبيت امتداد Zeal", + "description": "نوصي بتثبيت Zeal في شريط المهام الخاص بك للوصول الأسرع إلى محفظتك." + }, + "step2": { + "title": "إنشاء أو استيراد محفظة", + "description": "تأكد من عمل نسخة احتياطية لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أحد." + }, + "step3": { + "title": "قم بتحديث متصفحك", + "description": "بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الامتداد." + } + } + }, + "safepal": { + "extension": { + "step1": { + "title": "قم بتثبيت صيغة SafePal Wallet", + "description": "انقر في أعلى يمين المتصفح وثبت صيغة SafePal Wallet لسهولة الوصول." + }, + "step2": { + "title": "أنشئ محفظة أو استورد محفظة", + "description": "أنشئ محفظة جديدة أو استورد واحدة موجودة بالفعل." + }, + "step3": { + "title": "قم بتحديث متصفحك", + "description": "بمجرد إعداد محفظة SafePal، انقر أدناه لتحديث المتصفح وتحميل الإضافة." + } + }, + "qr_code": { + "step1": { + "title": "افتح تطبيق محفظة SafePal", + "description": "ضع محفظة SafePal على شاشة الرئيسية لسهولة الوصول إلى محفظتك." + }, + "step2": { + "title": "إنشاء أو استيراد محفظة", + "description": "أنشئ محفظة جديدة أو استورد واحدة موجودة بالفعل." + }, + "step3": { + "title": "اضغط على WalletConnect في الإعدادات", + "description": "اختر الاتصال الجديد، ثم امسح الرمز الشريطي وأكد الموجه للاتصال." + } + } + }, + "desig": { + "extension": { + "step1": { + "title": "قم بتثبيت إضافة Desig", + "description": "نوصي بتثبيت Desig على شريط المهام الخاص بك للوصول الأسهل إلى محفظتك." + }, + "step2": { + "title": "إنشاء محفظة", + "description": "تأكد من عمل نسخة احتياطية لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أحد." + }, + "step3": { + "title": "قم بتحديث متصفحك", + "description": "بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الامتداد." + } + } + }, + "subwallet": { + "extension": { + "step1": { + "title": "قم بتثبيت إضافة SubWallet", + "description": "نوصي بتثبيت SubWallet على شريط المهام الخاص بك للوصول الأسرع إلى محفظتك." + }, + "step2": { + "title": "إنشاء أو استيراد محفظة", + "description": "تأكد من النسخ الاحتياطي لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارة الاستعادة الخاصة بك مع أي شخص." + }, + "step3": { + "title": "قم بتحديث متصفحك", + "description": "بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الامتداد." + } + }, + "qr_code": { + "step1": { + "title": "افتح تطبيق SubWallet", + "description": "نوصي بوضع SubWallet على شاشة الرئيسية الخاصة بك للوصول الأسرع." + }, + "step2": { + "title": "إنشاء أو استيراد محفظة", + "description": "تأكد من عمل نسخة احتياطية لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أحد." + }, + "step3": { + "title": "اضغط على زر المسح", + "description": "بعد الفحص، سيظهر لك موجه الاتصال لتوصيل المحفظة الخاصة بك." + } + } + }, + "clv": { + "extension": { + "step1": { + "title": "قم بتثبيت إضافة CLV Wallet", + "description": "نوصي بتثبيت CLV Wallet على شريط المهام الخاص بك للوصول الأسرع إلى محفظتك." + }, + "step2": { + "title": "إنشاء أو استيراد محفظة", + "description": "تأكد من عمل نسخة احتياطية لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أحد." + }, + "step3": { + "title": "قم بتحديث متصفحك", + "description": "بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الامتداد." + } + }, + "qr_code": { + "step1": { + "title": "افتح تطبيق محفظة CLV", + "description": "نوصي بوضع محفظة CLV على الشاشة الرئيسية للوصول الأسرع." + }, + "step2": { + "title": "إنشاء أو استيراد محفظة", + "description": "تأكد من عمل نسخة احتياطية لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أحد." + }, + "step3": { + "title": "اضغط على زر المسح", + "description": "بعد الفحص، سيظهر لك موجه الاتصال لتوصيل المحفظة الخاصة بك." + } + } + }, + "okto": { + "qr_code": { + "step1": { + "title": "افتح تطبيق Okto", + "description": "أضف Okto إلى الشاشة الرئيسية للوصول السريع" + }, + "step2": { + "title": "أنشئ محفظة MPC", + "description": "أنشئ حسابًا وقم بإنشاء محفظة" + }, + "step3": { + "title": "اضغط على WalletConnect في الإعدادات", + "description": "اضغط على أيقونة فحص الشاشة في الجهة العليا اليمنى وأكد الإدخال للاتصال." + } + } + }, + "ledger": { + "desktop": { + "step1": { + "title": "افتح تطبيق Ledger Live", + "description": "نوصي بوضع Ledger Live على شاشة الرئيسية لديك لسرعة الوصول." + }, + "step2": { + "title": "قم بإعداد Ledger الخاص بك", + "description": "قم بإعداد Ledger جديد أو قم بالاتصال بواحد موجود ." + }, + "step3": { + "title": "اتصل", + "description": "بعد المسح، سوف يظهر لك نافذة الاتصال لتوصيل محفظتك." + } + }, + "qr_code": { + "step1": { + "title": "افتح تطبيق Ledger Live", + "description": "نوصي بوضع Ledger Live على شاشة الرئيسية لديك لسرعة الوصول." + }, + "step2": { + "title": "قم بإعداد Ledger الخاص بك", + "description": "يمكنك إما المزامنة مع تطبيق سطح المكتب أو توصيل Ledger الخاص بك." + }, + "step3": { + "title": "مسح الرمز", + "description": "اضغط على WalletConnect ثم انتقل إلى الفحص. بعد المسح، سوف يظهر لك نافذة الاتصال لتوصيل محفظتك." + } + } + }, + "valora": { + "qr_code": { + "step1": { + "title": "افتح تطبيق Valora", + "description": "نوصي بوضع Valora على شاشتك الرئيسية للوصول الأسرع." + }, + "step2": { + "title": "أنشئ محفظة أو استورد محفظة", + "description": "أنشئ محفظة جديدة أو استورد واحدة موجودة بالفعل." + }, + "step3": { + "title": "اضغط على زر المسح", + "description": "بعد الفحص، سيظهر لك موجه الاتصال لتوصيل المحفظة الخاصة بك." + } + } + } + } +} +`;export{u as default}; diff --git a/app/dist/assets/arbitrum-IA4OWRTN-B0aI2PBQ.js b/app/dist/assets/arbitrum-IA4OWRTN-B0aI2PBQ.js new file mode 100644 index 0000000..9f4ef12 --- /dev/null +++ b/app/dist/assets/arbitrum-IA4OWRTN-B0aI2PBQ.js @@ -0,0 +1 @@ +var t='data:image/svg+xml,%0A';export{t as default}; diff --git a/app/dist/assets/assets-NU2OP443-COMs-Mo6.js b/app/dist/assets/assets-NU2OP443-COMs-Mo6.js new file mode 100644 index 0000000..6d0157c --- /dev/null +++ b/app/dist/assets/assets-NU2OP443-COMs-Mo6.js @@ -0,0 +1 @@ +var h='data:image/svg+xml,';export{h as default}; diff --git a/app/dist/assets/avalanche-MXEFEDSW-DcC5FNt3.js b/app/dist/assets/avalanche-MXEFEDSW-DcC5FNt3.js new file mode 100644 index 0000000..14b16a7 --- /dev/null +++ b/app/dist/assets/avalanche-MXEFEDSW-DcC5FNt3.js @@ -0,0 +1 @@ +var l='data:image/svg+xml,%0A';export{l as default}; diff --git a/app/dist/assets/base-Z4LFBE5D-DHfqMzJC.js b/app/dist/assets/base-Z4LFBE5D-DHfqMzJC.js new file mode 100644 index 0000000..cd3ecf7 --- /dev/null +++ b/app/dist/assets/base-Z4LFBE5D-DHfqMzJC.js @@ -0,0 +1 @@ +var l='data:image/svg+xml,';export{l as default}; diff --git a/app/dist/assets/blast-TN2WIMWF-BUZNbRBy.js b/app/dist/assets/blast-TN2WIMWF-BUZNbRBy.js new file mode 100644 index 0000000..0997c19 --- /dev/null +++ b/app/dist/assets/blast-TN2WIMWF-BUZNbRBy.js @@ -0,0 +1 @@ +var l='data:image/svg+xml,';export{l as default}; diff --git a/app/dist/assets/bsc-RVE67I5L-DVYEF0vl.js b/app/dist/assets/bsc-RVE67I5L-DVYEF0vl.js new file mode 100644 index 0000000..fb2d8e1 --- /dev/null +++ b/app/dist/assets/bsc-RVE67I5L-DVYEF0vl.js @@ -0,0 +1 @@ +var l='data:image/svg+xml,';export{l as default}; diff --git a/app/dist/assets/ccip-Cw0j4Bxy.js b/app/dist/assets/ccip-Cw0j4Bxy.js new file mode 100644 index 0000000..376392b --- /dev/null +++ b/app/dist/assets/ccip-Cw0j4Bxy.js @@ -0,0 +1 @@ +import{B as l,g as m,s as y,d as k,i as b,c as O,a as E,e as L,H as h,b as x}from"./index-vLeYm_sl.js";class M extends l{constructor({callbackSelector:r,cause:a,data:o,extraData:i,sender:d,urls:t}){var n;super(a.shortMessage||"An error occurred while fetching for an offchain result.",{cause:a,metaMessages:[...a.metaMessages||[],(n=a.metaMessages)!=null&&n.length?"":[],"Offchain Gateway Call:",t&&[" Gateway URL(s):",...t.map(f=>` ${m(f)}`)],` Sender: ${d}`,` Data: ${o}`,` Callback selector: ${r}`,` Extra data: ${i}`].flat(),name:"OffchainLookupError"})}}class R extends l{constructor({result:r,url:a}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${m(a)}`,`Response: ${y(r)}`],name:"OffchainLookupResponseMalformedError"})}}class S extends l{constructor({sender:r,to:a}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${a}`,`OffchainLookup sender address: ${r}`],name:"OffchainLookupSenderMismatchError"})}}const A="0x556f1830",$={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function C(c,{blockNumber:r,blockTag:a,data:o,to:i}){const{args:d}=k({data:o,abi:[$]}),[t,n,f,u,s]=d,{ccipRead:e}=c,g=e&&typeof(e==null?void 0:e.request)=="function"?e.request:T;try{if(!b(i,t))throw new S({sender:t,to:i});const p=await g({data:f,sender:t,urls:n}),{data:w}=await O(c,{blockNumber:r,blockTag:a,data:E([u,L([{type:"bytes"},{type:"bytes"}],[p,s])]),to:i});return w}catch(p){throw new M({callbackSelector:u,cause:p,data:o,extraData:s,sender:t,urls:n})}}async function T({data:c,sender:r,urls:a}){var i;let o=new Error("An unknown error occurred.");for(let d=0;d0&&(s=n[0]),s instanceof Error)throw s;var u=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw u.context=s,u}var c=f[e];if(c===void 0)return!1;if(typeof c=="function")h(c,this,n);else for(var O=c.length,P=b(c,O),r=0;r0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=s.length,C(u)}return t}o.prototype.addListener=function(e,n){return y(this,e,n,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,n){return y(this,e,n,!0)};function R(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function g(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=R.bind(r);return i.listener=n,r.wrapFn=i,i}o.prototype.once=function(e,n){return l(n),this.on(e,g(this,e,n)),this},o.prototype.prependOnceListener=function(e,n){return l(n),this.prependListener(e,g(this,e,n)),this},o.prototype.removeListener=function(e,n){var r,i,f,s,u;if(l(n),i=this._events,i===void 0)return this;if(r=i[e],r===void 0)return this;if(r===n||r.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,r.listener||n));else if(typeof r!="function"){for(f=-1,s=r.length-1;s>=0;s--)if(r[s]===n||r[s].listener===n){u=r[s].listener,f=s;break}if(f<0)return this;f===0?r.shift():j(r,f),r.length===1&&(i[e]=r[0]),i.removeListener!==void 0&&this.emit("removeListener",e,u||n)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var n,r,i;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[e]),this;if(arguments.length===0){var f=Object.keys(r),s;for(i=0;i=0;i--)this.removeListener(e,n[i]);return this};function _(t,e,n){var r=t._events;if(r===void 0)return[];var i=r[e];return i===void 0?[]:typeof i=="function"?n?[i.listener||i]:[i]:n?N(i):b(i,i.length)}o.prototype.listeners=function(e){return _(this,e,!0)},o.prototype.rawListeners=function(e){return _(this,e,!1)},o.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):w.call(t,e)},o.prototype.listenerCount=w;function w(t){var e=this._events;if(e!==void 0){var n=e[t];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}o.prototype.eventNames=function(){return this._eventsCount>0?v(this._events):[]};function b(t,e){for(var n=new Array(e),r=0;r2&&(i.children=arguments.length>3?F.call(arguments,2):t),typeof _=="function"&&_.defaultProps!=null)for(r in _.defaultProps)i[r]===void 0&&(i[r]=_.defaultProps[r]);return N(_,i,n,u,null)}function N(_,e,t,n,u){var r={type:_,props:e,key:t,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:u??++ge,__i:-1,__u:0};return u==null&&v.vnode!=null&&v.vnode(r),r}function je(){return{current:null}}function L(_){return _.children}function A(_,e){this.props=_,this.context=e}function S(_,e){if(e==null)return _.__?S(_.__,_.__i+1):null;for(var t;e<_.__k.length;e++)if((t=_.__k[e])!=null&&t.__e!=null)return t.__e;return typeof _.type=="function"?S(_):null}function xe(_){var e,t;if((_=_.__)!=null&&_.__c!=null){for(_.__e=_.__c.base=null,e=0;e<_.__k.length;e++)if((t=_.__k[e])!=null&&t.__e!=null){_.__e=_.__c.base=t.__e;break}return xe(_)}}function X(_){(!_.__d&&(_.__d=!0)&&H.push(_)&&!R.__r++||ie!==v.debounceRendering)&&((ie=v.debounceRendering)||ke)(R)}function R(){var _,e,t,n,u,r,i,l;for(H.sort(G);_=H.shift();)_.__d&&(e=H.length,n=void 0,r=(u=(t=_).__v).__e,i=[],l=[],t.__P&&((n=w({},u)).__v=u.__v+1,v.vnode&&v.vnode(n),_e(t.__P,n,u,t.__n,t.__P.namespaceURI,32&u.__u?[r]:null,i,r??S(u),!!(32&u.__u),l),n.__v=u.__v,n.__.__k[n.__i]=n,Ee(i,n,l),n.__e!=r&&xe(n)),H.length>e&&H.sort(G));R.__r=0}function He(_,e,t,n,u,r,i,l,c,f,p){var o,a,s,g,k,b,d=n&&n.__k||Ce,m=e.length;for(c=Ie(t,e,d,c,m),o=0;o0?N(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=_,i.__b=_.__b+1,l=null,(f=i.__i=Oe(i,t,c,o))!==-1&&(o--,(l=t[f])&&(l.__u|=2)),l==null||l.__v===null?(f==-1&&a--,typeof i.type!="function"&&(i.__u|=4)):f!=c&&(f==c-1?a--:f==c+1?a++:(f>c?a--:a++,i.__u|=4))):_.__k[r]=null;if(o)for(r=0;r(c!=null&&!(2&c.__u)?1:0))for(u=t-1,r=t+1;u>=0||r=0){if((c=e[u])&&!(2&c.__u)&&i==c.key&&l===c.type)return u;u--}if(r2&&(l.children=arguments.length>3?F.call(arguments,2):t),N(_.type,l,n||_.key,u||_.ref,null)}function Be(_,e){var t={__c:e="__cC"+we++,__:_,Consumer:function(n,u){return n.children(u)},Provider:function(n){var u,r;return this.getChildContext||(u=new Set,(r={})[e]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){u=null},this.shouldComponentUpdate=function(i){this.props.value!==i.value&&u.forEach(function(l){l.__e=!0,X(l)})},this.sub=function(i){u.add(i);var l=i.componentWillUnmount;i.componentWillUnmount=function(){u&&u.delete(i),l&&l.call(i)}}),n.children}};return t.Provider.__=t.Consumer.contextType=t}F=Ce.slice,v={__e:function(_,e,t,n){for(var u,r,i;e=e.__;)if((u=e.__c)&&!u.__)try{if((r=u.constructor)&&r.getDerivedStateFromError!=null&&(u.setState(r.getDerivedStateFromError(_)),i=u.__d),u.componentDidCatch!=null&&(u.componentDidCatch(_,n||{}),i=u.__d),i)return u.__E=u}catch(l){_=l}throw _}},ge=0,be=function(_){return _!=null&&_.constructor==null},A.prototype.setState=function(_,e){var t;t=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=w({},this.state),typeof _=="function"&&(_=_(w({},t),this.props)),_&&w(t,_),_!=null&&this.__v&&(e&&this._sb.push(e),X(this))},A.prototype.forceUpdate=function(_){this.__v&&(this.__e=!0,_&&this.__h.push(_),X(this))},A.prototype.render=L,H=[],ke=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,G=function(_,e){return _.__v.__b-e.__v.__b},R.__r=0,$e=/(PointerCapture)$|Capture$/i,Z=0,J=fe(!1),K=fe(!0),we=0;const n_=Object.freeze(Object.defineProperty({__proto__:null,Component:A,Fragment:L,cloneElement:ze,createContext:Be,createElement:Q,createRef:je,h:Q,hydrate:De,get isValidElement(){return be},get options(){return v},render:Ue,toChildArray:Se},Symbol.toStringTag,{value:"Module"}));var C,h,V,ce,E=0,Ne=[],y=v,se=y.__b,ae=y.__r,pe=y.diffed,he=y.__c,de=y.unmount,me=y.__;function P(_,e){y.__h&&y.__h(h,_,E||e),E=0;var t=h.__H||(h.__H={__:[],__h:[]});return _>=t.__.length&&t.__.push({}),t.__[_]}function Ae(_){return E=1,Me(Le,_)}function Me(_,e,t){var n=P(C++,2);if(n.t=_,!n.__c&&(n.__=[t?t(e):Le(void 0,e),function(l){var c=n.__N?n.__N[0]:n.__[0],f=n.t(c,l);c!==f&&(n.__N=[f,n.__[1]],n.__c.setState({}))}],n.__c=h,!h.u)){var u=function(l,c,f){if(!n.__c.__H)return!0;var p=n.__c.__H.__.filter(function(a){return!!a.__c});if(p.every(function(a){return!a.__N}))return!r||r.call(this,l,c,f);var o=n.__c.props!==l;return p.forEach(function(a){if(a.__N){var s=a.__[0];a.__=a.__N,a.__N=void 0,s!==a.__[0]&&(o=!0)}}),r&&r.call(this,l,c,f)||o};h.u=!0;var r=h.shouldComponentUpdate,i=h.componentWillUpdate;h.componentWillUpdate=function(l,c,f){if(this.__e){var p=r;r=void 0,u(l,c,f),r=p}i&&i.call(this,l,c,f)},h.shouldComponentUpdate=u}return n.__N||n.__}function Ve(_,e){var t=P(C++,3);!y.__s&&re(t.__H,e)&&(t.__=_,t.i=e,h.__H.__h.push(t))}function Fe(_,e){var t=P(C++,4);!y.__s&&re(t.__H,e)&&(t.__=_,t.i=e,h.__h.push(t))}function Ge(_){return E=5,ne(function(){return{current:_}},[])}function Je(_,e,t){E=6,Fe(function(){return typeof _=="function"?(_(e()),function(){return _(null)}):_?(_.current=e(),function(){return _.current=null}):void 0},t==null?t:t.concat(_))}function ne(_,e){var t=P(C++,7);return re(t.__H,e)&&(t.__=_(),t.__H=e,t.__h=_),t.__}function Ke(_,e){return E=8,ne(function(){return _},e)}function Qe(_){var e=h.context[_.__c],t=P(C++,9);return t.c=_,e?(t.__==null&&(t.__=!0,e.sub(h)),e.props.value):_.__}function Xe(_,e){y.useDebugValue&&y.useDebugValue(e?e(_):_)}function Ye(_){var e=P(C++,10),t=Ae();return e.__=_,h.componentDidCatch||(h.componentDidCatch=function(n,u){e.__&&e.__(n,u),t[1](n)}),[t[0],function(){t[1](void 0)}]}function Ze(){var _=P(C++,11);if(!_.__){for(var e=h.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var t=e.__m||(e.__m=[0,0]);_.__="P"+t[0]+"-"+t[1]++}return _.__}function e_(){for(var _;_=Ne.shift();)if(_.__P&&_.__H)try{_.__H.__h.forEach(O),_.__H.__h.forEach(Y),_.__H.__h=[]}catch(e){_.__H.__h=[],y.__e(e,_.__v)}}y.__b=function(_){h=null,se&&se(_)},y.__=function(_,e){_&&e.__k&&e.__k.__m&&(_.__m=e.__k.__m),me&&me(_,e)},y.__r=function(_){ae&&ae(_),C=0;var e=(h=_.__c).__H;e&&(V===h?(e.__h=[],h.__h=[],e.__.forEach(function(t){t.__N&&(t.__=t.__N),t.i=t.__N=void 0})):(e.__h.forEach(O),e.__h.forEach(Y),e.__h=[],C=0)),V=h},y.diffed=function(_){pe&&pe(_);var e=_.__c;e&&e.__H&&(e.__H.__h.length&&(Ne.push(e)!==1&&ce===y.requestAnimationFrame||((ce=y.requestAnimationFrame)||__)(e_)),e.__H.__.forEach(function(t){t.i&&(t.__H=t.i),t.i=void 0})),V=h=null},y.__c=function(_,e){e.some(function(t){try{t.__h.forEach(O),t.__h=t.__h.filter(function(n){return!n.__||Y(n)})}catch(n){e.some(function(u){u.__h&&(u.__h=[])}),e=[],y.__e(n,t.__v)}}),he&&he(_,e)},y.unmount=function(_){de&&de(_);var e,t=_.__c;t&&t.__H&&(t.__H.__.forEach(function(n){try{O(n)}catch(u){e=u}}),t.__H=void 0,e&&y.__e(e,t.__v))};var ve=typeof requestAnimationFrame=="function";function __(_){var e,t=function(){clearTimeout(n),ve&&cancelAnimationFrame(e),setTimeout(_)},n=setTimeout(t,100);ve&&(e=requestAnimationFrame(t))}function O(_){var e=h,t=_.__c;typeof t=="function"&&(_.__c=void 0,t()),h=e}function Y(_){var e=h;_.__c=_.__(),h=e}function re(_,e){return!_||_.length!==e.length||e.some(function(t,n){return t!==_[n]})}function Le(_,e){return typeof e=="function"?e(_):e}const r_=Object.freeze(Object.defineProperty({__proto__:null,useCallback:Ke,useContext:Qe,useDebugValue:Xe,useEffect:Ve,useErrorBoundary:Ye,useId:Ze,useImperativeHandle:Je,useLayoutEffect:Fe,useMemo:ne,useReducer:Me,useRef:Ge,useState:Ae},Symbol.toStringTag,{value:"Module"}));export{Ue as D,t_ as a,r_ as b,ue as c,Q as g,Ae as h,n_ as p,Ve as y}; diff --git a/app/dist/assets/id_ID-ZMGZ2JFV-CgKQKAmU.js b/app/dist/assets/id_ID-ZMGZ2JFV-CgKQKAmU.js new file mode 100644 index 0000000..f71fe23 --- /dev/null +++ b/app/dist/assets/id_ID-ZMGZ2JFV-CgKQKAmU.js @@ -0,0 +1,1349 @@ +var n=`{ + "connect_wallet": { + "label": "Hubungkan Dompet", + "wrong_network": { + "label": "Jaringan yang salah" + } + }, + "intro": { + "title": "Apa itu Dompet?", + "description": "Sebuah dompet digunakan untuk mengirim, menerima, menyimpan, dan menampilkan aset digital. Ini juga cara baru untuk masuk, tanpa perlu membuat akun dan kata sandi baru di setiap situs web.", + "digital_asset": { + "title": "Sebuah Rumah untuk Aset Digital Anda", + "description": "Dompet digunakan untuk mengirim, menerima, menyimpan, dan menampilkan aset digital seperti Ethereum dan NFTs." + }, + "login": { + "title": "Cara Baru untuk Masuk", + "description": "Alih-alih membuat akun dan kata sandi baru di setiap situs web, cukup hubungkan dompet Anda." + }, + "get": { + "label": "Dapatkan Dompet" + }, + "learn_more": { + "label": "Pelajari lebih lanjut" + } + }, + "sign_in": { + "label": "Verifikasi akun Anda", + "description": "Untuk menyelesaikan koneksi, Anda harus menandatangani sebuah pesan di dompet Anda untuk memastikan bahwa Anda adalah pemilik dari akun ini.", + "message": { + "send": "Kirim pesan", + "preparing": "Mempersiapkan pesan...", + "cancel": "Batal", + "preparing_error": "Kesalahan dalam mempersiapkan pesan, silakan coba lagi!" + }, + "signature": { + "waiting": "Menunggu tanda tangan...", + "verifying": "Memverifikasi tanda tangan...", + "signing_error": "Kesalahan dalam menandatangani pesan, silakan coba lagi!", + "verifying_error": "Kesalahan dalam memverifikasi tanda tangan, silakan coba lagi!", + "oops_error": "Ups, ada yang salah!" + } + }, + "connect": { + "label": "Hubungkan", + "title": "Hubungkan Dompet", + "new_to_ethereum": { + "description": "Baru dalam dompet Ethereum?", + "learn_more": { + "label": "Pelajari lebih lanjut" + } + }, + "learn_more": { + "label": "Pelajari lebih lanjut" + }, + "recent": "Terkini", + "status": { + "opening": "Membuka %{wallet}...", + "connecting": "Menghubungkan", + "connect_mobile": "Lanjutkan di %{wallet}", + "not_installed": "%{wallet} tidak terpasang", + "not_available": "%{wallet} tidak tersedia", + "confirm": "Konfirmasikan koneksi di ekstensi", + "confirm_mobile": "Terima permintaan koneksi di dompet" + }, + "secondary_action": { + "get": { + "description": "Tidak memiliki %{wallet}?", + "label": "DAPATKAN" + }, + "install": { + "label": "PASANG" + }, + "retry": { + "label": "COBA LAGI" + } + }, + "walletconnect": { + "description": { + "full": "Perlu modal resmi WalletConnect?", + "compact": "Perlu modal WalletConnect?" + }, + "open": { + "label": "BUKA" + } + } + }, + "connect_scan": { + "title": "Pindai dengan %{wallet}", + "fallback_title": "Pindai dengan ponsel Anda" + }, + "connector_group": { + "installed": "Terinstal", + "recommended": "Direkomendasikan", + "other": "Lainnya", + "popular": "Populer", + "more": "Lebih Banyak", + "others": "Lainnya" + }, + "get": { + "title": "Dapatkan Dompet", + "action": { + "label": "DAPATKAN" + }, + "mobile": { + "description": "Dompet Mobile" + }, + "extension": { + "description": "Ekstensi Browser" + }, + "mobile_and_extension": { + "description": "Dompet Mobile dan Ekstensi" + }, + "mobile_and_desktop": { + "description": "Dompet Seluler dan Desktop" + }, + "looking_for": { + "title": "Bukan yang Anda cari?", + "mobile": { + "description": "Pilih dompet di layar utama untuk memulai dengan penyedia dompet yang berbeda." + }, + "desktop": { + "compact_description": "Pilih dompet di layar utama untuk memulai dengan penyedia dompet yang berbeda.", + "wide_description": "Pilih dompet di sebelah kiri untuk memulai dengan penyedia dompet yang berbeda." + } + } + }, + "get_options": { + "title": "Mulai dengan %{wallet}", + "short_title": "Dapatkan %{wallet}", + "mobile": { + "title": "%{wallet} untuk Mobile", + "description": "Gunakan dompet mobile untuk menjelajahi dunia Ethereum.", + "download": { + "label": "Dapatkan aplikasinya" + } + }, + "extension": { + "title": "%{wallet} untuk %{browser}", + "description": "Akses dompet Anda langsung dari browser web favorit Anda.", + "download": { + "label": "Tambahkan ke %{browser}" + } + }, + "desktop": { + "title": "%{wallet} untuk %{platform}", + "description": "Akses dompet Anda secara native dari desktop yang kuat Anda.", + "download": { + "label": "Tambahkan ke %{platform}" + } + } + }, + "get_mobile": { + "title": "Instal %{wallet}", + "description": "Pindai dengan ponsel Anda untuk mengunduh di iOS atau Android", + "continue": { + "label": "Lanjutkan" + } + }, + "get_instructions": { + "mobile": { + "connect": { + "label": "Hubungkan" + }, + "learn_more": { + "label": "Pelajari lebih lanjut" + } + }, + "extension": { + "refresh": { + "label": "Segarkan" + }, + "learn_more": { + "label": "Pelajari lebih lanjut" + } + }, + "desktop": { + "connect": { + "label": "Hubungkan" + }, + "learn_more": { + "label": "Pelajari lebih lanjut" + } + } + }, + "chains": { + "title": "Alihkan Jaringan", + "wrong_network": "Jaringan yang salah terdeteksi, alihkan atau diskonek untuk melanjutkan.", + "confirm": "Konfirmasi di Dompet", + "switching_not_supported": "Dompet Anda tidak mendukung pengalihan jaringan dari %{appName}. Coba alihkan jaringan dari dalam dompet Anda.", + "switching_not_supported_fallback": "Wallet Anda tidak mendukung penggantian jaringan dari aplikasi ini. Cobalah ganti jaringan dari dalam wallet Anda.", + "disconnect": "Putuskan koneksi", + "connected": "Terkoneksi" + }, + "profile": { + "disconnect": { + "label": "Putuskan koneksi" + }, + "copy_address": { + "label": "Salin Alamat", + "copied": "Tersalin!" + }, + "explorer": { + "label": "Lihat lebih banyak di penjelajah" + }, + "transactions": { + "description": "%{appName} transaksi akan muncul di sini...", + "description_fallback": "Transaksi Anda akan muncul di sini...", + "recent": { + "title": "Transaksi Terbaru" + }, + "clear": { + "label": "Hapus Semua" + } + } + }, + "wallet_connectors": { + "argent": { + "qr_code": { + "step1": { + "description": "Letakkan Argent di layar utama Anda untuk akses lebih cepat ke dompet Anda.", + "title": "Buka aplikasi Argent" + }, + "step2": { + "description": "Buat dompet dan nama pengguna, atau impor dompet yang ada.", + "title": "Buat atau Impor Dompet" + }, + "step3": { + "description": "Setelah Anda memindai, akan muncul petunjuk koneksi untuk Anda menghubungkan dompet Anda.", + "title": "Tekan tombol Scan QR" + } + } + }, + "berasig": { + "extension": { + "step1": { + "title": "Instal ekstensi BeraSig", + "description": "Kami merekomendasikan menempelkan BeraSig ke taskbar Anda untuk akses dompet Anda lebih mudah." + }, + "step2": { + "title": "Buat Dompet", + "description": "Pastikan untuk mencadangkan wallet Anda menggunakan metode yang aman. Jangan pernah berbagi frasa rahasia Anda dengan siapa pun." + }, + "step3": { + "title": "Segarkan browser Anda", + "description": "Setelah Anda menyiapkan dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi." + } + } + }, + "best": { + "qr_code": { + "step1": { + "title": "Buka aplikasi Best Wallet", + "description": "Tambahkan Best Wallet ke layar utama Anda untuk akses ke wallet Anda lebih cepat." + }, + "step2": { + "title": "Buat atau Impor Dompet", + "description": "Buat dompet baru atau impor yang sudah ada." + }, + "step3": { + "title": "Ketuk ikon QR dan scan", + "description": "Ketuk ikon QR di layar utama Anda, pindai kode dan konfirmasi prompt untuk terhubung." + } + } + }, + "bifrost": { + "qr_code": { + "step1": { + "description": "Kami merekomendasikan untuk menempatkan Bifrost Wallet di layar utama anda untuk akses yang lebih cepat.", + "title": "Buka aplikasi Bifrost Wallet" + }, + "step2": { + "description": "Buat atau impor sebuah dompet menggunakan frasa pemulihan Anda.", + "title": "Buat atau Impor sebuah Wallet" + }, + "step3": { + "description": "Setelah Anda memindai, sebuah pesan akan muncul untuk menghubungkan dompet Anda.", + "title": "Tekan tombol scan" + } + } + }, + "bitget": { + "qr_code": { + "step1": { + "description": "Kami menyarankan untuk meletakkan Bitget Wallet di layar depan Anda untuk akses yang lebih cepat.", + "title": "Buka aplikasi Bitget Wallet" + }, + "step2": { + "description": "Pastikan untuk mencadangkan wallet Anda menggunakan metode yang aman. Jangan pernah berbagi frasa rahasia Anda dengan siapa pun.", + "title": "Buat atau Impor Wallet" + }, + "step3": { + "description": "Setelah Anda pindai, akan muncul petunjuk untuk menghubungkan wallet Anda.", + "title": "Tekan tombol pindai" + } + }, + "extension": { + "step1": { + "description": "Kami menyarankan untuk memasang Bitget Wallet ke taskbar Anda untuk akses yang lebih cepat ke wallet Anda.", + "title": "Instal ekstensi Dompet Bitget" + }, + "step2": { + "description": "Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah membagikan frasa rahasia Anda kepada siapa pun.", + "title": "Buat atau Impor Dompet" + }, + "step3": { + "description": "Setelah Anda menyiapkan dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi.", + "title": "Segarkan browser Anda" + } + } + }, + "bitski": { + "extension": { + "step1": { + "description": "Kami merekomendasikan untuk memasang Bitski ke taskbar Anda untuk akses dompet Anda yang lebih cepat.", + "title": "Pasang ekstensi Bitski" + }, + "step2": { + "description": "Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah berbagi frasa rahasia Anda dengan siapa pun.", + "title": "Buat atau Impor Dompet" + }, + "step3": { + "description": "Setelah Anda menyiapkan dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi.", + "title": "Segarkan browser Anda" + } + } + }, + "bitverse": { + "qr_code": { + "step1": { + "title": "Buka aplikasi Bitverse Wallet", + "description": "Tambahkan Bitverse Wallet ke layar utama Anda untuk akses yang lebih cepat ke dompet Anda." + }, + "step2": { + "title": "Buat atau Impor Dompet", + "description": "Buat dompet baru atau impor yang sudah ada." + }, + "step3": { + "title": "Ketuk ikon QR dan scan", + "description": "Ketuk ikon QR di layar utama Anda, pindai kode dan konfirmasi prompt untuk terhubung." + } + } + }, + "bloom": { + "desktop": { + "step1": { + "title": "Buka aplikasi Bloom Wallet", + "description": "Kami merekomendasikan untuk meletakkan Bloom Wallet di layar utama Anda untuk akses yang lebih cepat." + }, + "step2": { + "description": "Buat atau impor sebuah dompet menggunakan frasa pemulihan Anda.", + "title": "Buat atau Impor Dompet" + }, + "step3": { + "description": "Setelah Anda memiliki dompet, klik pada Sambungkan untuk terhubung melalui Bloom. Sebuah permintaan sambungan akan muncul di aplikasi untuk Anda konfirmasi.", + "title": "Klik pada Sambungkan" + } + } + }, + "bybit": { + "qr_code": { + "step1": { + "description": "Kami menyarankan menempatkan Bybit di layar utama Anda untuk akses yang lebih cepat ke dompet Anda.", + "title": "Buka aplikasi Bybit" + }, + "step2": { + "description": "Anda dapat dengan mudah mencadangkan wallet Anda menggunakan fitur cadangan kami di telepon Anda.", + "title": "Buat atau Impor Dompet" + }, + "step3": { + "description": "Setelah Anda memindai, akan muncul petunjuk koneksi untuk Anda menghubungkan dompet Anda.", + "title": "Tekan tombol scan" + } + }, + "extension": { + "step1": { + "description": "Klik di pojok kanan atas browser Anda dan sematkan Wallet Bybit untuk akses yang mudah.", + "title": "Pasang ekstensi Wallet Bybit" + }, + "step2": { + "description": "Buat dompet baru atau impor yang sudah ada.", + "title": "Buat atau Impor sebuah dompet" + }, + "step3": { + "description": "Setelah Anda mengatur Wallet Bybit, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi.", + "title": "Segarkan browser Anda" + } + } + }, + "binance": { + "qr_code": { + "step1": { + "description": "Kami merekomendasikan untuk meletakkan Binance di layar utama Anda untuk akses lebih cepat ke wallet Anda.", + "title": "Buka aplikasi Binance" + }, + "step2": { + "description": "Anda dapat dengan mudah mencadangkan wallet Anda menggunakan fitur cadangan kami di telepon Anda.", + "title": "Buat atau Impor Dompet" + }, + "step3": { + "description": "Setelah Anda memindai, akan muncul petunjuk koneksi untuk Anda menghubungkan dompet Anda.", + "title": "Ketuk tombol WalletConnect" + } + } + }, + "coin98": { + "qr_code": { + "step1": { + "description": "Kami merekomendasikan untuk menaruh Coin98 Wallet di layar utama Anda untuk akses wallet Anda lebih cepat.", + "title": "Buka aplikasi Coin98 Wallet" + }, + "step2": { + "description": "Anda dapat dengan mudah mencadangkan wallet Anda menggunakan fitur cadangan kami di telepon Anda.", + "title": "Buat atau Impor Wallet" + }, + "step3": { + "description": "Setelah Anda melakukan pemindaian, akan muncul prompt koneksi untuk Anda menghubungkan wallet Anda.", + "title": "Ketuk tombol WalletConnect" + } + }, + "extension": { + "step1": { + "description": "Klik di pojok kanan atas browser Anda dan sematkan Coin98 Wallet untuk akses mudah.", + "title": "Pasang ekstensi Coin98 Wallet" + }, + "step2": { + "description": "Buat dompet baru atau impor yang sudah ada.", + "title": "Buat atau Impor sebuah dompet" + }, + "step3": { + "description": "Setelah Anda menyiapkan Coin98 Wallet, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi.", + "title": "Segarkan browser Anda" + } + } + }, + "coinbase": { + "qr_code": { + "step1": { + "description": "Kami merekomendasikan memasang Coinbase Wallet di layar utama Anda untuk akses yang lebih cepat.", + "title": "Buka aplikasi Coinbase Wallet" + }, + "step2": { + "description": "Anda dapat dengan mudah mencadangkan dompet Anda menggunakan fitur cadangan awan.", + "title": "Buat atau Impor sebuah Dompet" + }, + "step3": { + "description": "Setelah Anda memindai, akan muncul sebuah petunjuk koneksi untuk Anda menyambungkan dompet Anda.", + "title": "Ketuk tombol pindai" + } + }, + "extension": { + "step1": { + "description": "Kami merekomendasikan untuk menempel Coinbase Wallet ke taskbar Anda untuk akses lebih cepat ke dompet Anda.", + "title": "Instal ekstensi Coinbase Wallet" + }, + "step2": { + "description": "Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah membagikan frase pemulihan rahasia Anda kepada siapa pun.", + "title": "Buat atau Import Wallet" + }, + "step3": { + "description": "Setelah Anda menyiapkan wallet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi.", + "title": "Segarkan browser Anda" + } + } + }, + "compass": { + "extension": { + "step1": { + "description": "Kami merekomendasikan untuk menempelkan Compass Wallet ke taskbar Anda untuk akses lebih cepat ke dompet Anda.", + "title": "Instal ekstensi Compass Wallet" + }, + "step2": { + "description": "Pastikan untuk mencadangkan wallet Anda menggunakan metode yang aman. Jangan pernah berbagi frasa rahasia Anda dengan siapa pun.", + "title": "Buat atau Impor Dompet" + }, + "step3": { + "description": "Setelah Anda menyiapkan dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi.", + "title": "Segarkan browser Anda" + } + } + }, + "core": { + "qr_code": { + "step1": { + "description": "Kami merekomendasikan untuk meletakkan Core di layar utama Anda untuk akses lebih cepat ke wallet Anda.", + "title": "Buka aplikasi Core" + }, + "step2": { + "description": "Anda dapat dengan mudah mencadangkan wallet Anda dengan menggunakan fitur cadangan kami di telepon Anda.", + "title": "Buat atau Import Wallet" + }, + "step3": { + "description": "Setelah Anda memindai, akan muncul petunjuk koneksi untuk Anda menyambungkan wallet Anda.", + "title": "Ketuk tombol WalletConnect" + } + }, + "extension": { + "step1": { + "description": "Kami merekomendasikan untuk menempelkan Core pada taskbar Anda untuk akses ke dompet Anda lebih cepat.", + "title": "Pasang ekstensi Core" + }, + "step2": { + "description": "Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah membagikan frase rahasia Anda kepada siapa pun.", + "title": "Buat atau Impor Dompet" + }, + "step3": { + "description": "Setelah Anda menyiapkan dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi.", + "title": "Segarkan browser Anda" + } + } + }, + "fox": { + "qr_code": { + "step1": { + "description": "Kami merekomendasikan untuk menaruh FoxWallet pada layar utama Anda untuk akses lebih cepat.", + "title": "Buka aplikasi FoxWallet" + }, + "step2": { + "description": "Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah membagikan frase rahasia Anda kepada siapa pun.", + "title": "Buat atau Impor Wallet" + }, + "step3": { + "description": "Setelah Anda memindai, prompt koneksi akan muncul untuk Anda hubungkan dompet Anda.", + "title": "Ketuk tombol pindai" + } + } + }, + "frontier": { + "qr_code": { + "step1": { + "description": "Kami merekomendasikan untuk meletakkan Frontier Wallet di layar awal Anda untuk akses yang lebih cepat.", + "title": "Buka aplikasi Frontier Wallet" + }, + "step2": { + "description": "Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah membagikan frase rahasia Anda kepada siapa pun.", + "title": "Buat atau Impor Wallet" + }, + "step3": { + "description": "Setelah Anda memindai, prompt koneksi akan muncul untuk Anda menghubungkan dompet Anda.", + "title": "Ketuk tombol pindai" + } + }, + "extension": { + "step1": { + "description": "Kami menyarankan menempelkan Frontier Wallet ke taskbar Anda untuk akses yang lebih cepat ke dompet Anda.", + "title": "Instal ekstensi Frontier Wallet" + }, + "step2": { + "description": "Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah berbagi frasa rahasia Anda dengan siapa pun.", + "title": "Buat atau Impor Dompet" + }, + "step3": { + "description": "Setelah Anda menyiapkan dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi.", + "title": "Segarkan browser Anda" + } + } + }, + "im_token": { + "qr_code": { + "step1": { + "title": "Buka aplikasi imToken", + "description": "Letakkan aplikasi imToken di layar utama Anda untuk akses yang lebih cepat ke dompet Anda." + }, + "step2": { + "title": "Buat atau Impor Dompet", + "description": "Buat dompet baru atau impor yang sudah ada." + }, + "step3": { + "title": "Ketuk Ikon Scanner di pojok kanan atas", + "description": "Pilih Koneksi Baru, lalu pindai kode QR dan konfirmasi petunjuk untuk terhubung." + } + } + }, + "iopay": { + "qr_code": { + "step1": { + "description": "Kami merekomendasikan untuk menaruh ioPay di layar utama Anda untuk akses wallet Anda lebih cepat.", + "title": "Buka aplikasi ioPay" + }, + "step2": { + "description": "Anda dapat dengan mudah mencadangkan wallet Anda menggunakan fitur cadangan kami di telepon Anda.", + "title": "Buat atau Impor Dompet" + }, + "step3": { + "description": "Setelah Anda memindai, akan muncul petunjuk koneksi untuk Anda menghubungkan dompet Anda.", + "title": "Ketuk tombol WalletConnect" + } + } + }, + "kaikas": { + "extension": { + "step1": { + "description": "Kami menyarankan memasang Kaikas di taskbar Anda untuk akses yang lebih cepat ke dompet Anda.", + "title": "Pasang ekstensi Kaikas" + }, + "step2": { + "description": "Pastikan untuk mencadangkan wallet Anda menggunakan metode yang aman. Jangan pernah berbagi frasa rahasia Anda dengan siapa pun.", + "title": "Buat atau Impor Dompet" + }, + "step3": { + "description": "Setelah Anda menyiapkan dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi.", + "title": "Segarkan browser Anda" + } + }, + "qr_code": { + "step1": { + "title": "Buka aplikasi Kaikas", + "description": "Letakkan aplikasi Kaikas di layar utama Anda untuk akses yang lebih cepat ke dompet Anda." + }, + "step2": { + "title": "Buat atau Impor Dompet", + "description": "Buat dompet baru atau impor yang sudah ada." + }, + "step3": { + "title": "Ketuk Ikon Scanner di pojok kanan atas", + "description": "Pilih Koneksi Baru, lalu pindai kode QR dan konfirmasi petunjuk untuk terhubung." + } + } + }, + "kaia": { + "extension": { + "step1": { + "description": "Kami merekomendasikan menempelkan Kaia ke taskbar Anda untuk akses dompet Anda lebih cepat.", + "title": "Instal ekstensi Kaia" + }, + "step2": { + "description": "Pastikan untuk mencadangkan wallet Anda menggunakan metode yang aman. Jangan pernah berbagi frasa rahasia Anda dengan siapa pun.", + "title": "Buat atau Impor Dompet" + }, + "step3": { + "description": "Setelah Anda menyiapkan dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi.", + "title": "Segarkan browser Anda" + } + }, + "qr_code": { + "step1": { + "title": "Buka aplikasi Kaia", + "description": "Letakkan aplikasi Kaia di layar utama Anda untuk akses yang lebih cepat ke dompet Anda." + }, + "step2": { + "title": "Buat atau Impor Dompet", + "description": "Buat dompet baru atau impor yang sudah ada." + }, + "step3": { + "title": "Ketuk Ikon Scanner di pojok kanan atas", + "description": "Pilih Koneksi Baru, lalu pindai kode QR dan konfirmasi petunjuk untuk terhubung." + } + } + }, + "kraken": { + "qr_code": { + "step1": { + "title": "Buka aplikasi Kraken Wallet", + "description": "Tambahkan Kraken Wallet ke layar utama Anda untuk akses lebih cepat ke dompet Anda." + }, + "step2": { + "title": "Buat atau Impor Dompet", + "description": "Buat dompet baru atau impor yang sudah ada." + }, + "step3": { + "title": "Ketuk ikon QR dan scan", + "description": "Ketuk ikon QR di layar utama Anda, pindai kode dan konfirmasi prompt untuk terhubung." + } + } + }, + "kresus": { + "qr_code": { + "step1": { + "title": "Buka aplikasi Kresus Wallet", + "description": "Tambahkan Kresus Wallet ke layar utama Anda untuk akses yang lebih cepat ke wallet Anda." + }, + "step2": { + "title": "Buat atau Impor Dompet", + "description": "Buat dompet baru atau impor yang sudah ada." + }, + "step3": { + "title": "Ketuk ikon QR dan scan", + "description": "Ketuk ikon QR di layar utama Anda, pindai kode dan konfirmasi prompt untuk terhubung." + } + } + }, + "magicEden": { + "extension": { + "step1": { + "title": "Instal ekstensi Magic Eden", + "description": "Kami menyarankan untuk menempelkan Magic Eden ke taskbar Anda untuk akses lebih cepat ke dompet Anda." + }, + "step2": { + "title": "Buat atau Impor Dompet", + "description": "Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah membagikan frase pemulihan rahasia Anda kepada siapa pun." + }, + "step3": { + "title": "Segarkan browser Anda", + "description": "Setelah Anda menyiapkan dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi." + } + } + }, + "metamask": { + "qr_code": { + "step1": { + "title": "Buka aplikasi MetaMask", + "description": "Kami merekomendasikan untuk meletakkan MetaMask di layar beranda Anda untuk akses yang lebih cepat." + }, + "step2": { + "title": "Buat atau Impor Dompet", + "description": "Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah membagikan frase rahasia Anda kepada siapa pun." + }, + "step3": { + "title": "Ketuk tombol pindai", + "description": "Setelah Anda memindai, petunjuk koneksi akan muncul untuk Anda menyambungkan dompet Anda." + } + }, + "extension": { + "step1": { + "title": "Pasang ekstensi MetaMask", + "description": "Kami menyarankan untuk memasang MetaMask pada taskbar Anda untuk akses wallet lebih cepat." + }, + "step2": { + "title": "Buat atau Impor Wallet", + "description": "Pastikan untuk mencadangkan wallet Anda menggunakan metode yang aman. Jangan pernah membagikan frase rahasia Anda kepada siapa pun." + }, + "step3": { + "title": "Segarkan browser Anda", + "description": "Setelah Anda menyiapkan wallet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi." + } + } + }, + "nestwallet": { + "extension": { + "step1": { + "title": "Instal ekstensi NestWallet", + "description": "Kami menyarankan untuk memasang NestWallet ke taskbar Anda untuk akses dompet yang lebih cepat." + }, + "step2": { + "title": "Buat atau Impor Dompet", + "description": "Pastikan untuk mencadangkan wallet Anda menggunakan metode yang aman. Jangan pernah berbagi frasa rahasia Anda dengan siapa pun." + }, + "step3": { + "title": "Segarkan browser Anda", + "description": "Setelah Anda menyiapkan dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi." + } + } + }, + "okx": { + "qr_code": { + "step1": { + "title": "Buka aplikasi OKX Wallet", + "description": "Kami menyarankan untuk menaruh OKX Wallet di layar utama Anda untuk akses lebih cepat." + }, + "step2": { + "title": "Buat atau Impor Wallet", + "description": "Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah membagikan frasa rahasia Anda kepada siapa pun." + }, + "step3": { + "title": "Ketuk tombol scan", + "description": "Setelah Anda memindai, prompt koneksi akan muncul untuk Anda hubungkan dompet Anda." + } + }, + "extension": { + "step1": { + "title": "Instal ekstensi OKX Wallet", + "description": "Kami menyarankan untuk menempelkan OKX Wallet ke taskbar Anda untuk akses lebih cepat ke dompet Anda." + }, + "step2": { + "title": "Buat atau Impor Dompet", + "description": "Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah membagikan frasa rahasia Anda kepada siapa pun." + }, + "step3": { + "title": "Segarkan browser Anda", + "description": "Setelah Anda mengatur wallet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi." + } + } + }, + "omni": { + "qr_code": { + "step1": { + "title": "Buka aplikasi Omni", + "description": "Tambahkan Omni ke layar utama Anda untuk akses yang lebih cepat ke wallet Anda." + }, + "step2": { + "title": "Buat atau Impor Wallet", + "description": "Buat wallet baru atau impor yang sudah ada." + }, + "step3": { + "title": "Ketuk ikon QR dan scan", + "description": "Ketuk ikon QR di layar utama Anda, pindai kode dan konfirmasi petunjuk untuk terhubung." + } + } + }, + "1inch": { + "qr_code": { + "step1": { + "description": "Letakkan Wallet 1inch di layar utama Anda untuk akses yang lebih cepat ke dompet Anda.", + "title": "Buka aplikasi Wallet 1inch" + }, + "step2": { + "description": "Buat dompet dan nama pengguna, atau impor dompet yang ada.", + "title": "Buat atau Impor Dompet" + }, + "step3": { + "description": "Setelah Anda memindai, akan muncul petunjuk koneksi untuk Anda menghubungkan dompet Anda.", + "title": "Tekan tombol Scan QR" + } + } + }, + "token_pocket": { + "qr_code": { + "step1": { + "title": "Buka aplikasi TokenPocket", + "description": "Kami sarankan meletakkan TokenPocket di layar utama Anda untuk akses yang lebih cepat." + }, + "step2": { + "title": "Buat atau impor Dompet", + "description": "Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah membagikan frase pemulihan rahasia Anda kepada siapa pun." + }, + "step3": { + "title": "Ketuk tombol pindai", + "description": "Setelah Anda memindai, Indikasi sambungan akan muncul untuk Anda menghubungkan dompet Anda." + } + }, + "extension": { + "step1": { + "title": "Instal ekstensi TokenPocket", + "description": "Kami merekomendasikan penambatan TokenPocket ke taskbar Anda untuk akses dompet Anda lebih cepat." + }, + "step2": { + "title": "Buat atau Impor Wallet", + "description": "Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah membagi frasa rahasia Anda dengan siapa pun." + }, + "step3": { + "title": "Segarkan browser Anda", + "description": "Setelah Anda mengatur dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi." + } + } + }, + "trust": { + "qr_code": { + "step1": { + "title": "Buka aplikasi Trust Wallet", + "description": "Pasang Trust Wallet di layar utama Anda untuk akses dompet Anda lebih cepat." + }, + "step2": { + "title": "Buat atau Impor Wallet", + "description": "Buat dompet baru atau impor yang sudah ada." + }, + "step3": { + "title": "Ketuk WalletConnect di Pengaturan", + "description": "Pilih Koneksi Baru, kemudian pindai kode QR dan konfirmasi perintah untuk terhubung." + } + }, + "extension": { + "step1": { + "title": "Instal ekstensi Trust Wallet", + "description": "Klik di pojok kanan atas browser Anda dan sematkan Trust Wallet untuk akses mudah." + }, + "step2": { + "title": "Buat atau Impor dompet", + "description": "Buat dompet baru atau impor yang sudah ada." + }, + "step3": { + "title": "Segarkan browser Anda", + "description": "Setelah Anda mengatur Trust Wallet, klik di bawah untuk menyegarkan browser dan memuat ekstensi." + } + } + }, + "uniswap": { + "qr_code": { + "step1": { + "title": "Buka aplikasi Uniswap", + "description": "Tambahkan Uniswap Wallet ke layar utama Anda untuk akses ke wallet Anda lebih cepat." + }, + "step2": { + "title": "Buat atau Impor Wallet", + "description": "Buat wallet baru atau impor yang sudah ada." + }, + "step3": { + "title": "Ketuk ikon QR dan pindai", + "description": "Ketuk ikon QR di layar utama Anda, pindai kode dan konfirmasi prompt untuk terhubung." + } + } + }, + "zerion": { + "qr_code": { + "step1": { + "title": "Buka aplikasi Zerion", + "description": "Kami merekomendasikan untuk meletakkan Zerion di layar utama Anda untuk akses lebih cepat." + }, + "step2": { + "title": "Buat atau Impor Dompet", + "description": "Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah membagikan frase pemulihan rahasia Anda kepada siapa pun." + }, + "step3": { + "title": "Ketuk tombol scan", + "description": "Setelah Anda scan, muncul prompt koneksi untuk Anda menghubungkan dompet Anda." + } + }, + "extension": { + "step1": { + "title": "Instal ekstensi Zerion", + "description": "Kami menyarankan untuk menempelkan Zerion ke taskbar Anda untuk akses lebih cepat ke dompet Anda." + }, + "step2": { + "title": "Buat atau Impor Wallet", + "description": "Pastikan untuk mencadangkan wallet Anda menggunakan metode yang aman. Jangan pernah berbagi frasa rahasia Anda dengan siapa pun." + }, + "step3": { + "title": "Segarkan browser Anda", + "description": "Setelah Anda mengatur wallet Anda, klik di bawah untuk menyegarkan browser dan memuat ekstensi." + } + } + }, + "rainbow": { + "qr_code": { + "step1": { + "title": "Buka aplikasi Rainbow", + "description": "Kami menyarankan menempatkan Rainbow di layar home Anda untuk akses yang lebih cepat ke wallet Anda." + }, + "step2": { + "title": "Buat atau Impor Wallet", + "description": "Anda dapat dengan mudah mencadangkan wallet Anda menggunakan fitur cadangan kami di telepon Anda." + }, + "step3": { + "title": "Tekan tombol scan", + "description": "Setelah Anda memindai, akan muncul pesan untuk menghubungkan dompet Anda." + } + } + }, + "enkrypt": { + "extension": { + "step1": { + "description": "Kami menyarankan untuk memasang Enkrypt Wallet ke taskbar Anda untuk akses dompet yang lebih cepat.", + "title": "Instal ekstensi Enkrypt Wallet" + }, + "step2": { + "description": "Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah berbagi frase rahasia Anda dengan siapa pun.", + "title": "Buat atau Impor Dompet" + }, + "step3": { + "description": "Setelah Anda menyiapkan dompet, klik di bawah ini untuk memuat ulang peramban dan meload ekstensi.", + "title": "Segarkan browser Anda" + } + } + }, + "frame": { + "extension": { + "step1": { + "description": "Kami menyarankan untuk memasang Frame ke taskbar Anda untuk akses dompet yang lebih cepat.", + "title": "Instal Frame & ekstensi pendamping" + }, + "step2": { + "description": "Pastikan untuk mencadangkan wallet Anda menggunakan metode yang aman. Jangan pernah membagikan frase rahasia Anda kepada siapa pun.", + "title": "Buat atau Impor Wallet" + }, + "step3": { + "description": "Setelah Anda menyetel wallet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi.", + "title": "Segarkan browser Anda" + } + } + }, + "one_key": { + "extension": { + "step1": { + "title": "Instal ekstensi OneKey Wallet", + "description": "Kami menyarankan untuk menempelkan OneKey Wallet ke taskbar Anda untuk akses wallet yang lebih cepat." + }, + "step2": { + "title": "Buat atau Impor Wallet", + "description": "Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah membagikan frase rahasia Anda kepada siapa pun." + }, + "step3": { + "title": "Segarkan browser Anda", + "description": "Setelah Anda menyiapkan dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi." + } + } + }, + "paraswap": { + "qr_code": { + "step1": { + "title": "Buka aplikasi ParaSwap", + "description": "Tambahkan ParaSwap Wallet ke layar utama Anda untuk akses ke wallet Anda lebih cepat." + }, + "step2": { + "title": "Buat atau Impor Dompet", + "description": "Buat dompet baru atau impor yang sudah ada." + }, + "step3": { + "title": "Ketuk ikon QR dan scan", + "description": "Ketuk ikon QR di layar utama Anda, pindai kode dan konfirmasi prompt untuk terhubung." + } + } + }, + "phantom": { + "extension": { + "step1": { + "title": "Instal ekstensi Phantom", + "description": "Kami menyarankan untuk mem-pin Phantom ke taskbar Anda untuk akses dompet yang lebih mudah." + }, + "step2": { + "title": "Buat atau Impor Dompet", + "description": "Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah membagikan frase pemulihan rahasia Anda kepada siapa pun." + }, + "step3": { + "title": "Segarkan browser Anda", + "description": "Setelah Anda menyiapkan dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi." + } + } + }, + "rabby": { + "extension": { + "step1": { + "title": "Instal ekstensi Rabby", + "description": "Kami merekomendasikan menempelkan Rabby ke taskbar Anda untuk akses lebih cepat ke wallet Anda." + }, + "step2": { + "title": "Buat atau Impor Wallet", + "description": "Pastikan untuk mencadangkan wallet Anda dengan metode yang aman. Jangan pernah berbagi frase rahasia Anda dengan siapa pun." + }, + "step3": { + "title": "Segarkan browser Anda", + "description": "Setelah Anda menyiapkan wallet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi." + } + } + }, + "ronin": { + "qr_code": { + "step1": { + "description": "Kami merekomendasikan untuk meletakkan Ronin Wallet di layar utama Anda untuk akses yang lebih cepat.", + "title": "Buka aplikasi Ronin Wallet" + }, + "step2": { + "description": "Pastikan untuk mencadangkan wallet Anda menggunakan metode yang aman. Jangan pernah berbagi frasa rahasia Anda dengan siapa pun.", + "title": "Buat atau Impor Dompet" + }, + "step3": { + "description": "Setelah Anda memindai, akan muncul petunjuk koneksi untuk Anda menghubungkan dompet Anda.", + "title": "Tekan tombol scan" + } + }, + "extension": { + "step1": { + "description": "Kami merekomendasikan untuk memasang Ronin Wallet di taskbar Anda untuk akses yang lebih cepat ke wallet Anda.", + "title": "Pasang ekstensi Ronin Wallet" + }, + "step2": { + "description": "Pastikan untuk mencadangkan wallet Anda menggunakan metode yang aman. Jangan pernah berbagi frasa rahasia Anda dengan siapa pun.", + "title": "Buat atau Impor Dompet" + }, + "step3": { + "description": "Setelah Anda menyiapkan dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi.", + "title": "Segarkan browser Anda" + } + } + }, + "ramper": { + "extension": { + "step1": { + "title": "Pasang ekstensi Ramper", + "description": "Kami merekomendasikan untuk memasang Ramper di taskbar Anda untuk akses yang lebih mudah ke wallet Anda." + }, + "step2": { + "title": "Buat Dompet", + "description": "Pastikan untuk mencadangkan wallet Anda menggunakan metode yang aman. Jangan pernah berbagi frasa rahasia Anda dengan siapa pun." + }, + "step3": { + "title": "Segarkan browser Anda", + "description": "Setelah Anda menyiapkan dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi." + } + } + }, + "safeheron": { + "extension": { + "step1": { + "title": "Instal ekstensi Core", + "description": "Kami merekomendasikan menempelkan Safeheron ke taskbar Anda untuk akses lebih cepat ke wallet Anda." + }, + "step2": { + "title": "Buat atau Impor Wallet", + "description": "Pastikan untuk mencadangkan dompet Anda dengan metode yang aman. Jangan pernah berbagi frasa rahasia Anda dengan siapa pun." + }, + "step3": { + "title": "Segarkan browser Anda", + "description": "Setelah Anda mengatur dompet Anda, klik di bawah untuk menyegarkan browser dan memuat ekstensi." + } + } + }, + "taho": { + "extension": { + "step1": { + "title": "Instal ekstensi Taho", + "description": "Kami merekomendasikan pengepinan Taho ke taskbar Anda untuk akses yang lebih cepat ke dompet Anda." + }, + "step2": { + "title": "Buat atau Impor Dompet", + "description": "Pastikan untuk mencadangkan dompet Anda dengan metode yang aman. Jangan pernah berbagi frasa rahasia Anda dengan siapa pun." + }, + "step3": { + "title": "Segarkan browser Anda", + "description": "Setelah Anda menyiapkan dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi." + } + } + }, + "wigwam": { + "extension": { + "step1": { + "title": "Instal ekstensi Wigwam", + "description": "Kami menyarankan untuk memasang Wigwam ke taskbar Anda untuk akses dompet yang lebih cepat." + }, + "step2": { + "title": "Buat atau Impor Dompet", + "description": "Pastikan untuk mencadangkan wallet Anda menggunakan metode yang aman. Jangan pernah berbagi frasa rahasia Anda dengan siapa pun." + }, + "step3": { + "title": "Segarkan browser Anda", + "description": "Setelah Anda menyiapkan dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi." + } + } + }, + "talisman": { + "extension": { + "step1": { + "title": "Instal ekstensi Talisman", + "description": "Kami merekomendasikan menempelkan Talisman ke taskbar Anda untuk akses dompet Anda lebih cepat." + }, + "step2": { + "title": "Buat atau Impor Dompet Ethereum", + "description": "Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah berbagi frase pemulihan Anda dengan siapa pun." + }, + "step3": { + "title": "Segarkan browser Anda", + "description": "Setelah Anda menyiapkan dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi." + } + } + }, + "xdefi": { + "extension": { + "step1": { + "title": "Instal ekstensi Dompet XDEFI", + "description": "Kami merekomendasikan menempelkan XDEFI Wallet ke taskbar Anda untuk akses lebih cepat ke dompet Anda." + }, + "step2": { + "title": "Buat atau Impor Dompet", + "description": "Pastikan untuk mencadangkan dompet Anda dengan metode yang aman. Jangan pernah berbagi frase rahasia Anda dengan siapa pun." + }, + "step3": { + "title": "Segarkan browser Anda", + "description": "Setelah Anda menyiapkan dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi." + } + } + }, + "zeal": { + "qr_code": { + "step1": { + "title": "Buka aplikasi Zeal", + "description": "Tambahkan Zeal Wallet ke layar utama Anda untuk akses yang lebih cepat ke wallet Anda." + }, + "step2": { + "title": "Buat atau Impor Dompet", + "description": "Buat dompet baru atau impor yang sudah ada." + }, + "step3": { + "title": "Ketuk ikon QR dan scan", + "description": "Ketuk ikon QR di layar utama Anda, pindai kode dan konfirmasi prompt untuk terhubung." + } + }, + "extension": { + "step1": { + "title": "Instal ekstensi Zeal", + "description": "Kami merekomendasikan untuk mem-pin Zeal ke taskbar Anda untuk akses wallet lebih cepat." + }, + "step2": { + "title": "Buat atau Impor Dompet", + "description": "Pastikan untuk mencadangkan wallet Anda menggunakan metode yang aman. Jangan pernah berbagi frasa rahasia Anda dengan siapa pun." + }, + "step3": { + "title": "Segarkan browser Anda", + "description": "Setelah Anda menyiapkan dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi." + } + } + }, + "safepal": { + "extension": { + "step1": { + "title": "Pasang ekstensi SafePal Wallet", + "description": "Klik di pojok kanan atas browser Anda dan pin SafePal Wallet untuk akses mudah." + }, + "step2": { + "title": "Buat atau Impor sebuah dompet", + "description": "Buat dompet baru atau impor yang sudah ada." + }, + "step3": { + "title": "Segarkan browser Anda", + "description": "Setelah Anda menyiapkan SafePal Wallet, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi." + } + }, + "qr_code": { + "step1": { + "title": "Buka aplikasi SafePal Wallet", + "description": "Letakkan SafePal Wallet di layar utama Anda untuk akses yang lebih cepat ke wallet Anda." + }, + "step2": { + "title": "Buat atau Impor Dompet", + "description": "Buat dompet baru atau impor yang sudah ada." + }, + "step3": { + "title": "Ketuk WalletConnect di Pengaturan", + "description": "Pilih Koneksi Baru, lalu pindai kode QR dan konfirmasi petunjuk untuk terhubung." + } + } + }, + "desig": { + "extension": { + "step1": { + "title": "Instal ekstensi Desig", + "description": "Kami merekomendasikan menempelkan Desig ke taskbar Anda untuk akses dompet Anda lebih mudah." + }, + "step2": { + "title": "Buat Dompet", + "description": "Pastikan untuk mencadangkan wallet Anda menggunakan metode yang aman. Jangan pernah berbagi frasa rahasia Anda dengan siapa pun." + }, + "step3": { + "title": "Segarkan browser Anda", + "description": "Setelah Anda menyiapkan dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi." + } + } + }, + "subwallet": { + "extension": { + "step1": { + "title": "Instal ekstensi SubWallet", + "description": "Kami merekomendasikan menempelkan SubWallet ke taskbar Anda untuk akses dompet Anda lebih cepat." + }, + "step2": { + "title": "Buat atau Impor Dompet", + "description": "Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah berbagi frase pemulihan Anda dengan siapa pun." + }, + "step3": { + "title": "Segarkan browser Anda", + "description": "Setelah Anda menyiapkan dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi." + } + }, + "qr_code": { + "step1": { + "title": "Buka aplikasi SubWallet", + "description": "Kami merekomendasikan menaruh SubWallet di layar utama Anda untuk akses lebih cepat." + }, + "step2": { + "title": "Buat atau Impor Dompet", + "description": "Pastikan untuk mencadangkan wallet Anda menggunakan metode yang aman. Jangan pernah berbagi frasa rahasia Anda dengan siapa pun." + }, + "step3": { + "title": "Tekan tombol scan", + "description": "Setelah Anda memindai, akan muncul petunjuk koneksi untuk Anda menghubungkan dompet Anda." + } + } + }, + "clv": { + "extension": { + "step1": { + "title": "Instal ekstensi CLV Wallet", + "description": "Kami merekomendasikan menempelkan CLV Wallet ke taskbar Anda untuk akses dompet Anda lebih cepat." + }, + "step2": { + "title": "Buat atau Impor Dompet", + "description": "Pastikan untuk mencadangkan wallet Anda menggunakan metode yang aman. Jangan pernah berbagi frasa rahasia Anda dengan siapa pun." + }, + "step3": { + "title": "Segarkan browser Anda", + "description": "Setelah Anda menyiapkan dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi." + } + }, + "qr_code": { + "step1": { + "title": "Buka aplikasi CLV Wallet", + "description": "Kami sarankan untuk menempatkan CLV Wallet di layar utama Anda untuk akses yang lebih cepat." + }, + "step2": { + "title": "Buat atau Impor Dompet", + "description": "Pastikan untuk mencadangkan wallet Anda menggunakan metode yang aman. Jangan pernah berbagi frasa rahasia Anda dengan siapa pun." + }, + "step3": { + "title": "Tekan tombol scan", + "description": "Setelah Anda memindai, akan muncul petunjuk koneksi untuk Anda menghubungkan dompet Anda." + } + } + }, + "okto": { + "qr_code": { + "step1": { + "title": "Buka aplikasi Okto", + "description": "Tambahkan Okto ke layar utama Anda untuk akses cepat" + }, + "step2": { + "title": "Buat Wallet MPC", + "description": "Buat akun dan generate wallet" + }, + "step3": { + "title": "Ketuk WalletConnect di Pengaturan", + "description": "Ketuk ikon Scan QR di pojok kanan atas dan konfirmasi prompt untuk terhubung." + } + } + }, + "ledger": { + "desktop": { + "step1": { + "title": "Buka aplikasi Ledger Live", + "description": "Kami merekomendasikan menempatkan Ledger Live di layar utama Anda untuk akses lebih cepat." + }, + "step2": { + "title": "Atur Ledger Anda", + "description": "Atur Ledger baru atau hubungkan ke Ledger yang sudah ada." + }, + "step3": { + "title": "Hubungkan", + "description": "Setelah Anda scan, muncul prompt koneksi untuk Anda menghubungkan dompet Anda." + } + }, + "qr_code": { + "step1": { + "title": "Buka aplikasi Ledger Live", + "description": "Kami merekomendasikan menempatkan Ledger Live di layar utama Anda untuk akses lebih cepat." + }, + "step2": { + "title": "Atur Ledger Anda", + "description": "Anda dapat melakukan sinkronisasi dengan aplikasi desktop atau menghubungkan Ledger Anda." + }, + "step3": { + "title": "Pindai kode", + "description": "Ketuk WalletConnect lalu Beralih ke Scanner. Setelah Anda scan, muncul prompt koneksi untuk Anda menghubungkan dompet Anda." + } + } + }, + "valora": { + "qr_code": { + "step1": { + "title": "Buka aplikasi Valora", + "description": "Kami merekomendasikan untuk meletakkan Valora di layar utama Anda untuk akses lebih cepat." + }, + "step2": { + "title": "Buat atau Impor dompet", + "description": "Buat dompet baru atau impor yang sudah ada." + }, + "step3": { + "title": "Tekan tombol scan", + "description": "Setelah Anda memindai, akan muncul petunjuk koneksi untuk Anda menghubungkan dompet Anda." + } + } + } + } +} +`;export{n as default}; diff --git a/app/dist/assets/index-BKHg97jM.js b/app/dist/assets/index-BKHg97jM.js new file mode 100644 index 0000000..44ff2d4 --- /dev/null +++ b/app/dist/assets/index-BKHg97jM.js @@ -0,0 +1,54 @@ +import{T as Pe,M as nt,R as k,E as z,C as O,a as re,b as uo,O as K,c as fe}from"./index-Db_7AJd0.js";import{r as ho,l as fo}from"./index-vLeYm_sl.js";/** + * @license + * Copyright 2019 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const rt=window,En=rt.ShadowRoot&&(rt.ShadyCSS===void 0||rt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,An=Symbol(),Bn=new WeakMap;let Sr=class{constructor(e,n,o){if(this._$cssResult$=!0,o!==An)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=n}get styleSheet(){let e=this.o;const n=this.t;if(En&&e===void 0){const o=n!==void 0&&n.length===1;o&&(e=Bn.get(n)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),o&&Bn.set(n,e))}return e}toString(){return this.cssText}};const mo=t=>new Sr(typeof t=="string"?t:t+"",void 0,An),B=(t,...e)=>{const n=t.length===1?t[0]:e.reduce((o,r,i)=>o+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+t[i+1],t[0]);return new Sr(n,t,An)},po=(t,e)=>{En?t.adoptedStyleSheets=e.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet):e.forEach(n=>{const o=document.createElement("style"),r=rt.litNonce;r!==void 0&&o.setAttribute("nonce",r),o.textContent=n.cssText,t.appendChild(o)})},Wn=En?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let n="";for(const o of e.cssRules)n+=o.cssText;return mo(n)})(t):t;/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */var xt;const ot=window,Un=ot.trustedTypes,go=Un?Un.emptyScript:"",jn=ot.reactiveElementPolyfillSupport,rn={toAttribute(t,e){switch(e){case Boolean:t=t?go:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=t!==null;break;case Number:n=t===null?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch{n=null}}return n}},Dr=(t,e)=>e!==t&&(e==e||t==t),$t={attribute:!0,type:String,converter:rn,reflect:!1,hasChanged:Dr},on="finalized";let Ce=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(e){var n;this.finalize(),((n=this.h)!==null&&n!==void 0?n:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((n,o)=>{const r=this._$Ep(o,n);r!==void 0&&(this._$Ev.set(r,o),e.push(r))}),e}static createProperty(e,n=$t){if(n.state&&(n.attribute=!1),this.finalize(),this.elementProperties.set(e,n),!n.noAccessor&&!this.prototype.hasOwnProperty(e)){const o=typeof e=="symbol"?Symbol():"__"+e,r=this.getPropertyDescriptor(e,o,n);r!==void 0&&Object.defineProperty(this.prototype,e,r)}}static getPropertyDescriptor(e,n,o){return{get(){return this[n]},set(r){const i=this[e];this[n]=r,this.requestUpdate(e,i,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||$t}static finalize(){if(this.hasOwnProperty(on))return!1;this[on]=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const n=this.properties,o=[...Object.getOwnPropertyNames(n),...Object.getOwnPropertySymbols(n)];for(const r of o)this.createProperty(r,n[r])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const n=[];if(Array.isArray(e)){const o=new Set(e.flat(1/0).reverse());for(const r of o)n.unshift(Wn(r))}else e!==void 0&&n.push(Wn(e));return n}static _$Ep(e,n){const o=n.attribute;return o===!1?void 0:typeof o=="string"?o:typeof e=="string"?e.toLowerCase():void 0}_$Eu(){var e;this._$E_=new Promise(n=>this.enableUpdating=n),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(n=>n(this))}addController(e){var n,o;((n=this._$ES)!==null&&n!==void 0?n:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((o=e.hostConnected)===null||o===void 0||o.call(e))}removeController(e){var n;(n=this._$ES)===null||n===void 0||n.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,n)=>{this.hasOwnProperty(n)&&(this._$Ei.set(n,this[n]),delete this[n])})}createRenderRoot(){var e;const n=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return po(n,this.constructor.elementStyles),n}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(n=>{var o;return(o=n.hostConnected)===null||o===void 0?void 0:o.call(n)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(n=>{var o;return(o=n.hostDisconnected)===null||o===void 0?void 0:o.call(n)})}attributeChangedCallback(e,n,o){this._$AK(e,o)}_$EO(e,n,o=$t){var r;const i=this.constructor._$Ep(e,o);if(i!==void 0&&o.reflect===!0){const s=(((r=o.converter)===null||r===void 0?void 0:r.toAttribute)!==void 0?o.converter:rn).toAttribute(n,o.type);this._$El=e,s==null?this.removeAttribute(i):this.setAttribute(i,s),this._$El=null}}_$AK(e,n){var o;const r=this.constructor,i=r._$Ev.get(e);if(i!==void 0&&this._$El!==i){const s=r.getPropertyOptions(i),l=typeof s.converter=="function"?{fromAttribute:s.converter}:((o=s.converter)===null||o===void 0?void 0:o.fromAttribute)!==void 0?s.converter:rn;this._$El=i,this[i]=l.fromAttribute(n,s.type),this._$El=null}}requestUpdate(e,n,o){let r=!0;e!==void 0&&(((o=o||this.constructor.getPropertyOptions(e)).hasChanged||Dr)(this[e],n)?(this._$AL.has(e)||this._$AL.set(e,n),o.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,o))):r=!1),!this.isUpdatePending&&r&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(n){Promise.reject(n)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((r,i)=>this[i]=r),this._$Ei=void 0);let n=!1;const o=this._$AL;try{n=this.shouldUpdate(o),n?(this.willUpdate(o),(e=this._$ES)===null||e===void 0||e.forEach(r=>{var i;return(i=r.hostUpdate)===null||i===void 0?void 0:i.call(r)}),this.update(o)):this._$Ek()}catch(r){throw n=!1,this._$Ek(),r}n&&this._$AE(o)}willUpdate(e){}_$AE(e){var n;(n=this._$ES)===null||n===void 0||n.forEach(o=>{var r;return(r=o.hostUpdated)===null||r===void 0?void 0:r.call(o)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((n,o)=>this._$EO(o,this[o],n)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};Ce[on]=!0,Ce.elementProperties=new Map,Ce.elementStyles=[],Ce.shadowRootOptions={mode:"open"},jn==null||jn({ReactiveElement:Ce}),((xt=ot.reactiveElementVersions)!==null&&xt!==void 0?xt:ot.reactiveElementVersions=[]).push("1.6.3");/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */var Ct;const it=window,Oe=it.trustedTypes,kn=Oe?Oe.createPolicy("lit-html",{createHTML:t=>t}):void 0,sn="$lit$",ne=`lit$${(Math.random()+"").slice(9)}$`,Lr="?"+ne,wo=`<${Lr}>`,me=document,ke=()=>me.createComment(""),He=t=>t===null||typeof t!="object"&&typeof t!="function",Nr=Array.isArray,vo=t=>Nr(t)||typeof(t==null?void 0:t[Symbol.iterator])=="function",_t=`[ +\f\r]`,Be=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Hn=/-->/g,Fn=/>/g,de=RegExp(`>|${_t}(?:([^\\s"'>=/]+)(${_t}*=${_t}*(?:[^ +\f\r"'\`<>=]|("|')|))|$)`,"g"),zn=/'/g,qn=/"/g,Br=/^(?:script|style|textarea|title)$/i,Wr=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),f=Wr(1),j=Wr(2),pe=Symbol.for("lit-noChange"),H=Symbol.for("lit-nothing"),Vn=new WeakMap,ue=me.createTreeWalker(me,129,null,!1);function Ur(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return kn!==void 0?kn.createHTML(e):e}const bo=(t,e)=>{const n=t.length-1,o=[];let r,i=e===2?"":"",s=Be;for(let l=0;l"?(s=r??Be,w=-1):h[1]===void 0?w=-2:(w=s.lastIndex-h[2].length,c=h[1],s=h[3]===void 0?de:h[3]==='"'?qn:zn):s===qn||s===zn?s=de:s===Hn||s===Fn?s=Be:(s=de,r=void 0);const u=s===de&&t[l+1].startsWith("/>")?" ":"";i+=s===Be?a+wo:w>=0?(o.push(c),a.slice(0,w)+sn+a.slice(w)+ne+u):a+ne+(w===-2?(o.push(void 0),l):u)}return[Ur(t,i+(t[n]||"")+(e===2?"":"")),o]};class Fe{constructor({strings:e,_$litType$:n},o){let r;this.parts=[];let i=0,s=0;const l=e.length-1,a=this.parts,[c,h]=bo(e,n);if(this.el=Fe.createElement(c,o),ue.currentNode=this.el.content,n===2){const w=this.el.content,d=w.firstChild;d.remove(),w.append(...d.childNodes)}for(;(r=ue.nextNode())!==null&&a.length0){r.textContent=Oe?Oe.emptyScript:"";for(let u=0;u2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=H}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,n=this,o,r){const i=this.strings;let s=!1;if(i===void 0)e=Ie(this,e,n,0),s=!He(e)||e!==this._$AH&&e!==pe,s&&(this._$AH=e);else{const l=e;let a,c;for(e=i[0],a=0;a{var o,r;const i=(o=n==null?void 0:n.renderBefore)!==null&&o!==void 0?o:e;let s=i._$litPart$;if(s===void 0){const l=(r=n==null?void 0:n.renderBefore)!==null&&r!==void 0?r:null;i._$litPart$=s=new Ye(e.insertBefore(ke(),l),l,void 0,n??{})}return s._$AI(t),s};/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */var Et,At;class S extends Ce{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,n;const o=super.createRenderRoot();return(e=(n=this.renderOptions).renderBefore)!==null&&e!==void 0||(n.renderBefore=o.firstChild),o}update(e){const n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Ao(n,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return pe}}S.finalized=!0,S._$litElement$=!0,(Et=globalThis.litElementHydrateSupport)===null||Et===void 0||Et.call(globalThis,{LitElement:S});const Kn=globalThis.litElementPolyfillSupport;Kn==null||Kn({LitElement:S});((At=globalThis.litElementVersions)!==null&&At!==void 0?At:globalThis.litElementVersions=[]).push("3.3.3");/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const N=t=>e=>typeof e=="function"?((n,o)=>(customElements.define(n,o),o))(t,e):((n,o)=>{const{kind:r,elements:i}=o;return{kind:r,elements:i,finisher(s){customElements.define(n,s)}}})(t,e);/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const Po=(t,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(n){n.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(n){n.createProperty(e.key,t)}},Oo=(t,e,n)=>{e.constructor.createProperty(n,t)};function M(t){return(e,n)=>n!==void 0?Oo(t,e,n):Po(t,e)}/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */function q(t){return M({...t,state:!0})}/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */var Pt;((Pt=window.HTMLSlotElement)===null||Pt===void 0?void 0:Pt.prototype.assignedElements)!=null;/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const Io={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},To=t=>(...e)=>({_$litDirective$:t,values:e});class Ro{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,n,o){this._$Ct=e,this._$AM=n,this._$Ci=o}_$AS(e,n){return this.update(e,n)}update(e,n){return this.render(...n)}}/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const X=To(class extends Ro{constructor(t){var e;if(super(t),t.type!==Io.ATTRIBUTE||t.name!=="class"||((e=t.strings)===null||e===void 0?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(t,[e]){var n,o;if(this.it===void 0){this.it=new Set,t.strings!==void 0&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter(i=>i!=="")));for(const i in e)e[i]&&!(!((n=this.nt)===null||n===void 0)&&n.has(i))&&this.it.add(i);return this.render(e)}const r=t.element.classList;this.it.forEach(i=>{i in e||(r.remove(i),this.it.delete(i))});for(const i in e){const s=!!e[i];s===this.it.has(i)||!((o=this.nt)===null||o===void 0)&&o.has(i)||(s?(r.add(i),this.it.add(i)):(r.remove(i),this.it.delete(i)))}return pe}});function Mo(t,e){t.indexOf(e)===-1&&t.push(e)}const jr=(t,e,n)=>Math.min(Math.max(n,t),e),V={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},st=t=>typeof t=="number",Ee=t=>Array.isArray(t)&&!st(t[0]),So=(t,e,n)=>{const o=e-t;return((n-t)%o+o)%o+t};function Do(t,e){return Ee(t)?t[So(0,t.length,e)]:t}const kr=(t,e,n)=>-n*t+n*e+t,Hr=()=>{},oe=t=>t,Pn=(t,e,n)=>e-t===0?1:(n-t)/(e-t);function Fr(t,e){const n=t[t.length-1];for(let o=1;o<=e;o++){const r=Pn(0,e,o);t.push(kr(n,1,r))}}function Lo(t){const e=[0];return Fr(e,t-1),e}function No(t,e=Lo(t.length),n=oe){const o=t.length,r=o-e.length;return r>0&&Fr(e,r),i=>{let s=0;for(;sArray.isArray(t)&&st(t[0]),ln=t=>typeof t=="object"&&!!t.createAnimation,Te=t=>typeof t=="function",Bo=t=>typeof t=="string",je={ms:t=>t*1e3,s:t=>t/1e3},qr=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Wo=1e-7,Uo=12;function jo(t,e,n,o,r){let i,s,l=0;do s=e+(n-e)/2,i=qr(s,o,r)-t,i>0?n=s:e=s;while(Math.abs(i)>Wo&&++ljo(i,0,1,t,n);return i=>i===0||i===1?i:qr(r(i),e,o)}const ko=(t,e="end")=>n=>{n=e==="end"?Math.min(n,.999):Math.max(n,.001);const o=n*t,r=e==="end"?Math.floor(o):Math.ceil(o);return jr(0,1,r/t)},Ho={ease:Ue(.25,.1,.25,1),"ease-in":Ue(.42,0,1,1),"ease-in-out":Ue(.42,0,.58,1),"ease-out":Ue(0,0,.58,1)},Fo=/\((.*?)\)/;function Yn(t){if(Te(t))return t;if(zr(t))return Ue(...t);const e=Ho[t];if(e)return e;if(t.startsWith("steps")){const n=Fo.exec(t);if(n){const o=n[1].split(",");return ko(parseFloat(o[0]),o[1].trim())}}return oe}class Vr{constructor(e,n=[0,1],{easing:o,duration:r=V.duration,delay:i=V.delay,endDelay:s=V.endDelay,repeat:l=V.repeat,offset:a,direction:c="normal",autoplay:h=!0}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=oe,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((d,u)=>{this.resolve=d,this.reject=u}),o=o||V.easing,ln(o)){const d=o.createAnimation(n);o=d.easing,n=d.keyframes||n,r=d.duration||r}this.repeat=l,this.easing=Ee(o)?oe:Yn(o),this.updateDuration(r);const w=No(n,a,Ee(o)?o.map(Yn):oe);this.tick=d=>{var u;i=i;let b=0;this.pauseTime!==void 0?b=this.pauseTime:b=(d-this.startTime)*this.rate,this.t=b,b/=1e3,b=Math.max(b-i,0),this.playState==="finished"&&this.pauseTime===void 0&&(b=this.totalDuration);const g=b/this.duration;let D=Math.floor(g),p=g%1;!p&&g>=1&&(p=1),p===1&&D--;const E=D%2;(c==="reverse"||c==="alternate"&&E||c==="alternate-reverse"&&!E)&&(p=1-p);const y=b>=this.totalDuration?1:Math.min(p,1),$=w(this.easing(y));e($),this.pauseTime===void 0&&(this.playState==="finished"||b>=this.totalDuration+s)?(this.playState="finished",(u=this.resolve)===null||u===void 0||u.call(this,$)):this.playState!=="idle"&&(this.frameRequestId=requestAnimationFrame(this.tick))},h&&this.play()}play(){const e=performance.now();this.playState="running",this.pauseTime!==void 0?this.startTime=e-this.pauseTime:this.startTime||(this.startTime=e),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var e;this.playState="idle",this.frameRequestId!==void 0&&cancelAnimationFrame(this.frameRequestId),(e=this.reject)===null||e===void 0||e.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(e){this.duration=e,this.totalDuration=e*(this.repeat+1)}get currentTime(){return this.t}set currentTime(e){this.pauseTime!==void 0||this.rate===0?this.pauseTime=e:this.startTime=performance.now()-e/this.rate}get playbackRate(){return this.rate}set playbackRate(e){this.rate=e}}class zo{setAnimation(e){this.animation=e,e==null||e.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}}const Ot=new WeakMap;function Zr(t){return Ot.has(t)||Ot.set(t,{transforms:[],values:new Map}),Ot.get(t)}function qo(t,e){return t.has(e)||t.set(e,new zo),t.get(e)}const Vo=["","X","Y","Z"],Zo=["translate","scale","rotate","skew"],lt={x:"translateX",y:"translateY",z:"translateZ"},Gn={syntax:"",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},Ko={translate:{syntax:"",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:Gn,scale:{syntax:"",initialValue:1,toDefaultUnit:oe},skew:Gn},ze=new Map,On=t=>`--motion-${t}`,at=["x","y","z"];Zo.forEach(t=>{Vo.forEach(e=>{at.push(t+e),ze.set(On(t+e),Ko[t])})});const Yo=(t,e)=>at.indexOf(t)-at.indexOf(e),Go=new Set(at),Kr=t=>Go.has(t),Qo=(t,e)=>{lt[e]&&(e=lt[e]);const{transforms:n}=Zr(t);Mo(n,e),t.style.transform=Jo(n)},Jo=t=>t.sort(Yo).reduce(Xo,"").trim(),Xo=(t,e)=>`${t} ${e}(var(${On(e)}))`,an=t=>t.startsWith("--"),Qn=new Set;function ei(t){if(!Qn.has(t)){Qn.add(t);try{const{syntax:e,initialValue:n}=ze.has(t)?ze.get(t):{};CSS.registerProperty({name:t,inherits:!1,syntax:e,initialValue:n})}catch{}}}const It=(t,e)=>document.createElement("div").animate(t,e),Jn={cssRegisterProperty:()=>typeof CSS<"u"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{It({opacity:[1]})}catch{return!1}return!0},finished:()=>!!It({opacity:[0,1]},{duration:.001}).finished,linearEasing:()=>{try{It({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0}},Tt={},_e={};for(const t in Jn)_e[t]=()=>(Tt[t]===void 0&&(Tt[t]=Jn[t]()),Tt[t]);const ti=.015,ni=(t,e)=>{let n="";const o=Math.round(e/ti);for(let r=0;rTe(t)?_e.linearEasing()?`linear(${ni(t,e)})`:V.easing:zr(t)?ri(t):t,ri=([t,e,n,o])=>`cubic-bezier(${t}, ${e}, ${n}, ${o})`;function oi(t,e){for(let n=0;nArray.isArray(t)?t:[t];function cn(t){return lt[t]&&(t=lt[t]),Kr(t)?On(t):t}const et={get:(t,e)=>{e=cn(e);let n=an(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!n&&n!==0){const o=ze.get(e);o&&(n=o.initialValue)}return n},set:(t,e,n)=>{e=cn(e),an(e)?t.style.setProperty(e,n):t.style[e]=n}};function Yr(t,e=!0){if(!(!t||t.playState==="finished"))try{t.stop?t.stop():(e&&t.commitStyles(),t.cancel())}catch{}}function si(t,e){var n;let o=(e==null?void 0:e.toDefaultUnit)||oe;const r=t[t.length-1];if(Bo(r)){const i=((n=r.match(/(-?[\d.]+)([a-z%]*)/))===null||n===void 0?void 0:n[2])||"";i&&(o=s=>s+i)}return o}function li(){return window.__MOTION_DEV_TOOLS_RECORD}function ai(t,e,n,o={},r){const i=li(),s=o.record!==!1&&i;let l,{duration:a=V.duration,delay:c=V.delay,endDelay:h=V.endDelay,repeat:w=V.repeat,easing:d=V.easing,persist:u=!1,direction:b,offset:g,allowWebkitAcceleration:D=!1,autoplay:p=!0}=o;const E=Zr(t),y=Kr(e);let $=_e.waapi();y&&Qo(t,e);const W=cn(e),x=qo(E.values,W),_=ze.get(W);return Yr(x.animation,!(ln(d)&&x.generator)&&o.record!==!1),()=>{const A=()=>{var v,P;return(P=(v=et.get(t,W))!==null&&v!==void 0?v:_==null?void 0:_.initialValue)!==null&&P!==void 0?P:0};let m=oi(ii(n),A);const I=si(m,_);if(ln(d)){const v=d.createAnimation(m,e!=="opacity",A,W,x);d=v.easing,m=v.keyframes||m,a=v.duration||a}if(an(W)&&(_e.cssRegisterProperty()?ei(W):$=!1),y&&!_e.linearEasing()&&(Te(d)||Ee(d)&&d.some(Te))&&($=!1),$){_&&(m=m.map(C=>st(C)?_.toDefaultUnit(C):C)),m.length===1&&(!_e.partialKeyframes()||s)&&m.unshift(A());const v={delay:je.ms(c),duration:je.ms(a),endDelay:je.ms(h),easing:Ee(d)?void 0:Xn(d,a),direction:b,iterations:w+1,fill:"both"};l=t.animate({[W]:m,offset:g,easing:Ee(d)?d.map(C=>Xn(C,a)):void 0},v),l.finished||(l.finished=new Promise((C,R)=>{l.onfinish=C,l.oncancel=R}));const P=m[m.length-1];l.finished.then(()=>{u||(et.set(t,W,P),l.cancel())}).catch(Hr),D||(l.playbackRate=1.000001)}else if(y)m=m.map(v=>typeof v=="string"?parseFloat(v):v),m.length===1&&m.unshift(parseFloat(A())),l=new r(v=>{et.set(t,W,I?I(v):v)},m,Object.assign(Object.assign({},o),{duration:a,easing:d}));else{const v=m[m.length-1];et.set(t,W,_&&st(v)?_.toDefaultUnit(v):v)}return s&&i(t,e,m,{duration:a,delay:c,easing:d,repeat:w,offset:g},"motion-one"),x.setAnimation(l),l&&!p&&l.pause(),l}}const ci=(t,e)=>t[e]?Object.assign(Object.assign({},t),t[e]):Object.assign({},t);function di(t,e){return typeof t=="string"?t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}const ui=t=>t(),Gr=(t,e,n=V.duration)=>new Proxy({animations:t.map(ui).filter(Boolean),duration:n,options:e},fi),hi=t=>t.animations[0],fi={get:(t,e)=>{const n=hi(t);switch(e){case"duration":return t.duration;case"currentTime":return je.s((n==null?void 0:n[e])||0);case"playbackRate":case"playState":return n==null?void 0:n[e];case"finished":return t.finished||(t.finished=Promise.all(t.animations.map(mi)).catch(Hr)),t.finished;case"stop":return()=>{t.animations.forEach(o=>Yr(o))};case"forEachNative":return o=>{t.animations.forEach(r=>o(r,t))};default:return typeof(n==null?void 0:n[e])>"u"?void 0:()=>t.animations.forEach(o=>o[e]())}},set:(t,e,n)=>{switch(e){case"currentTime":n=je.ms(n);case"playbackRate":for(let o=0;ot.finished;function pi(t,e,n){return Te(t)?t(e,n):t}function gi(t){return function(n,o,r={}){n=di(n);const i=n.length,s=[];for(let l=0;l{const n=new Vr(t,[0,1],e);return n.finished.catch(()=>{}),n}],e,e.duration)}function he(t,e,n){return(Te(t)?vi:wi)(t,e,n)}/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const F=t=>t??H;var $e={},Rt,er;function bi(){return er||(er=1,Rt=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Rt}var Mt={},te={},tr;function be(){if(tr)return te;tr=1;let t;const e=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return te.getSymbolSize=function(o){if(!o)throw new Error('"version" cannot be null or undefined');if(o<1||o>40)throw new Error('"version" should be in range from 1 to 40');return o*4+17},te.getSymbolTotalCodewords=function(o){return e[o]},te.getBCHDigit=function(n){let o=0;for(;n!==0;)o++,n>>>=1;return o},te.setToSJISFunction=function(o){if(typeof o!="function")throw new Error('"toSJISFunc" is not a valid function.');t=o},te.isKanjiModeEnabled=function(){return typeof t<"u"},te.toSJIS=function(o){return t(o)},te}var St={},nr;function In(){return nr||(nr=1,function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+n)}}t.isValid=function(o){return o&&typeof o.bit<"u"&&o.bit>=0&&o.bit<4},t.from=function(o,r){if(t.isValid(o))return o;try{return e(o)}catch{return r}}}(St)),St}var Dt,rr;function yi(){if(rr)return Dt;rr=1;function t(){this.buffer=[],this.length=0}return t.prototype={get:function(e){const n=Math.floor(e/8);return(this.buffer[n]>>>7-e%8&1)===1},put:function(e,n){for(let o=0;o>>n-o-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),e&&(this.buffer[n]|=128>>>this.length%8),this.length++}},Dt=t,Dt}var Lt,or;function xi(){if(or)return Lt;or=1;function t(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}return t.prototype.set=function(e,n,o,r){const i=e*this.size+n;this.data[i]=o,r&&(this.reservedBit[i]=!0)},t.prototype.get=function(e,n){return this.data[e*this.size+n]},t.prototype.xor=function(e,n,o){this.data[e*this.size+n]^=o},t.prototype.isReserved=function(e,n){return this.reservedBit[e*this.size+n]},Lt=t,Lt}var Nt={},ir;function $i(){return ir||(ir=1,function(t){const e=be().getSymbolSize;t.getRowColCoords=function(o){if(o===1)return[];const r=Math.floor(o/7)+2,i=e(o),s=i===145?26:Math.ceil((i-13)/(2*r-2))*2,l=[i-7];for(let a=1;a=0&&r<=7},t.from=function(r){return t.isValid(r)?parseInt(r,10):void 0},t.getPenaltyN1=function(r){const i=r.size;let s=0,l=0,a=0,c=null,h=null;for(let w=0;w=5&&(s+=e.N1+(l-5)),c=u,l=1),u=r.get(d,w),u===h?a++:(a>=5&&(s+=e.N1+(a-5)),h=u,a=1)}l>=5&&(s+=e.N1+(l-5)),a>=5&&(s+=e.N1+(a-5))}return s},t.getPenaltyN2=function(r){const i=r.size;let s=0;for(let l=0;l=10&&(l===1488||l===93)&&s++,a=a<<1&2047|r.get(h,c),h>=10&&(a===1488||a===93)&&s++}return s*e.N3},t.getPenaltyN4=function(r){let i=0;const s=r.data.length;for(let a=0;a=0;){const s=i[0];for(let a=0;a0){const l=new Uint8Array(this.degree);return l.set(i,s),l}return i},jt=e,jt}var kt={},Ht={},Ft={},hr;function Jr(){return hr||(hr=1,Ft.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),Ft}var Z={},fr;function Xr(){if(fr)return Z;fr=1;const t="[0-9]+",e="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const o="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+`)(?:.|[\r +]))+`;Z.KANJI=new RegExp(n,"g"),Z.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Z.BYTE=new RegExp(o,"g"),Z.NUMERIC=new RegExp(t,"g"),Z.ALPHANUMERIC=new RegExp(e,"g");const r=new RegExp("^"+n+"$"),i=new RegExp("^"+t+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return Z.testKanji=function(a){return r.test(a)},Z.testNumeric=function(a){return i.test(a)},Z.testAlphanumeric=function(a){return s.test(a)},Z}var mr;function ye(){return mr||(mr=1,function(t){const e=Jr(),n=Xr();t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(i,s){if(!i.ccBits)throw new Error("Invalid mode: "+i);if(!e.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?i.ccBits[0]:s<27?i.ccBits[1]:i.ccBits[2]},t.getBestModeForData=function(i){return n.testNumeric(i)?t.NUMERIC:n.testAlphanumeric(i)?t.ALPHANUMERIC:n.testKanji(i)?t.KANJI:t.BYTE},t.toString=function(i){if(i&&i.id)return i.id;throw new Error("Invalid mode")},t.isValid=function(i){return i&&i.bit&&i.ccBits};function o(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+r)}}t.from=function(i,s){if(t.isValid(i))return i;try{return o(i)}catch{return s}}}(Ht)),Ht}var pr;function Oi(){return pr||(pr=1,function(t){const e=be(),n=Qr(),o=In(),r=ye(),i=Jr(),s=7973,l=e.getBCHDigit(s);function a(d,u,b){for(let g=1;g<=40;g++)if(u<=t.getCapacity(g,b,d))return g}function c(d,u){return r.getCharCountIndicator(d,u)+4}function h(d,u){let b=0;return d.forEach(function(g){const D=c(g.mode,u);b+=D+g.getBitsLength()}),b}function w(d,u){for(let b=1;b<=40;b++)if(h(d,b)<=t.getCapacity(b,u,r.MIXED))return b}t.from=function(u,b){return i.isValid(u)?parseInt(u,10):b},t.getCapacity=function(u,b,g){if(!i.isValid(u))throw new Error("Invalid QR Code version");typeof g>"u"&&(g=r.BYTE);const D=e.getSymbolTotalCodewords(u),p=n.getTotalCodewordsCount(u,b),E=(D-p)*8;if(g===r.MIXED)return E;const y=E-c(g,u);switch(g){case r.NUMERIC:return Math.floor(y/10*3);case r.ALPHANUMERIC:return Math.floor(y/11*2);case r.KANJI:return Math.floor(y/13);case r.BYTE:default:return Math.floor(y/8)}},t.getBestVersionForData=function(u,b){let g;const D=o.from(b,o.M);if(Array.isArray(u)){if(u.length>1)return w(u,D);if(u.length===0)return 1;g=u[0]}else g=u;return a(g.mode,g.getLength(),D)},t.getEncodedBits=function(u){if(!i.isValid(u)||u<7)throw new Error("Invalid QR Code version");let b=u<<12;for(;e.getBCHDigit(b)-l>=0;)b^=s<=0;)a^=e<0&&(i=this.data.substr(r),s=parseInt(i,10),o.put(s,l*3+1))},Vt=e,Vt}var Zt,vr;function Ri(){if(vr)return Zt;vr=1;const t=ye(),e=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(o){this.mode=t.ALPHANUMERIC,this.data=o}return n.getBitsLength=function(r){return 11*Math.floor(r/2)+6*(r%2)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(r){let i;for(i=0;i+2<=this.data.length;i+=2){let s=e.indexOf(this.data[i])*45;s+=e.indexOf(this.data[i+1]),r.put(s,11)}this.data.length%2&&r.put(e.indexOf(this.data[i]),6)},Zt=n,Zt}var Kt,br;function Mi(){return br||(br=1,Kt=function(e){for(var n=[],o=e.length,r=0;r=55296&&i<=56319&&o>r+1){var s=e.charCodeAt(r+1);s>=56320&&s<=57343&&(i=(i-55296)*1024+s-56320+65536,r+=1)}if(i<128){n.push(i);continue}if(i<2048){n.push(i>>6|192),n.push(i&63|128);continue}if(i<55296||i>=57344&&i<65536){n.push(i>>12|224),n.push(i>>6&63|128),n.push(i&63|128);continue}if(i>=65536&&i<=1114111){n.push(i>>18|240),n.push(i>>12&63|128),n.push(i>>6&63|128),n.push(i&63|128);continue}n.push(239,191,189)}return new Uint8Array(n).buffer}),Kt}var Yt,yr;function Si(){if(yr)return Yt;yr=1;const t=Mi(),e=ye();function n(o){this.mode=e.BYTE,typeof o=="string"&&(o=t(o)),this.data=new Uint8Array(o)}return n.getBitsLength=function(r){return r*8},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(o){for(let r=0,i=this.data.length;r=33088&&i<=40956)i-=33088;else if(i>=57408&&i<=60351)i-=49472;else throw new Error("Invalid SJIS character: "+this.data[r]+` +Make sure your charset is UTF-8`);i=(i>>>8&255)*192+(i&255),o.put(i,13)}},Gt=n,Gt}var $r;function Li(){return $r||($r=1,function(t){const e=ye(),n=Ti(),o=Ri(),r=Si(),i=Di(),s=Xr(),l=be(),a=ho();function c(p){return unescape(encodeURIComponent(p)).length}function h(p,E,y){const $=[];let W;for(;(W=p.exec(y))!==null;)$.push({data:W[0],index:W.index,mode:E,length:W[0].length});return $}function w(p){const E=h(s.NUMERIC,e.NUMERIC,p),y=h(s.ALPHANUMERIC,e.ALPHANUMERIC,p);let $,W;return l.isKanjiModeEnabled()?($=h(s.BYTE,e.BYTE,p),W=h(s.KANJI,e.KANJI,p)):($=h(s.BYTE_KANJI,e.BYTE,p),W=[]),E.concat(y,$,W).sort(function(_,A){return _.index-A.index}).map(function(_){return{data:_.data,mode:_.mode,length:_.length}})}function d(p,E){switch(E){case e.NUMERIC:return n.getBitsLength(p);case e.ALPHANUMERIC:return o.getBitsLength(p);case e.KANJI:return i.getBitsLength(p);case e.BYTE:return r.getBitsLength(p)}}function u(p){return p.reduce(function(E,y){const $=E.length-1>=0?E[E.length-1]:null;return $&&$.mode===y.mode?(E[E.length-1].data+=y.data,E):(E.push(y),E)},[])}function b(p){const E=[];for(let y=0;y=0&&C<=6&&(R===0||R===6)||R>=0&&R<=6&&(C===0||C===6)||C>=2&&C<=4&&R>=2&&R<=4?x.set(v+C,P+R,!0,!0):x.set(v+C,P+R,!1,!0))}}function b(x){const _=x.size;for(let A=8;A<_-8;A++){const m=A%2===0;x.set(A,6,m,!0),x.set(6,A,m,!0)}}function g(x,_){const A=r.getPositions(_);for(let m=0;m>C&1)===1,x.set(I,v,P,!0),x.set(v,I,P,!0)}function p(x,_,A){const m=x.size,I=h.getEncodedBits(_,A);let v,P;for(v=0;v<15;v++)P=(I>>v&1)===1,v<6?x.set(v,8,P,!0):v<8?x.set(v+1,8,P,!0):x.set(m-15+v,8,P,!0),v<8?x.set(8,m-v-1,P,!0):v<9?x.set(8,15-v-1+1,P,!0):x.set(8,15-v-1,P,!0);x.set(m-8,8,1,!0)}function E(x,_){const A=x.size;let m=-1,I=A-1,v=7,P=0;for(let C=A-1;C>0;C-=2)for(C===6&&C--;;){for(let R=0;R<2;R++)if(!x.isReserved(I,C-R)){let ee=!1;P<_.length&&(ee=(_[P]>>>v&1)===1),x.set(I,C-R,ee),v--,v===-1&&(P++,v=7)}if(I+=m,I<0||A<=I){I-=m,m=-m;break}}}function y(x,_,A){const m=new n;A.forEach(function(R){m.put(R.mode.bit,4),m.put(R.getLength(),w.getCharCountIndicator(R.mode,x)),R.write(m)});const I=t.getSymbolTotalCodewords(x),v=l.getTotalCodewordsCount(x,_),P=(I-v)*8;for(m.getLengthInBits()+4<=P&&m.put(0,4);m.getLengthInBits()%8!==0;)m.putBit(0);const C=(P-m.getLengthInBits())/8;for(let R=0;R=7&&D(R,_),E(R,P),isNaN(m)&&(m=s.getBestMask(R,p.bind(null,R,A))),s.applyMask(m,R),p(R,A,m),{modules:R,version:_,errorCorrectionLevel:A,maskPattern:m,segments:I}}return Mt.create=function(_,A){if(typeof _>"u"||_==="")throw new Error("No input text");let m=e.M,I,v;return typeof A<"u"&&(m=e.from(A.errorCorrectionLevel,e.M),I=c.from(A.version),v=s.from(A.maskPattern),A.toSJISFunc&&t.setToSJISFunction(A.toSJISFunc)),W(_,I,m,v)},Mt}var Qt={},Jt={},_r;function eo(){return _r||(_r=1,function(t){function e(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let o=n.slice().replace("#","").split("");if(o.length<3||o.length===5||o.length>8)throw new Error("Invalid hex color: "+n);(o.length===3||o.length===4)&&(o=Array.prototype.concat.apply([],o.map(function(i){return[i,i]}))),o.length===6&&o.push("F","F");const r=parseInt(o.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:r&255,hex:"#"+o.slice(0,6).join("")}}t.getOptions=function(o){o||(o={}),o.color||(o.color={});const r=typeof o.margin>"u"||o.margin===null||o.margin<0?4:o.margin,i=o.width&&o.width>=21?o.width:void 0,s=o.scale||4;return{width:i,scale:i?4:s,margin:r,color:{dark:e(o.color.dark||"#000000ff"),light:e(o.color.light||"#ffffffff")},type:o.type,rendererOpts:o.rendererOpts||{}}},t.getScale=function(o,r){return r.width&&r.width>=o+r.margin*2?r.width/(o+r.margin*2):r.scale},t.getImageWidth=function(o,r){const i=t.getScale(o,r);return Math.floor((o+r.margin*2)*i)},t.qrToImageData=function(o,r,i){const s=r.modules.size,l=r.modules.data,a=t.getScale(s,i),c=Math.floor((s+i.margin*2)*a),h=i.margin*a,w=[i.color.light,i.color.dark];for(let d=0;d=h&&u>=h&&d"u"&&(!s||!s.getContext)&&(a=s,s=void 0),s||(c=o()),a=e.getOptions(a);const h=e.getImageWidth(i.modules.size,a),w=c.getContext("2d"),d=w.createImageData(h,h);return e.qrToImageData(d.data,i,a),n(w,c,h),w.putImageData(d,0,0),c},t.renderToDataURL=function(i,s,l){let a=l;typeof a>"u"&&(!s||!s.getContext)&&(a=s,s=void 0),a||(a={});const c=t.render(i,s,a),h=a.type||"image/png",w=a.rendererOpts||{};return c.toDataURL(h,w.quality)}}(Qt)),Qt}var Xt={},Ar;function Wi(){if(Ar)return Xt;Ar=1;const t=eo();function e(r,i){const s=r.a/255,l=i+'="'+r.hex+'"';return s<1?l+" "+i+'-opacity="'+s.toFixed(2).slice(1)+'"':l}function n(r,i,s){let l=r+i;return typeof s<"u"&&(l+=" "+s),l}function o(r,i,s){let l="",a=0,c=!1,h=0;for(let w=0;w0&&d>0&&r[w-1]||(l+=c?n("M",d+s,.5+u+s):n("m",a,0),a=0,c=!1),d+1':"",u="',b='viewBox="0 0 '+w+" "+w+'"',D=''+d+u+` +`;return typeof l=="function"&&l(null,D),D},Xt}var Pr;function Ui(){if(Pr)return $e;Pr=1;const t=bi(),e=Ni(),n=Bi(),o=Wi();function r(i,s,l,a,c){const h=[].slice.call(arguments,1),w=h.length,d=typeof h[w-1]=="function";if(!d&&!t())throw new Error("Callback required as last argument");if(d){if(w<2)throw new Error("Too few arguments provided");w===2?(c=l,l=s,s=a=void 0):w===3&&(s.getContext&&typeof c>"u"?(c=a,a=void 0):(c=a,a=l,l=s,s=void 0))}else{if(w<1)throw new Error("Too few arguments provided");return w===1?(l=s,s=a=void 0):w===2&&!s.getContext&&(a=l,l=s,s=void 0),new Promise(function(u,b){try{const g=e.create(l,a);u(i(g,s,a))}catch(g){b(g)}})}try{const u=e.create(l,a);c(null,i(u,s,a))}catch(u){c(u)}}return $e.create=e.create,$e.toCanvas=r.bind(null,n.render),$e.toDataURL=r.bind(null,n.renderToDataURL),$e.toString=r.bind(null,function(i,s,l){return o.render(i,l)}),$e}var ji=Ui();const ki=fo(ji);var Hi=Object.defineProperty,Or=Object.getOwnPropertySymbols,Fi=Object.prototype.hasOwnProperty,zi=Object.prototype.propertyIsEnumerable,Ir=(t,e,n)=>e in t?Hi(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,en=(t,e)=>{for(var n in e||(e={}))Fi.call(e,n)&&Ir(t,n,e[n]);if(Or)for(var n of Or(e))zi.call(e,n)&&Ir(t,n,e[n]);return t};function qi(){var t;const e=(t=Pe.state.themeMode)!=null?t:"dark",o={light:{foreground:{1:"rgb(20,20,20)",2:"rgb(121,134,134)",3:"rgb(158,169,169)"},background:{1:"rgb(255,255,255)",2:"rgb(241,243,243)",3:"rgb(228,231,231)"},overlay:"rgba(0,0,0,0.1)"},dark:{foreground:{1:"rgb(228,231,231)",2:"rgb(148,158,158)",3:"rgb(110,119,119)"},background:{1:"rgb(20,20,20)",2:"rgb(39,42,42)",3:"rgb(59,64,64)"},overlay:"rgba(255,255,255,0.1)"}}[e];return{"--wcm-color-fg-1":o.foreground[1],"--wcm-color-fg-2":o.foreground[2],"--wcm-color-fg-3":o.foreground[3],"--wcm-color-bg-1":o.background[1],"--wcm-color-bg-2":o.background[2],"--wcm-color-bg-3":o.background[3],"--wcm-color-overlay":o.overlay}}function Tr(){return{"--wcm-accent-color":"#3396FF","--wcm-accent-fill-color":"#FFFFFF","--wcm-z-index":"89","--wcm-background-color":"#3396FF","--wcm-background-border-radius":"8px","--wcm-container-border-radius":"30px","--wcm-wallet-icon-border-radius":"15px","--wcm-wallet-icon-large-border-radius":"30px","--wcm-wallet-icon-small-border-radius":"7px","--wcm-input-border-radius":"28px","--wcm-button-border-radius":"10px","--wcm-notification-border-radius":"36px","--wcm-secondary-button-border-radius":"28px","--wcm-icon-button-border-radius":"50%","--wcm-button-hover-highlight-border-radius":"10px","--wcm-text-big-bold-size":"20px","--wcm-text-big-bold-weight":"600","--wcm-text-big-bold-line-height":"24px","--wcm-text-big-bold-letter-spacing":"-0.03em","--wcm-text-big-bold-text-transform":"none","--wcm-text-xsmall-bold-size":"10px","--wcm-text-xsmall-bold-weight":"700","--wcm-text-xsmall-bold-line-height":"12px","--wcm-text-xsmall-bold-letter-spacing":"0.02em","--wcm-text-xsmall-bold-text-transform":"uppercase","--wcm-text-xsmall-regular-size":"12px","--wcm-text-xsmall-regular-weight":"600","--wcm-text-xsmall-regular-line-height":"14px","--wcm-text-xsmall-regular-letter-spacing":"-0.03em","--wcm-text-xsmall-regular-text-transform":"none","--wcm-text-small-thin-size":"14px","--wcm-text-small-thin-weight":"500","--wcm-text-small-thin-line-height":"16px","--wcm-text-small-thin-letter-spacing":"-0.03em","--wcm-text-small-thin-text-transform":"none","--wcm-text-small-regular-size":"14px","--wcm-text-small-regular-weight":"600","--wcm-text-small-regular-line-height":"16px","--wcm-text-small-regular-letter-spacing":"-0.03em","--wcm-text-small-regular-text-transform":"none","--wcm-text-medium-regular-size":"16px","--wcm-text-medium-regular-weight":"600","--wcm-text-medium-regular-line-height":"20px","--wcm-text-medium-regular-letter-spacing":"-0.03em","--wcm-text-medium-regular-text-transform":"none","--wcm-font-family":"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif","--wcm-font-feature-settings":"'tnum' on, 'lnum' on, 'case' on","--wcm-success-color":"rgb(38,181,98)","--wcm-error-color":"rgb(242, 90, 103)","--wcm-overlay-background-color":"rgba(0, 0, 0, 0.3)","--wcm-overlay-backdrop-filter":"none"}}const L={getPreset(t){return Tr()[t]},setTheme(){const t=document.querySelector(":root"),{themeVariables:e}=Pe.state;if(t){const n=en(en(en({},qi()),Tr()),e);Object.entries(n).forEach(([o,r])=>t.style.setProperty(o,r))}},globalCss:B`*,::after,::before{margin:0;padding:0;box-sizing:border-box;font-style:normal;text-rendering:optimizeSpeed;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-tap-highlight-color:transparent;backface-visibility:hidden}button{cursor:pointer;display:flex;justify-content:center;align-items:center;position:relative;border:none;background-color:transparent;transition:all .2s ease}@media (hover:hover) and (pointer:fine){button:active{transition:all .1s ease;transform:scale(.93)}}button::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;transition:background-color,.2s ease}button:disabled{cursor:not-allowed}button svg,button wcm-text{position:relative;z-index:1}input{border:none;outline:0;appearance:none}img{display:block}::selection{color:var(--wcm-accent-fill-color);background:var(--wcm-accent-color)}`},Vi=B`button{border-radius:var(--wcm-secondary-button-border-radius);height:28px;padding:0 10px;background-color:var(--wcm-accent-color)}button path{fill:var(--wcm-accent-fill-color)}button::after{border-radius:inherit;border:1px solid var(--wcm-color-overlay)}button:disabled::after{background-color:transparent}.wcm-icon-left svg{margin-right:5px}.wcm-icon-right svg{margin-left:5px}button:active::after{background-color:var(--wcm-color-overlay)}.wcm-ghost,.wcm-ghost:active::after,.wcm-outline{background-color:transparent}.wcm-ghost:active{opacity:.5}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}.wcm-ghost:hover::after{background-color:transparent}.wcm-ghost:hover{opacity:.5}}button:disabled{background-color:var(--wcm-color-bg-3);pointer-events:none}.wcm-ghost::after{border-color:transparent}.wcm-ghost path{fill:var(--wcm-color-fg-2)}.wcm-outline path{fill:var(--wcm-accent-color)}.wcm-outline:disabled{background-color:transparent;opacity:.5}`;var Zi=Object.defineProperty,Ki=Object.getOwnPropertyDescriptor,Se=(t,e,n,o)=>{for(var r=o>1?void 0:o?Ki(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&Zi(e,n,r),r};let se=class extends S{constructor(){super(...arguments),this.disabled=!1,this.iconLeft=void 0,this.iconRight=void 0,this.onClick=()=>null,this.variant="default"}render(){const t={"wcm-icon-left":this.iconLeft!==void 0,"wcm-icon-right":this.iconRight!==void 0,"wcm-ghost":this.variant==="ghost","wcm-outline":this.variant==="outline"};let e="inverse";return this.variant==="ghost"&&(e="secondary"),this.variant==="outline"&&(e="accent"),f``}};se.styles=[L.globalCss,Vi];Se([M({type:Boolean})],se.prototype,"disabled",2);Se([M()],se.prototype,"iconLeft",2);Se([M()],se.prototype,"iconRight",2);Se([M()],se.prototype,"onClick",2);Se([M()],se.prototype,"variant",2);se=Se([N("wcm-button")],se);const Yi=B`:host{display:inline-block}button{padding:0 15px 1px;height:40px;border-radius:var(--wcm-button-border-radius);color:var(--wcm-accent-fill-color);background-color:var(--wcm-accent-color)}button::after{content:'';top:0;bottom:0;left:0;right:0;position:absolute;background-color:transparent;border-radius:inherit;transition:background-color .2s ease;border:1px solid var(--wcm-color-overlay)}button:active::after{background-color:var(--wcm-color-overlay)}button:disabled{padding-bottom:0;background-color:var(--wcm-color-bg-3);color:var(--wcm-color-fg-3)}.wcm-secondary{color:var(--wcm-accent-color);background-color:transparent}.wcm-secondary::after{display:none}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}}`;var Gi=Object.defineProperty,Qi=Object.getOwnPropertyDescriptor,Tn=(t,e,n,o)=>{for(var r=o>1?void 0:o?Qi(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&Gi(e,n,r),r};let qe=class extends S{constructor(){super(...arguments),this.disabled=!1,this.variant="primary"}render(){const t={"wcm-secondary":this.variant==="secondary"};return f``}};qe.styles=[L.globalCss,Yi];Tn([M({type:Boolean})],qe.prototype,"disabled",2);Tn([M()],qe.prototype,"variant",2);qe=Tn([N("wcm-button-big")],qe);const Ji=B`:host{background-color:var(--wcm-color-bg-2);border-top:1px solid var(--wcm-color-bg-3)}div{padding:10px 20px;display:inherit;flex-direction:inherit;align-items:inherit;width:inherit;justify-content:inherit}`;var Xi=Object.defineProperty,es=Object.getOwnPropertyDescriptor,ts=(t,e,n,o)=>{for(var r=o>1?void 0:o?es(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&Xi(e,n,r),r};let dn=class extends S{render(){return f`
`}};dn.styles=[L.globalCss,Ji];dn=ts([N("wcm-info-footer")],dn);const U={CROSS_ICON:j``,WALLET_CONNECT_LOGO:j``,WALLET_CONNECT_ICON:j``,WALLET_CONNECT_ICON_COLORED:j``,BACK_ICON:j``,COPY_ICON:j``,RETRY_ICON:j``,DESKTOP_ICON:j``,MOBILE_ICON:j``,ARROW_DOWN_ICON:j``,ARROW_UP_RIGHT_ICON:j``,ARROW_RIGHT_ICON:j``,QRCODE_ICON:j``,SCAN_ICON:j``,CHECKMARK_ICON:j``,SEARCH_ICON:j``,WALLET_PLACEHOLDER:j``,GLOBE_ICON:j``},ns=B`.wcm-toolbar-placeholder{top:0;bottom:0;left:0;right:0;width:100%;position:absolute;display:block;pointer-events:none;height:100px;border-radius:calc(var(--wcm-background-border-radius) * .9);background-color:var(--wcm-background-color);background-position:center;background-size:cover}.wcm-toolbar{height:38px;display:flex;position:relative;margin:5px 15px 5px 5px;justify-content:space-between;align-items:center}.wcm-toolbar img,.wcm-toolbar svg{height:28px;object-position:left center;object-fit:contain}#wcm-wc-logo path{fill:var(--wcm-accent-fill-color)}button{width:28px;height:28px;border-radius:var(--wcm-icon-button-border-radius);border:0;display:flex;justify-content:center;align-items:center;cursor:pointer;background-color:var(--wcm-color-bg-1);box-shadow:0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-bg-2)}button svg{display:block;object-position:center}button path{fill:var(--wcm-color-fg-1)}.wcm-toolbar div{display:flex}@media(hover:hover){button:hover{background-color:var(--wcm-color-bg-2)}}`;var rs=Object.defineProperty,os=Object.getOwnPropertyDescriptor,is=(t,e,n,o)=>{for(var r=o>1?void 0:o?os(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&rs(e,n,r),r};let un=class extends S{render(){return f`
${U.WALLET_CONNECT_LOGO}
`}};un.styles=[L.globalCss,ns];un=is([N("wcm-modal-backcard")],un);const ss=B`main{padding:20px;padding-top:0;width:100%}`;var ls=Object.defineProperty,as=Object.getOwnPropertyDescriptor,cs=(t,e,n,o)=>{for(var r=o>1?void 0:o?as(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&ls(e,n,r),r};let hn=class extends S{render(){return f`
`}};hn.styles=[L.globalCss,ss];hn=cs([N("wcm-modal-content")],hn);const ds=B`footer{padding:10px;display:flex;flex-direction:column;align-items:inherit;justify-content:inherit;border-top:1px solid var(--wcm-color-bg-2)}`;var us=Object.defineProperty,hs=Object.getOwnPropertyDescriptor,fs=(t,e,n,o)=>{for(var r=o>1?void 0:o?hs(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&us(e,n,r),r};let fn=class extends S{render(){return f`
`}};fn.styles=[L.globalCss,ds];fn=fs([N("wcm-modal-footer")],fn);const ms=B`header{display:flex;justify-content:center;align-items:center;padding:20px;position:relative}.wcm-border{border-bottom:1px solid var(--wcm-color-bg-2);margin-bottom:20px}header button{padding:15px 20px}header button:active{opacity:.5}@media(hover:hover){header button:hover{opacity:.5}}.wcm-back-btn{position:absolute;left:0}.wcm-action-btn{position:absolute;right:0}path{fill:var(--wcm-accent-color)}`;var ps=Object.defineProperty,gs=Object.getOwnPropertyDescriptor,Ge=(t,e,n,o)=>{for(var r=o>1?void 0:o?gs(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&ps(e,n,r),r};let ge=class extends S{constructor(){super(...arguments),this.title="",this.onAction=void 0,this.actionIcon=void 0,this.border=!1}backBtnTemplate(){return f``}actionBtnTemplate(){return f``}render(){const t={"wcm-border":this.border},e=k.state.history.length>1,n=this.title?f`${this.title}`:f``;return f`
${e?this.backBtnTemplate():null} ${n} ${this.onAction?this.actionBtnTemplate():null}
`}};ge.styles=[L.globalCss,ms];Ge([M()],ge.prototype,"title",2);Ge([M()],ge.prototype,"onAction",2);Ge([M()],ge.prototype,"actionIcon",2);Ge([M({type:Boolean})],ge.prototype,"border",2);ge=Ge([N("wcm-modal-header")],ge);const T={MOBILE_BREAKPOINT:600,WCM_RECENT_WALLET_DATA:"WCM_RECENT_WALLET_DATA",EXPLORER_WALLET_URL:"https://explorer.walletconnect.com/?type=wallet",getShadowRootElement(t,e){const n=t.renderRoot.querySelector(e);if(!n)throw new Error(`${e} not found`);return n},getWalletIcon({id:t,image_id:e}){const{walletImages:n}=fe.state;return n!=null&&n[t]?n[t]:e?z.getWalletImageUrl(e):""},getWalletName(t,e=!1){return e&&t.length>8?`${t.substring(0,8)}..`:t},isMobileAnimation(){return window.innerWidth<=T.MOBILE_BREAKPOINT},async preloadImage(t){const e=new Promise((n,o)=>{const r=new Image;r.onload=n,r.onerror=o,r.crossOrigin="anonymous",r.src=t});return Promise.race([e,O.wait(3e3)])},getErrorMessage(t){return t instanceof Error?t.message:"Unknown Error"},debounce(t,e=500){let n;return(...o)=>{function r(){t(...o)}n&&clearTimeout(n),n=setTimeout(r,e)}},handleMobileLinking(t,e="_self"){const{walletConnectUri:n}=K.state,{mobile:o,name:r}=t,i=o==null?void 0:o.native,s=o==null?void 0:o.universal;T.setRecentWallet(t);function l(a){if(i){const c=O.formatNativeUrl(i,a,r);O.openHref(c,e)}else if(s){const c=O.formatUniversalUrl(s,a,r);O.openHref(c,e)}}n&&l(n)},handleAndroidLinking(){const{walletConnectUri:t}=K.state;t&&(O.setWalletConnectAndroidDeepLink(t),O.openHref(t,O.isTelegram()?"_blank":"_self"))},async handleUriCopy(){const{walletConnectUri:t}=K.state;if(t)try{await navigator.clipboard.writeText(t),re.openToast("Link copied","success")}catch{re.openToast("Failed to copy","error")}},getCustomImageUrls(){const{walletImages:t}=fe.state,e=Object.values(t??{});return Object.values(e)},truncate(t,e=8){return t.length<=e?t:`${t.substring(0,4)}...${t.substring(t.length-4)}`},setRecentWallet(t){try{localStorage.setItem(T.WCM_RECENT_WALLET_DATA,JSON.stringify(t))}catch{console.info("Unable to set recent wallet")}},getRecentWallet(){try{const t=localStorage.getItem(T.WCM_RECENT_WALLET_DATA);return t?JSON.parse(t):void 0}catch{console.info("Unable to get recent wallet")}},caseSafeIncludes(t,e){return t.toUpperCase().includes(e.toUpperCase())},openWalletExplorerUrl(){O.openHref(T.EXPLORER_WALLET_URL,"_blank")},getCachedRouterWalletPlatforms(){const{desktop:t,mobile:e}=O.getWalletRouterData(),n=!!(t!=null&&t.native),o=!!(t!=null&&t.universal),r=!!(e!=null&&e.native)||!!(e!=null&&e.universal);return{isDesktop:n,isMobile:r,isWeb:o}},goToConnectingView(t){k.setData({Wallet:t});const e=O.isMobile(),{isDesktop:n,isWeb:o,isMobile:r}=T.getCachedRouterWalletPlatforms();e?r?(k.push("MobileConnecting"),!O.isAndroid()&&O.isTelegram()&&this.handleMobileLinking(t,"_blank")):o?k.push("WebConnecting"):k.push("InstallWallet"):n?k.push("DesktopConnecting"):o?k.push("WebConnecting"):r?k.push("MobileQrcodeConnecting"):k.push("InstallWallet")}},ws=B`.wcm-router{overflow:hidden;will-change:transform}.wcm-content{display:flex;flex-direction:column}`;var vs=Object.defineProperty,bs=Object.getOwnPropertyDescriptor,Rn=(t,e,n,o)=>{for(var r=o>1?void 0:o?bs(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&vs(e,n,r),r};let Ve=class extends S{constructor(){super(),this.view=k.state.view,this.prevView=k.state.view,this.unsubscribe=void 0,this.oldHeight="0px",this.resizeObserver=void 0,this.unsubscribe=k.subscribe(t=>{this.view!==t.view&&this.onChangeRoute()})}firstUpdated(){this.resizeObserver=new ResizeObserver(([t])=>{const e=`${t.contentRect.height}px`;this.oldHeight!=="0px"&&he(this.routerEl,{height:[this.oldHeight,e]},{duration:.2}),this.oldHeight=e}),this.resizeObserver.observe(this.contentEl)}disconnectedCallback(){var t,e;(t=this.unsubscribe)==null||t.call(this),(e=this.resizeObserver)==null||e.disconnect()}get routerEl(){return T.getShadowRootElement(this,".wcm-router")}get contentEl(){return T.getShadowRootElement(this,".wcm-content")}viewTemplate(){switch(this.view){case"ConnectWallet":return f``;case"DesktopConnecting":return f``;case"MobileConnecting":return f``;case"WebConnecting":return f``;case"MobileQrcodeConnecting":return f``;case"WalletExplorer":return f``;case"Qrcode":return f``;case"InstallWallet":return f``;default:return f`
Not Found
`}}async onChangeRoute(){await he(this.routerEl,{opacity:[1,0],scale:[1,1.02]},{duration:.15,delay:.1}).finished,this.view=k.state.view,he(this.routerEl,{opacity:[0,1],scale:[.99,1]},{duration:.37,delay:.05})}render(){return f`
${this.viewTemplate()}
`}};Ve.styles=[L.globalCss,ws];Rn([q()],Ve.prototype,"view",2);Rn([q()],Ve.prototype,"prevView",2);Ve=Rn([N("wcm-modal-router")],Ve);const ys=B`div{height:36px;width:max-content;display:flex;justify-content:center;align-items:center;padding:9px 15px 11px;position:absolute;top:12px;box-shadow:0 6px 14px -6px rgba(10,16,31,.3),0 10px 32px -4px rgba(10,16,31,.15);z-index:2;left:50%;transform:translateX(-50%);pointer-events:none;backdrop-filter:blur(20px) saturate(1.8);-webkit-backdrop-filter:blur(20px) saturate(1.8);border-radius:var(--wcm-notification-border-radius);border:1px solid var(--wcm-color-overlay);background-color:var(--wcm-color-overlay)}svg{margin-right:5px}@-moz-document url-prefix(){div{background-color:var(--wcm-color-bg-3)}}.wcm-success path{fill:var(--wcm-accent-color)}.wcm-error path{fill:var(--wcm-error-color)}`;var xs=Object.defineProperty,$s=Object.getOwnPropertyDescriptor,to=(t,e,n,o)=>{for(var r=o>1?void 0:o?$s(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&xs(e,n,r),r};let ct=class extends S{constructor(){super(),this.open=!1,this.unsubscribe=void 0,this.timeout=void 0,this.unsubscribe=re.subscribe(t=>{t.open?(this.open=!0,this.timeout=setTimeout(()=>re.closeToast(),2200)):(this.open=!1,clearTimeout(this.timeout))})}disconnectedCallback(){var t;(t=this.unsubscribe)==null||t.call(this),clearTimeout(this.timeout),re.closeToast()}render(){const{message:t,variant:e}=re.state,n={"wcm-success":e==="success","wcm-error":e==="error"};return this.open?f`
${e==="success"?U.CHECKMARK_ICON:null} ${e==="error"?U.CROSS_ICON:null}${t}
`:null}};ct.styles=[L.globalCss,ys];to([q()],ct.prototype,"open",2);ct=to([N("wcm-modal-toast")],ct);const Cs=.1,Rr=2.5,J=7;function tn(t,e,n){return t===e?!1:(t-e<0?e-t:t-e)<=n+Cs}function _s(t,e){const n=Array.prototype.slice.call(ki.create(t,{errorCorrectionLevel:e}).modules.data,0),o=Math.sqrt(n.length);return n.reduce((r,i,s)=>(s%o===0?r.push([i]):r[r.length-1].push(i))&&r,[])}const Es={generate(t,e,n){const o="#141414",r="#ffffff",i=[],s=_s(t,"Q"),l=e/s.length,a=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];a.forEach(({x:b,y:g})=>{const D=(s.length-J)*l*b,p=(s.length-J)*l*g,E=.45;for(let y=0;y`)}});const c=Math.floor((n+25)/l),h=s.length/2-c/2,w=s.length/2+c/2-1,d=[];s.forEach((b,g)=>{b.forEach((D,p)=>{if(s[g][p]&&!(gs.length-(J+1)&&ps.length-(J+1))&&!(g>h&&gh&&p{u[b]?u[b].push(g):u[b]=[g]}),Object.entries(u).map(([b,g])=>{const D=g.filter(p=>g.every(E=>!tn(p,E,l)));return[Number(b),D]}).forEach(([b,g])=>{g.forEach(D=>{i.push(j``)})}),Object.entries(u).filter(([b,g])=>g.length>1).map(([b,g])=>{const D=g.filter(p=>g.some(E=>tn(p,E,l)));return[Number(b),D]}).map(([b,g])=>{g.sort((p,E)=>py.some($=>tn(p,$,l)));E?E.push(p):D.push([p])}return[b,D.map(p=>[p[0],p[p.length-1]])]}).forEach(([b,g])=>{g.forEach(([D,p])=>{i.push(j``)})}),i}},As=B`@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}div{position:relative;user-select:none;display:block;overflow:hidden;aspect-ratio:1/1;animation:fadeIn ease .2s}.wcm-dark{background-color:#fff;border-radius:var(--wcm-container-border-radius);padding:18px;box-shadow:0 2px 5px #000}svg:first-child,wcm-wallet-image{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{width:25%;height:25%;border-radius:var(--wcm-wallet-icon-border-radius)}svg:first-child{transform:translateY(-50%) translateX(-50%) scale(.9)}svg:first-child path:first-child{fill:var(--wcm-accent-color)}svg:first-child path:last-child{stroke:var(--wcm-color-overlay)}`;var Ps=Object.defineProperty,Os=Object.getOwnPropertyDescriptor,De=(t,e,n,o)=>{for(var r=o>1?void 0:o?Os(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&Ps(e,n,r),r};let le=class extends S{constructor(){super(...arguments),this.uri="",this.size=0,this.imageId=void 0,this.walletId=void 0,this.imageUrl=void 0}svgTemplate(){const e=Pe.state.themeMode==="light"?this.size:this.size-18*2;return j`${Es.generate(this.uri,e,e/4)}`}render(){const t={"wcm-dark":Pe.state.themeMode==="dark"};return f`
${this.walletId||this.imageUrl?f``:U.WALLET_CONNECT_ICON_COLORED} ${this.svgTemplate()}
`}};le.styles=[L.globalCss,As];De([M()],le.prototype,"uri",2);De([M({type:Number})],le.prototype,"size",2);De([M()],le.prototype,"imageId",2);De([M()],le.prototype,"walletId",2);De([M()],le.prototype,"imageUrl",2);le=De([N("wcm-qrcode")],le);const Is=B`:host{position:relative;height:28px;width:80%}input{width:100%;height:100%;line-height:28px!important;border-radius:var(--wcm-input-border-radius);font-style:normal;font-family:-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,Ubuntu,'Helvetica Neue',sans-serif;font-feature-settings:'case' on;font-weight:500;font-size:16px;letter-spacing:-.03em;padding:0 10px 0 34px;transition:.2s all ease;color:var(--wcm-color-fg-1);background-color:var(--wcm-color-bg-3);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay);caret-color:var(--wcm-accent-color)}input::placeholder{color:var(--wcm-color-fg-2)}svg{left:10px;top:4px;pointer-events:none;position:absolute;width:20px;height:20px}input:focus-within{box-shadow:inset 0 0 0 1px var(--wcm-accent-color)}path{fill:var(--wcm-color-fg-2)}`;var Ts=Object.defineProperty,Rs=Object.getOwnPropertyDescriptor,no=(t,e,n,o)=>{for(var r=o>1?void 0:o?Rs(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&Ts(e,n,r),r};let dt=class extends S{constructor(){super(...arguments),this.onChange=()=>null}render(){return f` ${U.SEARCH_ICON}`}};dt.styles=[L.globalCss,Is];no([M()],dt.prototype,"onChange",2);dt=no([N("wcm-search-input")],dt);const Ms=B`@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}100%{stroke-dasharray:90,150;stroke-dashoffset:-124}}svg{animation:rotate 2s linear infinite;display:flex;justify-content:center;align-items:center}svg circle{stroke-linecap:round;animation:dash 1.5s ease infinite;stroke:var(--wcm-accent-color)}`;var Ss=Object.defineProperty,Ds=Object.getOwnPropertyDescriptor,Ls=(t,e,n,o)=>{for(var r=o>1?void 0:o?Ds(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&Ss(e,n,r),r};let mn=class extends S{render(){return f``}};mn.styles=[L.globalCss,Ms];mn=Ls([N("wcm-spinner")],mn);const Ns=B`span{font-style:normal;font-family:var(--wcm-font-family);font-feature-settings:var(--wcm-font-feature-settings)}.wcm-xsmall-bold{font-family:var(--wcm-text-xsmall-bold-font-family);font-weight:var(--wcm-text-xsmall-bold-weight);font-size:var(--wcm-text-xsmall-bold-size);line-height:var(--wcm-text-xsmall-bold-line-height);letter-spacing:var(--wcm-text-xsmall-bold-letter-spacing);text-transform:var(--wcm-text-xsmall-bold-text-transform)}.wcm-xsmall-regular{font-family:var(--wcm-text-xsmall-regular-font-family);font-weight:var(--wcm-text-xsmall-regular-weight);font-size:var(--wcm-text-xsmall-regular-size);line-height:var(--wcm-text-xsmall-regular-line-height);letter-spacing:var(--wcm-text-xsmall-regular-letter-spacing);text-transform:var(--wcm-text-xsmall-regular-text-transform)}.wcm-small-thin{font-family:var(--wcm-text-small-thin-font-family);font-weight:var(--wcm-text-small-thin-weight);font-size:var(--wcm-text-small-thin-size);line-height:var(--wcm-text-small-thin-line-height);letter-spacing:var(--wcm-text-small-thin-letter-spacing);text-transform:var(--wcm-text-small-thin-text-transform)}.wcm-small-regular{font-family:var(--wcm-text-small-regular-font-family);font-weight:var(--wcm-text-small-regular-weight);font-size:var(--wcm-text-small-regular-size);line-height:var(--wcm-text-small-regular-line-height);letter-spacing:var(--wcm-text-small-regular-letter-spacing);text-transform:var(--wcm-text-small-regular-text-transform)}.wcm-medium-regular{font-family:var(--wcm-text-medium-regular-font-family);font-weight:var(--wcm-text-medium-regular-weight);font-size:var(--wcm-text-medium-regular-size);line-height:var(--wcm-text-medium-regular-line-height);letter-spacing:var(--wcm-text-medium-regular-letter-spacing);text-transform:var(--wcm-text-medium-regular-text-transform)}.wcm-big-bold{font-family:var(--wcm-text-big-bold-font-family);font-weight:var(--wcm-text-big-bold-weight);font-size:var(--wcm-text-big-bold-size);line-height:var(--wcm-text-big-bold-line-height);letter-spacing:var(--wcm-text-big-bold-letter-spacing);text-transform:var(--wcm-text-big-bold-text-transform)}:host(*){color:var(--wcm-color-fg-1)}.wcm-color-primary{color:var(--wcm-color-fg-1)}.wcm-color-secondary{color:var(--wcm-color-fg-2)}.wcm-color-tertiary{color:var(--wcm-color-fg-3)}.wcm-color-inverse{color:var(--wcm-accent-fill-color)}.wcm-color-accnt{color:var(--wcm-accent-color)}.wcm-color-error{color:var(--wcm-error-color)}`;var Bs=Object.defineProperty,Ws=Object.getOwnPropertyDescriptor,Mn=(t,e,n,o)=>{for(var r=o>1?void 0:o?Ws(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&Bs(e,n,r),r};let Ze=class extends S{constructor(){super(...arguments),this.variant="medium-regular",this.color="primary"}render(){const t={"wcm-big-bold":this.variant==="big-bold","wcm-medium-regular":this.variant==="medium-regular","wcm-small-regular":this.variant==="small-regular","wcm-small-thin":this.variant==="small-thin","wcm-xsmall-regular":this.variant==="xsmall-regular","wcm-xsmall-bold":this.variant==="xsmall-bold","wcm-color-primary":this.color==="primary","wcm-color-secondary":this.color==="secondary","wcm-color-tertiary":this.color==="tertiary","wcm-color-inverse":this.color==="inverse","wcm-color-accnt":this.color==="accent","wcm-color-error":this.color==="error"};return f``}};Ze.styles=[L.globalCss,Ns];Mn([M()],Ze.prototype,"variant",2);Mn([M()],Ze.prototype,"color",2);Ze=Mn([N("wcm-text")],Ze);const Us=B`button{width:100%;height:100%;border-radius:var(--wcm-button-hover-highlight-border-radius);display:flex;align-items:flex-start}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}button>div{width:80px;padding:5px 0;display:flex;flex-direction:column;align-items:center}wcm-text{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}wcm-wallet-image{height:60px;width:60px;transition:all .2s ease;border-radius:var(--wcm-wallet-icon-border-radius);margin-bottom:5px}.wcm-sublabel{margin-top:2px}`;var js=Object.defineProperty,ks=Object.getOwnPropertyDescriptor,ce=(t,e,n,o)=>{for(var r=o>1?void 0:o?ks(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&js(e,n,r),r};let Y=class extends S{constructor(){super(...arguments),this.onClick=()=>null,this.name="",this.walletId="",this.label=void 0,this.imageId=void 0,this.installed=!1,this.recent=!1}sublabelTemplate(){return this.recent?f`RECENT`:this.installed?f`INSTALLED`:null}handleClick(){uo.click({name:"WALLET_BUTTON",walletId:this.walletId}),this.onClick()}render(){var t;return f``}};Y.styles=[L.globalCss,Us];ce([M()],Y.prototype,"onClick",2);ce([M()],Y.prototype,"name",2);ce([M()],Y.prototype,"walletId",2);ce([M()],Y.prototype,"label",2);ce([M()],Y.prototype,"imageId",2);ce([M({type:Boolean})],Y.prototype,"installed",2);ce([M({type:Boolean})],Y.prototype,"recent",2);Y=ce([N("wcm-wallet-button")],Y);const Hs=B`:host{display:block}div{overflow:hidden;position:relative;border-radius:inherit;width:100%;height:100%;background-color:var(--wcm-color-overlay)}svg{position:relative;width:100%;height:100%}div::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;border-radius:inherit;border:1px solid var(--wcm-color-overlay)}div img{width:100%;height:100%;object-fit:cover;object-position:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;var Fs=Object.defineProperty,zs=Object.getOwnPropertyDescriptor,pt=(t,e,n,o)=>{for(var r=o>1?void 0:o?zs(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&Fs(e,n,r),r};let Re=class extends S{constructor(){super(...arguments),this.walletId="",this.imageId=void 0,this.imageUrl=void 0}render(){var t;const e=(t=this.imageUrl)!=null&&t.length?this.imageUrl:T.getWalletIcon({id:this.walletId,image_id:this.imageId});return f`${e.length?f`
${this.id}
`:U.WALLET_PLACEHOLDER}`}};Re.styles=[L.globalCss,Hs];pt([M()],Re.prototype,"walletId",2);pt([M()],Re.prototype,"imageId",2);pt([M()],Re.prototype,"imageUrl",2);Re=pt([N("wcm-wallet-image")],Re);var qs=Object.defineProperty,Vs=Object.getOwnPropertyDescriptor,ro=(t,e,n,o)=>{for(var r=o>1?void 0:o?Vs(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&qs(e,n,r),r};let pn=class extends S{constructor(){super(),this.preload=!0,this.preloadData()}async loadImages(t){try{t!=null&&t.length&&await Promise.all(t.map(async e=>T.preloadImage(e)))}catch{console.info("Unsuccessful attempt at preloading some images",t)}}async preloadListings(){if(fe.state.enableExplorer){await z.getRecomendedWallets(),K.setIsDataLoaded(!0);const{recomendedWallets:t}=z.state,e=t.map(n=>T.getWalletIcon(n));await this.loadImages(e)}else K.setIsDataLoaded(!0)}async preloadCustomImages(){const t=T.getCustomImageUrls();await this.loadImages(t)}async preloadData(){try{this.preload&&(this.preload=!1,await Promise.all([this.preloadListings(),this.preloadCustomImages()]))}catch(t){console.error(t),re.openToast("Failed preloading","error")}}};ro([q()],pn.prototype,"preload",2);pn=ro([N("wcm-explorer-context")],pn);var Zs=Object.defineProperty,Ks=Object.getOwnPropertyDescriptor,Ys=(t,e,n,o)=>{for(var r=o>1?void 0:o?Ks(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&Zs(e,n,r),r};let Mr=class extends S{constructor(){super(),this.unsubscribeTheme=void 0,L.setTheme(),this.unsubscribeTheme=Pe.subscribe(L.setTheme)}disconnectedCallback(){var t;(t=this.unsubscribeTheme)==null||t.call(this)}};Mr=Ys([N("wcm-theme-context")],Mr);const Gs=B`@keyframes scroll{0%{transform:translate3d(0,0,0)}100%{transform:translate3d(calc(-70px * 9),0,0)}}.wcm-slider{position:relative;overflow-x:hidden;padding:10px 0;margin:0 -20px;width:calc(100% + 40px)}.wcm-track{display:flex;width:calc(70px * 18);animation:scroll 20s linear infinite;opacity:.7}.wcm-track svg{margin:0 5px}wcm-wallet-image{width:60px;height:60px;margin:0 5px;border-radius:var(--wcm-wallet-icon-border-radius)}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-title{display:flex;align-items:center;margin-bottom:10px}.wcm-title svg{margin-right:6px}.wcm-title path{fill:var(--wcm-accent-color)}wcm-modal-footer .wcm-title{padding:0 10px}wcm-button-big{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);filter:drop-shadow(0 0 17px var(--wcm-color-bg-1))}wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-info-footer wcm-text{text-align:center;margin-bottom:15px}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;var Qs=Object.defineProperty,Js=Object.getOwnPropertyDescriptor,Xs=(t,e,n,o)=>{for(var r=o>1?void 0:o?Js(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&Qs(e,n,r),r};let gn=class extends S{onGoToQrcode(){k.push("Qrcode")}render(){const{recomendedWallets:t}=z.state,e=[...t,...t],n=O.RECOMMENDED_WALLET_AMOUNT*2;return f`
${U.MOBILE_ICON}WalletConnect
${[...Array(n)].map((o,r)=>{const i=e[r%e.length];return i?f``:U.WALLET_PLACEHOLDER})}
Select Wallet
Choose WalletConnect to see supported apps on your device`}};gn.styles=[L.globalCss,Gs];gn=Xs([N("wcm-android-wallet-selection")],gn);const el=B`@keyframes loading{to{stroke-dashoffset:0}}@keyframes shake{10%,90%{transform:translate3d(-1px,0,0)}20%,80%{transform:translate3d(1px,0,0)}30%,50%,70%{transform:translate3d(-2px,0,0)}40%,60%{transform:translate3d(2px,0,0)}}:host{display:flex;flex-direction:column;align-items:center}div{position:relative;width:110px;height:110px;display:flex;justify-content:center;align-items:center;margin:40px 0 20px 0;transform:translate3d(0,0,0)}svg{position:absolute;width:110px;height:110px;fill:none;stroke:transparent;stroke-linecap:round;stroke-width:2px;top:0;left:0}use{stroke:var(--wcm-accent-color);animation:loading 1s linear infinite}wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:90px;height:90px}wcm-text{margin-bottom:40px}.wcm-error svg{stroke:var(--wcm-error-color)}.wcm-error use{display:none}.wcm-error{animation:shake .4s cubic-bezier(.36,.07,.19,.97) both}.wcm-stale svg,.wcm-stale use{display:none}`;var tl=Object.defineProperty,nl=Object.getOwnPropertyDescriptor,Le=(t,e,n,o)=>{for(var r=o>1?void 0:o?nl(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&tl(e,n,r),r};let ae=class extends S{constructor(){super(...arguments),this.walletId=void 0,this.imageId=void 0,this.isError=!1,this.isStale=!1,this.label=""}svgLoaderTemplate(){var t,e;const i=(e=(t=Pe.state.themeVariables)==null?void 0:t["--wcm-wallet-icon-large-border-radius"])!=null?e:L.getPreset("--wcm-wallet-icon-large-border-radius");let s=0;i.includes("%")?s=88/100*parseInt(i,10):s=parseInt(i,10),s*=1.17;const l=317-s*1.57,a=425-s*1.8;return f``}render(){const t={"wcm-error":this.isError,"wcm-stale":this.isStale};return f`
${this.svgLoaderTemplate()}
${this.isError?"Connection declined":this.label}`}};ae.styles=[L.globalCss,el];Le([M()],ae.prototype,"walletId",2);Le([M()],ae.prototype,"imageId",2);Le([M({type:Boolean})],ae.prototype,"isError",2);Le([M({type:Boolean})],ae.prototype,"isStale",2);Le([M()],ae.prototype,"label",2);ae=Le([N("wcm-connector-waiting")],ae);const Ae={manualWallets(){var t,e;const{mobileWallets:n,desktopWallets:o}=fe.state,r=(t=Ae.recentWallet())==null?void 0:t.id,i=O.isMobile()?n:o,s=i==null?void 0:i.filter(l=>r!==l.id);return(e=O.isMobile()?s==null?void 0:s.map(({id:l,name:a,links:c})=>({id:l,name:a,mobile:c,links:c})):s==null?void 0:s.map(({id:l,name:a,links:c})=>({id:l,name:a,desktop:c,links:c})))!=null?e:[]},recentWallet(){return T.getRecentWallet()},recomendedWallets(t=!1){var e;const n=t||(e=Ae.recentWallet())==null?void 0:e.id,{recomendedWallets:o}=z.state;return o.filter(i=>n!==i.id)}},ie={onConnecting(t){T.goToConnectingView(t)},manualWalletsTemplate(){return Ae.manualWallets().map(e=>f``)},recomendedWalletsTemplate(t=!1){return Ae.recomendedWallets(t).map(n=>f``)},recentWalletTemplate(){const t=Ae.recentWallet();if(t)return f``}},rl=B`.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-desktop-title,.wcm-mobile-title{display:flex;align-items:center}.wcm-mobile-title{justify-content:space-between;margin-bottom:20px;margin-top:-10px}.wcm-desktop-title{margin-bottom:10px;padding:0 10px}.wcm-subtitle{display:flex;align-items:center}.wcm-subtitle:last-child path{fill:var(--wcm-color-fg-3)}.wcm-desktop-title svg,.wcm-mobile-title svg{margin-right:6px}.wcm-desktop-title path,.wcm-mobile-title path{fill:var(--wcm-accent-color)}`;var ol=Object.defineProperty,il=Object.getOwnPropertyDescriptor,sl=(t,e,n,o)=>{for(var r=o>1?void 0:o?il(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&ol(e,n,r),r};let wn=class extends S{render(){const{explorerExcludedWalletIds:t,enableExplorer:e}=fe.state,n=t!=="ALL"&&e,o=ie.manualWalletsTemplate(),r=ie.recomendedWalletsTemplate();let s=[ie.recentWalletTemplate(),...o,...r];s=s.filter(Boolean);const l=s.length>4||n;let a=[];l?a=s.slice(0,3):a=s;const c=!!a.length;return f`
${U.MOBILE_ICON}Mobile
${U.SCAN_ICON}Scan with your wallet
${c?f`
${U.DESKTOP_ICON}Desktop
${a} ${l?f``:null}
`:null}`}};wn.styles=[L.globalCss,rl];wn=sl([N("wcm-desktop-wallet-selection")],wn);const ll=B`div{background-color:var(--wcm-color-bg-2);padding:10px 20px 15px 20px;border-top:1px solid var(--wcm-color-bg-3);text-align:center}a{color:var(--wcm-accent-color);text-decoration:none;transition:opacity .2s ease-in-out;display:inline}a:active{opacity:.8}@media(hover:hover){a:hover{opacity:.8}}`;var al=Object.defineProperty,cl=Object.getOwnPropertyDescriptor,dl=(t,e,n,o)=>{for(var r=o>1?void 0:o?cl(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&al(e,n,r),r};let vn=class extends S{render(){const{termsOfServiceUrl:t,privacyPolicyUrl:e}=fe.state;return t??e?f`
By connecting your wallet to this app, you agree to the app's ${t?f`Terms of Service`:null} ${t&&e?"and":null} ${e?f`Privacy Policy`:null}
`:null}};vn.styles=[L.globalCss,ll];vn=dl([N("wcm-legal-notice")],vn);const ul=B`div{display:grid;grid-template-columns:repeat(4,80px);margin:0 -10px;justify-content:space-between;row-gap:10px}`;var hl=Object.defineProperty,fl=Object.getOwnPropertyDescriptor,ml=(t,e,n,o)=>{for(var r=o>1?void 0:o?fl(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&hl(e,n,r),r};let bn=class extends S{onQrcode(){k.push("Qrcode")}render(){const{explorerExcludedWalletIds:t,enableExplorer:e}=fe.state,n=t!=="ALL"&&e,o=ie.manualWalletsTemplate(),r=ie.recomendedWalletsTemplate();let s=[ie.recentWalletTemplate(),...o,...r];s=s.filter(Boolean);const l=s.length>8||n;let a=[];l?a=s.slice(0,7):a=s;const c=!!a.length;return f`${c?f`
${a} ${l?f``:null}
`:null}`}};bn.styles=[L.globalCss,ul];bn=ml([N("wcm-mobile-wallet-selection")],bn);const pl=B`:host{all:initial}.wcm-overlay{top:0;bottom:0;left:0;right:0;position:fixed;z-index:var(--wcm-z-index);overflow:hidden;display:flex;justify-content:center;align-items:center;opacity:0;pointer-events:none;background-color:var(--wcm-overlay-background-color);backdrop-filter:var(--wcm-overlay-backdrop-filter)}@media(max-height:720px) and (orientation:landscape){.wcm-overlay{overflow:scroll;align-items:flex-start;padding:20px 0}}.wcm-active{pointer-events:auto}.wcm-container{position:relative;max-width:360px;width:100%;outline:0;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) var(--wcm-container-border-radius) var(--wcm-container-border-radius);border:1px solid var(--wcm-color-overlay);overflow:hidden}.wcm-card{width:100%;position:relative;border-radius:var(--wcm-container-border-radius);overflow:hidden;box-shadow:0 6px 14px -6px rgba(10,16,31,.12),0 10px 32px -4px rgba(10,16,31,.1),0 0 0 1px var(--wcm-color-overlay);background-color:var(--wcm-color-bg-1);color:var(--wcm-color-fg-1)}@media(max-width:600px){.wcm-container{max-width:440px;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) 0 0}.wcm-card{border-radius:var(--wcm-container-border-radius) var(--wcm-container-border-radius) 0 0}.wcm-overlay{align-items:flex-end}}@media(max-width:440px){.wcm-container{border:0}}`;var gl=Object.defineProperty,wl=Object.getOwnPropertyDescriptor,Sn=(t,e,n,o)=>{for(var r=o>1?void 0:o?wl(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&gl(e,n,r),r};let Ke=class extends S{constructor(){super(),this.open=!1,this.active=!1,this.unsubscribeModal=void 0,this.abortController=void 0,this.unsubscribeModal=nt.subscribe(t=>{t.open?this.onOpenModalEvent():this.onCloseModalEvent()})}disconnectedCallback(){var t;(t=this.unsubscribeModal)==null||t.call(this)}get overlayEl(){return T.getShadowRootElement(this,".wcm-overlay")}get containerEl(){return T.getShadowRootElement(this,".wcm-container")}toggleBodyScroll(t){if(document.querySelector("body"))if(t){const n=document.getElementById("wcm-styles");n==null||n.remove()}else document.head.insertAdjacentHTML("beforeend",'')}onCloseModal(t){t.target===t.currentTarget&&nt.close()}onOpenModalEvent(){this.toggleBodyScroll(!1),this.addKeyboardEvents(),this.open=!0,setTimeout(async()=>{const t=T.isMobileAnimation()?{y:["50vh","0vh"]}:{scale:[.98,1]},e=.1,n=.2;await Promise.all([he(this.overlayEl,{opacity:[0,1]},{delay:e,duration:n}).finished,he(this.containerEl,t,{delay:e,duration:n}).finished]),this.active=!0},0)}async onCloseModalEvent(){this.toggleBodyScroll(!0),this.removeKeyboardEvents();const t=T.isMobileAnimation()?{y:["0vh","50vh"]}:{scale:[1,.98]},e=.2;await Promise.all([he(this.overlayEl,{opacity:[1,0]},{duration:e}).finished,he(this.containerEl,t,{duration:e}).finished]),this.containerEl.removeAttribute("style"),this.active=!1,this.open=!1}addKeyboardEvents(){this.abortController=new AbortController,window.addEventListener("keydown",t=>{var e;t.key==="Escape"?nt.close():t.key==="Tab"&&((e=t.target)!=null&&e.tagName.includes("wcm-")||this.containerEl.focus())},this.abortController),this.containerEl.focus()}removeKeyboardEvents(){var t;(t=this.abortController)==null||t.abort(),this.abortController=void 0}render(){const t={"wcm-overlay":!0,"wcm-active":this.active};return f`
${this.open?f`
`:null}
`}};Ke.styles=[L.globalCss,pl];Sn([q()],Ke.prototype,"open",2);Sn([q()],Ke.prototype,"active",2);Ke=Sn([N("wcm-modal")],Ke);const vl=B`div{display:flex;margin-top:15px}slot{display:inline-block;margin:0 5px}wcm-button{margin:0 5px}`;var bl=Object.defineProperty,yl=Object.getOwnPropertyDescriptor,Qe=(t,e,n,o)=>{for(var r=o>1?void 0:o?yl(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&bl(e,n,r),r};let we=class extends S{constructor(){super(...arguments),this.isMobile=!1,this.isDesktop=!1,this.isWeb=!1,this.isRetry=!1}onMobile(){O.isMobile()?k.replace("MobileConnecting"):k.replace("MobileQrcodeConnecting")}onDesktop(){k.replace("DesktopConnecting")}onWeb(){k.replace("WebConnecting")}render(){return f`
${this.isRetry?f``:null} ${this.isMobile?f`Mobile`:null} ${this.isDesktop?f`Desktop`:null} ${this.isWeb?f`Web`:null}
`}};we.styles=[L.globalCss,vl];Qe([M({type:Boolean})],we.prototype,"isMobile",2);Qe([M({type:Boolean})],we.prototype,"isDesktop",2);Qe([M({type:Boolean})],we.prototype,"isWeb",2);Qe([M({type:Boolean})],we.prototype,"isRetry",2);we=Qe([N("wcm-platform-selection")],we);const xl=B`button{display:flex;flex-direction:column;padding:5px 10px;border-radius:var(--wcm-button-hover-highlight-border-radius);height:100%;justify-content:flex-start}.wcm-icons{width:60px;height:60px;display:flex;flex-wrap:wrap;padding:7px;border-radius:var(--wcm-wallet-icon-border-radius);justify-content:space-between;align-items:center;margin-bottom:5px;background-color:var(--wcm-color-bg-2);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}.wcm-icons img{width:21px;height:21px;object-fit:cover;object-position:center;border-radius:calc(var(--wcm-wallet-icon-border-radius)/ 2);border:1px solid var(--wcm-color-overlay)}.wcm-icons svg{width:21px;height:21px}.wcm-icons img:nth-child(1),.wcm-icons img:nth-child(2),.wcm-icons svg:nth-child(1),.wcm-icons svg:nth-child(2){margin-bottom:4px}wcm-text{width:100%;text-align:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;var $l=Object.defineProperty,Cl=Object.getOwnPropertyDescriptor,_l=(t,e,n,o)=>{for(var r=o>1?void 0:o?Cl(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&$l(e,n,r),r};let yn=class extends S{onClick(){k.push("WalletExplorer")}render(){const{recomendedWallets:t}=z.state,e=Ae.manualWallets(),n=[...t,...e].reverse().slice(0,4);return f``}};yn.styles=[L.globalCss,xl];yn=_l([N("wcm-view-all-wallets-button")],yn);const El=B`.wcm-qr-container{width:100%;display:flex;justify-content:center;align-items:center;aspect-ratio:1/1}`;var Al=Object.defineProperty,Pl=Object.getOwnPropertyDescriptor,gt=(t,e,n,o)=>{for(var r=o>1?void 0:o?Pl(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&Al(e,n,r),r};let Me=class extends S{constructor(){super(),this.walletId="",this.imageId="",this.uri="",setTimeout(()=>{const{walletConnectUri:t}=K.state;this.uri=t},0)}get overlayEl(){return T.getShadowRootElement(this,".wcm-qr-container")}render(){return f`
${this.uri?f``:f``}
`}};Me.styles=[L.globalCss,El];gt([M()],Me.prototype,"walletId",2);gt([M()],Me.prototype,"imageId",2);gt([q()],Me.prototype,"uri",2);Me=gt([N("wcm-walletconnect-qr")],Me);var Ol=Object.defineProperty,Il=Object.getOwnPropertyDescriptor,Tl=(t,e,n,o)=>{for(var r=o>1?void 0:o?Il(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&Ol(e,n,r),r};let xn=class extends S{viewTemplate(){return O.isAndroid()&&!O.isTelegram()?f``:O.isMobile()?f``:f``}render(){return f`${this.viewTemplate()}`}};xn.styles=[L.globalCss];xn=Tl([N("wcm-connect-wallet-view")],xn);const Rl=B`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;var Ml=Object.defineProperty,Sl=Object.getOwnPropertyDescriptor,oo=(t,e,n,o)=>{for(var r=o>1?void 0:o?Sl(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&Ml(e,n,r),r};let ut=class extends S{constructor(){super(),this.isError=!1,this.openDesktopApp()}onFormatAndRedirect(t){const{desktop:e,name:n}=O.getWalletRouterData(),o=e==null?void 0:e.native,r=e==null?void 0:e.universal;if(o){const i=O.formatNativeUrl(o,t,n);O.openHref(i,"_self")}else if(r){const i=O.formatUniversalUrl(r,t,n);O.openHref(i,"_blank")}}openDesktopApp(){const{walletConnectUri:t}=K.state,e=O.getWalletRouterData();T.setRecentWallet(e),t&&this.onFormatAndRedirect(t)}render(){const{name:t,id:e,image_id:n}=O.getWalletRouterData(),{isMobile:o,isWeb:r}=T.getCachedRouterWalletPlatforms();return f`${`Connection can continue loading if ${t} is not installed on your device`}Retry`}};ut.styles=[L.globalCss,Rl];oo([q()],ut.prototype,"isError",2);ut=oo([N("wcm-desktop-connecting-view")],ut);const Dl=B`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}wcm-button{margin-top:15px}`;var Ll=Object.defineProperty,Nl=Object.getOwnPropertyDescriptor,Bl=(t,e,n,o)=>{for(var r=o>1?void 0:o?Nl(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&Ll(e,n,r),r};let $n=class extends S{onInstall(t){t&&O.openHref(t,"_blank")}render(){const{name:t,id:e,image_id:n,homepage:o}=O.getWalletRouterData();return f`${`Download ${t} to continue. If multiple browser extensions are installed, disable non ${t} ones and try again`}Download`}};$n.styles=[L.globalCss,Dl];$n=Bl([N("wcm-install-wallet-view")],$n);const Wl=B`wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:96px;height:96px;margin-bottom:20px}wcm-info-footer{display:flex;width:100%}.wcm-app-store{justify-content:space-between}.wcm-app-store wcm-wallet-image{margin-right:10px;margin-bottom:0;width:28px;height:28px;border-radius:var(--wcm-wallet-icon-small-border-radius)}.wcm-app-store div{display:flex;align-items:center}.wcm-app-store wcm-button{margin-right:-10px}.wcm-note{flex-direction:column;align-items:center;padding:5px 0}.wcm-note wcm-text{text-align:center}wcm-platform-selection{margin-top:-15px}.wcm-note wcm-text{margin-top:15px}.wcm-note wcm-text span{color:var(--wcm-accent-color)}`;var Ul=Object.defineProperty,jl=Object.getOwnPropertyDescriptor,io=(t,e,n,o)=>{for(var r=o>1?void 0:o?jl(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&Ul(e,n,r),r};let ht=class extends S{constructor(){super(),this.isError=!1,this.openMobileApp()}onFormatAndRedirect(t,e=!1){const{mobile:n,name:o}=O.getWalletRouterData(),r=n==null?void 0:n.native,i=n==null?void 0:n.universal,s=O.isTelegram()?"_blank":"_self";if(t=O.isTelegram()&&O.isAndroid()?encodeURIComponent(t):t,r&&!e){const l=O.formatNativeUrl(r,t,o);O.openHref(l,s)}else if(i){const l=O.formatUniversalUrl(i,t,o);O.openHref(l,s)}}openMobileApp(t=!1){const{walletConnectUri:e}=K.state,n=O.getWalletRouterData();e&&this.onFormatAndRedirect(e,t),T.setRecentWallet(n)}onGoToAppStore(t){t&&O.openHref(t,"_blank")}render(){const{name:t,id:e,image_id:n,app:o,mobile:r}=O.getWalletRouterData(),{isWeb:i}=T.getCachedRouterWalletPlatforms(),s=o==null?void 0:o.ios,l=r==null?void 0:r.universal;return f`Retry${l?f`Still doesn't work? Try this alternate link`:null}
${`Get ${t}`}
App Store
`}};ht.styles=[L.globalCss,Wl];io([q()],ht.prototype,"isError",2);ht=io([N("wcm-mobile-connecting-view")],ht);const kl=B`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;var Hl=Object.defineProperty,Fl=Object.getOwnPropertyDescriptor,zl=(t,e,n,o)=>{for(var r=o>1?void 0:o?Fl(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&Hl(e,n,r),r};let Cn=class extends S{render(){const{name:t,id:e,image_id:n}=O.getWalletRouterData(),{isDesktop:o,isWeb:r}=T.getCachedRouterWalletPlatforms();return f`${`Scan this QR Code with your phone's camera or inside ${t} app`}`}};Cn.styles=[L.globalCss,kl];Cn=zl([N("wcm-mobile-qr-connecting-view")],Cn);var ql=Object.defineProperty,Vl=Object.getOwnPropertyDescriptor,Zl=(t,e,n,o)=>{for(var r=o>1?void 0:o?Vl(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&ql(e,n,r),r};let _n=class extends S{render(){return f``}};_n.styles=[L.globalCss];_n=Zl([N("wcm-qrcode-view")],_n);const Kl=B`wcm-modal-content{height:clamp(200px,60vh,600px);display:block;overflow:scroll;scrollbar-width:none;position:relative;margin-top:1px}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between;margin:-15px -10px;padding-top:20px}wcm-modal-content::after,wcm-modal-content::before{content:'';position:fixed;pointer-events:none;z-index:1;width:100%;height:20px;opacity:1}wcm-modal-content::before{box-shadow:0 -1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(var(--wcm-color-bg-1),rgba(255,255,255,0))}wcm-modal-content::after{box-shadow:0 1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(rgba(255,255,255,0),var(--wcm-color-bg-1));top:calc(100% - 20px)}wcm-modal-content::-webkit-scrollbar{display:none}.wcm-placeholder-block{display:flex;justify-content:center;align-items:center;height:100px;overflow:hidden}.wcm-empty,.wcm-loading{display:flex}.wcm-loading .wcm-placeholder-block{height:100%}.wcm-end-reached .wcm-placeholder-block{height:0;opacity:0}.wcm-empty .wcm-placeholder-block{opacity:1;height:100%}wcm-wallet-button{margin:calc((100% - 60px)/ 3) 0}`;var Yl=Object.defineProperty,Gl=Object.getOwnPropertyDescriptor,Je=(t,e,n,o)=>{for(var r=o>1?void 0:o?Gl(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&Yl(e,n,r),r};const nn=40;let ve=class extends S{constructor(){super(...arguments),this.loading=!z.state.wallets.listings.length,this.firstFetch=!z.state.wallets.listings.length,this.search="",this.endReached=!1,this.intersectionObserver=void 0,this.searchDebounce=T.debounce(t=>{t.length>=1?(this.firstFetch=!0,this.endReached=!1,this.search=t,z.resetSearch(),this.fetchWallets()):this.search&&(this.search="",this.endReached=this.isLastPage(),z.resetSearch())})}firstUpdated(){this.createPaginationObserver()}disconnectedCallback(){var t;(t=this.intersectionObserver)==null||t.disconnect()}get placeholderEl(){return T.getShadowRootElement(this,".wcm-placeholder-block")}createPaginationObserver(){this.intersectionObserver=new IntersectionObserver(([t])=>{t.isIntersecting&&!(this.search&&this.firstFetch)&&this.fetchWallets()}),this.intersectionObserver.observe(this.placeholderEl)}isLastPage(){const{wallets:t,search:e}=z.state,{listings:n,total:o}=this.search?e:t;return o<=nn||n.length>=o}async fetchWallets(){var t;const{wallets:e,search:n}=z.state,{listings:o,total:r,page:i}=this.search?n:e;if(!this.endReached&&(this.firstFetch||r>nn&&o.lengthT.getWalletIcon(c));await Promise.all([...a.map(async c=>T.preloadImage(c)),O.wait(300)]),this.endReached=this.isLastPage()}catch(s){console.error(s),re.openToast(T.getErrorMessage(s),"error")}finally{this.loading=!1,this.firstFetch=!1}}onConnect(t){O.isAndroid()?T.handleMobileLinking(t):T.goToConnectingView(t)}onSearchChange(t){const{value:e}=t.target;this.searchDebounce(e)}render(){const{wallets:t,search:e}=z.state,{listings:n}=this.search?e:t,o=this.loading&&!n.length,r=this.search.length>=3;let i=ie.manualWalletsTemplate(),s=ie.recomendedWalletsTemplate(!0);r&&(i=i.filter(({values:c})=>T.caseSafeIncludes(c[0],this.search)),s=s.filter(({values:c})=>T.caseSafeIncludes(c[0],this.search)));const l=!this.loading&&!n.length&&!s.length,a={"wcm-loading":o,"wcm-end-reached":this.endReached||!this.loading,"wcm-empty":l};return f`
${o?null:i} ${o?null:s} ${o?null:n.map(c=>f`${c?f``:null}`)}
${l?f`No results found`:null} ${!l&&this.loading?f``:null}
`}};ve.styles=[L.globalCss,Kl];Je([q()],ve.prototype,"loading",2);Je([q()],ve.prototype,"firstFetch",2);Je([q()],ve.prototype,"search",2);Je([q()],ve.prototype,"endReached",2);ve=Je([N("wcm-wallet-explorer-view")],ve);const Ql=B`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;var Jl=Object.defineProperty,Xl=Object.getOwnPropertyDescriptor,so=(t,e,n,o)=>{for(var r=o>1?void 0:o?Xl(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&Jl(e,n,r),r};let ft=class extends S{constructor(){super(),this.isError=!1,this.openWebWallet()}onFormatAndRedirect(t){const{desktop:e,name:n}=O.getWalletRouterData(),o=e==null?void 0:e.universal;if(o){const r=O.formatUniversalUrl(o,t,n);O.openHref(r,"_blank")}}openWebWallet(){const{walletConnectUri:t}=K.state,e=O.getWalletRouterData();T.setRecentWallet(e),t&&this.onFormatAndRedirect(t)}render(){const{name:t,id:e,image_id:n}=O.getWalletRouterData(),{isMobile:o,isDesktop:r}=T.getCachedRouterWalletPlatforms(),i=O.isMobile();return f`${`${t} web app has opened in a new tab. Go there, accept the connection, and come back`}Retry`}};ft.styles=[L.globalCss,Ql];so([q()],ft.prototype,"isError",2);ft=so([N("wcm-web-connecting-view")],ft);export{Ke as WcmModal,le as WcmQrCode}; diff --git a/app/dist/assets/index-BWLsGJDA.js b/app/dist/assets/index-BWLsGJDA.js new file mode 100644 index 0000000..5d3ac0c --- /dev/null +++ b/app/dist/assets/index-BWLsGJDA.js @@ -0,0 +1 @@ +import{r as T}from"./index-Bmo1X34e.js";import{h as y,j as k,k as I}from"./index-vLeYm_sl.js";const q=()=>"9.1.0",v=t=>t.toString(16).padStart(2,"0"),C=t=>{const e=new Uint8Array(t/2);return window.crypto.getRandomValues(e),Array.from(e,v).join("")},R=()=>typeof window<"u"?C(10):new Date().getTime().toString(36);class g{}g.makeRequest=(t,e)=>({id:R(),method:t,params:e,env:{sdkVersion:q()}});g.makeResponse=(t,e,s)=>({id:t,success:!0,version:s,data:e});g.makeErrorResponse=(t,e,s)=>({id:t,success:!1,error:e,version:s});var r;(function(t){t.sendTransactions="sendTransactions",t.rpcCall="rpcCall",t.getChainInfo="getChainInfo",t.getSafeInfo="getSafeInfo",t.getTxBySafeTxHash="getTxBySafeTxHash",t.getSafeBalances="getSafeBalances",t.signMessage="signMessage",t.signTypedMessage="signTypedMessage",t.getEnvironmentInfo="getEnvironmentInfo",t.getOffChainSignature="getOffChainSignature",t.requestAddressBook="requestAddressBook",t.wallet_getPermissions="wallet_getPermissions",t.wallet_requestPermissions="wallet_requestPermissions"})(r||(r={}));var m;(function(t){t.requestAddressBook="requestAddressBook"})(m||(m={}));class H{constructor(e=null,s=!1){this.allowedOrigins=null,this.callbacks=new Map,this.debugMode=!1,this.isServer=typeof window>"u",this.isValidMessage=({origin:a,data:n,source:i})=>{const o=!n,l=!this.isServer&&i===window.parent,u=typeof n.version<"u"&&parseInt(n.version.split(".")[0]),B=typeof u=="number"&&u>=1;let p=!0;return Array.isArray(this.allowedOrigins)&&(p=this.allowedOrigins.find(P=>P.test(a))!==void 0),!o&&l&&B&&p},this.logIncomingMessage=a=>{console.info(`Safe Apps SDK v1: A message was received from origin ${a.origin}. `,a.data)},this.onParentMessage=a=>{this.isValidMessage(a)&&(this.debugMode&&this.logIncomingMessage(a),this.handleIncomingMessage(a.data))},this.handleIncomingMessage=a=>{const{id:n}=a,i=this.callbacks.get(n);i&&(i(a),this.callbacks.delete(n))},this.send=(a,n)=>{const i=g.makeRequest(a,n);if(this.isServer)throw new Error("Window doesn't exist");return window.parent.postMessage(i,"*"),new Promise((o,l)=>{this.callbacks.set(i.id,u=>{if(!u.success){l(new Error(u.error));return}o(u)})})},this.allowedOrigins=e,this.debugMode=s,this.isServer||window.addEventListener("message",this.onParentMessage)}}const b=t=>typeof t=="object"&&t!=null&&"domain"in t&&"types"in t&&"message"in t;T();class E{constructor(e){this.communicator=e}async getBySafeTxHash(e){if(!e)throw new Error("Invalid safeTxHash");return(await this.communicator.send(r.getTxBySafeTxHash,{safeTxHash:e})).data}async signMessage(e){const s={message:e};return(await this.communicator.send(r.signMessage,s)).data}async signTypedMessage(e){if(!b(e))throw new Error("Invalid typed data");return(await this.communicator.send(r.signTypedMessage,{typedData:e})).data}async send({txs:e,params:s}){if(!e||!e.length)throw new Error("No transactions were passed");const a={txs:e,params:s};return(await this.communicator.send(r.sendTransactions,a)).data}}const c={eth_call:"eth_call",eth_gasPrice:"eth_gasPrice",eth_getLogs:"eth_getLogs",eth_getBalance:"eth_getBalance",eth_getCode:"eth_getCode",eth_getBlockByHash:"eth_getBlockByHash",eth_getBlockByNumber:"eth_getBlockByNumber",eth_getStorageAt:"eth_getStorageAt",eth_getTransactionByHash:"eth_getTransactionByHash",eth_getTransactionReceipt:"eth_getTransactionReceipt",eth_getTransactionCount:"eth_getTransactionCount",eth_estimateGas:"eth_estimateGas",safe_setSettings:"safe_setSettings"},h={defaultBlockParam:(t="latest")=>t,returnFullTxObjectParam:(t=!1)=>t,blockNumberToHex:t=>Number.isInteger(t)?`0x${t.toString(16)}`:t};class A{constructor(e){this.communicator=e,this.call=this.buildRequest({call:c.eth_call,formatters:[null,h.defaultBlockParam]}),this.getBalance=this.buildRequest({call:c.eth_getBalance,formatters:[null,h.defaultBlockParam]}),this.getCode=this.buildRequest({call:c.eth_getCode,formatters:[null,h.defaultBlockParam]}),this.getStorageAt=this.buildRequest({call:c.eth_getStorageAt,formatters:[null,h.blockNumberToHex,h.defaultBlockParam]}),this.getPastLogs=this.buildRequest({call:c.eth_getLogs}),this.getBlockByHash=this.buildRequest({call:c.eth_getBlockByHash,formatters:[null,h.returnFullTxObjectParam]}),this.getBlockByNumber=this.buildRequest({call:c.eth_getBlockByNumber,formatters:[h.blockNumberToHex,h.returnFullTxObjectParam]}),this.getTransactionByHash=this.buildRequest({call:c.eth_getTransactionByHash}),this.getTransactionReceipt=this.buildRequest({call:c.eth_getTransactionReceipt}),this.getTransactionCount=this.buildRequest({call:c.eth_getTransactionCount,formatters:[null,h.defaultBlockParam]}),this.getGasPrice=this.buildRequest({call:c.eth_gasPrice}),this.getEstimateGas=s=>this.buildRequest({call:c.eth_estimateGas})([s]),this.setSafeSettings=this.buildRequest({call:c.safe_setSettings})}buildRequest(e){const{call:s,formatters:a}=e;return async n=>{a&&Array.isArray(n)&&a.forEach((l,u)=>{l&&(n[u]=l(n[u]))});const i={call:s,params:n||[]};return(await this.communicator.send(r.rpcCall,i)).data}}}const x="0x1626ba7e",O="0x20c13b0b",f=4001;class d extends Error{constructor(e,s,a){super(e),this.code=s,this.data=a,Object.setPrototypeOf(this,d.prototype)}}class S{constructor(e){this.communicator=e}async getPermissions(){return(await this.communicator.send(r.wallet_getPermissions,void 0)).data}async requestPermissions(e){if(!this.isPermissionRequestValid(e))throw new d("Permissions request is invalid",f);try{return(await this.communicator.send(r.wallet_requestPermissions,e)).data}catch{throw new d("Permissions rejected",f)}}isPermissionRequestValid(e){return e.every(s=>typeof s=="object"?Object.keys(s).every(a=>!!Object.values(m).includes(a)):!1)}}const w=(t,e)=>e.some(s=>s.parentCapability===t),V=()=>(t,e,s)=>{const a=s.value;return s.value=async function(){const n=new S(this.communicator);let i=await n.getPermissions();if(w(e,i)||(i=await n.requestPermissions([{[e]:{}}])),!w(e,i))throw new d("Permissions rejected",f);return a.apply(this)},s};var M=function(t,e,s,a){var n=arguments.length,i=n<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,s):a,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,s,a);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(i=(n<3?o(i):n>3?o(e,s,i):o(e,s))||i);return n>3&&i&&Object.defineProperty(e,s,i),i};class _{constructor(e){this.communicator=e}async getChainInfo(){return(await this.communicator.send(r.getChainInfo,void 0)).data}async getInfo(){return(await this.communicator.send(r.getSafeInfo,void 0)).data}async experimental_getBalances({currency:e="usd"}={}){return(await this.communicator.send(r.getSafeBalances,{currency:e})).data}async check1271Signature(e,s="0x"){const a=await this.getInfo(),n=y({abi:[{constant:!1,inputs:[{name:"_dataHash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[e,s]}),i={call:c.eth_call,params:[{to:a.safeAddress,data:n},"latest"]};try{return(await this.communicator.send(r.rpcCall,i)).data.slice(0,10).toLowerCase()===x}catch{return!1}}async check1271SignatureBytes(e,s="0x"){const a=await this.getInfo(),n=y({abi:[{constant:!1,inputs:[{name:"_data",type:"bytes"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[e,s]}),i={call:c.eth_call,params:[{to:a.safeAddress,data:n},"latest"]};try{return(await this.communicator.send(r.rpcCall,i)).data.slice(0,10).toLowerCase()===O}catch{return!1}}calculateMessageHash(e){return k(e)}calculateTypedMessageHash(e){const s=typeof e.domain.chainId=="object"?e.domain.chainId.toNumber():Number(e.domain.chainId);let a=e.primaryType;if(!a){const n=Object.values(e.types),i=Object.keys(e.types).filter(o=>n.every(l=>l.every(({type:u})=>u.replace("[","").replace("]","")!==o)));if(i.length===0||i.length>1)throw new Error("Please specify primaryType");a=i[0]}return I({message:e.message,domain:{...e.domain,chainId:s,verifyingContract:e.domain.verifyingContract,salt:e.domain.salt},types:e.types,primaryType:a})}async getOffChainSignature(e){return(await this.communicator.send(r.getOffChainSignature,e)).data}async isMessageSigned(e,s="0x"){let a;if(typeof e=="string"&&(a=async()=>{const n=this.calculateMessageHash(e);return await this.isMessageHashSigned(n,s)}),b(e)&&(a=async()=>{const n=this.calculateTypedMessageHash(e);return await this.isMessageHashSigned(n,s)}),a)return await a();throw new Error("Invalid message type")}async isMessageHashSigned(e,s="0x"){const a=[this.check1271Signature.bind(this),this.check1271SignatureBytes.bind(this)];for(const n of a)if(await n(e,s))return!0;return!1}async getEnvironmentInfo(){return(await this.communicator.send(r.getEnvironmentInfo,void 0)).data}async requestAddressBook(){return(await this.communicator.send(r.requestAddressBook,void 0)).data}}M([V()],_.prototype,"requestAddressBook",null);class D{constructor(e={}){const{allowedDomains:s=null,debug:a=!1}=e;this.communicator=new H(s,a),this.eth=new A(this.communicator),this.txs=new E(this.communicator),this.safe=new _(this.communicator),this.wallet=new S(this.communicator)}}export{g as MessageFormatter,r as Methods,c as RPC_CALLS,m as RestrictedMethods,D as default,q as getSDKVersion,b as isObjectEIP712TypedData}; diff --git a/app/dist/assets/index-Bmo1X34e.js b/app/dist/assets/index-Bmo1X34e.js new file mode 100644 index 0000000..2af2d3d --- /dev/null +++ b/app/dist/assets/index-Bmo1X34e.js @@ -0,0 +1 @@ +var R={},A={},_={},K;function Ve(){if(K)return _;K=1;var e=_.__awaiter||function(t,s,f,o){function O(h){return h instanceof f?h:new f(function(T){T(h)})}return new(f||(f=Promise))(function(h,T){function D(N){try{v(o.next(N))}catch(C){T(C)}}function M(N){try{v(o.throw(N))}catch(C){T(C)}}function v(N){N.done?h(N.value):O(N.value).then(D,M)}v((o=o.apply(t,s||[])).next())})};Object.defineProperty(_,"__esModule",{value:!0}),_.getData=_.fetchData=_.stringifyQuery=_.insertParams=void 0;const n=t=>typeof t=="object"&&t!==null&&"code"in t&&"message"in t;function E(t,s,f){return t.replace(new RegExp(`\\{${s}\\}`,"g"),f)}function c(t,s){return s?Object.keys(s).reduce((f,o)=>E(f,o,String(s[o])),t):t}_.insertParams=c;function S(t){if(!t)return"";const s=new URLSearchParams;Object.keys(t).forEach(o=>{t[o]!=null&&s.append(o,String(t[o]))});const f=s.toString();return f?`?${f}`:""}_.stringifyQuery=S;function u(t){return e(this,void 0,void 0,function*(){let s;try{s=yield t.json()}catch{s={}}if(!t.ok){const f=n(s)?`CGW error - ${s.code}: ${s.message}`:`CGW error - status ${t.statusText}`;throw new Error(f)}return s})}function l(t,s,f,o,O){return e(this,void 0,void 0,function*(){const h=Object.assign({"Content-Type":"application/json"},o),T={method:s??"POST",headers:h};O&&(T.credentials=O),f!=null&&(T.body=typeof f=="string"?f:JSON.stringify(f));const D=yield fetch(t,T);return u(D)})}_.fetchData=l;function g(t,s,f){return e(this,void 0,void 0,function*(){const o={method:"GET"};s&&(o.headers=Object.assign(Object.assign({},s),{"Content-Type":"application/json"})),f&&(o.credentials=f);const O=yield fetch(t,o);return u(O)})}return _.getData=g,_}var V;function Be(){if(V)return A;V=1,Object.defineProperty(A,"__esModule",{value:!0}),A.getEndpoint=A.deleteEndpoint=A.putEndpoint=A.postEndpoint=void 0;const e=Ve();function n(l,g,t,s){const f=(0,e.insertParams)(g,t),o=(0,e.stringifyQuery)(s);return`${l}${f}${o}`}function E(l,g,t){const s=n(l,g,t==null?void 0:t.path,t==null?void 0:t.query);return(0,e.fetchData)(s,"POST",t==null?void 0:t.body,t==null?void 0:t.headers,t==null?void 0:t.credentials)}A.postEndpoint=E;function c(l,g,t){const s=n(l,g,t==null?void 0:t.path,t==null?void 0:t.query);return(0,e.fetchData)(s,"PUT",t==null?void 0:t.body,t==null?void 0:t.headers,t==null?void 0:t.credentials)}A.putEndpoint=c;function S(l,g,t){const s=n(l,g,t==null?void 0:t.path,t==null?void 0:t.query);return(0,e.fetchData)(s,"DELETE",t==null?void 0:t.body,t==null?void 0:t.headers,t==null?void 0:t.credentials)}A.deleteEndpoint=S;function u(l,g,t,s){if(s)return(0,e.getData)(s,void 0,t==null?void 0:t.credentials);const f=n(l,g,t==null?void 0:t.path,t==null?void 0:t.query);return(0,e.getData)(f,t==null?void 0:t.headers,t==null?void 0:t.credentials)}return A.getEndpoint=u,A}var L={},B;function Fe(){return B||(B=1,Object.defineProperty(L,"__esModule",{value:!0}),L.DEFAULT_BASE_URL=void 0,L.DEFAULT_BASE_URL="https://safe-client.safe.global"),L}var y={},F;function Xe(){return F||(F=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ImplementationVersionState=void 0,function(n){n.UP_TO_DATE="UP_TO_DATE",n.OUTDATED="OUTDATED",n.UNKNOWN="UNKNOWN"}(e.ImplementationVersionState||(e.ImplementationVersionState={}))}(y)),y}var P={},X;function me(){return X||(X=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SafeAppSocialPlatforms=e.SafeAppFeatures=e.SafeAppAccessPolicyTypes=void 0,function(n){n.NoRestrictions="NO_RESTRICTIONS",n.DomainAllowlist="DOMAIN_ALLOWLIST"}(e.SafeAppAccessPolicyTypes||(e.SafeAppAccessPolicyTypes={})),function(n){n.BATCHED_TRANSACTIONS="BATCHED_TRANSACTIONS"}(e.SafeAppFeatures||(e.SafeAppFeatures={})),function(n){n.TWITTER="TWITTER",n.GITHUB="GITHUB",n.DISCORD="DISCORD"}(e.SafeAppSocialPlatforms||(e.SafeAppSocialPlatforms={}))}(P)),P}var b={},m;function Qe(){return m||(m=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LabelValue=e.StartTimeValue=e.DurationType=e.DetailedExecutionInfoType=e.TransactionListItemType=e.ConflictType=e.TransactionInfoType=e.SettingsInfoType=e.TransactionTokenType=e.TransferDirection=e.TransactionStatus=e.Operation=void 0,function(n){n[n.CALL=0]="CALL",n[n.DELEGATE=1]="DELEGATE"}(e.Operation||(e.Operation={})),function(n){n.AWAITING_CONFIRMATIONS="AWAITING_CONFIRMATIONS",n.AWAITING_EXECUTION="AWAITING_EXECUTION",n.CANCELLED="CANCELLED",n.FAILED="FAILED",n.SUCCESS="SUCCESS"}(e.TransactionStatus||(e.TransactionStatus={})),function(n){n.INCOMING="INCOMING",n.OUTGOING="OUTGOING",n.UNKNOWN="UNKNOWN"}(e.TransferDirection||(e.TransferDirection={})),function(n){n.ERC20="ERC20",n.ERC721="ERC721",n.NATIVE_COIN="NATIVE_COIN"}(e.TransactionTokenType||(e.TransactionTokenType={})),function(n){n.SET_FALLBACK_HANDLER="SET_FALLBACK_HANDLER",n.ADD_OWNER="ADD_OWNER",n.REMOVE_OWNER="REMOVE_OWNER",n.SWAP_OWNER="SWAP_OWNER",n.CHANGE_THRESHOLD="CHANGE_THRESHOLD",n.CHANGE_IMPLEMENTATION="CHANGE_IMPLEMENTATION",n.ENABLE_MODULE="ENABLE_MODULE",n.DISABLE_MODULE="DISABLE_MODULE",n.SET_GUARD="SET_GUARD",n.DELETE_GUARD="DELETE_GUARD"}(e.SettingsInfoType||(e.SettingsInfoType={})),function(n){n.TRANSFER="Transfer",n.SETTINGS_CHANGE="SettingsChange",n.CUSTOM="Custom",n.CREATION="Creation",n.SWAP_ORDER="SwapOrder",n.TWAP_ORDER="TwapOrder",n.SWAP_TRANSFER="SwapTransfer",n.NATIVE_STAKING_DEPOSIT="NativeStakingDeposit",n.NATIVE_STAKING_VALIDATORS_EXIT="NativeStakingValidatorsExit",n.NATIVE_STAKING_WITHDRAW="NativeStakingWithdraw"}(e.TransactionInfoType||(e.TransactionInfoType={})),function(n){n.NONE="None",n.HAS_NEXT="HasNext",n.END="End"}(e.ConflictType||(e.ConflictType={})),function(n){n.TRANSACTION="TRANSACTION",n.LABEL="LABEL",n.CONFLICT_HEADER="CONFLICT_HEADER",n.DATE_LABEL="DATE_LABEL"}(e.TransactionListItemType||(e.TransactionListItemType={})),function(n){n.MULTISIG="MULTISIG",n.MODULE="MODULE"}(e.DetailedExecutionInfoType||(e.DetailedExecutionInfoType={})),function(n){n.AUTO="AUTO",n.LIMIT_DURATION="LIMIT_DURATION"}(e.DurationType||(e.DurationType={})),function(n){n.AT_MINING_TIME="AT_MINING_TIME",n.AT_EPOCH="AT_EPOCH"}(e.StartTimeValue||(e.StartTimeValue={})),function(n){n.Queued="Queued",n.Next="Next"}(e.LabelValue||(e.LabelValue={}))}(b)),b}var G={},Q;function $e(){return Q||(Q=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FEATURES=e.GAS_PRICE_TYPE=e.RPC_AUTHENTICATION=void 0,function(n){n.API_KEY_PATH="API_KEY_PATH",n.NO_AUTHENTICATION="NO_AUTHENTICATION",n.UNKNOWN="UNKNOWN"}(e.RPC_AUTHENTICATION||(e.RPC_AUTHENTICATION={})),function(n){n.ORACLE="ORACLE",n.FIXED="FIXED",n.FIXED_1559="FIXED1559",n.UNKNOWN="UNKNOWN"}(e.GAS_PRICE_TYPE||(e.GAS_PRICE_TYPE={})),function(n){n.ERC721="ERC721",n.SAFE_APPS="SAFE_APPS",n.CONTRACT_INTERACTION="CONTRACT_INTERACTION",n.DOMAIN_LOOKUP="DOMAIN_LOOKUP",n.SPENDING_LIMIT="SPENDING_LIMIT",n.EIP1559="EIP1559",n.SAFE_TX_GAS_OPTIONAL="SAFE_TX_GAS_OPTIONAL",n.TX_SIMULATION="TX_SIMULATION",n.EIP1271="EIP1271"}(e.FEATURES||(e.FEATURES={}))}(G)),G}var U={},$;function Ye(){return $||($=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TokenType=void 0,function(n){n.ERC20="ERC20",n.ERC721="ERC721",n.NATIVE_TOKEN="NATIVE_TOKEN"}(e.TokenType||(e.TokenType={}))}(U)),U}var W={},Y;function Je(){return Y||(Y=1,Object.defineProperty(W,"__esModule",{value:!0})),W}var H={},J;function ze(){return J||(J=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NativeStakingStatus=e.ConfirmationViewTypes=void 0,function(n){n.GENERIC="GENERIC",n.COW_SWAP_ORDER="COW_SWAP_ORDER",n.COW_SWAP_TWAP_ORDER="COW_SWAP_TWAP_ORDER",n.KILN_NATIVE_STAKING_DEPOSIT="KILN_NATIVE_STAKING_DEPOSIT",n.KILN_NATIVE_STAKING_VALIDATORS_EXIT="KILN_NATIVE_STAKING_VALIDATORS_EXIT",n.KILN_NATIVE_STAKING_WITHDRAW="KILN_NATIVE_STAKING_WITHDRAW"}(e.ConfirmationViewTypes||(e.ConfirmationViewTypes={})),function(n){n.NOT_STAKED="NOT_STAKED",n.ACTIVATING="ACTIVATING",n.DEPOSIT_IN_PROGRESS="DEPOSIT_IN_PROGRESS",n.ACTIVE="ACTIVE",n.EXIT_REQUESTED="EXIT_REQUESTED",n.EXITING="EXITING",n.EXITED="EXITED",n.SLASHED="SLASHED"}(e.NativeStakingStatus||(e.NativeStakingStatus={}))}(H)),H}var j={},z;function Ze(){return z||(z=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SafeMessageStatus=e.SafeMessageListItemType=void 0,function(n){n.DATE_LABEL="DATE_LABEL",n.MESSAGE="MESSAGE"}(e.SafeMessageListItemType||(e.SafeMessageListItemType={})),function(n){n.NEEDS_CONFIRMATION="NEEDS_CONFIRMATION",n.CONFIRMED="CONFIRMED"}(e.SafeMessageStatus||(e.SafeMessageStatus={}))}(j)),j}var q={},Z;function pe(){return Z||(Z=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeviceType=void 0,function(n){n.ANDROID="ANDROID",n.IOS="IOS",n.WEB="WEB"}(e.DeviceType||(e.DeviceType={}))}(q)),q}var w={},p;function ke(){return p||(p=1,Object.defineProperty(w,"__esModule",{value:!0})),w}var k;function xe(){return k||(k=1,function(e){var n=R.__createBinding||(Object.create?function(i,a,d,r){r===void 0&&(r=d);var I=Object.getOwnPropertyDescriptor(a,d);(!I||("get"in I?!a.__esModule:I.writable||I.configurable))&&(I={enumerable:!0,get:function(){return a[d]}}),Object.defineProperty(i,r,I)}:function(i,a,d,r){r===void 0&&(r=d),i[r]=a[d]}),E=R.__exportStar||function(i,a){for(var d in i)d!=="default"&&!Object.prototype.hasOwnProperty.call(a,d)&&n(a,i,d)};Object.defineProperty(e,"__esModule",{value:!0}),e.getAccount=e.createAccount=e.verifyAuth=e.getAuthNonce=e.getContract=e.getSafeOverviews=e.unsubscribeAll=e.unsubscribeSingle=e.registerRecoveryModule=e.deleteRegisteredEmail=e.getRegisteredEmail=e.verifyEmail=e.resendEmailVerificationCode=e.changeEmail=e.registerEmail=e.unregisterDevice=e.unregisterSafe=e.registerDevice=e.getDelegates=e.confirmSafeMessage=e.proposeSafeMessage=e.getSafeMessage=e.getSafeMessages=e.getDecodedData=e.getMasterCopies=e.getSafeApps=e.getChainConfig=e.getChainsConfig=e.getTxPreview=e.getConfirmationView=e.proposeTransaction=e.getNonces=e.postSafeGasEstimation=e.deleteTransaction=e.getTransactionDetails=e.getTransactionQueue=e.getTransactionHistory=e.getCollectiblesPage=e.getCollectibles=e.getAllOwnedSafes=e.getOwnedSafes=e.getFiatCurrencies=e.getBalances=e.getMultisigTransactions=e.getModuleTransactions=e.getIncomingTransfers=e.getSafeInfo=e.getRelayCount=e.relayTransaction=e.setBaseUrl=void 0,e.getIndexingStatus=e.putAccountDataSettings=e.getAccountDataSettings=e.getAccountDataTypes=e.deleteAccount=void 0;const c=Be(),S=Fe();E(Xe(),e),E(me(),e),E(Qe(),e),E($e(),e),E(Ye(),e),E(Je(),e),E(ze(),e),E(Ze(),e),E(pe(),e),E(ke(),e);let u=S.DEFAULT_BASE_URL;const l=i=>{u=i};e.setBaseUrl=l;function g(i,a){return(0,c.postEndpoint)(u,"/v1/chains/{chainId}/relay",{path:{chainId:i},body:a})}e.relayTransaction=g;function t(i,a){return(0,c.getEndpoint)(u,"/v1/chains/{chainId}/relay/{address}",{path:{chainId:i,address:a}})}e.getRelayCount=t;function s(i,a){return(0,c.getEndpoint)(u,"/v1/chains/{chainId}/safes/{address}",{path:{chainId:i,address:a}})}e.getSafeInfo=s;function f(i,a,d,r){return(0,c.getEndpoint)(u,"/v1/chains/{chainId}/safes/{address}/incoming-transfers/",{path:{chainId:i,address:a},query:d},r)}e.getIncomingTransfers=f;function o(i,a,d,r){return(0,c.getEndpoint)(u,"/v1/chains/{chainId}/safes/{address}/module-transactions/",{path:{chainId:i,address:a},query:d},r)}e.getModuleTransactions=o;function O(i,a,d,r){return(0,c.getEndpoint)(u,"/v1/chains/{chainId}/safes/{address}/multisig-transactions/",{path:{chainId:i,address:a},query:d},r)}e.getMultisigTransactions=O;function h(i,a,d="usd",r={}){return(0,c.getEndpoint)(u,"/v1/chains/{chainId}/safes/{address}/balances/{currency}",{path:{chainId:i,address:a,currency:d},query:r})}e.getBalances=h;function T(){return(0,c.getEndpoint)(u,"/v1/balances/supported-fiat-codes")}e.getFiatCurrencies=T;function D(i,a){return(0,c.getEndpoint)(u,"/v1/chains/{chainId}/owners/{address}/safes",{path:{chainId:i,address:a}})}e.getOwnedSafes=D;function M(i){return(0,c.getEndpoint)(u,"/v1/owners/{address}/safes",{path:{address:i}})}e.getAllOwnedSafes=M;function v(i,a,d={}){return(0,c.getEndpoint)(u,"/v1/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:i,address:a},query:d})}e.getCollectibles=v;function N(i,a,d={},r){return(0,c.getEndpoint)(u,"/v2/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:i,address:a},query:d},r)}e.getCollectiblesPage=N;function C(i,a,d={},r){return(0,c.getEndpoint)(u,"/v1/chains/{chainId}/safes/{safe_address}/transactions/history",{path:{chainId:i,safe_address:a},query:d},r)}e.getTransactionHistory=C;function x(i,a,d={},r){return(0,c.getEndpoint)(u,"/v1/chains/{chainId}/safes/{safe_address}/transactions/queued",{path:{chainId:i,safe_address:a},query:d},r)}e.getTransactionQueue=x;function ee(i,a){return(0,c.getEndpoint)(u,"/v1/chains/{chainId}/transactions/{transactionId}",{path:{chainId:i,transactionId:a}})}e.getTransactionDetails=ee;function ne(i,a,d){return(0,c.deleteEndpoint)(u,"/v1/chains/{chainId}/transactions/{safeTxHash}",{path:{chainId:i,safeTxHash:a},body:{signature:d}})}e.deleteTransaction=ne;function ie(i,a,d){return(0,c.postEndpoint)(u,"/v2/chains/{chainId}/safes/{safe_address}/multisig-transactions/estimations",{path:{chainId:i,safe_address:a},body:d})}e.postSafeGasEstimation=ie;function te(i,a){return(0,c.getEndpoint)(u,"/v1/chains/{chainId}/safes/{safe_address}/nonces",{path:{chainId:i,safe_address:a}})}e.getNonces=te;function ae(i,a,d){return(0,c.postEndpoint)(u,"/v1/chains/{chainId}/transactions/{safe_address}/propose",{path:{chainId:i,safe_address:a},body:d})}e.proposeTransaction=ae;function ue(i,a,d,r,I){return(0,c.postEndpoint)(u,"/v1/chains/{chainId}/safes/{safe_address}/views/transaction-confirmation",{path:{chainId:i,safe_address:a},body:{data:d,to:r,value:I}})}e.getConfirmationView=ue;function de(i,a,d,r,I){return(0,c.postEndpoint)(u,"/v1/chains/{chainId}/transactions/{safe_address}/preview",{path:{chainId:i,safe_address:a},body:{data:d,to:r,value:I}})}e.getTxPreview=de;function ce(i){return(0,c.getEndpoint)(u,"/v1/chains",{query:i})}e.getChainsConfig=ce;function se(i){return(0,c.getEndpoint)(u,"/v1/chains/{chainId}",{path:{chainId:i}})}e.getChainConfig=se;function re(i,a={}){return(0,c.getEndpoint)(u,"/v1/chains/{chainId}/safe-apps",{path:{chainId:i},query:a})}e.getSafeApps=re;function fe(i){return(0,c.getEndpoint)(u,"/v1/chains/{chainId}/about/master-copies",{path:{chainId:i}})}e.getMasterCopies=fe;function oe(i,a,d){return(0,c.postEndpoint)(u,"/v1/chains/{chainId}/data-decoder",{path:{chainId:i},body:{data:a,to:d}})}e.getDecodedData=oe;function Ee(i,a,d){return(0,c.getEndpoint)(u,"/v1/chains/{chainId}/safes/{safe_address}/messages",{path:{chainId:i,safe_address:a},query:{}},d)}e.getSafeMessages=Ee;function le(i,a){return(0,c.getEndpoint)(u,"/v1/chains/{chainId}/messages/{message_hash}",{path:{chainId:i,message_hash:a}})}e.getSafeMessage=le;function ge(i,a,d){return(0,c.postEndpoint)(u,"/v1/chains/{chainId}/safes/{safe_address}/messages",{path:{chainId:i,safe_address:a},body:d})}e.proposeSafeMessage=ge;function Ie(i,a,d){return(0,c.postEndpoint)(u,"/v1/chains/{chainId}/messages/{message_hash}/signatures",{path:{chainId:i,message_hash:a},body:d})}e.confirmSafeMessage=Ie;function _e(i,a={}){return(0,c.getEndpoint)(u,"/v2/chains/{chainId}/delegates",{path:{chainId:i},query:a})}e.getDelegates=_e;function Ae(i){return(0,c.postEndpoint)(u,"/v1/register/notifications",{body:i})}e.registerDevice=Ae;function Te(i,a,d){return(0,c.deleteEndpoint)(u,"/v1/chains/{chainId}/notifications/devices/{uuid}/safes/{safe_address}",{path:{chainId:i,safe_address:a,uuid:d}})}e.unregisterSafe=Te;function he(i,a){return(0,c.deleteEndpoint)(u,"/v1/chains/{chainId}/notifications/devices/{uuid}",{path:{chainId:i,uuid:a}})}e.unregisterDevice=he;function Ne(i,a,d,r){return(0,c.postEndpoint)(u,"/v1/chains/{chainId}/safes/{safe_address}/emails",{path:{chainId:i,safe_address:a},body:d,headers:r})}e.registerEmail=Ne;function Oe(i,a,d,r,I){return(0,c.putEndpoint)(u,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}",{path:{chainId:i,safe_address:a,signer:d},body:r,headers:I})}e.changeEmail=Oe;function Se(i,a,d){return(0,c.postEndpoint)(u,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}/verify-resend",{path:{chainId:i,safe_address:a,signer:d},body:""})}e.resendEmailVerificationCode=Se;function De(i,a,d,r){return(0,c.putEndpoint)(u,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}/verify",{path:{chainId:i,safe_address:a,signer:d},body:r})}e.verifyEmail=De;function ve(i,a,d,r){return(0,c.getEndpoint)(u,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}",{path:{chainId:i,safe_address:a,signer:d},headers:r})}e.getRegisteredEmail=ve;function Ce(i,a,d,r){return(0,c.deleteEndpoint)(u,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}",{path:{chainId:i,safe_address:a,signer:d},headers:r})}e.deleteRegisteredEmail=Ce;function Re(i,a,d){return(0,c.postEndpoint)(u,"/v1/chains/{chainId}/safes/{safe_address}/recovery",{path:{chainId:i,safe_address:a},body:d})}e.registerRecoveryModule=Re;function Le(i){return(0,c.deleteEndpoint)(u,"/v1/subscriptions",{query:i})}e.unsubscribeSingle=Le;function Me(i){return(0,c.deleteEndpoint)(u,"/v1/subscriptions/all",{query:i})}e.unsubscribeAll=Me;function ye(i,a){return(0,c.getEndpoint)(u,"/v1/safes",{query:Object.assign(Object.assign({},a),{safes:i.join(",")})})}e.getSafeOverviews=ye;function Pe(i,a){return(0,c.getEndpoint)(u,"/v1/chains/{chainId}/contracts/{contractAddress}",{path:{chainId:i,contractAddress:a}})}e.getContract=Pe;function be(){return(0,c.getEndpoint)(u,"/v1/auth/nonce",{credentials:"include"})}e.getAuthNonce=be;function Ge(i){return(0,c.postEndpoint)(u,"/v1/auth/verify",{body:i,credentials:"include"})}e.verifyAuth=Ge;function Ue(i){return(0,c.postEndpoint)(u,"/v1/accounts",{body:i,credentials:"include"})}e.createAccount=Ue;function We(i){return(0,c.getEndpoint)(u,"/v1/accounts/{address}",{path:{address:i},credentials:"include"})}e.getAccount=We;function He(i){return(0,c.deleteEndpoint)(u,"/v1/accounts/{address}",{path:{address:i},credentials:"include"})}e.deleteAccount=He;function je(){return(0,c.getEndpoint)(u,"/v1/accounts/data-types")}e.getAccountDataTypes=je;function qe(i){return(0,c.getEndpoint)(u,"/v1/accounts/{address}/data-settings",{path:{address:i},credentials:"include"})}e.getAccountDataSettings=qe;function we(i,a){return(0,c.putEndpoint)(u,"/v1/accounts/{address}/data-settings",{path:{address:i},body:a,credentials:"include"})}e.putAccountDataSettings=we;function Ke(i){return(0,c.getEndpoint)(u,"/v1/chains/{chainId}/about/indexing",{path:{chainId:i}})}e.getIndexingStatus=Ke}(R)),R}export{xe as r}; diff --git a/app/dist/assets/index-BnsVTdaL.css b/app/dist/assets/index-BnsVTdaL.css new file mode 100644 index 0000000..9ce92af --- /dev/null +++ b/app/dist/assets/index-BnsVTdaL.css @@ -0,0 +1 @@ +:root{height:100%}body{margin:0;display:flex;place-items:center;min-width:320px;min-height:100vh}[data-rk] .iekbcc0{border:0;box-sizing:border-box;font-size:100%;line-height:normal;margin:0;padding:0;text-align:left;vertical-align:baseline;-webkit-tap-highlight-color:transparent}[data-rk] .iekbcc1{list-style:none}[data-rk] .iekbcc2{quotes:none}[data-rk] .iekbcc2:before,[data-rk] .iekbcc2:after{content:""}[data-rk] .iekbcc3{border-collapse:collapse;border-spacing:0}[data-rk] .iekbcc4{-webkit-appearance:none;-moz-appearance:none;appearance:none}[data-rk] .iekbcc5{outline:none}[data-rk] .iekbcc5::-moz-placeholder{opacity:1}[data-rk] .iekbcc5::placeholder{opacity:1}[data-rk] .iekbcc6{background-color:transparent;color:inherit}[data-rk] .iekbcc7:disabled{opacity:1}[data-rk] .iekbcc7::-ms-expand{display:none}[data-rk] .iekbcc8::-ms-clear{display:none}[data-rk] .iekbcc8::-webkit-search-cancel-button{-webkit-appearance:none}[data-rk] .iekbcc9{background:none;cursor:pointer;text-align:left}[data-rk] .iekbcca{color:inherit;text-decoration:none}[data-rk] .ju367v0{align-items:flex-start}[data-rk] .ju367v2{align-items:flex-end}[data-rk] .ju367v4{align-items:center}[data-rk] .ju367v6{display:none}[data-rk] .ju367v8{display:block}[data-rk] .ju367va{display:flex}[data-rk] .ju367vc{display:inline}[data-rk] .ju367ve{align-self:flex-start}[data-rk] .ju367vf{align-self:flex-end}[data-rk] .ju367vg{align-self:center}[data-rk] .ju367vh{background-size:cover}[data-rk] .ju367vi{border-radius:1px}[data-rk] .ju367vj{border-radius:6px}[data-rk] .ju367vk{border-radius:10px}[data-rk] .ju367vl{border-radius:13px}[data-rk] .ju367vm{border-radius:var(--rk-radii-actionButton)}[data-rk] .ju367vn{border-radius:var(--rk-radii-connectButton)}[data-rk] .ju367vo{border-radius:var(--rk-radii-menuButton)}[data-rk] .ju367vp{border-radius:var(--rk-radii-modal)}[data-rk] .ju367vq{border-radius:var(--rk-radii-modalMobile)}[data-rk] .ju367vr{border-radius:25%}[data-rk] .ju367vs{border-radius:9999px}[data-rk] .ju367vt{border-style:solid}[data-rk] .ju367vu{border-width:0px}[data-rk] .ju367vv{border-width:1px}[data-rk] .ju367vw{border-width:2px}[data-rk] .ju367vx{border-width:4px}[data-rk] .ju367vy{cursor:pointer}[data-rk] .ju367vz{cursor:none}[data-rk] .ju367v10{pointer-events:none}[data-rk] .ju367v11{pointer-events:all}[data-rk] .ju367v12{min-height:8px}[data-rk] .ju367v13{min-height:44px}[data-rk] .ju367v14{flex-direction:row}[data-rk] .ju367v15{flex-direction:column}[data-rk] .ju367v16{font-family:var(--rk-fonts-body)}[data-rk] .ju367v17{font-size:12px;line-height:18px}[data-rk] .ju367v18{font-size:13px;line-height:18px}[data-rk] .ju367v19{font-size:14px;line-height:18px}[data-rk] .ju367v1a{font-size:16px;line-height:20px}[data-rk] .ju367v1b{font-size:18px;line-height:24px}[data-rk] .ju367v1c{font-size:20px;line-height:24px}[data-rk] .ju367v1d{font-size:23px;line-height:29px}[data-rk] .ju367v1e{font-weight:400}[data-rk] .ju367v1f{font-weight:500}[data-rk] .ju367v1g{font-weight:600}[data-rk] .ju367v1h{font-weight:700}[data-rk] .ju367v1i{font-weight:800}[data-rk] .ju367v1j{gap:0}[data-rk] .ju367v1k{gap:1px}[data-rk] .ju367v1l{gap:2px}[data-rk] .ju367v1m{gap:3px}[data-rk] .ju367v1n{gap:4px}[data-rk] .ju367v1o{gap:5px}[data-rk] .ju367v1p{gap:6px}[data-rk] .ju367v1q{gap:8px}[data-rk] .ju367v1r{gap:10px}[data-rk] .ju367v1s{gap:12px}[data-rk] .ju367v1t{gap:14px}[data-rk] .ju367v1u{gap:16px}[data-rk] .ju367v1v{gap:18px}[data-rk] .ju367v1w{gap:20px}[data-rk] .ju367v1x{gap:24px}[data-rk] .ju367v1y{gap:28px}[data-rk] .ju367v1z{gap:32px}[data-rk] .ju367v20{gap:36px}[data-rk] .ju367v21{gap:44px}[data-rk] .ju367v22{gap:64px}[data-rk] .ju367v23{gap:-1px}[data-rk] .ju367v24{height:1px}[data-rk] .ju367v25{height:2px}[data-rk] .ju367v26{height:4px}[data-rk] .ju367v27{height:8px}[data-rk] .ju367v28{height:12px}[data-rk] .ju367v29{height:20px}[data-rk] .ju367v2a{height:24px}[data-rk] .ju367v2b{height:28px}[data-rk] .ju367v2c{height:30px}[data-rk] .ju367v2d{height:32px}[data-rk] .ju367v2e{height:34px}[data-rk] .ju367v2f{height:36px}[data-rk] .ju367v2g{height:40px}[data-rk] .ju367v2h{height:44px}[data-rk] .ju367v2i{height:48px}[data-rk] .ju367v2j{height:54px}[data-rk] .ju367v2k{height:60px}[data-rk] .ju367v2l{height:200px}[data-rk] .ju367v2m{height:100%}[data-rk] .ju367v2n{height:-moz-max-content;height:max-content}[data-rk] .ju367v2o{justify-content:flex-start}[data-rk] .ju367v2p{justify-content:flex-end}[data-rk] .ju367v2q{justify-content:center}[data-rk] .ju367v2r{justify-content:space-between}[data-rk] .ju367v2s{justify-content:space-around}[data-rk] .ju367v2t{text-align:left}[data-rk] .ju367v2u{text-align:center}[data-rk] .ju367v2v{text-align:inherit}[data-rk] .ju367v2w{margin-bottom:0}[data-rk] .ju367v2x{margin-bottom:1px}[data-rk] .ju367v2y{margin-bottom:2px}[data-rk] .ju367v2z{margin-bottom:3px}[data-rk] .ju367v30{margin-bottom:4px}[data-rk] .ju367v31{margin-bottom:5px}[data-rk] .ju367v32{margin-bottom:6px}[data-rk] .ju367v33{margin-bottom:8px}[data-rk] .ju367v34{margin-bottom:10px}[data-rk] .ju367v35{margin-bottom:12px}[data-rk] .ju367v36{margin-bottom:14px}[data-rk] .ju367v37{margin-bottom:16px}[data-rk] .ju367v38{margin-bottom:18px}[data-rk] .ju367v39{margin-bottom:20px}[data-rk] .ju367v3a{margin-bottom:24px}[data-rk] .ju367v3b{margin-bottom:28px}[data-rk] .ju367v3c{margin-bottom:32px}[data-rk] .ju367v3d{margin-bottom:36px}[data-rk] .ju367v3e{margin-bottom:44px}[data-rk] .ju367v3f{margin-bottom:64px}[data-rk] .ju367v3g{margin-bottom:-1px}[data-rk] .ju367v3h{margin-left:0}[data-rk] .ju367v3i{margin-left:1px}[data-rk] .ju367v3j{margin-left:2px}[data-rk] .ju367v3k{margin-left:3px}[data-rk] .ju367v3l{margin-left:4px}[data-rk] .ju367v3m{margin-left:5px}[data-rk] .ju367v3n{margin-left:6px}[data-rk] .ju367v3o{margin-left:8px}[data-rk] .ju367v3p{margin-left:10px}[data-rk] .ju367v3q{margin-left:12px}[data-rk] .ju367v3r{margin-left:14px}[data-rk] .ju367v3s{margin-left:16px}[data-rk] .ju367v3t{margin-left:18px}[data-rk] .ju367v3u{margin-left:20px}[data-rk] .ju367v3v{margin-left:24px}[data-rk] .ju367v3w{margin-left:28px}[data-rk] .ju367v3x{margin-left:32px}[data-rk] .ju367v3y{margin-left:36px}[data-rk] .ju367v3z{margin-left:44px}[data-rk] .ju367v40{margin-left:64px}[data-rk] .ju367v41{margin-left:-1px}[data-rk] .ju367v42{margin-right:0}[data-rk] .ju367v43{margin-right:1px}[data-rk] .ju367v44{margin-right:2px}[data-rk] .ju367v45{margin-right:3px}[data-rk] .ju367v46{margin-right:4px}[data-rk] .ju367v47{margin-right:5px}[data-rk] .ju367v48{margin-right:6px}[data-rk] .ju367v49{margin-right:8px}[data-rk] .ju367v4a{margin-right:10px}[data-rk] .ju367v4b{margin-right:12px}[data-rk] .ju367v4c{margin-right:14px}[data-rk] .ju367v4d{margin-right:16px}[data-rk] .ju367v4e{margin-right:18px}[data-rk] .ju367v4f{margin-right:20px}[data-rk] .ju367v4g{margin-right:24px}[data-rk] .ju367v4h{margin-right:28px}[data-rk] .ju367v4i{margin-right:32px}[data-rk] .ju367v4j{margin-right:36px}[data-rk] .ju367v4k{margin-right:44px}[data-rk] .ju367v4l{margin-right:64px}[data-rk] .ju367v4m{margin-right:-1px}[data-rk] .ju367v4n{margin-top:0}[data-rk] .ju367v4o{margin-top:1px}[data-rk] .ju367v4p{margin-top:2px}[data-rk] .ju367v4q{margin-top:3px}[data-rk] .ju367v4r{margin-top:4px}[data-rk] .ju367v4s{margin-top:5px}[data-rk] .ju367v4t{margin-top:6px}[data-rk] .ju367v4u{margin-top:8px}[data-rk] .ju367v4v{margin-top:10px}[data-rk] .ju367v4w{margin-top:12px}[data-rk] .ju367v4x{margin-top:14px}[data-rk] .ju367v4y{margin-top:16px}[data-rk] .ju367v4z{margin-top:18px}[data-rk] .ju367v50{margin-top:20px}[data-rk] .ju367v51{margin-top:24px}[data-rk] .ju367v52{margin-top:28px}[data-rk] .ju367v53{margin-top:32px}[data-rk] .ju367v54{margin-top:36px}[data-rk] .ju367v55{margin-top:44px}[data-rk] .ju367v56{margin-top:64px}[data-rk] .ju367v57{margin-top:-1px}[data-rk] .ju367v58{max-width:1px}[data-rk] .ju367v59{max-width:2px}[data-rk] .ju367v5a{max-width:4px}[data-rk] .ju367v5b{max-width:8px}[data-rk] .ju367v5c{max-width:12px}[data-rk] .ju367v5d{max-width:20px}[data-rk] .ju367v5e{max-width:24px}[data-rk] .ju367v5f{max-width:28px}[data-rk] .ju367v5g{max-width:30px}[data-rk] .ju367v5h{max-width:32px}[data-rk] .ju367v5i{max-width:34px}[data-rk] .ju367v5j{max-width:36px}[data-rk] .ju367v5k{max-width:40px}[data-rk] .ju367v5l{max-width:44px}[data-rk] .ju367v5m{max-width:48px}[data-rk] .ju367v5n{max-width:54px}[data-rk] .ju367v5o{max-width:60px}[data-rk] .ju367v5p{max-width:200px}[data-rk] .ju367v5q{max-width:100%}[data-rk] .ju367v5r{max-width:-moz-max-content;max-width:max-content}[data-rk] .ju367v5s{min-width:1px}[data-rk] .ju367v5t{min-width:2px}[data-rk] .ju367v5u{min-width:4px}[data-rk] .ju367v5v{min-width:8px}[data-rk] .ju367v5w{min-width:12px}[data-rk] .ju367v5x{min-width:20px}[data-rk] .ju367v5y{min-width:24px}[data-rk] .ju367v5z{min-width:28px}[data-rk] .ju367v60{min-width:30px}[data-rk] .ju367v61{min-width:32px}[data-rk] .ju367v62{min-width:34px}[data-rk] .ju367v63{min-width:36px}[data-rk] .ju367v64{min-width:40px}[data-rk] .ju367v65{min-width:44px}[data-rk] .ju367v66{min-width:48px}[data-rk] .ju367v67{min-width:54px}[data-rk] .ju367v68{min-width:60px}[data-rk] .ju367v69{min-width:200px}[data-rk] .ju367v6a{min-width:100%}[data-rk] .ju367v6b{min-width:-moz-max-content;min-width:max-content}[data-rk] .ju367v6c{overflow:hidden}[data-rk] .ju367v6d{padding-bottom:0}[data-rk] .ju367v6e{padding-bottom:1px}[data-rk] .ju367v6f{padding-bottom:2px}[data-rk] .ju367v6g{padding-bottom:3px}[data-rk] .ju367v6h{padding-bottom:4px}[data-rk] .ju367v6i{padding-bottom:5px}[data-rk] .ju367v6j{padding-bottom:6px}[data-rk] .ju367v6k{padding-bottom:8px}[data-rk] .ju367v6l{padding-bottom:10px}[data-rk] .ju367v6m{padding-bottom:12px}[data-rk] .ju367v6n{padding-bottom:14px}[data-rk] .ju367v6o{padding-bottom:16px}[data-rk] .ju367v6p{padding-bottom:18px}[data-rk] .ju367v6q{padding-bottom:20px}[data-rk] .ju367v6r{padding-bottom:24px}[data-rk] .ju367v6s{padding-bottom:28px}[data-rk] .ju367v6t{padding-bottom:32px}[data-rk] .ju367v6u{padding-bottom:36px}[data-rk] .ju367v6v{padding-bottom:44px}[data-rk] .ju367v6w{padding-bottom:64px}[data-rk] .ju367v6x{padding-bottom:-1px}[data-rk] .ju367v6y{padding-left:0}[data-rk] .ju367v6z{padding-left:1px}[data-rk] .ju367v70{padding-left:2px}[data-rk] .ju367v71{padding-left:3px}[data-rk] .ju367v72{padding-left:4px}[data-rk] .ju367v73{padding-left:5px}[data-rk] .ju367v74{padding-left:6px}[data-rk] .ju367v75{padding-left:8px}[data-rk] .ju367v76{padding-left:10px}[data-rk] .ju367v77{padding-left:12px}[data-rk] .ju367v78{padding-left:14px}[data-rk] .ju367v79{padding-left:16px}[data-rk] .ju367v7a{padding-left:18px}[data-rk] .ju367v7b{padding-left:20px}[data-rk] .ju367v7c{padding-left:24px}[data-rk] .ju367v7d{padding-left:28px}[data-rk] .ju367v7e{padding-left:32px}[data-rk] .ju367v7f{padding-left:36px}[data-rk] .ju367v7g{padding-left:44px}[data-rk] .ju367v7h{padding-left:64px}[data-rk] .ju367v7i{padding-left:-1px}[data-rk] .ju367v7j{padding-right:0}[data-rk] .ju367v7k{padding-right:1px}[data-rk] .ju367v7l{padding-right:2px}[data-rk] .ju367v7m{padding-right:3px}[data-rk] .ju367v7n{padding-right:4px}[data-rk] .ju367v7o{padding-right:5px}[data-rk] .ju367v7p{padding-right:6px}[data-rk] .ju367v7q{padding-right:8px}[data-rk] .ju367v7r{padding-right:10px}[data-rk] .ju367v7s{padding-right:12px}[data-rk] .ju367v7t{padding-right:14px}[data-rk] .ju367v7u{padding-right:16px}[data-rk] .ju367v7v{padding-right:18px}[data-rk] .ju367v7w{padding-right:20px}[data-rk] .ju367v7x{padding-right:24px}[data-rk] .ju367v7y{padding-right:28px}[data-rk] .ju367v7z{padding-right:32px}[data-rk] .ju367v80{padding-right:36px}[data-rk] .ju367v81{padding-right:44px}[data-rk] .ju367v82{padding-right:64px}[data-rk] .ju367v83{padding-right:-1px}[data-rk] .ju367v84{padding-top:0}[data-rk] .ju367v85{padding-top:1px}[data-rk] .ju367v86{padding-top:2px}[data-rk] .ju367v87{padding-top:3px}[data-rk] .ju367v88{padding-top:4px}[data-rk] .ju367v89{padding-top:5px}[data-rk] .ju367v8a{padding-top:6px}[data-rk] .ju367v8b{padding-top:8px}[data-rk] .ju367v8c{padding-top:10px}[data-rk] .ju367v8d{padding-top:12px}[data-rk] .ju367v8e{padding-top:14px}[data-rk] .ju367v8f{padding-top:16px}[data-rk] .ju367v8g{padding-top:18px}[data-rk] .ju367v8h{padding-top:20px}[data-rk] .ju367v8i{padding-top:24px}[data-rk] .ju367v8j{padding-top:28px}[data-rk] .ju367v8k{padding-top:32px}[data-rk] .ju367v8l{padding-top:36px}[data-rk] .ju367v8m{padding-top:44px}[data-rk] .ju367v8n{padding-top:64px}[data-rk] .ju367v8o{padding-top:-1px}[data-rk] .ju367v8p{position:absolute}[data-rk] .ju367v8q{position:fixed}[data-rk] .ju367v8r{position:relative}[data-rk] .ju367v8s{-webkit-user-select:none}[data-rk] .ju367v8t{right:0}[data-rk] .ju367v8u{transition:.125s ease}[data-rk] .ju367v8v{transition:transform .125s ease}[data-rk] .ju367v8w{-webkit-user-select:none;-moz-user-select:none;user-select:none}[data-rk] .ju367v8x{width:1px}[data-rk] .ju367v8y{width:2px}[data-rk] .ju367v8z{width:4px}[data-rk] .ju367v90{width:8px}[data-rk] .ju367v91{width:12px}[data-rk] .ju367v92{width:20px}[data-rk] .ju367v93{width:24px}[data-rk] .ju367v94{width:28px}[data-rk] .ju367v95{width:30px}[data-rk] .ju367v96{width:32px}[data-rk] .ju367v97{width:34px}[data-rk] .ju367v98{width:36px}[data-rk] .ju367v99{width:40px}[data-rk] .ju367v9a{width:44px}[data-rk] .ju367v9b{width:48px}[data-rk] .ju367v9c{width:54px}[data-rk] .ju367v9d{width:60px}[data-rk] .ju367v9e{width:200px}[data-rk] .ju367v9f{width:100%}[data-rk] .ju367v9g{width:-moz-max-content;width:max-content}[data-rk] .ju367v9h{-webkit-backdrop-filter:var(--rk-blurs-modalOverlay);backdrop-filter:var(--rk-blurs-modalOverlay)}[data-rk] .ju367v9i,[data-rk] .ju367v9j:hover,[data-rk] .ju367v9k:active{background:var(--rk-colors-accentColor)}[data-rk] .ju367v9l,[data-rk] .ju367v9m:hover,[data-rk] .ju367v9n:active{background:var(--rk-colors-accentColorForeground)}[data-rk] .ju367v9o,[data-rk] .ju367v9p:hover,[data-rk] .ju367v9q:active{background:var(--rk-colors-actionButtonBorder)}[data-rk] .ju367v9r,[data-rk] .ju367v9s:hover,[data-rk] .ju367v9t:active{background:var(--rk-colors-actionButtonBorderMobile)}[data-rk] .ju367v9u,[data-rk] .ju367v9v:hover,[data-rk] .ju367v9w:active{background:var(--rk-colors-actionButtonSecondaryBackground)}[data-rk] .ju367v9x,[data-rk] .ju367v9y:hover,[data-rk] .ju367v9z:active{background:var(--rk-colors-closeButton)}[data-rk] .ju367va0,[data-rk] .ju367va1:hover,[data-rk] .ju367va2:active{background:var(--rk-colors-closeButtonBackground)}[data-rk] .ju367va3,[data-rk] .ju367va4:hover,[data-rk] .ju367va5:active{background:var(--rk-colors-connectButtonBackground)}[data-rk] .ju367va6,[data-rk] .ju367va7:hover,[data-rk] .ju367va8:active{background:var(--rk-colors-connectButtonBackgroundError)}[data-rk] .ju367va9,[data-rk] .ju367vaa:hover,[data-rk] .ju367vab:active{background:var(--rk-colors-connectButtonInnerBackground)}[data-rk] .ju367vac,[data-rk] .ju367vad:hover,[data-rk] .ju367vae:active{background:var(--rk-colors-connectButtonText)}[data-rk] .ju367vaf,[data-rk] .ju367vag:hover,[data-rk] .ju367vah:active{background:var(--rk-colors-connectButtonTextError)}[data-rk] .ju367vai,[data-rk] .ju367vaj:hover,[data-rk] .ju367vak:active{background:var(--rk-colors-connectionIndicator)}[data-rk] .ju367val,[data-rk] .ju367vam:hover,[data-rk] .ju367van:active{background:var(--rk-colors-downloadBottomCardBackground)}[data-rk] .ju367vao,[data-rk] .ju367vap:hover,[data-rk] .ju367vaq:active{background:var(--rk-colors-downloadTopCardBackground)}[data-rk] .ju367var,[data-rk] .ju367vas:hover,[data-rk] .ju367vat:active{background:var(--rk-colors-error)}[data-rk] .ju367vau,[data-rk] .ju367vav:hover,[data-rk] .ju367vaw:active{background:var(--rk-colors-generalBorder)}[data-rk] .ju367vax,[data-rk] .ju367vay:hover,[data-rk] .ju367vaz:active{background:var(--rk-colors-generalBorderDim)}[data-rk] .ju367vb0,[data-rk] .ju367vb1:hover,[data-rk] .ju367vb2:active{background:var(--rk-colors-menuItemBackground)}[data-rk] .ju367vb3,[data-rk] .ju367vb4:hover,[data-rk] .ju367vb5:active{background:var(--rk-colors-modalBackdrop)}[data-rk] .ju367vb6,[data-rk] .ju367vb7:hover,[data-rk] .ju367vb8:active{background:var(--rk-colors-modalBackground)}[data-rk] .ju367vb9,[data-rk] .ju367vba:hover,[data-rk] .ju367vbb:active{background:var(--rk-colors-modalBorder)}[data-rk] .ju367vbc,[data-rk] .ju367vbd:hover,[data-rk] .ju367vbe:active{background:var(--rk-colors-modalText)}[data-rk] .ju367vbf,[data-rk] .ju367vbg:hover,[data-rk] .ju367vbh:active{background:var(--rk-colors-modalTextDim)}[data-rk] .ju367vbi,[data-rk] .ju367vbj:hover,[data-rk] .ju367vbk:active{background:var(--rk-colors-modalTextSecondary)}[data-rk] .ju367vbl,[data-rk] .ju367vbm:hover,[data-rk] .ju367vbn:active{background:var(--rk-colors-profileAction)}[data-rk] .ju367vbo,[data-rk] .ju367vbp:hover,[data-rk] .ju367vbq:active{background:var(--rk-colors-profileActionHover)}[data-rk] .ju367vbr,[data-rk] .ju367vbs:hover,[data-rk] .ju367vbt:active{background:var(--rk-colors-profileForeground)}[data-rk] .ju367vbu,[data-rk] .ju367vbv:hover,[data-rk] .ju367vbw:active{background:var(--rk-colors-selectedOptionBorder)}[data-rk] .ju367vbx,[data-rk] .ju367vby:hover,[data-rk] .ju367vbz:active{background:var(--rk-colors-standby)}[data-rk] .ju367vc0,[data-rk] .ju367vc1:hover,[data-rk] .ju367vc2:active{border-color:var(--rk-colors-accentColor)}[data-rk] .ju367vc3,[data-rk] .ju367vc4:hover,[data-rk] .ju367vc5:active{border-color:var(--rk-colors-accentColorForeground)}[data-rk] .ju367vc6,[data-rk] .ju367vc7:hover,[data-rk] .ju367vc8:active{border-color:var(--rk-colors-actionButtonBorder)}[data-rk] .ju367vc9,[data-rk] .ju367vca:hover,[data-rk] .ju367vcb:active{border-color:var(--rk-colors-actionButtonBorderMobile)}[data-rk] .ju367vcc,[data-rk] .ju367vcd:hover,[data-rk] .ju367vce:active{border-color:var(--rk-colors-actionButtonSecondaryBackground)}[data-rk] .ju367vcf,[data-rk] .ju367vcg:hover,[data-rk] .ju367vch:active{border-color:var(--rk-colors-closeButton)}[data-rk] .ju367vci,[data-rk] .ju367vcj:hover,[data-rk] .ju367vck:active{border-color:var(--rk-colors-closeButtonBackground)}[data-rk] .ju367vcl,[data-rk] .ju367vcm:hover,[data-rk] .ju367vcn:active{border-color:var(--rk-colors-connectButtonBackground)}[data-rk] .ju367vco,[data-rk] .ju367vcp:hover,[data-rk] .ju367vcq:active{border-color:var(--rk-colors-connectButtonBackgroundError)}[data-rk] .ju367vcr,[data-rk] .ju367vcs:hover,[data-rk] .ju367vct:active{border-color:var(--rk-colors-connectButtonInnerBackground)}[data-rk] .ju367vcu,[data-rk] .ju367vcv:hover,[data-rk] .ju367vcw:active{border-color:var(--rk-colors-connectButtonText)}[data-rk] .ju367vcx,[data-rk] .ju367vcy:hover,[data-rk] .ju367vcz:active{border-color:var(--rk-colors-connectButtonTextError)}[data-rk] .ju367vd0,[data-rk] .ju367vd1:hover,[data-rk] .ju367vd2:active{border-color:var(--rk-colors-connectionIndicator)}[data-rk] .ju367vd3,[data-rk] .ju367vd4:hover,[data-rk] .ju367vd5:active{border-color:var(--rk-colors-downloadBottomCardBackground)}[data-rk] .ju367vd6,[data-rk] .ju367vd7:hover,[data-rk] .ju367vd8:active{border-color:var(--rk-colors-downloadTopCardBackground)}[data-rk] .ju367vd9,[data-rk] .ju367vda:hover,[data-rk] .ju367vdb:active{border-color:var(--rk-colors-error)}[data-rk] .ju367vdc,[data-rk] .ju367vdd:hover,[data-rk] .ju367vde:active{border-color:var(--rk-colors-generalBorder)}[data-rk] .ju367vdf,[data-rk] .ju367vdg:hover,[data-rk] .ju367vdh:active{border-color:var(--rk-colors-generalBorderDim)}[data-rk] .ju367vdi,[data-rk] .ju367vdj:hover,[data-rk] .ju367vdk:active{border-color:var(--rk-colors-menuItemBackground)}[data-rk] .ju367vdl,[data-rk] .ju367vdm:hover,[data-rk] .ju367vdn:active{border-color:var(--rk-colors-modalBackdrop)}[data-rk] .ju367vdo,[data-rk] .ju367vdp:hover,[data-rk] .ju367vdq:active{border-color:var(--rk-colors-modalBackground)}[data-rk] .ju367vdr,[data-rk] .ju367vds:hover,[data-rk] .ju367vdt:active{border-color:var(--rk-colors-modalBorder)}[data-rk] .ju367vdu,[data-rk] .ju367vdv:hover,[data-rk] .ju367vdw:active{border-color:var(--rk-colors-modalText)}[data-rk] .ju367vdx,[data-rk] .ju367vdy:hover,[data-rk] .ju367vdz:active{border-color:var(--rk-colors-modalTextDim)}[data-rk] .ju367ve0,[data-rk] .ju367ve1:hover,[data-rk] .ju367ve2:active{border-color:var(--rk-colors-modalTextSecondary)}[data-rk] .ju367ve3,[data-rk] .ju367ve4:hover,[data-rk] .ju367ve5:active{border-color:var(--rk-colors-profileAction)}[data-rk] .ju367ve6,[data-rk] .ju367ve7:hover,[data-rk] .ju367ve8:active{border-color:var(--rk-colors-profileActionHover)}[data-rk] .ju367ve9,[data-rk] .ju367vea:hover,[data-rk] .ju367veb:active{border-color:var(--rk-colors-profileForeground)}[data-rk] .ju367vec,[data-rk] .ju367ved:hover,[data-rk] .ju367vee:active{border-color:var(--rk-colors-selectedOptionBorder)}[data-rk] .ju367vef,[data-rk] .ju367veg:hover,[data-rk] .ju367veh:active{border-color:var(--rk-colors-standby)}[data-rk] .ju367vei,[data-rk] .ju367vej:hover,[data-rk] .ju367vek:active{box-shadow:var(--rk-shadows-connectButton)}[data-rk] .ju367vel,[data-rk] .ju367vem:hover,[data-rk] .ju367ven:active{box-shadow:var(--rk-shadows-dialog)}[data-rk] .ju367veo,[data-rk] .ju367vep:hover,[data-rk] .ju367veq:active{box-shadow:var(--rk-shadows-profileDetailsAction)}[data-rk] .ju367ver,[data-rk] .ju367ves:hover,[data-rk] .ju367vet:active{box-shadow:var(--rk-shadows-selectedOption)}[data-rk] .ju367veu,[data-rk] .ju367vev:hover,[data-rk] .ju367vew:active{box-shadow:var(--rk-shadows-selectedWallet)}[data-rk] .ju367vex,[data-rk] .ju367vey:hover,[data-rk] .ju367vez:active{box-shadow:var(--rk-shadows-walletLogo)}[data-rk] .ju367vf0,[data-rk] .ju367vf1:hover,[data-rk] .ju367vf2:active{color:var(--rk-colors-accentColor)}[data-rk] .ju367vf3,[data-rk] .ju367vf4:hover,[data-rk] .ju367vf5:active{color:var(--rk-colors-accentColorForeground)}[data-rk] .ju367vf6,[data-rk] .ju367vf7:hover,[data-rk] .ju367vf8:active{color:var(--rk-colors-actionButtonBorder)}[data-rk] .ju367vf9,[data-rk] .ju367vfa:hover,[data-rk] .ju367vfb:active{color:var(--rk-colors-actionButtonBorderMobile)}[data-rk] .ju367vfc,[data-rk] .ju367vfd:hover,[data-rk] .ju367vfe:active{color:var(--rk-colors-actionButtonSecondaryBackground)}[data-rk] .ju367vff,[data-rk] .ju367vfg:hover,[data-rk] .ju367vfh:active{color:var(--rk-colors-closeButton)}[data-rk] .ju367vfi,[data-rk] .ju367vfj:hover,[data-rk] .ju367vfk:active{color:var(--rk-colors-closeButtonBackground)}[data-rk] .ju367vfl,[data-rk] .ju367vfm:hover,[data-rk] .ju367vfn:active{color:var(--rk-colors-connectButtonBackground)}[data-rk] .ju367vfo,[data-rk] .ju367vfp:hover,[data-rk] .ju367vfq:active{color:var(--rk-colors-connectButtonBackgroundError)}[data-rk] .ju367vfr,[data-rk] .ju367vfs:hover,[data-rk] .ju367vft:active{color:var(--rk-colors-connectButtonInnerBackground)}[data-rk] .ju367vfu,[data-rk] .ju367vfv:hover,[data-rk] .ju367vfw:active{color:var(--rk-colors-connectButtonText)}[data-rk] .ju367vfx,[data-rk] .ju367vfy:hover,[data-rk] .ju367vfz:active{color:var(--rk-colors-connectButtonTextError)}[data-rk] .ju367vg0,[data-rk] .ju367vg1:hover,[data-rk] .ju367vg2:active{color:var(--rk-colors-connectionIndicator)}[data-rk] .ju367vg3,[data-rk] .ju367vg4:hover,[data-rk] .ju367vg5:active{color:var(--rk-colors-downloadBottomCardBackground)}[data-rk] .ju367vg6,[data-rk] .ju367vg7:hover,[data-rk] .ju367vg8:active{color:var(--rk-colors-downloadTopCardBackground)}[data-rk] .ju367vg9,[data-rk] .ju367vga:hover,[data-rk] .ju367vgb:active{color:var(--rk-colors-error)}[data-rk] .ju367vgc,[data-rk] .ju367vgd:hover,[data-rk] .ju367vge:active{color:var(--rk-colors-generalBorder)}[data-rk] .ju367vgf,[data-rk] .ju367vgg:hover,[data-rk] .ju367vgh:active{color:var(--rk-colors-generalBorderDim)}[data-rk] .ju367vgi,[data-rk] .ju367vgj:hover,[data-rk] .ju367vgk:active{color:var(--rk-colors-menuItemBackground)}[data-rk] .ju367vgl,[data-rk] .ju367vgm:hover,[data-rk] .ju367vgn:active{color:var(--rk-colors-modalBackdrop)}[data-rk] .ju367vgo,[data-rk] .ju367vgp:hover,[data-rk] .ju367vgq:active{color:var(--rk-colors-modalBackground)}[data-rk] .ju367vgr,[data-rk] .ju367vgs:hover,[data-rk] .ju367vgt:active{color:var(--rk-colors-modalBorder)}[data-rk] .ju367vgu,[data-rk] .ju367vgv:hover,[data-rk] .ju367vgw:active{color:var(--rk-colors-modalText)}[data-rk] .ju367vgx,[data-rk] .ju367vgy:hover,[data-rk] .ju367vgz:active{color:var(--rk-colors-modalTextDim)}[data-rk] .ju367vh0,[data-rk] .ju367vh1:hover,[data-rk] .ju367vh2:active{color:var(--rk-colors-modalTextSecondary)}[data-rk] .ju367vh3,[data-rk] .ju367vh4:hover,[data-rk] .ju367vh5:active{color:var(--rk-colors-profileAction)}[data-rk] .ju367vh6,[data-rk] .ju367vh7:hover,[data-rk] .ju367vh8:active{color:var(--rk-colors-profileActionHover)}[data-rk] .ju367vh9,[data-rk] .ju367vha:hover,[data-rk] .ju367vhb:active{color:var(--rk-colors-profileForeground)}[data-rk] .ju367vhc,[data-rk] .ju367vhd:hover,[data-rk] .ju367vhe:active{color:var(--rk-colors-selectedOptionBorder)}[data-rk] .ju367vhf,[data-rk] .ju367vhg:hover,[data-rk] .ju367vhh:active{color:var(--rk-colors-standby)}@media screen and (min-width: 768px){[data-rk] .ju367v1{align-items:flex-start}[data-rk] .ju367v3{align-items:flex-end}[data-rk] .ju367v5{align-items:center}[data-rk] .ju367v7{display:none}[data-rk] .ju367v9{display:block}[data-rk] .ju367vb{display:flex}[data-rk] .ju367vd{display:inline}}[data-rk] ._12cbo8i3,[data-rk] ._12cbo8i3:after{--_12cbo8i0: 1;--_12cbo8i1: 1}[data-rk] ._12cbo8i3:hover{transform:scale(var(--_12cbo8i0))}[data-rk] ._12cbo8i3:active{transform:scale(var(--_12cbo8i1))}[data-rk] ._12cbo8i3:active:after{content:"";bottom:-1px;display:block;left:-1px;position:absolute;right:-1px;top:-1px;transform:scale(calc((1 / var(--_12cbo8i1)) * var(--_12cbo8i0)))}[data-rk] ._12cbo8i4,[data-rk] ._12cbo8i4:after{--_12cbo8i0: 1.025}[data-rk] ._12cbo8i5,[data-rk] ._12cbo8i5:after{--_12cbo8i0: 1.1}[data-rk] ._12cbo8i6,[data-rk] ._12cbo8i6:after{--_12cbo8i1: .95}[data-rk] ._12cbo8i7,[data-rk] ._12cbo8i7:after{--_12cbo8i1: .9}@keyframes _1luule41{0%{transform:rotate(0)}to{transform:rotate(360deg)}}[data-rk] ._1luule42{animation:_1luule41 3s infinite linear}[data-rk] ._1luule43{background:conic-gradient(from 180deg at 50% 50%,rgba(72,146,254,0) 0deg,currentColor 282.04deg,rgba(72,146,254,0) 319.86deg,rgba(72,146,254,0) 360deg);height:21px;width:21px}@keyframes _9pm4ki0{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes _9pm4ki1{0%{opacity:0}to{opacity:1}}[data-rk] ._9pm4ki3{animation:_9pm4ki1 .15s ease;bottom:-200px;left:-200px;padding:200px;right:-200px;top:-200px;transform:translateZ(0);z-index:2147483646}[data-rk] ._9pm4ki5{animation:_9pm4ki0 .35s cubic-bezier(.15,1.15,.6,1),_9pm4ki1 .15s ease;max-width:100vw}[data-rk] ._1ckjpok1{box-sizing:content-box;max-width:100vw;width:360px}[data-rk] ._1ckjpok2{width:100vw}[data-rk] ._1ckjpok3{min-width:720px;width:720px}[data-rk] ._1ckjpok4{min-width:368px;width:368px}[data-rk] ._1ckjpok6{border-width:0px;box-sizing:border-box;width:100vw}@media screen and (min-width: 768px){[data-rk] ._1ckjpok1{width:360px}[data-rk] ._1ckjpok2{width:480px}[data-rk] ._1ckjpok4{min-width:368px;width:368px}}@media screen and (max-width: 767px){[data-rk] ._1ckjpok7{border-bottom-left-radius:0;border-bottom-right-radius:0;margin-top:-200px;padding-bottom:200px;top:200px}}[data-rk] .v9horb0:hover{background:unset}[data-rk] ._18dqw9x0{max-height:456px;overflow-y:auto;overflow-x:hidden}[data-rk] ._18dqw9x1{max-height:456px;overflow-y:auto;overflow-x:hidden;scrollbar-width:none}[data-rk] ._18dqw9x1::-webkit-scrollbar{display:none}[data-rk] .g5kl0l0{border-color:transparent}[data-rk] ._1vwt0cg0{background:#fff}[data-rk] ._1vwt0cg2{max-height:454px;overflow-y:auto}[data-rk] ._1vwt0cg3{min-width:287px}[data-rk] ._1vwt0cg4{min-width:100%}@keyframes _1am14411{0%{stroke-dashoffset:0}to{stroke-dashoffset:-283}}[data-rk] ._1am14410{overflow:auto;scrollbar-width:none;transform:translateZ(0)}[data-rk] ._1am14410::-webkit-scrollbar{display:none}[data-rk] ._1am14412{animation:_1am14411 1s linear infinite;stroke-dasharray:98 196;fill:none;stroke-linecap:round;stroke-width:4}[data-rk] ._1am14413{position:absolute}[data-rk] ._1y2lnfi0{border:1px solid rgba(16,21,31,.06)}[data-rk] ._1y2lnfi1{max-width:-moz-fit-content;max-width:fit-content}#root{max-width:1280px;margin:0 auto;text-align:center}html,body,#root,[data-rk]{height:100%} diff --git a/app/dist/assets/index-Cj7wY6S3.js b/app/dist/assets/index-Cj7wY6S3.js new file mode 100644 index 0000000..666b4fd --- /dev/null +++ b/app/dist/assets/index-Cj7wY6S3.js @@ -0,0 +1,12 @@ +import{f as $r,o as Zt,t as Al,p as Tl,l as Ll}from"./index-vLeYm_sl.js";import{r as Ps,a as Qe}from"./inherits_browser-DIknFztW.js";import{p as Bl,a as Nl,b as Pl}from"./hooks.module-hYI_ep3v.js";import{r as dn}from"./events-DQ172AOg.js";var xn={},tr={},rr={},oo;function Ol(){if(oo)return rr;oo=1,Object.defineProperty(rr,"__esModule",{value:!0}),rr.walletLogo=void 0;const e=(r,n)=>{let t;switch(r){case"standard":return t=n,`data:image/svg+xml,%3Csvg width='${n}' height='${t}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;case"circle":return t=n,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${n}' height='${t}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E`;case"text":return t=(.1*n).toFixed(2),`data:image/svg+xml,%3Csvg width='${n}' height='${t}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogo":return t=(.25*n).toFixed(2),`data:image/svg+xml,%3Csvg width='${n}' height='${t}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;case"textLight":return t=(.1*n).toFixed(2),`data:image/svg+xml,%3Csvg width='${n}' height='${t}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogoLight":return t=(.25*n).toFixed(2),`data:image/svg+xml,%3Csvg width='${n}' height='${t}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;default:return t=n,`data:image/svg+xml,%3Csvg width='${n}' height='${t}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `}};return rr.walletLogo=e,rr}var nr={},ao;function Fl(){return ao||(ao=1,Object.defineProperty(nr,"__esModule",{value:!0}),nr.LINK_API_URL=void 0,nr.LINK_API_URL="https://www.walletlink.org"),nr}var ie={},hn={exports:{}},Dl=hn.exports,uo;function fn(){return uo||(uo=1,function(e){(function(r,n){function t(F,d){if(!F)throw new Error(d||"Assertion failed")}function g(F,d){F.super_=d;var _=function(){};_.prototype=d.prototype,F.prototype=new _,F.prototype.constructor=F}function i(F,d,_){if(i.isBN(F))return F;this.negative=0,this.words=null,this.length=0,this.red=null,F!==null&&((d==="le"||d==="be")&&(_=d,d=10),this._init(F||0,d||10,_||"be"))}typeof r=="object"?r.exports=i:n.BN=i,i.BN=i,i.wordSize=26;var c;try{typeof window<"u"&&typeof window.Buffer<"u"?c=window.Buffer:c=Ps.Buffer}catch{}i.isBN=function(d){return d instanceof i?!0:d!==null&&typeof d=="object"&&d.constructor.wordSize===i.wordSize&&Array.isArray(d.words)},i.max=function(d,_){return d.cmp(_)>0?d:_},i.min=function(d,_){return d.cmp(_)<0?d:_},i.prototype._init=function(d,_,C){if(typeof d=="number")return this._initNumber(d,_,C);if(typeof d=="object")return this._initArray(d,_,C);_==="hex"&&(_=16),t(_===(_|0)&&_>=2&&_<=36),d=d.toString().replace(/\s+/g,"");var M=0;d[0]==="-"&&(M++,this.negative=1),M=0;M-=3)B=d[M]|d[M-1]<<8|d[M-2]<<16,this.words[x]|=B<>>26-j&67108863,j+=24,j>=26&&(j-=26,x++);else if(C==="le")for(M=0,x=0;M>>26-j&67108863,j+=24,j>=26&&(j-=26,x++);return this._strip()};function a(F,d){var _=F.charCodeAt(d);if(_>=48&&_<=57)return _-48;if(_>=65&&_<=70)return _-55;if(_>=97&&_<=102)return _-87;t(!1,"Invalid character in "+F)}function p(F,d,_){var C=a(F,_);return _-1>=d&&(C|=a(F,_-1)<<4),C}i.prototype._parseHex=function(d,_,C){this.length=Math.ceil((d.length-_)/6),this.words=new Array(this.length);for(var M=0;M=_;M-=2)j=p(d,_,M)<=18?(x-=18,B+=1,this.words[B]|=j>>>26):x+=8;else{var A=d.length-_;for(M=A%2===0?_+1:_;M=18?(x-=18,B+=1,this.words[B]|=j>>>26):x+=8}this._strip()};function u(F,d,_,C){for(var M=0,x=0,B=Math.min(F.length,_),j=d;j=49?x=A-49+10:A>=17?x=A-17+10:x=A,t(A>=0&&x1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=o}catch{i.prototype.inspect=o}else i.prototype.inspect=o;function o(){return(this.red?""}var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],s=[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];i.prototype.toString=function(d,_){d=d||10,_=_|0||1;var C;if(d===16||d==="hex"){C="";for(var M=0,x=0,B=0;B>>24-M&16777215,M+=2,M>=26&&(M-=26,B--),x!==0||B!==this.length-1?C=h[6-A.length]+A+C:C=A+C}for(x!==0&&(C=x.toString(16)+C);C.length%_!==0;)C="0"+C;return this.negative!==0&&(C="-"+C),C}if(d===(d|0)&&d>=2&&d<=36){var b=s[d],N=f[d];C="";var te=this.clone();for(te.negative=0;!te.isZero();){var K=te.modrn(N).toString(d);te=te.idivn(N),te.isZero()?C=K+C:C=h[b-K.length]+K+C}for(this.isZero()&&(C="0"+C);C.length%_!==0;)C="0"+C;return this.negative!==0&&(C="-"+C),C}t(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var d=this.words[0];return this.length===2?d+=this.words[1]*67108864:this.length===3&&this.words[2]===1?d+=4503599627370496+this.words[1]*67108864:this.length>2&&t(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-d:d},i.prototype.toJSON=function(){return this.toString(16,2)},c&&(i.prototype.toBuffer=function(d,_){return this.toArrayLike(c,d,_)}),i.prototype.toArray=function(d,_){return this.toArrayLike(Array,d,_)};var E=function(d,_){return d.allocUnsafe?d.allocUnsafe(_):new d(_)};i.prototype.toArrayLike=function(d,_,C){this._strip();var M=this.byteLength(),x=C||Math.max(1,M);t(M<=x,"byte array longer than desired length"),t(x>0,"Requested array length <= 0");var B=E(d,x),j=_==="le"?"LE":"BE";return this["_toArrayLike"+j](B,M),B},i.prototype._toArrayLikeLE=function(d,_){for(var C=0,M=0,x=0,B=0;x>8&255),C>16&255),B===6?(C>24&255),M=0,B=0):(M=j>>>24,B+=2)}if(C=0&&(d[C--]=j>>8&255),C>=0&&(d[C--]=j>>16&255),B===6?(C>=0&&(d[C--]=j>>24&255),M=0,B=0):(M=j>>>24,B+=2)}if(C>=0)for(d[C--]=M;C>=0;)d[C--]=0},Math.clz32?i.prototype._countBits=function(d){return 32-Math.clz32(d)}:i.prototype._countBits=function(d){var _=d,C=0;return _>=4096&&(C+=13,_>>>=13),_>=64&&(C+=7,_>>>=7),_>=8&&(C+=4,_>>>=4),_>=2&&(C+=2,_>>>=2),C+_},i.prototype._zeroBits=function(d){if(d===0)return 26;var _=d,C=0;return _&8191||(C+=13,_>>>=13),_&127||(C+=7,_>>>=7),_&15||(C+=4,_>>>=4),_&3||(C+=2,_>>>=2),_&1||C++,C},i.prototype.bitLength=function(){var d=this.words[this.length-1],_=this._countBits(d);return(this.length-1)*26+_};function y(F){for(var d=new Array(F.bitLength()),_=0;_>>M&1}return d}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var d=0,_=0;_d.length?this.clone().ior(d):d.clone().ior(this)},i.prototype.uor=function(d){return this.length>d.length?this.clone().iuor(d):d.clone().iuor(this)},i.prototype.iuand=function(d){var _;this.length>d.length?_=d:_=this;for(var C=0;C<_.length;C++)this.words[C]=this.words[C]&d.words[C];return this.length=_.length,this._strip()},i.prototype.iand=function(d){return t((this.negative|d.negative)===0),this.iuand(d)},i.prototype.and=function(d){return this.length>d.length?this.clone().iand(d):d.clone().iand(this)},i.prototype.uand=function(d){return this.length>d.length?this.clone().iuand(d):d.clone().iuand(this)},i.prototype.iuxor=function(d){var _,C;this.length>d.length?(_=this,C=d):(_=d,C=this);for(var M=0;Md.length?this.clone().ixor(d):d.clone().ixor(this)},i.prototype.uxor=function(d){return this.length>d.length?this.clone().iuxor(d):d.clone().iuxor(this)},i.prototype.inotn=function(d){t(typeof d=="number"&&d>=0);var _=Math.ceil(d/26)|0,C=d%26;this._expand(_),C>0&&_--;for(var M=0;M<_;M++)this.words[M]=~this.words[M]&67108863;return C>0&&(this.words[M]=~this.words[M]&67108863>>26-C),this._strip()},i.prototype.notn=function(d){return this.clone().inotn(d)},i.prototype.setn=function(d,_){t(typeof d=="number"&&d>=0);var C=d/26|0,M=d%26;return this._expand(C+1),_?this.words[C]=this.words[C]|1<d.length?(C=this,M=d):(C=d,M=this);for(var x=0,B=0;B>>26;for(;x!==0&&B>>26;if(this.length=C.length,x!==0)this.words[this.length]=x,this.length++;else if(C!==this)for(;Bd.length?this.clone().iadd(d):d.clone().iadd(this)},i.prototype.isub=function(d){if(d.negative!==0){d.negative=0;var _=this.iadd(d);return d.negative=1,_._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(d),this.negative=1,this._normSign();var C=this.cmp(d);if(C===0)return this.negative=0,this.length=1,this.words[0]=0,this;var M,x;C>0?(M=this,x=d):(M=d,x=this);for(var B=0,j=0;j>26,this.words[j]=_&67108863;for(;B!==0&&j>26,this.words[j]=_&67108863;if(B===0&&j>>26,te=A&67108863,K=Math.min(b,d.length-1),$=Math.max(0,b-F.length+1);$<=K;$++){var W=b-$|0;M=F.words[W]|0,x=d.words[$]|0,B=M*x+te,N+=B/67108864|0,te=B&67108863}_.words[b]=te|0,A=N|0}return A!==0?_.words[b]=A|0:_.length--,_._strip()}var R=function(d,_,C){var M=d.words,x=_.words,B=C.words,j=0,A,b,N,te=M[0]|0,K=te&8191,$=te>>>13,W=M[1]|0,J=W&8191,ee=W>>>13,oe=M[2]|0,P=oe&8191,O=oe>>>13,Z=M[3]|0,Q=Z&8191,ae=Z>>>13,le=M[4]|0,ne=le&8191,fe=le>>>13,He=M[5]|0,me=He&8191,he=He>>>13,ve=M[6]|0,pe=ve&8191,we=ve>>>13,je=M[7]|0,ye=je&8191,k=je>>>13,w=M[8]|0,v=w&8191,L=w>>>13,U=M[9]|0,V=U&8191,z=U>>>13,de=x[0]|0,ce=de&8191,ue=de>>>13,be=x[1]|0,se=be&8191,_e=be>>>13,At=x[2]|0,Ee=At&8191,Re=At>>>13,Tt=x[3]|0,Se=Tt&8191,Ce=Tt>>>13,Lt=x[4]|0,Me=Lt&8191,ke=Lt>>>13,Bt=x[5]|0,Ie=Bt&8191,xe=Bt>>>13,Nt=x[6]|0,Ae=Nt&8191,Te=Nt>>>13,Pt=x[7]|0,Le=Pt&8191,Be=Pt>>>13,Ot=x[8]|0,Ne=Ot&8191,Pe=Ot>>>13,Ft=x[9]|0,Oe=Ft&8191,Fe=Ft>>>13;C.negative=d.negative^_.negative,C.length=19,A=Math.imul(K,ce),b=Math.imul(K,ue),b=b+Math.imul($,ce)|0,N=Math.imul($,ue);var at=(j+A|0)+((b&8191)<<13)|0;j=(N+(b>>>13)|0)+(at>>>26)|0,at&=67108863,A=Math.imul(J,ce),b=Math.imul(J,ue),b=b+Math.imul(ee,ce)|0,N=Math.imul(ee,ue),A=A+Math.imul(K,se)|0,b=b+Math.imul(K,_e)|0,b=b+Math.imul($,se)|0,N=N+Math.imul($,_e)|0;var ut=(j+A|0)+((b&8191)<<13)|0;j=(N+(b>>>13)|0)+(ut>>>26)|0,ut&=67108863,A=Math.imul(P,ce),b=Math.imul(P,ue),b=b+Math.imul(O,ce)|0,N=Math.imul(O,ue),A=A+Math.imul(J,se)|0,b=b+Math.imul(J,_e)|0,b=b+Math.imul(ee,se)|0,N=N+Math.imul(ee,_e)|0,A=A+Math.imul(K,Ee)|0,b=b+Math.imul(K,Re)|0,b=b+Math.imul($,Ee)|0,N=N+Math.imul($,Re)|0;var ct=(j+A|0)+((b&8191)<<13)|0;j=(N+(b>>>13)|0)+(ct>>>26)|0,ct&=67108863,A=Math.imul(Q,ce),b=Math.imul(Q,ue),b=b+Math.imul(ae,ce)|0,N=Math.imul(ae,ue),A=A+Math.imul(P,se)|0,b=b+Math.imul(P,_e)|0,b=b+Math.imul(O,se)|0,N=N+Math.imul(O,_e)|0,A=A+Math.imul(J,Ee)|0,b=b+Math.imul(J,Re)|0,b=b+Math.imul(ee,Ee)|0,N=N+Math.imul(ee,Re)|0,A=A+Math.imul(K,Se)|0,b=b+Math.imul(K,Ce)|0,b=b+Math.imul($,Se)|0,N=N+Math.imul($,Ce)|0;var lt=(j+A|0)+((b&8191)<<13)|0;j=(N+(b>>>13)|0)+(lt>>>26)|0,lt&=67108863,A=Math.imul(ne,ce),b=Math.imul(ne,ue),b=b+Math.imul(fe,ce)|0,N=Math.imul(fe,ue),A=A+Math.imul(Q,se)|0,b=b+Math.imul(Q,_e)|0,b=b+Math.imul(ae,se)|0,N=N+Math.imul(ae,_e)|0,A=A+Math.imul(P,Ee)|0,b=b+Math.imul(P,Re)|0,b=b+Math.imul(O,Ee)|0,N=N+Math.imul(O,Re)|0,A=A+Math.imul(J,Se)|0,b=b+Math.imul(J,Ce)|0,b=b+Math.imul(ee,Se)|0,N=N+Math.imul(ee,Ce)|0,A=A+Math.imul(K,Me)|0,b=b+Math.imul(K,ke)|0,b=b+Math.imul($,Me)|0,N=N+Math.imul($,ke)|0;var ht=(j+A|0)+((b&8191)<<13)|0;j=(N+(b>>>13)|0)+(ht>>>26)|0,ht&=67108863,A=Math.imul(me,ce),b=Math.imul(me,ue),b=b+Math.imul(he,ce)|0,N=Math.imul(he,ue),A=A+Math.imul(ne,se)|0,b=b+Math.imul(ne,_e)|0,b=b+Math.imul(fe,se)|0,N=N+Math.imul(fe,_e)|0,A=A+Math.imul(Q,Ee)|0,b=b+Math.imul(Q,Re)|0,b=b+Math.imul(ae,Ee)|0,N=N+Math.imul(ae,Re)|0,A=A+Math.imul(P,Se)|0,b=b+Math.imul(P,Ce)|0,b=b+Math.imul(O,Se)|0,N=N+Math.imul(O,Ce)|0,A=A+Math.imul(J,Me)|0,b=b+Math.imul(J,ke)|0,b=b+Math.imul(ee,Me)|0,N=N+Math.imul(ee,ke)|0,A=A+Math.imul(K,Ie)|0,b=b+Math.imul(K,xe)|0,b=b+Math.imul($,Ie)|0,N=N+Math.imul($,xe)|0;var dt=(j+A|0)+((b&8191)<<13)|0;j=(N+(b>>>13)|0)+(dt>>>26)|0,dt&=67108863,A=Math.imul(pe,ce),b=Math.imul(pe,ue),b=b+Math.imul(we,ce)|0,N=Math.imul(we,ue),A=A+Math.imul(me,se)|0,b=b+Math.imul(me,_e)|0,b=b+Math.imul(he,se)|0,N=N+Math.imul(he,_e)|0,A=A+Math.imul(ne,Ee)|0,b=b+Math.imul(ne,Re)|0,b=b+Math.imul(fe,Ee)|0,N=N+Math.imul(fe,Re)|0,A=A+Math.imul(Q,Se)|0,b=b+Math.imul(Q,Ce)|0,b=b+Math.imul(ae,Se)|0,N=N+Math.imul(ae,Ce)|0,A=A+Math.imul(P,Me)|0,b=b+Math.imul(P,ke)|0,b=b+Math.imul(O,Me)|0,N=N+Math.imul(O,ke)|0,A=A+Math.imul(J,Ie)|0,b=b+Math.imul(J,xe)|0,b=b+Math.imul(ee,Ie)|0,N=N+Math.imul(ee,xe)|0,A=A+Math.imul(K,Ae)|0,b=b+Math.imul(K,Te)|0,b=b+Math.imul($,Ae)|0,N=N+Math.imul($,Te)|0;var ft=(j+A|0)+((b&8191)<<13)|0;j=(N+(b>>>13)|0)+(ft>>>26)|0,ft&=67108863,A=Math.imul(ye,ce),b=Math.imul(ye,ue),b=b+Math.imul(k,ce)|0,N=Math.imul(k,ue),A=A+Math.imul(pe,se)|0,b=b+Math.imul(pe,_e)|0,b=b+Math.imul(we,se)|0,N=N+Math.imul(we,_e)|0,A=A+Math.imul(me,Ee)|0,b=b+Math.imul(me,Re)|0,b=b+Math.imul(he,Ee)|0,N=N+Math.imul(he,Re)|0,A=A+Math.imul(ne,Se)|0,b=b+Math.imul(ne,Ce)|0,b=b+Math.imul(fe,Se)|0,N=N+Math.imul(fe,Ce)|0,A=A+Math.imul(Q,Me)|0,b=b+Math.imul(Q,ke)|0,b=b+Math.imul(ae,Me)|0,N=N+Math.imul(ae,ke)|0,A=A+Math.imul(P,Ie)|0,b=b+Math.imul(P,xe)|0,b=b+Math.imul(O,Ie)|0,N=N+Math.imul(O,xe)|0,A=A+Math.imul(J,Ae)|0,b=b+Math.imul(J,Te)|0,b=b+Math.imul(ee,Ae)|0,N=N+Math.imul(ee,Te)|0,A=A+Math.imul(K,Le)|0,b=b+Math.imul(K,Be)|0,b=b+Math.imul($,Le)|0,N=N+Math.imul($,Be)|0;var pt=(j+A|0)+((b&8191)<<13)|0;j=(N+(b>>>13)|0)+(pt>>>26)|0,pt&=67108863,A=Math.imul(v,ce),b=Math.imul(v,ue),b=b+Math.imul(L,ce)|0,N=Math.imul(L,ue),A=A+Math.imul(ye,se)|0,b=b+Math.imul(ye,_e)|0,b=b+Math.imul(k,se)|0,N=N+Math.imul(k,_e)|0,A=A+Math.imul(pe,Ee)|0,b=b+Math.imul(pe,Re)|0,b=b+Math.imul(we,Ee)|0,N=N+Math.imul(we,Re)|0,A=A+Math.imul(me,Se)|0,b=b+Math.imul(me,Ce)|0,b=b+Math.imul(he,Se)|0,N=N+Math.imul(he,Ce)|0,A=A+Math.imul(ne,Me)|0,b=b+Math.imul(ne,ke)|0,b=b+Math.imul(fe,Me)|0,N=N+Math.imul(fe,ke)|0,A=A+Math.imul(Q,Ie)|0,b=b+Math.imul(Q,xe)|0,b=b+Math.imul(ae,Ie)|0,N=N+Math.imul(ae,xe)|0,A=A+Math.imul(P,Ae)|0,b=b+Math.imul(P,Te)|0,b=b+Math.imul(O,Ae)|0,N=N+Math.imul(O,Te)|0,A=A+Math.imul(J,Le)|0,b=b+Math.imul(J,Be)|0,b=b+Math.imul(ee,Le)|0,N=N+Math.imul(ee,Be)|0,A=A+Math.imul(K,Ne)|0,b=b+Math.imul(K,Pe)|0,b=b+Math.imul($,Ne)|0,N=N+Math.imul($,Pe)|0;var gt=(j+A|0)+((b&8191)<<13)|0;j=(N+(b>>>13)|0)+(gt>>>26)|0,gt&=67108863,A=Math.imul(V,ce),b=Math.imul(V,ue),b=b+Math.imul(z,ce)|0,N=Math.imul(z,ue),A=A+Math.imul(v,se)|0,b=b+Math.imul(v,_e)|0,b=b+Math.imul(L,se)|0,N=N+Math.imul(L,_e)|0,A=A+Math.imul(ye,Ee)|0,b=b+Math.imul(ye,Re)|0,b=b+Math.imul(k,Ee)|0,N=N+Math.imul(k,Re)|0,A=A+Math.imul(pe,Se)|0,b=b+Math.imul(pe,Ce)|0,b=b+Math.imul(we,Se)|0,N=N+Math.imul(we,Ce)|0,A=A+Math.imul(me,Me)|0,b=b+Math.imul(me,ke)|0,b=b+Math.imul(he,Me)|0,N=N+Math.imul(he,ke)|0,A=A+Math.imul(ne,Ie)|0,b=b+Math.imul(ne,xe)|0,b=b+Math.imul(fe,Ie)|0,N=N+Math.imul(fe,xe)|0,A=A+Math.imul(Q,Ae)|0,b=b+Math.imul(Q,Te)|0,b=b+Math.imul(ae,Ae)|0,N=N+Math.imul(ae,Te)|0,A=A+Math.imul(P,Le)|0,b=b+Math.imul(P,Be)|0,b=b+Math.imul(O,Le)|0,N=N+Math.imul(O,Be)|0,A=A+Math.imul(J,Ne)|0,b=b+Math.imul(J,Pe)|0,b=b+Math.imul(ee,Ne)|0,N=N+Math.imul(ee,Pe)|0,A=A+Math.imul(K,Oe)|0,b=b+Math.imul(K,Fe)|0,b=b+Math.imul($,Oe)|0,N=N+Math.imul($,Fe)|0;var mt=(j+A|0)+((b&8191)<<13)|0;j=(N+(b>>>13)|0)+(mt>>>26)|0,mt&=67108863,A=Math.imul(V,se),b=Math.imul(V,_e),b=b+Math.imul(z,se)|0,N=Math.imul(z,_e),A=A+Math.imul(v,Ee)|0,b=b+Math.imul(v,Re)|0,b=b+Math.imul(L,Ee)|0,N=N+Math.imul(L,Re)|0,A=A+Math.imul(ye,Se)|0,b=b+Math.imul(ye,Ce)|0,b=b+Math.imul(k,Se)|0,N=N+Math.imul(k,Ce)|0,A=A+Math.imul(pe,Me)|0,b=b+Math.imul(pe,ke)|0,b=b+Math.imul(we,Me)|0,N=N+Math.imul(we,ke)|0,A=A+Math.imul(me,Ie)|0,b=b+Math.imul(me,xe)|0,b=b+Math.imul(he,Ie)|0,N=N+Math.imul(he,xe)|0,A=A+Math.imul(ne,Ae)|0,b=b+Math.imul(ne,Te)|0,b=b+Math.imul(fe,Ae)|0,N=N+Math.imul(fe,Te)|0,A=A+Math.imul(Q,Le)|0,b=b+Math.imul(Q,Be)|0,b=b+Math.imul(ae,Le)|0,N=N+Math.imul(ae,Be)|0,A=A+Math.imul(P,Ne)|0,b=b+Math.imul(P,Pe)|0,b=b+Math.imul(O,Ne)|0,N=N+Math.imul(O,Pe)|0,A=A+Math.imul(J,Oe)|0,b=b+Math.imul(J,Fe)|0,b=b+Math.imul(ee,Oe)|0,N=N+Math.imul(ee,Fe)|0;var wt=(j+A|0)+((b&8191)<<13)|0;j=(N+(b>>>13)|0)+(wt>>>26)|0,wt&=67108863,A=Math.imul(V,Ee),b=Math.imul(V,Re),b=b+Math.imul(z,Ee)|0,N=Math.imul(z,Re),A=A+Math.imul(v,Se)|0,b=b+Math.imul(v,Ce)|0,b=b+Math.imul(L,Se)|0,N=N+Math.imul(L,Ce)|0,A=A+Math.imul(ye,Me)|0,b=b+Math.imul(ye,ke)|0,b=b+Math.imul(k,Me)|0,N=N+Math.imul(k,ke)|0,A=A+Math.imul(pe,Ie)|0,b=b+Math.imul(pe,xe)|0,b=b+Math.imul(we,Ie)|0,N=N+Math.imul(we,xe)|0,A=A+Math.imul(me,Ae)|0,b=b+Math.imul(me,Te)|0,b=b+Math.imul(he,Ae)|0,N=N+Math.imul(he,Te)|0,A=A+Math.imul(ne,Le)|0,b=b+Math.imul(ne,Be)|0,b=b+Math.imul(fe,Le)|0,N=N+Math.imul(fe,Be)|0,A=A+Math.imul(Q,Ne)|0,b=b+Math.imul(Q,Pe)|0,b=b+Math.imul(ae,Ne)|0,N=N+Math.imul(ae,Pe)|0,A=A+Math.imul(P,Oe)|0,b=b+Math.imul(P,Fe)|0,b=b+Math.imul(O,Oe)|0,N=N+Math.imul(O,Fe)|0;var yt=(j+A|0)+((b&8191)<<13)|0;j=(N+(b>>>13)|0)+(yt>>>26)|0,yt&=67108863,A=Math.imul(V,Se),b=Math.imul(V,Ce),b=b+Math.imul(z,Se)|0,N=Math.imul(z,Ce),A=A+Math.imul(v,Me)|0,b=b+Math.imul(v,ke)|0,b=b+Math.imul(L,Me)|0,N=N+Math.imul(L,ke)|0,A=A+Math.imul(ye,Ie)|0,b=b+Math.imul(ye,xe)|0,b=b+Math.imul(k,Ie)|0,N=N+Math.imul(k,xe)|0,A=A+Math.imul(pe,Ae)|0,b=b+Math.imul(pe,Te)|0,b=b+Math.imul(we,Ae)|0,N=N+Math.imul(we,Te)|0,A=A+Math.imul(me,Le)|0,b=b+Math.imul(me,Be)|0,b=b+Math.imul(he,Le)|0,N=N+Math.imul(he,Be)|0,A=A+Math.imul(ne,Ne)|0,b=b+Math.imul(ne,Pe)|0,b=b+Math.imul(fe,Ne)|0,N=N+Math.imul(fe,Pe)|0,A=A+Math.imul(Q,Oe)|0,b=b+Math.imul(Q,Fe)|0,b=b+Math.imul(ae,Oe)|0,N=N+Math.imul(ae,Fe)|0;var bt=(j+A|0)+((b&8191)<<13)|0;j=(N+(b>>>13)|0)+(bt>>>26)|0,bt&=67108863,A=Math.imul(V,Me),b=Math.imul(V,ke),b=b+Math.imul(z,Me)|0,N=Math.imul(z,ke),A=A+Math.imul(v,Ie)|0,b=b+Math.imul(v,xe)|0,b=b+Math.imul(L,Ie)|0,N=N+Math.imul(L,xe)|0,A=A+Math.imul(ye,Ae)|0,b=b+Math.imul(ye,Te)|0,b=b+Math.imul(k,Ae)|0,N=N+Math.imul(k,Te)|0,A=A+Math.imul(pe,Le)|0,b=b+Math.imul(pe,Be)|0,b=b+Math.imul(we,Le)|0,N=N+Math.imul(we,Be)|0,A=A+Math.imul(me,Ne)|0,b=b+Math.imul(me,Pe)|0,b=b+Math.imul(he,Ne)|0,N=N+Math.imul(he,Pe)|0,A=A+Math.imul(ne,Oe)|0,b=b+Math.imul(ne,Fe)|0,b=b+Math.imul(fe,Oe)|0,N=N+Math.imul(fe,Fe)|0;var vt=(j+A|0)+((b&8191)<<13)|0;j=(N+(b>>>13)|0)+(vt>>>26)|0,vt&=67108863,A=Math.imul(V,Ie),b=Math.imul(V,xe),b=b+Math.imul(z,Ie)|0,N=Math.imul(z,xe),A=A+Math.imul(v,Ae)|0,b=b+Math.imul(v,Te)|0,b=b+Math.imul(L,Ae)|0,N=N+Math.imul(L,Te)|0,A=A+Math.imul(ye,Le)|0,b=b+Math.imul(ye,Be)|0,b=b+Math.imul(k,Le)|0,N=N+Math.imul(k,Be)|0,A=A+Math.imul(pe,Ne)|0,b=b+Math.imul(pe,Pe)|0,b=b+Math.imul(we,Ne)|0,N=N+Math.imul(we,Pe)|0,A=A+Math.imul(me,Oe)|0,b=b+Math.imul(me,Fe)|0,b=b+Math.imul(he,Oe)|0,N=N+Math.imul(he,Fe)|0;var _t=(j+A|0)+((b&8191)<<13)|0;j=(N+(b>>>13)|0)+(_t>>>26)|0,_t&=67108863,A=Math.imul(V,Ae),b=Math.imul(V,Te),b=b+Math.imul(z,Ae)|0,N=Math.imul(z,Te),A=A+Math.imul(v,Le)|0,b=b+Math.imul(v,Be)|0,b=b+Math.imul(L,Le)|0,N=N+Math.imul(L,Be)|0,A=A+Math.imul(ye,Ne)|0,b=b+Math.imul(ye,Pe)|0,b=b+Math.imul(k,Ne)|0,N=N+Math.imul(k,Pe)|0,A=A+Math.imul(pe,Oe)|0,b=b+Math.imul(pe,Fe)|0,b=b+Math.imul(we,Oe)|0,N=N+Math.imul(we,Fe)|0;var Cn=(j+A|0)+((b&8191)<<13)|0;j=(N+(b>>>13)|0)+(Cn>>>26)|0,Cn&=67108863,A=Math.imul(V,Le),b=Math.imul(V,Be),b=b+Math.imul(z,Le)|0,N=Math.imul(z,Be),A=A+Math.imul(v,Ne)|0,b=b+Math.imul(v,Pe)|0,b=b+Math.imul(L,Ne)|0,N=N+Math.imul(L,Pe)|0,A=A+Math.imul(ye,Oe)|0,b=b+Math.imul(ye,Fe)|0,b=b+Math.imul(k,Oe)|0,N=N+Math.imul(k,Fe)|0;var Mn=(j+A|0)+((b&8191)<<13)|0;j=(N+(b>>>13)|0)+(Mn>>>26)|0,Mn&=67108863,A=Math.imul(V,Ne),b=Math.imul(V,Pe),b=b+Math.imul(z,Ne)|0,N=Math.imul(z,Pe),A=A+Math.imul(v,Oe)|0,b=b+Math.imul(v,Fe)|0,b=b+Math.imul(L,Oe)|0,N=N+Math.imul(L,Fe)|0;var kn=(j+A|0)+((b&8191)<<13)|0;j=(N+(b>>>13)|0)+(kn>>>26)|0,kn&=67108863,A=Math.imul(V,Oe),b=Math.imul(V,Fe),b=b+Math.imul(z,Oe)|0,N=Math.imul(z,Fe);var In=(j+A|0)+((b&8191)<<13)|0;return j=(N+(b>>>13)|0)+(In>>>26)|0,In&=67108863,B[0]=at,B[1]=ut,B[2]=ct,B[3]=lt,B[4]=ht,B[5]=dt,B[6]=ft,B[7]=pt,B[8]=gt,B[9]=mt,B[10]=wt,B[11]=yt,B[12]=bt,B[13]=vt,B[14]=_t,B[15]=Cn,B[16]=Mn,B[17]=kn,B[18]=In,j!==0&&(B[19]=j,C.length++),C};Math.imul||(R=l);function S(F,d,_){_.negative=d.negative^F.negative,_.length=F.length+d.length;for(var C=0,M=0,x=0;x<_.length-1;x++){var B=M;M=0;for(var j=C&67108863,A=Math.min(x,d.length-1),b=Math.max(0,x-F.length+1);b<=A;b++){var N=x-b,te=F.words[N]|0,K=d.words[b]|0,$=te*K,W=$&67108863;B=B+($/67108864|0)|0,W=W+j|0,j=W&67108863,B=B+(W>>>26)|0,M+=B>>>26,B&=67108863}_.words[x]=j,C=B,B=M}return C!==0?_.words[x]=C:_.length--,_._strip()}function I(F,d,_){return S(F,d,_)}i.prototype.mulTo=function(d,_){var C,M=this.length+d.length;return this.length===10&&d.length===10?C=R(this,d,_):M<63?C=l(this,d,_):M<1024?C=S(this,d,_):C=I(this,d,_),C},i.prototype.mul=function(d){var _=new i(null);return _.words=new Array(this.length+d.length),this.mulTo(d,_)},i.prototype.mulf=function(d){var _=new i(null);return _.words=new Array(this.length+d.length),I(this,d,_)},i.prototype.imul=function(d){return this.clone().mulTo(d,this)},i.prototype.imuln=function(d){var _=d<0;_&&(d=-d),t(typeof d=="number"),t(d<67108864);for(var C=0,M=0;M>=26,C+=x/67108864|0,C+=B>>>26,this.words[M]=B&67108863}return C!==0&&(this.words[M]=C,this.length++),_?this.ineg():this},i.prototype.muln=function(d){return this.clone().imuln(d)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(d){var _=y(d);if(_.length===0)return new i(1);for(var C=this,M=0;M<_.length&&_[M]===0;M++,C=C.sqr());if(++M<_.length)for(var x=C.sqr();M<_.length;M++,x=x.sqr())_[M]!==0&&(C=C.mul(x));return C},i.prototype.iushln=function(d){t(typeof d=="number"&&d>=0);var _=d%26,C=(d-_)/26,M=67108863>>>26-_<<26-_,x;if(_!==0){var B=0;for(x=0;x>>26-_}B&&(this.words[x]=B,this.length++)}if(C!==0){for(x=this.length-1;x>=0;x--)this.words[x+C]=this.words[x];for(x=0;x=0);var M;_?M=(_-_%26)/26:M=0;var x=d%26,B=Math.min((d-x)/26,this.length),j=67108863^67108863>>>x<B)for(this.length-=B,b=0;b=0&&(N!==0||b>=M);b--){var te=this.words[b]|0;this.words[b]=N<<26-x|te>>>x,N=te&j}return A&&N!==0&&(A.words[A.length++]=N),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(d,_,C){return t(this.negative===0),this.iushrn(d,_,C)},i.prototype.shln=function(d){return this.clone().ishln(d)},i.prototype.ushln=function(d){return this.clone().iushln(d)},i.prototype.shrn=function(d){return this.clone().ishrn(d)},i.prototype.ushrn=function(d){return this.clone().iushrn(d)},i.prototype.testn=function(d){t(typeof d=="number"&&d>=0);var _=d%26,C=(d-_)/26,M=1<<_;if(this.length<=C)return!1;var x=this.words[C];return!!(x&M)},i.prototype.imaskn=function(d){t(typeof d=="number"&&d>=0);var _=d%26,C=(d-_)/26;if(t(this.negative===0,"imaskn works only with positive numbers"),this.length<=C)return this;if(_!==0&&C++,this.length=Math.min(C,this.length),_!==0){var M=67108863^67108863>>>_<<_;this.words[this.length-1]&=M}return this._strip()},i.prototype.maskn=function(d){return this.clone().imaskn(d)},i.prototype.iaddn=function(d){return t(typeof d=="number"),t(d<67108864),d<0?this.isubn(-d):this.negative!==0?this.length===1&&(this.words[0]|0)<=d?(this.words[0]=d-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(d),this.negative=1,this):this._iaddn(d)},i.prototype._iaddn=function(d){this.words[0]+=d;for(var _=0;_=67108864;_++)this.words[_]-=67108864,_===this.length-1?this.words[_+1]=1:this.words[_+1]++;return this.length=Math.max(this.length,_+1),this},i.prototype.isubn=function(d){if(t(typeof d=="number"),t(d<67108864),d<0)return this.iaddn(-d);if(this.negative!==0)return this.negative=0,this.iaddn(d),this.negative=1,this;if(this.words[0]-=d,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var _=0;_>26)-(A/67108864|0),this.words[x+C]=B&67108863}for(;x>26,this.words[x+C]=B&67108863;if(j===0)return this._strip();for(t(j===-1),j=0,x=0;x>26,this.words[x]=B&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(d,_){var C=this.length-d.length,M=this.clone(),x=d,B=x.words[x.length-1]|0,j=this._countBits(B);C=26-j,C!==0&&(x=x.ushln(C),M.iushln(C),B=x.words[x.length-1]|0);var A=M.length-x.length,b;if(_!=="mod"){b=new i(null),b.length=A+1,b.words=new Array(b.length);for(var N=0;N=0;K--){var $=(M.words[x.length+K]|0)*67108864+(M.words[x.length+K-1]|0);for($=Math.min($/B|0,67108863),M._ishlnsubmul(x,$,K);M.negative!==0;)$--,M.negative=0,M._ishlnsubmul(x,1,K),M.isZero()||(M.negative^=1);b&&(b.words[K]=$)}return b&&b._strip(),M._strip(),_!=="div"&&C!==0&&M.iushrn(C),{div:b||null,mod:M}},i.prototype.divmod=function(d,_,C){if(t(!d.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var M,x,B;return this.negative!==0&&d.negative===0?(B=this.neg().divmod(d,_),_!=="mod"&&(M=B.div.neg()),_!=="div"&&(x=B.mod.neg(),C&&x.negative!==0&&x.iadd(d)),{div:M,mod:x}):this.negative===0&&d.negative!==0?(B=this.divmod(d.neg(),_),_!=="mod"&&(M=B.div.neg()),{div:M,mod:B.mod}):this.negative&d.negative?(B=this.neg().divmod(d.neg(),_),_!=="div"&&(x=B.mod.neg(),C&&x.negative!==0&&x.isub(d)),{div:B.div,mod:x}):d.length>this.length||this.cmp(d)<0?{div:new i(0),mod:this}:d.length===1?_==="div"?{div:this.divn(d.words[0]),mod:null}:_==="mod"?{div:null,mod:new i(this.modrn(d.words[0]))}:{div:this.divn(d.words[0]),mod:new i(this.modrn(d.words[0]))}:this._wordDiv(d,_)},i.prototype.div=function(d){return this.divmod(d,"div",!1).div},i.prototype.mod=function(d){return this.divmod(d,"mod",!1).mod},i.prototype.umod=function(d){return this.divmod(d,"mod",!0).mod},i.prototype.divRound=function(d){var _=this.divmod(d);if(_.mod.isZero())return _.div;var C=_.div.negative!==0?_.mod.isub(d):_.mod,M=d.ushrn(1),x=d.andln(1),B=C.cmp(M);return B<0||x===1&&B===0?_.div:_.div.negative!==0?_.div.isubn(1):_.div.iaddn(1)},i.prototype.modrn=function(d){var _=d<0;_&&(d=-d),t(d<=67108863);for(var C=(1<<26)%d,M=0,x=this.length-1;x>=0;x--)M=(C*M+(this.words[x]|0))%d;return _?-M:M},i.prototype.modn=function(d){return this.modrn(d)},i.prototype.idivn=function(d){var _=d<0;_&&(d=-d),t(d<=67108863);for(var C=0,M=this.length-1;M>=0;M--){var x=(this.words[M]|0)+C*67108864;this.words[M]=x/d|0,C=x%d}return this._strip(),_?this.ineg():this},i.prototype.divn=function(d){return this.clone().idivn(d)},i.prototype.egcd=function(d){t(d.negative===0),t(!d.isZero());var _=this,C=d.clone();_.negative!==0?_=_.umod(d):_=_.clone();for(var M=new i(1),x=new i(0),B=new i(0),j=new i(1),A=0;_.isEven()&&C.isEven();)_.iushrn(1),C.iushrn(1),++A;for(var b=C.clone(),N=_.clone();!_.isZero();){for(var te=0,K=1;!(_.words[0]&K)&&te<26;++te,K<<=1);if(te>0)for(_.iushrn(te);te-- >0;)(M.isOdd()||x.isOdd())&&(M.iadd(b),x.isub(N)),M.iushrn(1),x.iushrn(1);for(var $=0,W=1;!(C.words[0]&W)&&$<26;++$,W<<=1);if($>0)for(C.iushrn($);$-- >0;)(B.isOdd()||j.isOdd())&&(B.iadd(b),j.isub(N)),B.iushrn(1),j.iushrn(1);_.cmp(C)>=0?(_.isub(C),M.isub(B),x.isub(j)):(C.isub(_),B.isub(M),j.isub(x))}return{a:B,b:j,gcd:C.iushln(A)}},i.prototype._invmp=function(d){t(d.negative===0),t(!d.isZero());var _=this,C=d.clone();_.negative!==0?_=_.umod(d):_=_.clone();for(var M=new i(1),x=new i(0),B=C.clone();_.cmpn(1)>0&&C.cmpn(1)>0;){for(var j=0,A=1;!(_.words[0]&A)&&j<26;++j,A<<=1);if(j>0)for(_.iushrn(j);j-- >0;)M.isOdd()&&M.iadd(B),M.iushrn(1);for(var b=0,N=1;!(C.words[0]&N)&&b<26;++b,N<<=1);if(b>0)for(C.iushrn(b);b-- >0;)x.isOdd()&&x.iadd(B),x.iushrn(1);_.cmp(C)>=0?(_.isub(C),M.isub(x)):(C.isub(_),x.isub(M))}var te;return _.cmpn(1)===0?te=M:te=x,te.cmpn(0)<0&&te.iadd(d),te},i.prototype.gcd=function(d){if(this.isZero())return d.abs();if(d.isZero())return this.abs();var _=this.clone(),C=d.clone();_.negative=0,C.negative=0;for(var M=0;_.isEven()&&C.isEven();M++)_.iushrn(1),C.iushrn(1);do{for(;_.isEven();)_.iushrn(1);for(;C.isEven();)C.iushrn(1);var x=_.cmp(C);if(x<0){var B=_;_=C,C=B}else if(x===0||C.cmpn(1)===0)break;_.isub(C)}while(!0);return C.iushln(M)},i.prototype.invm=function(d){return this.egcd(d).a.umod(d)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(d){return this.words[0]&d},i.prototype.bincn=function(d){t(typeof d=="number");var _=d%26,C=(d-_)/26,M=1<<_;if(this.length<=C)return this._expand(C+1),this.words[C]|=M,this;for(var x=M,B=C;x!==0&&B>>26,j&=67108863,this.words[B]=j}return x!==0&&(this.words[B]=x,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(d){var _=d<0;if(this.negative!==0&&!_)return-1;if(this.negative===0&&_)return 1;this._strip();var C;if(this.length>1)C=1;else{_&&(d=-d),t(d<=67108863,"Number is too big");var M=this.words[0]|0;C=M===d?0:Md.length)return 1;if(this.length=0;C--){var M=this.words[C]|0,x=d.words[C]|0;if(M!==x){Mx&&(_=1);break}}return _},i.prototype.gtn=function(d){return this.cmpn(d)===1},i.prototype.gt=function(d){return this.cmp(d)===1},i.prototype.gten=function(d){return this.cmpn(d)>=0},i.prototype.gte=function(d){return this.cmp(d)>=0},i.prototype.ltn=function(d){return this.cmpn(d)===-1},i.prototype.lt=function(d){return this.cmp(d)===-1},i.prototype.lten=function(d){return this.cmpn(d)<=0},i.prototype.lte=function(d){return this.cmp(d)<=0},i.prototype.eqn=function(d){return this.cmpn(d)===0},i.prototype.eq=function(d){return this.cmp(d)===0},i.red=function(d){return new Y(d)},i.prototype.toRed=function(d){return t(!this.red,"Already a number in reduction context"),t(this.negative===0,"red works only with positives"),d.convertTo(this)._forceRed(d)},i.prototype.fromRed=function(){return t(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(d){return this.red=d,this},i.prototype.forceRed=function(d){return t(!this.red,"Already a number in reduction context"),this._forceRed(d)},i.prototype.redAdd=function(d){return t(this.red,"redAdd works only with red numbers"),this.red.add(this,d)},i.prototype.redIAdd=function(d){return t(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,d)},i.prototype.redSub=function(d){return t(this.red,"redSub works only with red numbers"),this.red.sub(this,d)},i.prototype.redISub=function(d){return t(this.red,"redISub works only with red numbers"),this.red.isub(this,d)},i.prototype.redShl=function(d){return t(this.red,"redShl works only with red numbers"),this.red.shl(this,d)},i.prototype.redMul=function(d){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,d),this.red.mul(this,d)},i.prototype.redIMul=function(d){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,d),this.red.imul(this,d)},i.prototype.redSqr=function(){return t(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return t(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return t(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return t(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return t(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(d){return t(this.red&&!d.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,d)};var T={k256:null,p224:null,p192:null,p25519:null};function q(F,d){this.name=F,this.p=new i(d,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}q.prototype._tmp=function(){var d=new i(null);return d.words=new Array(Math.ceil(this.n/13)),d},q.prototype.ireduce=function(d){var _=d,C;do this.split(_,this.tmp),_=this.imulK(_),_=_.iadd(this.tmp),C=_.bitLength();while(C>this.n);var M=C0?_.isub(this.p):_.strip!==void 0?_.strip():_._strip(),_},q.prototype.split=function(d,_){d.iushrn(this.n,0,_)},q.prototype.imulK=function(d){return d.imul(this.k)};function D(){q.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}g(D,q),D.prototype.split=function(d,_){for(var C=4194303,M=Math.min(d.length,9),x=0;x>>22,B=j}B>>>=22,d.words[x-10]=B,B===0&&d.length>10?d.length-=10:d.length-=9},D.prototype.imulK=function(d){d.words[d.length]=0,d.words[d.length+1]=0,d.length+=2;for(var _=0,C=0;C>>=26,d.words[C]=x,_=M}return _!==0&&(d.words[d.length++]=_),d},i._prime=function(d){if(T[d])return T[d];var _;if(d==="k256")_=new D;else if(d==="p224")_=new H;else if(d==="p192")_=new G;else if(d==="p25519")_=new X;else throw new Error("Unknown prime "+d);return T[d]=_,_};function Y(F){if(typeof F=="string"){var d=i._prime(F);this.m=d.p,this.prime=d}else t(F.gtn(1),"modulus must be greater than 1"),this.m=F,this.prime=null}Y.prototype._verify1=function(d){t(d.negative===0,"red works only with positives"),t(d.red,"red works only with red numbers")},Y.prototype._verify2=function(d,_){t((d.negative|_.negative)===0,"red works only with positives"),t(d.red&&d.red===_.red,"red works only with red numbers")},Y.prototype.imod=function(d){return this.prime?this.prime.ireduce(d)._forceRed(this):(m(d,d.umod(this.m)._forceRed(this)),d)},Y.prototype.neg=function(d){return d.isZero()?d.clone():this.m.sub(d)._forceRed(this)},Y.prototype.add=function(d,_){this._verify2(d,_);var C=d.add(_);return C.cmp(this.m)>=0&&C.isub(this.m),C._forceRed(this)},Y.prototype.iadd=function(d,_){this._verify2(d,_);var C=d.iadd(_);return C.cmp(this.m)>=0&&C.isub(this.m),C},Y.prototype.sub=function(d,_){this._verify2(d,_);var C=d.sub(_);return C.cmpn(0)<0&&C.iadd(this.m),C._forceRed(this)},Y.prototype.isub=function(d,_){this._verify2(d,_);var C=d.isub(_);return C.cmpn(0)<0&&C.iadd(this.m),C},Y.prototype.shl=function(d,_){return this._verify1(d),this.imod(d.ushln(_))},Y.prototype.imul=function(d,_){return this._verify2(d,_),this.imod(d.imul(_))},Y.prototype.mul=function(d,_){return this._verify2(d,_),this.imod(d.mul(_))},Y.prototype.isqr=function(d){return this.imul(d,d.clone())},Y.prototype.sqr=function(d){return this.mul(d,d)},Y.prototype.sqrt=function(d){if(d.isZero())return d.clone();var _=this.m.andln(3);if(t(_%2===1),_===3){var C=this.m.add(new i(1)).iushrn(2);return this.pow(d,C)}for(var M=this.m.subn(1),x=0;!M.isZero()&&M.andln(1)===0;)x++,M.iushrn(1);t(!M.isZero());var B=new i(1).toRed(this),j=B.redNeg(),A=this.m.subn(1).iushrn(1),b=this.m.bitLength();for(b=new i(2*b*b).toRed(this);this.pow(b,A).cmp(j)!==0;)b.redIAdd(j);for(var N=this.pow(b,M),te=this.pow(d,M.addn(1).iushrn(1)),K=this.pow(d,M),$=x;K.cmp(B)!==0;){for(var W=K,J=0;W.cmp(B)!==0;J++)W=W.redSqr();t(J<$);var ee=this.pow(N,new i(1).iushln($-J-1));te=te.redMul(ee),N=ee.redSqr(),K=K.redMul(N),$=J}return te},Y.prototype.invm=function(d){var _=d._invmp(this.m);return _.negative!==0?(_.negative=0,this.imod(_).redNeg()):this.imod(_)},Y.prototype.pow=function(d,_){if(_.isZero())return new i(1).toRed(this);if(_.cmpn(1)===0)return d.clone();var C=4,M=new Array(1<=0;x--){for(var N=_.words[x],te=b-1;te>=0;te--){var K=N>>te&1;if(B!==M[0]&&(B=this.sqr(B)),K===0&&j===0){A=0;continue}j<<=1,j|=K,A++,!(A!==C&&(x!==0||te!==0))&&(B=this.mul(B,M[j]),A=0,j=0)}b=26}return B},Y.prototype.convertTo=function(d){var _=d.umod(this.m);return _===d?_.clone():_},Y.prototype.convertFrom=function(d){var _=d.clone();return _.red=null,_},i.mont=function(d){return new re(d)};function re(F){Y.call(this,F),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._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}g(re,Y),re.prototype.convertTo=function(d){return this.imod(d.ushln(this.shift))},re.prototype.convertFrom=function(d){var _=this.imod(d.mul(this.rinv));return _.red=null,_},re.prototype.imul=function(d,_){if(d.isZero()||_.isZero())return d.words[0]=0,d.length=1,d;var C=d.imul(_),M=C.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=C.isub(M).iushrn(this.shift),B=x;return x.cmp(this.m)>=0?B=x.isub(this.m):x.cmpn(0)<0&&(B=x.iadd(this.m)),B._forceRed(this)},re.prototype.mul=function(d,_){if(d.isZero()||_.isZero())return new i(0)._forceRed(this);var C=d.mul(_),M=C.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=C.isub(M).iushrn(this.shift),B=x;return x.cmp(this.m)>=0?B=x.isub(this.m):x.cmpn(0)<0&&(B=x.iadd(this.m)),B._forceRed(this)},re.prototype.invm=function(d){var _=this.imod(d._invmp(this.m).mul(this.r2));return _._forceRed(this)}})(e,Dl)}(hn)),hn.exports}var An={},Et={},co;function pn(){return co||(co=1,Object.defineProperty(Et,"__esModule",{value:!0}),Et.errorValues=Et.standardErrorCodes=void 0,Et.standardErrorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901,unsupportedChain:4902}},Et.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."},4902:{standard:"EIP-3085",message:"Unrecognized chain ID."}}),Et}var ir={},Tn={},lo;function Os(){return lo||(lo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serialize=e.getErrorCode=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const r=pn(),n="Unspecified error message.";e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function t(h,s=n){if(h&&Number.isInteger(h)){const f=h.toString();if(m(r.errorValues,f))return r.errorValues[f].message;if(p(h))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return s}e.getMessageFromCode=t;function g(h){if(!Number.isInteger(h))return!1;const s=h.toString();return!!(r.errorValues[s]||p(h))}e.isValidCode=g;function i(h){var s;if(typeof h=="number")return h;if(c(h))return(s=h.code)!==null&&s!==void 0?s:h.errorCode}e.getErrorCode=i;function c(h){return typeof h=="object"&&h!==null&&(typeof h.code=="number"||typeof h.errorCode=="number")}function a(h,{shouldIncludeStack:s=!1}={}){const f={};if(h&&typeof h=="object"&&!Array.isArray(h)&&m(h,"code")&&g(h.code)){const E=h;f.code=E.code,E.message&&typeof E.message=="string"?(f.message=E.message,m(E,"data")&&(f.data=E.data)):(f.message=t(f.code),f.data={originalError:u(h)})}else f.code=r.standardErrorCodes.rpc.internal,f.message=o(h,"message")?h.message:n,f.data={originalError:u(h)};return s&&(f.stack=o(h,"stack")?h.stack:void 0),f}e.serialize=a;function p(h){return h>=-32099&&h<=-32e3}function u(h){return h&&typeof h=="object"&&!Array.isArray(h)?Object.assign({},h):h}function m(h,s){return Object.prototype.hasOwnProperty.call(h,s)}function o(h,s){return typeof h=="object"&&h!==null&&s in h&&typeof h[s]=="string"}}(Tn)),Tn}var ho;function ql(){if(ho)return ir;ho=1,Object.defineProperty(ir,"__esModule",{value:!0}),ir.standardErrors=void 0;const e=pn(),r=Os();ir.standardErrors={rpc:{parse:p=>n(e.standardErrorCodes.rpc.parse,p),invalidRequest:p=>n(e.standardErrorCodes.rpc.invalidRequest,p),invalidParams:p=>n(e.standardErrorCodes.rpc.invalidParams,p),methodNotFound:p=>n(e.standardErrorCodes.rpc.methodNotFound,p),internal:p=>n(e.standardErrorCodes.rpc.internal,p),server:p=>{if(!p||typeof p!="object"||Array.isArray(p))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:u}=p;if(!Number.isInteger(u)||u>-32005||u<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return n(u,p)},invalidInput:p=>n(e.standardErrorCodes.rpc.invalidInput,p),resourceNotFound:p=>n(e.standardErrorCodes.rpc.resourceNotFound,p),resourceUnavailable:p=>n(e.standardErrorCodes.rpc.resourceUnavailable,p),transactionRejected:p=>n(e.standardErrorCodes.rpc.transactionRejected,p),methodNotSupported:p=>n(e.standardErrorCodes.rpc.methodNotSupported,p),limitExceeded:p=>n(e.standardErrorCodes.rpc.limitExceeded,p)},provider:{userRejectedRequest:p=>t(e.standardErrorCodes.provider.userRejectedRequest,p),unauthorized:p=>t(e.standardErrorCodes.provider.unauthorized,p),unsupportedMethod:p=>t(e.standardErrorCodes.provider.unsupportedMethod,p),disconnected:p=>t(e.standardErrorCodes.provider.disconnected,p),chainDisconnected:p=>t(e.standardErrorCodes.provider.chainDisconnected,p),unsupportedChain:p=>t(e.standardErrorCodes.provider.unsupportedChain,p),custom:p=>{if(!p||typeof p!="object"||Array.isArray(p))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:u,message:m,data:o}=p;if(!m||typeof m!="string")throw new Error('"message" must be a nonempty string');return new c(u,m,o)}}};function n(p,u){const[m,o]=g(u);return new i(p,m||(0,r.getMessageFromCode)(p),o)}function t(p,u){const[m,o]=g(u);return new c(p,m||(0,r.getMessageFromCode)(p),o)}function g(p){if(p){if(typeof p=="string")return[p];if(typeof p=="object"&&!Array.isArray(p)){const{message:u,data:m}=p;if(u&&typeof u!="string")throw new Error("Must specify string message.");return[u||void 0,m]}}return[]}class i extends Error{constructor(u,m,o){if(!Number.isInteger(u))throw new Error('"code" must be an integer.');if(!m||typeof m!="string")throw new Error('"message" must be a nonempty string.');super(m),this.code=u,o!==void 0&&(this.data=o)}}class c extends i{constructor(u,m,o){if(!a(u))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(u,m,o)}}function a(p){return Number.isInteger(p)&&p>=1e3&&p<=4999}return ir}var sr={},or={},fo;function Fs(){if(fo)return or;fo=1,Object.defineProperty(or,"__esModule",{value:!0}),or.isErrorResponse=void 0;function e(r){return r.errorMessage!==void 0}return or.isErrorResponse=e,or}var ar={},po;function Ds(){return po||(po=1,Object.defineProperty(ar,"__esModule",{value:!0}),ar.LIB_VERSION=void 0,ar.LIB_VERSION="3.9.3"),ar}var go;function jl(){if(go)return sr;go=1,Object.defineProperty(sr,"__esModule",{value:!0}),sr.serializeError=void 0;const e=Fs(),r=Ds(),n=pn(),t=Os();function g(a,p){const u=(0,t.serialize)(i(a),{shouldIncludeStack:!0}),m=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");m.searchParams.set("version",r.LIB_VERSION),m.searchParams.set("code",u.code.toString());const o=c(u.data,p);return o&&m.searchParams.set("method",o),m.searchParams.set("message",u.message),Object.assign(Object.assign({},u),{docUrl:m.href})}sr.serializeError=g;function i(a){return typeof a=="string"?{message:a,code:n.standardErrorCodes.rpc.internal}:(0,e.isErrorResponse)(a)?Object.assign(Object.assign({},a),{message:a.errorMessage,code:a.errorCode,data:{method:a.method}}):a}function c(a,p){const u=a==null?void 0:a.method;if(u)return u;if(p!==void 0){if(typeof p=="string")return p;if(Array.isArray(p)){if(p.length>0)return p[0].method}else return p.method}}return sr}var mo;function gn(){return mo||(mo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.standardErrors=e.standardErrorCodes=e.serializeError=e.getMessageFromCode=e.getErrorCode=void 0;const r=pn();Object.defineProperty(e,"standardErrorCodes",{enumerable:!0,get:function(){return r.standardErrorCodes}});const n=ql();Object.defineProperty(e,"standardErrors",{enumerable:!0,get:function(){return n.standardErrors}});const t=jl();Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return t.serializeError}});const g=Os();Object.defineProperty(e,"getErrorCode",{enumerable:!0,get:function(){return g.getErrorCode}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return g.getMessageFromCode}})}(An)),An}var $e={},wo;function mn(){if(wo)return $e;wo=1,Object.defineProperty($e,"__esModule",{value:!0}),$e.ProviderType=$e.RegExpString=$e.IntNumber=$e.BigIntString=$e.AddressString=$e.HexString=$e.OpaqueType=void 0;function e(){return t=>t}$e.OpaqueType=e,$e.HexString=e(),$e.AddressString=e(),$e.BigIntString=e();function r(t){return Math.floor(t)}$e.IntNumber=r,$e.RegExpString=e();var n;return function(t){t.CoinbaseWallet="CoinbaseWallet",t.MetaMask="MetaMask",t.Unselected=""}(n||($e.ProviderType=n={})),$e}var yo;function tt(){if(yo)return ie;yo=1;var e=ie.__importDefault||function(C){return C&&C.__esModule?C:{default:C}};Object.defineProperty(ie,"__esModule",{value:!0}),ie.isMobileWeb=ie.getLocation=ie.isInIFrame=ie.createQrUrl=ie.getFavicon=ie.range=ie.isBigNumber=ie.ensureParsedJSONObject=ie.ensureBN=ie.ensureRegExpString=ie.ensureIntNumber=ie.ensureBuffer=ie.ensureAddressString=ie.ensureEvenLengthHexString=ie.ensureHexString=ie.isHexString=ie.prepend0x=ie.strip0x=ie.has0xPrefix=ie.hexStringFromIntNumber=ie.intNumberFromHexString=ie.bigIntStringFromBN=ie.hexStringFromBuffer=ie.hexStringToUint8Array=ie.uint8ArrayToHex=ie.randomBytesHex=void 0;const r=e(fn()),n=gn(),t=mn(),g=/^[0-9]*$/,i=/^[a-f0-9]*$/;function c(C){return a(crypto.getRandomValues(new Uint8Array(C)))}ie.randomBytesHex=c;function a(C){return[...C].map(M=>M.toString(16).padStart(2,"0")).join("")}ie.uint8ArrayToHex=a;function p(C){return new Uint8Array(C.match(/.{1,2}/g).map(M=>parseInt(M,16)))}ie.hexStringToUint8Array=p;function u(C,M=!1){const x=C.toString("hex");return(0,t.HexString)(M?`0x${x}`:x)}ie.hexStringFromBuffer=u;function m(C){return(0,t.BigIntString)(C.toString(10))}ie.bigIntStringFromBN=m;function o(C){return(0,t.IntNumber)(new r.default(R(C,!1),16).toNumber())}ie.intNumberFromHexString=o;function h(C){return(0,t.HexString)(`0x${new r.default(C).toString(16)}`)}ie.hexStringFromIntNumber=h;function s(C){return C.startsWith("0x")||C.startsWith("0X")}ie.has0xPrefix=s;function f(C){return s(C)?C.slice(2):C}ie.strip0x=f;function E(C){return s(C)?`0x${C.slice(2)}`:`0x${C}`}ie.prepend0x=E;function y(C){if(typeof C!="string")return!1;const M=f(C).toLowerCase();return i.test(M)}ie.isHexString=y;function l(C,M=!1){if(typeof C=="string"){const x=f(C).toLowerCase();if(i.test(x))return(0,t.HexString)(M?`0x${x}`:x)}throw n.standardErrors.rpc.invalidParams(`"${String(C)}" is not a hexadecimal string`)}ie.ensureHexString=l;function R(C,M=!1){let x=l(C,!1);return x.length%2===1&&(x=(0,t.HexString)(`0${x}`)),M?(0,t.HexString)(`0x${x}`):x}ie.ensureEvenLengthHexString=R;function S(C){if(typeof C=="string"){const M=f(C).toLowerCase();if(y(M)&&M.length===40)return(0,t.AddressString)(E(M))}throw n.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(C)}`)}ie.ensureAddressString=S;function I(C){if(Buffer.isBuffer(C))return C;if(typeof C=="string"){if(y(C)){const M=R(C,!1);return Buffer.from(M,"hex")}return Buffer.from(C,"utf8")}throw n.standardErrors.rpc.invalidParams(`Not binary data: ${String(C)}`)}ie.ensureBuffer=I;function T(C){if(typeof C=="number"&&Number.isInteger(C))return(0,t.IntNumber)(C);if(typeof C=="string"){if(g.test(C))return(0,t.IntNumber)(Number(C));if(y(C))return(0,t.IntNumber)(new r.default(R(C,!1),16).toNumber())}throw n.standardErrors.rpc.invalidParams(`Not an integer: ${String(C)}`)}ie.ensureIntNumber=T;function q(C){if(C instanceof RegExp)return(0,t.RegExpString)(C.toString());throw n.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(C)}`)}ie.ensureRegExpString=q;function D(C){if(C!==null&&(r.default.isBN(C)||G(C)))return new r.default(C.toString(10),10);if(typeof C=="number")return new r.default(T(C));if(typeof C=="string"){if(g.test(C))return new r.default(C,10);if(y(C))return new r.default(R(C,!1),16)}throw n.standardErrors.rpc.invalidParams(`Not an integer: ${String(C)}`)}ie.ensureBN=D;function H(C){if(typeof C=="string")return JSON.parse(C);if(typeof C=="object")return C;throw n.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(C)}`)}ie.ensureParsedJSONObject=H;function G(C){if(C==null||typeof C.constructor!="function")return!1;const{constructor:M}=C;return typeof M.config=="function"&&typeof M.EUCLID=="number"}ie.isBigNumber=G;function X(C,M){return Array.from({length:M-C},(x,B)=>C+B)}ie.range=X;function Y(){const C=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:M,host:x}=document.location,B=C?C.getAttribute("href"):null;return!B||B.startsWith("javascript:")||B.startsWith("vbscript:")?null:B.startsWith("http://")||B.startsWith("https://")||B.startsWith("data:")?B:B.startsWith("//")?M+B:`${M}//${x}${B}`}ie.getFavicon=Y;function re(C,M,x,B,j,A){const b=B?"parent-id":"id",N=new URLSearchParams({[b]:C,secret:M,server:x,v:j,chainId:A.toString()}).toString();return`${x}/#/link?${N}`}ie.createQrUrl=re;function F(){try{return window.frameElement!==null}catch{return!1}}ie.isInIFrame=F;function d(){try{return F()&&window.top?window.top.location:window.location}catch{return window.location}}ie.getLocation=d;function _(){var C;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test((C=window==null?void 0:window.navigator)===null||C===void 0?void 0:C.userAgent)}return ie.isMobileWeb=_,ie}var ur={},bo;function $l(){if(bo)return ur;bo=1,Object.defineProperty(ur,"__esModule",{value:!0}),ur.ScopedLocalStorage=void 0;let e=class{constructor(n){this.scope=n}setItem(n,t){localStorage.setItem(this.scopedKey(n),t)}getItem(n){return localStorage.getItem(this.scopedKey(n))}removeItem(n){localStorage.removeItem(this.scopedKey(n))}clear(){const n=this.scopedKey(""),t=[];for(let g=0;glocalStorage.removeItem(g))}scopedKey(n){return`${this.scope}:${n}`}};return ur.ScopedLocalStorage=e,ur}var Dt={},cr={},lr={},hr={},vo;function qs(){return vo||(vo=1,Object.defineProperty(hr,"__esModule",{value:!0}),hr.EVENTS=void 0,hr.EVENTS={STARTED_CONNECTING:"walletlink_sdk.started.connecting",CONNECTED_STATE_CHANGE:"walletlink_sdk.connected",DISCONNECTED:"walletlink_sdk.disconnected",METADATA_DESTROYED:"walletlink_sdk_metadata_destroyed",LINKED:"walletlink_sdk.linked",FAILURE:"walletlink_sdk.generic_failure",SESSION_CONFIG_RECEIVED:"walletlink_sdk.session_config_event_received",ETH_ACCOUNTS_STATE:"walletlink_sdk.eth_accounts_state",SESSION_STATE_CHANGE:"walletlink_sdk.session_state_change",UNLINKED_ERROR_STATE:"walletlink_sdk.unlinked_error_state",SKIPPED_CLEARING_SESSION:"walletlink_sdk.skipped_clearing_session",GENERAL_ERROR:"walletlink_sdk.general_error",WEB3_REQUEST:"walletlink_sdk.web3.request",WEB3_REQUEST_PUBLISHED:"walletlink_sdk.web3.request_published",WEB3_RESPONSE:"walletlink_sdk.web3.response",METHOD_NOT_IMPLEMENTED:"walletlink_sdk.method_not_implemented",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"}),hr}var Je={},_o;function js(){if(_o)return Je;_o=1,Object.defineProperty(Je,"__esModule",{value:!0}),Je.RelayAbstract=Je.APP_VERSION_KEY=Je.LOCAL_STORAGE_ADDRESSES_KEY=Je.WALLET_USER_NAME_KEY=void 0;const e=gn();Je.WALLET_USER_NAME_KEY="walletUsername",Je.LOCAL_STORAGE_ADDRESSES_KEY="Addresses",Je.APP_VERSION_KEY="AppVersion";let r=class{async makeEthereumJSONRPCRequest(t,g){if(!g)throw new Error("Error: No jsonRpcUrl provided");return window.fetch(g,{method:"POST",body:JSON.stringify(t),mode:"cors",headers:{"Content-Type":"application/json"}}).then(i=>i.json()).then(i=>{if(!i)throw e.standardErrors.rpc.parse({});const c=i,{error:a}=c;if(a)throw(0,e.serializeError)(a,t.method);return c})}};return Je.RelayAbstract=r,Je}var dr={},Ln={exports:{}},Jr={exports:{}},Bn={},fr={},Eo;function Ul(){if(Eo)return fr;Eo=1,fr.byteLength=a,fr.toByteArray=u,fr.fromByteArray=h;for(var e=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",g=0,i=t.length;g0)throw new Error("Invalid string. Length must be a multiple of 4");var E=s.indexOf("=");E===-1&&(E=f);var y=E===f?0:4-E%4;return[E,y]}function a(s){var f=c(s),E=f[0],y=f[1];return(E+y)*3/4-y}function p(s,f,E){return(f+E)*3/4-E}function u(s){var f,E=c(s),y=E[0],l=E[1],R=new n(p(s,y,l)),S=0,I=l>0?y-4:y,T;for(T=0;T>16&255,R[S++]=f>>8&255,R[S++]=f&255;return l===2&&(f=r[s.charCodeAt(T)]<<2|r[s.charCodeAt(T+1)]>>4,R[S++]=f&255),l===1&&(f=r[s.charCodeAt(T)]<<10|r[s.charCodeAt(T+1)]<<4|r[s.charCodeAt(T+2)]>>2,R[S++]=f>>8&255,R[S++]=f&255),R}function m(s){return e[s>>18&63]+e[s>>12&63]+e[s>>6&63]+e[s&63]}function o(s,f,E){for(var y,l=[],R=f;RI?I:S+R));return y===1?(f=s[E-1],l.push(e[f>>2]+e[f<<4&63]+"==")):y===2&&(f=(s[E-2]<<8)+s[E-1],l.push(e[f>>10]+e[f>>4&63]+e[f<<2&63]+"=")),l.join("")}return fr}var Gr={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */var Ro;function Hl(){return Ro||(Ro=1,Gr.read=function(e,r,n,t,g){var i,c,a=g*8-t-1,p=(1<>1,m=-7,o=n?g-1:0,h=n?-1:1,s=e[r+o];for(o+=h,i=s&(1<<-m)-1,s>>=-m,m+=a;m>0;i=i*256+e[r+o],o+=h,m-=8);for(c=i&(1<<-m)-1,i>>=-m,m+=t;m>0;c=c*256+e[r+o],o+=h,m-=8);if(i===0)i=1-u;else{if(i===p)return c?NaN:(s?-1:1)*(1/0);c=c+Math.pow(2,t),i=i-u}return(s?-1:1)*c*Math.pow(2,i-t)},Gr.write=function(e,r,n,t,g,i){var c,a,p,u=i*8-g-1,m=(1<>1,h=g===23?Math.pow(2,-24)-Math.pow(2,-77):0,s=t?0:i-1,f=t?1:-1,E=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(a=isNaN(r)?1:0,c=m):(c=Math.floor(Math.log(r)/Math.LN2),r*(p=Math.pow(2,-c))<1&&(c--,p*=2),c+o>=1?r+=h/p:r+=h*Math.pow(2,1-o),r*p>=2&&(c++,p/=2),c+o>=m?(a=0,c=m):c+o>=1?(a=(r*p-1)*Math.pow(2,g),c=c+o):(a=r*Math.pow(2,o-1)*Math.pow(2,g),c=0));g>=8;e[n+s]=a&255,s+=f,a/=256,g-=8);for(c=c<0;e[n+s]=c&255,s+=f,c/=256,u-=8);e[n+s-f]|=E*128}),Gr}/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */var So;function wn(){return So||(So=1,function(e){const r=Ul(),n=Hl(),t=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=R,e.INSPECT_MAX_BYTES=50;const g=2147483647;e.kMaxLength=g,a.TYPED_ARRAY_SUPPORT=i(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{const k=new Uint8Array(1),w={foo:function(){return 42}};return Object.setPrototypeOf(w,Uint8Array.prototype),Object.setPrototypeOf(k,w),k.foo()===42}catch{return!1}}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}});function c(k){if(k>g)throw new RangeError('The value "'+k+'" is invalid for option "size"');const w=new Uint8Array(k);return Object.setPrototypeOf(w,a.prototype),w}function a(k,w,v){if(typeof k=="number"){if(typeof w=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return o(k)}return p(k,w,v)}a.poolSize=8192;function p(k,w,v){if(typeof k=="string")return h(k,w);if(ArrayBuffer.isView(k))return f(k);if(k==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k);if(ve(k,ArrayBuffer)||k&&ve(k.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ve(k,SharedArrayBuffer)||k&&ve(k.buffer,SharedArrayBuffer)))return E(k,w,v);if(typeof k=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const L=k.valueOf&&k.valueOf();if(L!=null&&L!==k)return a.from(L,w,v);const U=y(k);if(U)return U;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof k[Symbol.toPrimitive]=="function")return a.from(k[Symbol.toPrimitive]("string"),w,v);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k)}a.from=function(k,w,v){return p(k,w,v)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function u(k){if(typeof k!="number")throw new TypeError('"size" argument must be of type number');if(k<0)throw new RangeError('The value "'+k+'" is invalid for option "size"')}function m(k,w,v){return u(k),k<=0?c(k):w!==void 0?typeof v=="string"?c(k).fill(w,v):c(k).fill(w):c(k)}a.alloc=function(k,w,v){return m(k,w,v)};function o(k){return u(k),c(k<0?0:l(k)|0)}a.allocUnsafe=function(k){return o(k)},a.allocUnsafeSlow=function(k){return o(k)};function h(k,w){if((typeof w!="string"||w==="")&&(w="utf8"),!a.isEncoding(w))throw new TypeError("Unknown encoding: "+w);const v=S(k,w)|0;let L=c(v);const U=L.write(k,w);return U!==v&&(L=L.slice(0,U)),L}function s(k){const w=k.length<0?0:l(k.length)|0,v=c(w);for(let L=0;L=g)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+g.toString(16)+" bytes");return k|0}function R(k){return+k!=k&&(k=0),a.alloc(+k)}a.isBuffer=function(w){return w!=null&&w._isBuffer===!0&&w!==a.prototype},a.compare=function(w,v){if(ve(w,Uint8Array)&&(w=a.from(w,w.offset,w.byteLength)),ve(v,Uint8Array)&&(v=a.from(v,v.offset,v.byteLength)),!a.isBuffer(w)||!a.isBuffer(v))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(w===v)return 0;let L=w.length,U=v.length;for(let V=0,z=Math.min(L,U);VU.length?(a.isBuffer(z)||(z=a.from(z)),z.copy(U,V)):Uint8Array.prototype.set.call(U,z,V);else if(a.isBuffer(z))z.copy(U,V);else throw new TypeError('"list" argument must be an Array of Buffers');V+=z.length}return U};function S(k,w){if(a.isBuffer(k))return k.length;if(ArrayBuffer.isView(k)||ve(k,ArrayBuffer))return k.byteLength;if(typeof k!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof k);const v=k.length,L=arguments.length>2&&arguments[2]===!0;if(!L&&v===0)return 0;let U=!1;for(;;)switch(w){case"ascii":case"latin1":case"binary":return v;case"utf8":case"utf-8":return ne(k).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v*2;case"hex":return v>>>1;case"base64":return me(k).length;default:if(U)return L?-1:ne(k).length;w=(""+w).toLowerCase(),U=!0}}a.byteLength=S;function I(k,w,v){let L=!1;if((w===void 0||w<0)&&(w=0),w>this.length||((v===void 0||v>this.length)&&(v=this.length),v<=0)||(v>>>=0,w>>>=0,v<=w))return"";for(k||(k="utf8");;)switch(k){case"hex":return B(this,w,v);case"utf8":case"utf-8":return d(this,w,v);case"ascii":return M(this,w,v);case"latin1":case"binary":return x(this,w,v);case"base64":return F(this,w,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,w,v);default:if(L)throw new TypeError("Unknown encoding: "+k);k=(k+"").toLowerCase(),L=!0}}a.prototype._isBuffer=!0;function T(k,w,v){const L=k[w];k[w]=k[v],k[v]=L}a.prototype.swap16=function(){const w=this.length;if(w%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let v=0;vv&&(w+=" ... "),""},t&&(a.prototype[t]=a.prototype.inspect),a.prototype.compare=function(w,v,L,U,V){if(ve(w,Uint8Array)&&(w=a.from(w,w.offset,w.byteLength)),!a.isBuffer(w))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof w);if(v===void 0&&(v=0),L===void 0&&(L=w?w.length:0),U===void 0&&(U=0),V===void 0&&(V=this.length),v<0||L>w.length||U<0||V>this.length)throw new RangeError("out of range index");if(U>=V&&v>=L)return 0;if(U>=V)return-1;if(v>=L)return 1;if(v>>>=0,L>>>=0,U>>>=0,V>>>=0,this===w)return 0;let z=V-U,de=L-v;const ce=Math.min(z,de),ue=this.slice(U,V),be=w.slice(v,L);for(let se=0;se2147483647?v=2147483647:v<-2147483648&&(v=-2147483648),v=+v,pe(v)&&(v=U?0:k.length-1),v<0&&(v=k.length+v),v>=k.length){if(U)return-1;v=k.length-1}else if(v<0)if(U)v=0;else return-1;if(typeof w=="string"&&(w=a.from(w,L)),a.isBuffer(w))return w.length===0?-1:D(k,w,v,L,U);if(typeof w=="number")return w=w&255,typeof Uint8Array.prototype.indexOf=="function"?U?Uint8Array.prototype.indexOf.call(k,w,v):Uint8Array.prototype.lastIndexOf.call(k,w,v):D(k,[w],v,L,U);throw new TypeError("val must be string, number or Buffer")}function D(k,w,v,L,U){let V=1,z=k.length,de=w.length;if(L!==void 0&&(L=String(L).toLowerCase(),L==="ucs2"||L==="ucs-2"||L==="utf16le"||L==="utf-16le")){if(k.length<2||w.length<2)return-1;V=2,z/=2,de/=2,v/=2}function ce(be,se){return V===1?be[se]:be.readUInt16BE(se*V)}let ue;if(U){let be=-1;for(ue=v;uez&&(v=z-de),ue=v;ue>=0;ue--){let be=!0;for(let se=0;seU&&(L=U)):L=U;const V=w.length;L>V/2&&(L=V/2);let z;for(z=0;z>>0,isFinite(L)?(L=L>>>0,U===void 0&&(U="utf8")):(U=L,L=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const V=this.length-v;if((L===void 0||L>V)&&(L=V),w.length>0&&(L<0||v<0)||v>this.length)throw new RangeError("Attempt to write outside buffer bounds");U||(U="utf8");let z=!1;for(;;)switch(U){case"hex":return H(this,w,v,L);case"utf8":case"utf-8":return G(this,w,v,L);case"ascii":case"latin1":case"binary":return X(this,w,v,L);case"base64":return Y(this,w,v,L);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return re(this,w,v,L);default:if(z)throw new TypeError("Unknown encoding: "+U);U=(""+U).toLowerCase(),z=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function F(k,w,v){return w===0&&v===k.length?r.fromByteArray(k):r.fromByteArray(k.slice(w,v))}function d(k,w,v){v=Math.min(k.length,v);const L=[];let U=w;for(;U239?4:V>223?3:V>191?2:1;if(U+de<=v){let ce,ue,be,se;switch(de){case 1:V<128&&(z=V);break;case 2:ce=k[U+1],(ce&192)===128&&(se=(V&31)<<6|ce&63,se>127&&(z=se));break;case 3:ce=k[U+1],ue=k[U+2],(ce&192)===128&&(ue&192)===128&&(se=(V&15)<<12|(ce&63)<<6|ue&63,se>2047&&(se<55296||se>57343)&&(z=se));break;case 4:ce=k[U+1],ue=k[U+2],be=k[U+3],(ce&192)===128&&(ue&192)===128&&(be&192)===128&&(se=(V&15)<<18|(ce&63)<<12|(ue&63)<<6|be&63,se>65535&&se<1114112&&(z=se))}}z===null?(z=65533,de=1):z>65535&&(z-=65536,L.push(z>>>10&1023|55296),z=56320|z&1023),L.push(z),U+=de}return C(L)}const _=4096;function C(k){const w=k.length;if(w<=_)return String.fromCharCode.apply(String,k);let v="",L=0;for(;LL)&&(v=L);let U="";for(let V=w;VL&&(w=L),v<0?(v+=L,v<0&&(v=0)):v>L&&(v=L),vv)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(w,v,L){w=w>>>0,v=v>>>0,L||A(w,v,this.length);let U=this[w],V=1,z=0;for(;++z>>0,v=v>>>0,L||A(w,v,this.length);let U=this[w+--v],V=1;for(;v>0&&(V*=256);)U+=this[w+--v]*V;return U},a.prototype.readUint8=a.prototype.readUInt8=function(w,v){return w=w>>>0,v||A(w,1,this.length),this[w]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(w,v){return w=w>>>0,v||A(w,2,this.length),this[w]|this[w+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(w,v){return w=w>>>0,v||A(w,2,this.length),this[w]<<8|this[w+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(w,v){return w=w>>>0,v||A(w,4,this.length),(this[w]|this[w+1]<<8|this[w+2]<<16)+this[w+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(w,v){return w=w>>>0,v||A(w,4,this.length),this[w]*16777216+(this[w+1]<<16|this[w+2]<<8|this[w+3])},a.prototype.readBigUInt64LE=je(function(w){w=w>>>0,Z(w,"offset");const v=this[w],L=this[w+7];(v===void 0||L===void 0)&&Q(w,this.length-8);const U=v+this[++w]*2**8+this[++w]*2**16+this[++w]*2**24,V=this[++w]+this[++w]*2**8+this[++w]*2**16+L*2**24;return BigInt(U)+(BigInt(V)<>>0,Z(w,"offset");const v=this[w],L=this[w+7];(v===void 0||L===void 0)&&Q(w,this.length-8);const U=v*2**24+this[++w]*2**16+this[++w]*2**8+this[++w],V=this[++w]*2**24+this[++w]*2**16+this[++w]*2**8+L;return(BigInt(U)<>>0,v=v>>>0,L||A(w,v,this.length);let U=this[w],V=1,z=0;for(;++z=V&&(U-=Math.pow(2,8*v)),U},a.prototype.readIntBE=function(w,v,L){w=w>>>0,v=v>>>0,L||A(w,v,this.length);let U=v,V=1,z=this[w+--U];for(;U>0&&(V*=256);)z+=this[w+--U]*V;return V*=128,z>=V&&(z-=Math.pow(2,8*v)),z},a.prototype.readInt8=function(w,v){return w=w>>>0,v||A(w,1,this.length),this[w]&128?(255-this[w]+1)*-1:this[w]},a.prototype.readInt16LE=function(w,v){w=w>>>0,v||A(w,2,this.length);const L=this[w]|this[w+1]<<8;return L&32768?L|4294901760:L},a.prototype.readInt16BE=function(w,v){w=w>>>0,v||A(w,2,this.length);const L=this[w+1]|this[w]<<8;return L&32768?L|4294901760:L},a.prototype.readInt32LE=function(w,v){return w=w>>>0,v||A(w,4,this.length),this[w]|this[w+1]<<8|this[w+2]<<16|this[w+3]<<24},a.prototype.readInt32BE=function(w,v){return w=w>>>0,v||A(w,4,this.length),this[w]<<24|this[w+1]<<16|this[w+2]<<8|this[w+3]},a.prototype.readBigInt64LE=je(function(w){w=w>>>0,Z(w,"offset");const v=this[w],L=this[w+7];(v===void 0||L===void 0)&&Q(w,this.length-8);const U=this[w+4]+this[w+5]*2**8+this[w+6]*2**16+(L<<24);return(BigInt(U)<>>0,Z(w,"offset");const v=this[w],L=this[w+7];(v===void 0||L===void 0)&&Q(w,this.length-8);const U=(v<<24)+this[++w]*2**16+this[++w]*2**8+this[++w];return(BigInt(U)<>>0,v||A(w,4,this.length),n.read(this,w,!0,23,4)},a.prototype.readFloatBE=function(w,v){return w=w>>>0,v||A(w,4,this.length),n.read(this,w,!1,23,4)},a.prototype.readDoubleLE=function(w,v){return w=w>>>0,v||A(w,8,this.length),n.read(this,w,!0,52,8)},a.prototype.readDoubleBE=function(w,v){return w=w>>>0,v||A(w,8,this.length),n.read(this,w,!1,52,8)};function b(k,w,v,L,U,V){if(!a.isBuffer(k))throw new TypeError('"buffer" argument must be a Buffer instance');if(w>U||wk.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(w,v,L,U){if(w=+w,v=v>>>0,L=L>>>0,!U){const de=Math.pow(2,8*L)-1;b(this,w,v,L,de,0)}let V=1,z=0;for(this[v]=w&255;++z>>0,L=L>>>0,!U){const de=Math.pow(2,8*L)-1;b(this,w,v,L,de,0)}let V=L-1,z=1;for(this[v+V]=w&255;--V>=0&&(z*=256);)this[v+V]=w/z&255;return v+L},a.prototype.writeUint8=a.prototype.writeUInt8=function(w,v,L){return w=+w,v=v>>>0,L||b(this,w,v,1,255,0),this[v]=w&255,v+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(w,v,L){return w=+w,v=v>>>0,L||b(this,w,v,2,65535,0),this[v]=w&255,this[v+1]=w>>>8,v+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(w,v,L){return w=+w,v=v>>>0,L||b(this,w,v,2,65535,0),this[v]=w>>>8,this[v+1]=w&255,v+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(w,v,L){return w=+w,v=v>>>0,L||b(this,w,v,4,4294967295,0),this[v+3]=w>>>24,this[v+2]=w>>>16,this[v+1]=w>>>8,this[v]=w&255,v+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(w,v,L){return w=+w,v=v>>>0,L||b(this,w,v,4,4294967295,0),this[v]=w>>>24,this[v+1]=w>>>16,this[v+2]=w>>>8,this[v+3]=w&255,v+4};function N(k,w,v,L,U){O(w,L,U,k,v,7);let V=Number(w&BigInt(4294967295));k[v++]=V,V=V>>8,k[v++]=V,V=V>>8,k[v++]=V,V=V>>8,k[v++]=V;let z=Number(w>>BigInt(32)&BigInt(4294967295));return k[v++]=z,z=z>>8,k[v++]=z,z=z>>8,k[v++]=z,z=z>>8,k[v++]=z,v}function te(k,w,v,L,U){O(w,L,U,k,v,7);let V=Number(w&BigInt(4294967295));k[v+7]=V,V=V>>8,k[v+6]=V,V=V>>8,k[v+5]=V,V=V>>8,k[v+4]=V;let z=Number(w>>BigInt(32)&BigInt(4294967295));return k[v+3]=z,z=z>>8,k[v+2]=z,z=z>>8,k[v+1]=z,z=z>>8,k[v]=z,v+8}a.prototype.writeBigUInt64LE=je(function(w,v=0){return N(this,w,v,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=je(function(w,v=0){return te(this,w,v,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(w,v,L,U){if(w=+w,v=v>>>0,!U){const ce=Math.pow(2,8*L-1);b(this,w,v,L,ce-1,-ce)}let V=0,z=1,de=0;for(this[v]=w&255;++V>0)-de&255;return v+L},a.prototype.writeIntBE=function(w,v,L,U){if(w=+w,v=v>>>0,!U){const ce=Math.pow(2,8*L-1);b(this,w,v,L,ce-1,-ce)}let V=L-1,z=1,de=0;for(this[v+V]=w&255;--V>=0&&(z*=256);)w<0&&de===0&&this[v+V+1]!==0&&(de=1),this[v+V]=(w/z>>0)-de&255;return v+L},a.prototype.writeInt8=function(w,v,L){return w=+w,v=v>>>0,L||b(this,w,v,1,127,-128),w<0&&(w=255+w+1),this[v]=w&255,v+1},a.prototype.writeInt16LE=function(w,v,L){return w=+w,v=v>>>0,L||b(this,w,v,2,32767,-32768),this[v]=w&255,this[v+1]=w>>>8,v+2},a.prototype.writeInt16BE=function(w,v,L){return w=+w,v=v>>>0,L||b(this,w,v,2,32767,-32768),this[v]=w>>>8,this[v+1]=w&255,v+2},a.prototype.writeInt32LE=function(w,v,L){return w=+w,v=v>>>0,L||b(this,w,v,4,2147483647,-2147483648),this[v]=w&255,this[v+1]=w>>>8,this[v+2]=w>>>16,this[v+3]=w>>>24,v+4},a.prototype.writeInt32BE=function(w,v,L){return w=+w,v=v>>>0,L||b(this,w,v,4,2147483647,-2147483648),w<0&&(w=4294967295+w+1),this[v]=w>>>24,this[v+1]=w>>>16,this[v+2]=w>>>8,this[v+3]=w&255,v+4},a.prototype.writeBigInt64LE=je(function(w,v=0){return N(this,w,v,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=je(function(w,v=0){return te(this,w,v,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function K(k,w,v,L,U,V){if(v+L>k.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("Index out of range")}function $(k,w,v,L,U){return w=+w,v=v>>>0,U||K(k,w,v,4),n.write(k,w,v,L,23,4),v+4}a.prototype.writeFloatLE=function(w,v,L){return $(this,w,v,!0,L)},a.prototype.writeFloatBE=function(w,v,L){return $(this,w,v,!1,L)};function W(k,w,v,L,U){return w=+w,v=v>>>0,U||K(k,w,v,8),n.write(k,w,v,L,52,8),v+8}a.prototype.writeDoubleLE=function(w,v,L){return W(this,w,v,!0,L)},a.prototype.writeDoubleBE=function(w,v,L){return W(this,w,v,!1,L)},a.prototype.copy=function(w,v,L,U){if(!a.isBuffer(w))throw new TypeError("argument should be a Buffer");if(L||(L=0),!U&&U!==0&&(U=this.length),v>=w.length&&(v=w.length),v||(v=0),U>0&&U=this.length)throw new RangeError("Index out of range");if(U<0)throw new RangeError("sourceEnd out of bounds");U>this.length&&(U=this.length),w.length-v>>0,L=L===void 0?this.length:L>>>0,w||(w=0);let V;if(typeof w=="number")for(V=v;V2**32?U=oe(String(v)):typeof v=="bigint"&&(U=String(v),(v>BigInt(2)**BigInt(32)||v<-(BigInt(2)**BigInt(32)))&&(U=oe(U)),U+="n"),L+=` It must be ${w}. Received ${U}`,L},RangeError);function oe(k){let w="",v=k.length;const L=k[0]==="-"?1:0;for(;v>=L+4;v-=3)w=`_${k.slice(v-3,v)}${w}`;return`${k.slice(0,v)}${w}`}function P(k,w,v){Z(w,"offset"),(k[w]===void 0||k[w+v]===void 0)&&Q(w,k.length-(v+1))}function O(k,w,v,L,U,V){if(k>v||k= 0${z} and < 2${z} ** ${(V+1)*8}${z}`:de=`>= -(2${z} ** ${(V+1)*8-1}${z}) and < 2 ** ${(V+1)*8-1}${z}`,new J.ERR_OUT_OF_RANGE("value",de,k)}P(L,U,V)}function Z(k,w){if(typeof k!="number")throw new J.ERR_INVALID_ARG_TYPE(w,"number",k)}function Q(k,w,v){throw Math.floor(k)!==k?(Z(k,v),new J.ERR_OUT_OF_RANGE("offset","an integer",k)):w<0?new J.ERR_BUFFER_OUT_OF_BOUNDS:new J.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${w}`,k)}const ae=/[^+/0-9A-Za-z-_]/g;function le(k){if(k=k.split("=")[0],k=k.trim().replace(ae,""),k.length<2)return"";for(;k.length%4!==0;)k=k+"=";return k}function ne(k,w){w=w||1/0;let v;const L=k.length;let U=null;const V=[];for(let z=0;z55295&&v<57344){if(!U){if(v>56319){(w-=3)>-1&&V.push(239,191,189);continue}else if(z+1===L){(w-=3)>-1&&V.push(239,191,189);continue}U=v;continue}if(v<56320){(w-=3)>-1&&V.push(239,191,189),U=v;continue}v=(U-55296<<10|v-56320)+65536}else U&&(w-=3)>-1&&V.push(239,191,189);if(U=null,v<128){if((w-=1)<0)break;V.push(v)}else if(v<2048){if((w-=2)<0)break;V.push(v>>6|192,v&63|128)}else if(v<65536){if((w-=3)<0)break;V.push(v>>12|224,v>>6&63|128,v&63|128)}else if(v<1114112){if((w-=4)<0)break;V.push(v>>18|240,v>>12&63|128,v>>6&63|128,v&63|128)}else throw new Error("Invalid code point")}return V}function fe(k){const w=[];for(let v=0;v>8,U=v%256,V.push(U),V.push(L);return V}function me(k){return r.toByteArray(le(k))}function he(k,w,v,L){let U;for(U=0;U=w.length||U>=k.length);++U)w[U+v]=k[U];return U}function ve(k,w){return k instanceof w||k!=null&&k.constructor!=null&&k.constructor.name!=null&&k.constructor.name===w.name}function pe(k){return k!==k}const we=function(){const k="0123456789abcdef",w=new Array(256);for(let v=0;v<16;++v){const L=v*16;for(let U=0;U<16;++U)w[L+U]=k[v]+k[U]}return w}();function je(k){return typeof BigInt>"u"?ye:k}function ye(){throw new Error("BigInt not supported")}}(Bn)),Bn}/*! safe-buffer. MIT License. Feross Aboukhadijeh */var Co;function st(){return Co||(Co=1,function(e,r){var n=wn(),t=n.Buffer;function g(c,a){for(var p in c)a[p]=c[p]}t.from&&t.alloc&&t.allocUnsafe&&t.allocUnsafeSlow?e.exports=n:(g(n,r),r.Buffer=i);function i(c,a,p){return t(c,a,p)}i.prototype=Object.create(t.prototype),g(t,i),i.from=function(c,a,p){if(typeof c=="number")throw new TypeError("Argument must not be a number");return t(c,a,p)},i.alloc=function(c,a,p){if(typeof c!="number")throw new TypeError("Argument must be a number");var u=t(c);return a!==void 0?typeof p=="string"?u.fill(a,p):u.fill(a):u.fill(0),u},i.allocUnsafe=function(c){if(typeof c!="number")throw new TypeError("Argument must be a number");return t(c)},i.allocUnsafeSlow=function(c){if(typeof c!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(c)}}(Jr,Jr.exports)),Jr.exports}var Nn,Mo;function Qt(){if(Mo)return Nn;Mo=1;var e=st().Buffer;function r(n,t){this._block=e.alloc(n),this._finalSize=t,this._blockSize=n,this._len=0}return r.prototype.update=function(n,t){typeof n=="string"&&(t=t||"utf8",n=e.from(n,t));for(var g=this._block,i=this._blockSize,c=n.length,a=this._len,p=0;p=this._finalSize&&(this._update(this._block),this._block.fill(0));var g=this._len*8;if(g<=4294967295)this._block.writeUInt32BE(g,this._blockSize-4);else{var i=(g&4294967295)>>>0,c=(g-i)/4294967296;this._block.writeUInt32BE(c,this._blockSize-8),this._block.writeUInt32BE(i,this._blockSize-4)}this._update(this._block);var a=this._hash();return n?a.toString(n):a},r.prototype._update=function(){throw new Error("_update must be implemented by subclass")},Nn=r,Nn}var Pn,ko;function Wl(){if(ko)return Pn;ko=1;var e=Qe(),r=Qt(),n=st().Buffer,t=[1518500249,1859775393,-1894007588,-899497514],g=new Array(80);function i(){this.init(),this._w=g,r.call(this,64,56)}e(i,r),i.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function c(u){return u<<5|u>>>27}function a(u){return u<<30|u>>>2}function p(u,m,o,h){return u===0?m&o|~m&h:u===2?m&o|m&h|o&h:m^o^h}return i.prototype._update=function(u){for(var m=this._w,o=this._a|0,h=this._b|0,s=this._c|0,f=this._d|0,E=this._e|0,y=0;y<16;++y)m[y]=u.readInt32BE(y*4);for(;y<80;++y)m[y]=m[y-3]^m[y-8]^m[y-14]^m[y-16];for(var l=0;l<80;++l){var R=~~(l/20),S=c(o)+p(R,h,s,f)+E+m[l]+t[R]|0;E=f,f=s,s=a(h),h=o,o=S}this._a=o+this._a|0,this._b=h+this._b|0,this._c=s+this._c|0,this._d=f+this._d|0,this._e=E+this._e|0},i.prototype._hash=function(){var u=n.allocUnsafe(20);return u.writeInt32BE(this._a|0,0),u.writeInt32BE(this._b|0,4),u.writeInt32BE(this._c|0,8),u.writeInt32BE(this._d|0,12),u.writeInt32BE(this._e|0,16),u},Pn=i,Pn}var On,Io;function Vl(){if(Io)return On;Io=1;var e=Qe(),r=Qt(),n=st().Buffer,t=[1518500249,1859775393,-1894007588,-899497514],g=new Array(80);function i(){this.init(),this._w=g,r.call(this,64,56)}e(i,r),i.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function c(m){return m<<1|m>>>31}function a(m){return m<<5|m>>>27}function p(m){return m<<30|m>>>2}function u(m,o,h,s){return m===0?o&h|~o&s:m===2?o&h|o&s|h&s:o^h^s}return i.prototype._update=function(m){for(var o=this._w,h=this._a|0,s=this._b|0,f=this._c|0,E=this._d|0,y=this._e|0,l=0;l<16;++l)o[l]=m.readInt32BE(l*4);for(;l<80;++l)o[l]=c(o[l-3]^o[l-8]^o[l-14]^o[l-16]);for(var R=0;R<80;++R){var S=~~(R/20),I=a(h)+u(S,s,f,E)+y+o[R]+t[S]|0;y=E,E=f,f=p(s),s=h,h=I}this._a=h+this._a|0,this._b=s+this._b|0,this._c=f+this._c|0,this._d=E+this._d|0,this._e=y+this._e|0},i.prototype._hash=function(){var m=n.allocUnsafe(20);return m.writeInt32BE(this._a|0,0),m.writeInt32BE(this._b|0,4),m.writeInt32BE(this._c|0,8),m.writeInt32BE(this._d|0,12),m.writeInt32BE(this._e|0,16),m},On=i,On}var Fn,xo;function Wc(){if(xo)return Fn;xo=1;var e=Qe(),r=Qt(),n=st().Buffer,t=[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],g=new Array(64);function i(){this.init(),this._w=g,r.call(this,64,56)}e(i,r),i.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function c(h,s,f){return f^h&(s^f)}function a(h,s,f){return h&s|f&(h|s)}function p(h){return(h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10)}function u(h){return(h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7)}function m(h){return(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3}function o(h){return(h>>>17|h<<15)^(h>>>19|h<<13)^h>>>10}return i.prototype._update=function(h){for(var s=this._w,f=this._a|0,E=this._b|0,y=this._c|0,l=this._d|0,R=this._e|0,S=this._f|0,I=this._g|0,T=this._h|0,q=0;q<16;++q)s[q]=h.readInt32BE(q*4);for(;q<64;++q)s[q]=o(s[q-2])+s[q-7]+m(s[q-15])+s[q-16]|0;for(var D=0;D<64;++D){var H=T+u(R)+c(R,S,I)+t[D]+s[D]|0,G=p(f)+a(f,E,y)|0;T=I,I=S,S=R,R=l+H|0,l=y,y=E,E=f,f=H+G|0}this._a=f+this._a|0,this._b=E+this._b|0,this._c=y+this._c|0,this._d=l+this._d|0,this._e=R+this._e|0,this._f=S+this._f|0,this._g=I+this._g|0,this._h=T+this._h|0},i.prototype._hash=function(){var h=n.allocUnsafe(32);return h.writeInt32BE(this._a,0),h.writeInt32BE(this._b,4),h.writeInt32BE(this._c,8),h.writeInt32BE(this._d,12),h.writeInt32BE(this._e,16),h.writeInt32BE(this._f,20),h.writeInt32BE(this._g,24),h.writeInt32BE(this._h,28),h},Fn=i,Fn}var Dn,Ao;function zl(){if(Ao)return Dn;Ao=1;var e=Qe(),r=Wc(),n=Qt(),t=st().Buffer,g=new Array(64);function i(){this.init(),this._w=g,n.call(this,64,56)}return e(i,r),i.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},i.prototype._hash=function(){var c=t.allocUnsafe(28);return c.writeInt32BE(this._a,0),c.writeInt32BE(this._b,4),c.writeInt32BE(this._c,8),c.writeInt32BE(this._d,12),c.writeInt32BE(this._e,16),c.writeInt32BE(this._f,20),c.writeInt32BE(this._g,24),c},Dn=i,Dn}var qn,To;function Vc(){if(To)return qn;To=1;var e=Qe(),r=Qt(),n=st().Buffer,t=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],g=new Array(160);function i(){this.init(),this._w=g,r.call(this,128,112)}e(i,r),i.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function c(E,y,l){return l^E&(y^l)}function a(E,y,l){return E&y|l&(E|y)}function p(E,y){return(E>>>28|y<<4)^(y>>>2|E<<30)^(y>>>7|E<<25)}function u(E,y){return(E>>>14|y<<18)^(E>>>18|y<<14)^(y>>>9|E<<23)}function m(E,y){return(E>>>1|y<<31)^(E>>>8|y<<24)^E>>>7}function o(E,y){return(E>>>1|y<<31)^(E>>>8|y<<24)^(E>>>7|y<<25)}function h(E,y){return(E>>>19|y<<13)^(y>>>29|E<<3)^E>>>6}function s(E,y){return(E>>>19|y<<13)^(y>>>29|E<<3)^(E>>>6|y<<26)}function f(E,y){return E>>>0>>0?1:0}return i.prototype._update=function(E){for(var y=this._w,l=this._ah|0,R=this._bh|0,S=this._ch|0,I=this._dh|0,T=this._eh|0,q=this._fh|0,D=this._gh|0,H=this._hh|0,G=this._al|0,X=this._bl|0,Y=this._cl|0,re=this._dl|0,F=this._el|0,d=this._fl|0,_=this._gl|0,C=this._hl|0,M=0;M<32;M+=2)y[M]=E.readInt32BE(M*4),y[M+1]=E.readInt32BE(M*4+4);for(;M<160;M+=2){var x=y[M-30],B=y[M-15*2+1],j=m(x,B),A=o(B,x);x=y[M-2*2],B=y[M-2*2+1];var b=h(x,B),N=s(B,x),te=y[M-7*2],K=y[M-7*2+1],$=y[M-16*2],W=y[M-16*2+1],J=A+K|0,ee=j+te+f(J,A)|0;J=J+N|0,ee=ee+b+f(J,N)|0,J=J+W|0,ee=ee+$+f(J,W)|0,y[M]=ee,y[M+1]=J}for(var oe=0;oe<160;oe+=2){ee=y[oe],J=y[oe+1];var P=a(l,R,S),O=a(G,X,Y),Z=p(l,G),Q=p(G,l),ae=u(T,F),le=u(F,T),ne=t[oe],fe=t[oe+1],He=c(T,q,D),me=c(F,d,_),he=C+le|0,ve=H+ae+f(he,C)|0;he=he+me|0,ve=ve+He+f(he,me)|0,he=he+fe|0,ve=ve+ne+f(he,fe)|0,he=he+J|0,ve=ve+ee+f(he,J)|0;var pe=Q+O|0,we=Z+P+f(pe,Q)|0;H=D,C=_,D=q,_=d,q=T,d=F,F=re+he|0,T=I+ve+f(F,re)|0,I=S,re=Y,S=R,Y=X,R=l,X=G,G=he+pe|0,l=ve+we+f(G,he)|0}this._al=this._al+G|0,this._bl=this._bl+X|0,this._cl=this._cl+Y|0,this._dl=this._dl+re|0,this._el=this._el+F|0,this._fl=this._fl+d|0,this._gl=this._gl+_|0,this._hl=this._hl+C|0,this._ah=this._ah+l+f(this._al,G)|0,this._bh=this._bh+R+f(this._bl,X)|0,this._ch=this._ch+S+f(this._cl,Y)|0,this._dh=this._dh+I+f(this._dl,re)|0,this._eh=this._eh+T+f(this._el,F)|0,this._fh=this._fh+q+f(this._fl,d)|0,this._gh=this._gh+D+f(this._gl,_)|0,this._hh=this._hh+H+f(this._hl,C)|0},i.prototype._hash=function(){var E=n.allocUnsafe(64);function y(l,R,S){E.writeInt32BE(l,S),E.writeInt32BE(R,S+4)}return y(this._ah,this._al,0),y(this._bh,this._bl,8),y(this._ch,this._cl,16),y(this._dh,this._dl,24),y(this._eh,this._el,32),y(this._fh,this._fl,40),y(this._gh,this._gl,48),y(this._hh,this._hl,56),E},qn=i,qn}var jn,Lo;function Jl(){if(Lo)return jn;Lo=1;var e=Qe(),r=Vc(),n=Qt(),t=st().Buffer,g=new Array(160);function i(){this.init(),this._w=g,n.call(this,128,112)}return e(i,r),i.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},i.prototype._hash=function(){var c=t.allocUnsafe(48);function a(p,u,m){c.writeInt32BE(p,m),c.writeInt32BE(u,m+4)}return a(this._ah,this._al,0),a(this._bh,this._bl,8),a(this._ch,this._cl,16),a(this._dh,this._dl,24),a(this._eh,this._el,32),a(this._fh,this._fl,40),c},jn=i,jn}var Bo;function Gl(){if(Bo)return Ln.exports;Bo=1;var e=Ln.exports=function(n){n=n.toLowerCase();var t=e[n];if(!t)throw new Error(n+" is not supported (we accept pull requests)");return new t};return e.sha=Wl(),e.sha1=Vl(),e.sha224=zl(),e.sha256=Wc(),e.sha384=Jl(),e.sha512=Vc(),Ln.exports}var No;function $s(){if(No)return dr;No=1,Object.defineProperty(dr,"__esModule",{value:!0}),dr.Session=void 0;const e=Gl(),r=tt(),n="session:id",t="session:secret",g="session:linked";let i=class zc{constructor(a,p,u,m){this._storage=a,this._id=p||(0,r.randomBytesHex)(16),this._secret=u||(0,r.randomBytesHex)(32),this._key=new e.sha256().update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!m}static load(a){const p=a.getItem(n),u=a.getItem(g),m=a.getItem(t);return p&&m?new zc(a,p,m,u==="1"):null}static hash(a){return new e.sha256().update(a).digest("hex")}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(a){this._linked=a,this.persistLinked()}save(){return this._storage.setItem(n,this._id),this._storage.setItem(t,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(g,this._linked?"1":"0")}};return dr.Session=i,dr}var pr={},gr={},Po;function Zl(){if(Po)return gr;Po=1,Object.defineProperty(gr,"__esModule",{value:!0}),gr.Cipher=void 0;const e=tt();let r=class{constructor(t){this.secret=t}async encrypt(t){const g=this.secret;if(g.length!==64)throw Error("secret must be 256 bits");const i=crypto.getRandomValues(new Uint8Array(12)),c=await crypto.subtle.importKey("raw",(0,e.hexStringToUint8Array)(g),{name:"aes-gcm"},!1,["encrypt","decrypt"]),a=new TextEncoder,p=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:i},c,a.encode(t)),u=16,m=p.slice(p.byteLength-u),o=p.slice(0,p.byteLength-u),h=new Uint8Array(m),s=new Uint8Array(o),f=new Uint8Array([...i,...h,...s]);return(0,e.uint8ArrayToHex)(f)}async decrypt(t){const g=this.secret;if(g.length!==64)throw Error("secret must be 256 bits");return new Promise((i,c)=>{(async function(){const a=await crypto.subtle.importKey("raw",(0,e.hexStringToUint8Array)(g),{name:"aes-gcm"},!1,["encrypt","decrypt"]),p=(0,e.hexStringToUint8Array)(t),u=p.slice(0,12),m=p.slice(12,28),o=p.slice(28),h=new Uint8Array([...o,...m]),s={name:"AES-GCM",iv:new Uint8Array(u)};try{const f=await window.crypto.subtle.decrypt(s,a,h),E=new TextDecoder;i(E.decode(f))}catch(f){c(f)}})()})}};return gr.Cipher=r,gr}var mr={},Oo;function Kl(){if(Oo)return mr;Oo=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.WalletLinkHTTP=void 0;let e=class{constructor(n,t,g){this.linkAPIUrl=n,this.sessionId=t;const i=`${t}:${g}`;this.auth=`Basic ${btoa(i)}`}async markUnseenEventsAsSeen(n){return Promise.all(n.map(t=>fetch(`${this.linkAPIUrl}/events/${t.eventId}/seen`,{method:"POST",headers:{Authorization:this.auth}}))).catch(t=>console.error("Unabled to mark event as failed:",t))}async fetchUnseenEvents(){var n;const t=await fetch(`${this.linkAPIUrl}/events?unseen=true`,{headers:{Authorization:this.auth}});if(t.ok){const{events:g,error:i}=await t.json();if(i)throw new Error(`Check unseen events failed: ${i}`);const c=(n=g==null?void 0:g.filter(a=>a.event==="Web3Response").map(a=>({type:"Event",sessionId:this.sessionId,eventId:a.id,event:a.event,data:a.data})))!==null&&n!==void 0?n:[];return this.markUnseenEventsAsSeen(c),c}throw new Error(`Check unseen events failed: ${t.status}`)}};return mr.WalletLinkHTTP=e,mr}var Rt={},Fo;function Ql(){if(Fo)return Rt;Fo=1,Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.WalletLinkWebSocket=Rt.ConnectionState=void 0;var e;(function(n){n[n.DISCONNECTED=0]="DISCONNECTED",n[n.CONNECTING=1]="CONNECTING",n[n.CONNECTED=2]="CONNECTED"})(e||(Rt.ConnectionState=e={}));let r=class{setConnectionStateListener(t){this.connectionStateListener=t}setIncomingDataListener(t){this.incomingDataListener=t}constructor(t,g=WebSocket){this.WebSocketClass=g,this.webSocket=null,this.pendingData=[],this.url=t.replace(/^http/,"ws")}async connect(){if(this.webSocket)throw new Error("webSocket object is not null");return new Promise((t,g)=>{var i;let c;try{this.webSocket=c=new this.WebSocketClass(this.url)}catch(a){g(a);return}(i=this.connectionStateListener)===null||i===void 0||i.call(this,e.CONNECTING),c.onclose=a=>{var p;this.clearWebSocket(),g(new Error(`websocket error ${a.code}: ${a.reason}`)),(p=this.connectionStateListener)===null||p===void 0||p.call(this,e.DISCONNECTED)},c.onopen=a=>{var p;t(),(p=this.connectionStateListener)===null||p===void 0||p.call(this,e.CONNECTED),this.pendingData.length>0&&([...this.pendingData].forEach(m=>this.sendData(m)),this.pendingData=[])},c.onmessage=a=>{var p,u;if(a.data==="h")(p=this.incomingDataListener)===null||p===void 0||p.call(this,{type:"Heartbeat"});else try{const m=JSON.parse(a.data);(u=this.incomingDataListener)===null||u===void 0||u.call(this,m)}catch{}}})}disconnect(){var t;const{webSocket:g}=this;if(g){this.clearWebSocket(),(t=this.connectionStateListener)===null||t===void 0||t.call(this,e.DISCONNECTED),this.connectionStateListener=void 0,this.incomingDataListener=void 0;try{g.close()}catch{}}}sendData(t){const{webSocket:g}=this;if(!g){this.pendingData.push(t),this.connect();return}g.send(t)}clearWebSocket(){const{webSocket:t}=this;t&&(this.webSocket=null,t.onclose=null,t.onerror=null,t.onmessage=null,t.onopen=null)}};return Rt.WalletLinkWebSocket=r,Rt}var Do;function Yl(){if(Do)return pr;Do=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.WalletLinkConnection=void 0;const e=mn(),r=Zl(),n=qs(),t=js(),g=$s(),i=Kl(),c=Ql(),a=1e4,p=6e4;let u=class{constructor({session:o,linkAPIUrl:h,listener:s,diagnostic:f,WebSocketClass:E=WebSocket}){this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,e.IntNumber)(1),this._connected=!1,this._linked=!1,this.shouldFetchUnseenEventsOnConnect=!1,this.requestResolutions=new Map,this.handleSessionMetadataUpdated=l=>{if(!l)return;new Map([["__destroyed",this.handleDestroyed],["EthereumAddress",this.handleAccountUpdated],["WalletUsername",this.handleWalletUsernameUpdated],["AppVersion",this.handleAppVersionUpdated],["ChainId",S=>l.JsonRpcUrl&&this.handleChainUpdated(S,l.JsonRpcUrl)]]).forEach((S,I)=>{const T=l[I];T!==void 0&&S(T)})},this.handleDestroyed=l=>{var R,S;l==="1"&&((R=this.listener)===null||R===void 0||R.resetAndReload(),(S=this.diagnostic)===null||S===void 0||S.log(n.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:this.isDestroyed,sessionIdHash:g.Session.hash(this.session.id)}))},this.handleAccountUpdated=async l=>{var R,S;try{const I=await this.cipher.decrypt(l);(R=this.listener)===null||R===void 0||R.accountUpdated(I)}catch{(S=this.diagnostic)===null||S===void 0||S.log(n.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}},this.handleMetadataUpdated=async(l,R)=>{var S,I;try{const T=await this.cipher.decrypt(R);(S=this.listener)===null||S===void 0||S.metadataUpdated(l,T)}catch{(I=this.diagnostic)===null||I===void 0||I.log(n.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:l})}},this.handleWalletUsernameUpdated=async l=>{this.handleMetadataUpdated(t.WALLET_USER_NAME_KEY,l)},this.handleAppVersionUpdated=async l=>{this.handleMetadataUpdated(t.APP_VERSION_KEY,l)},this.handleChainUpdated=async(l,R)=>{var S,I;try{const T=await this.cipher.decrypt(l),q=await this.cipher.decrypt(R);(S=this.listener)===null||S===void 0||S.chainUpdated(T,q)}catch{(I=this.diagnostic)===null||I===void 0||I.log(n.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}},this.session=o,this.cipher=new r.Cipher(o.secret),this.diagnostic=f,this.listener=s;const y=new c.WalletLinkWebSocket(`${h}/rpc`,E);y.setConnectionStateListener(async l=>{var R;(R=this.diagnostic)===null||R===void 0||R.log(n.EVENTS.CONNECTED_STATE_CHANGE,{state:l,sessionIdHash:g.Session.hash(o.id)});let S=!1;switch(l){case c.ConnectionState.DISCONNECTED:if(!this.destroyed){const I=async()=>{await new Promise(T=>setTimeout(T,5e3)),this.destroyed||y.connect().catch(()=>{I()})};I()}break;case c.ConnectionState.CONNECTED:try{await this.authenticate(),this.sendIsLinked(),this.sendGetSessionConfig(),S=!0}catch{}this.updateLastHeartbeat(),setInterval(()=>{this.heartbeat()},a),this.shouldFetchUnseenEventsOnConnect&&this.fetchUnseenEventsAPI();break;case c.ConnectionState.CONNECTING:break}this.connected!==S&&(this.connected=S)}),y.setIncomingDataListener(l=>{var R,S,I;switch(l.type){case"Heartbeat":this.updateLastHeartbeat();return;case"IsLinkedOK":case"Linked":{const T=l.type==="IsLinkedOK"?l.linked:void 0;(R=this.diagnostic)===null||R===void 0||R.log(n.EVENTS.LINKED,{sessionIdHash:g.Session.hash(o.id),linked:T,type:l.type,onlineGuests:l.onlineGuests}),this.linked=T||l.onlineGuests>0;break}case"GetSessionConfigOK":case"SessionConfigUpdated":{(S=this.diagnostic)===null||S===void 0||S.log(n.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:g.Session.hash(o.id),metadata_keys:l&&l.metadata?Object.keys(l.metadata):void 0}),this.handleSessionMetadataUpdated(l.metadata);break}case"Event":{this.handleIncomingEvent(l);break}}l.id!==void 0&&((I=this.requestResolutions.get(l.id))===null||I===void 0||I(l))}),this.ws=y,this.http=new i.WalletLinkHTTP(h,o.id,o.key)}connect(){var o;if(this.destroyed)throw new Error("instance is destroyed");(o=this.diagnostic)===null||o===void 0||o.log(n.EVENTS.STARTED_CONNECTING,{sessionIdHash:g.Session.hash(this.session.id)}),this.ws.connect()}destroy(){var o;this.destroyed=!0,this.ws.disconnect(),(o=this.diagnostic)===null||o===void 0||o.log(n.EVENTS.DISCONNECTED,{sessionIdHash:g.Session.hash(this.session.id)}),this.listener=void 0}get isDestroyed(){return this.destroyed}get connected(){return this._connected}set connected(o){var h,s;this._connected=o,o&&((h=this.onceConnected)===null||h===void 0||h.call(this)),(s=this.listener)===null||s===void 0||s.connectedUpdated(o)}setOnceConnected(o){return new Promise(h=>{this.connected?o().then(h):this.onceConnected=()=>{o().then(h),this.onceConnected=void 0}})}get linked(){return this._linked}set linked(o){var h,s;this._linked=o,o&&((h=this.onceLinked)===null||h===void 0||h.call(this)),(s=this.listener)===null||s===void 0||s.linkedUpdated(o)}setOnceLinked(o){return new Promise(h=>{this.linked?o().then(h):this.onceLinked=()=>{o().then(h),this.onceLinked=void 0}})}async handleIncomingEvent(o){var h,s;if(!(o.type!=="Event"||o.event!=="Web3Response"))try{const f=await this.cipher.decrypt(o.data),E=JSON.parse(f);if(E.type!=="WEB3_RESPONSE")return;(h=this.listener)===null||h===void 0||h.handleWeb3ResponseMessage(E)}catch{(s=this.diagnostic)===null||s===void 0||s.log(n.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}async checkUnseenEvents(){if(!this.connected){this.shouldFetchUnseenEventsOnConnect=!0;return}await new Promise(o=>setTimeout(o,250));try{await this.fetchUnseenEventsAPI()}catch(o){console.error("Unable to check for unseen events",o)}}async fetchUnseenEventsAPI(){this.shouldFetchUnseenEventsOnConnect=!1,(await this.http.fetchUnseenEvents()).forEach(h=>this.handleIncomingEvent(h))}async setSessionMetadata(o,h){const s={type:"SetSessionConfig",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id,metadata:{[o]:h}};return this.setOnceConnected(async()=>{const f=await this.makeRequest(s);if(f.type==="Fail")throw new Error(f.error||"failed to set session metadata")})}async publishEvent(o,h,s=!1){const f=await this.cipher.encrypt(JSON.stringify(Object.assign(Object.assign({},h),{origin:location.origin,relaySource:window.coinbaseWalletExtension?"injected_sdk":"sdk"}))),E={type:"PublishEvent",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id,event:o,data:f,callWebhook:s};return this.setOnceLinked(async()=>{const y=await this.makeRequest(E);if(y.type==="Fail")throw new Error(y.error||"failed to publish event");return y.eventId})}sendData(o){this.ws.sendData(JSON.stringify(o))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>a*2){this.ws.disconnect();return}try{this.ws.sendData("h")}catch{}}async makeRequest(o,h=p){const s=o.id;this.sendData(o);let f;return Promise.race([new Promise((E,y)=>{f=window.setTimeout(()=>{y(new Error(`request ${s} timed out`))},h)}),new Promise(E=>{this.requestResolutions.set(s,y=>{clearTimeout(f),E(y),this.requestResolutions.delete(s)})})])}async authenticate(){const o={type:"HostSession",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id,sessionKey:this.session.key},h=await this.makeRequest(o);if(h.type==="Fail")throw new Error(h.error||"failed to authentcate")}sendIsLinked(){const o={type:"IsLinked",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(o)}sendGetSessionConfig(){const o={type:"GetSessionConfig",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(o)}};return pr.WalletLinkConnection=u,pr}var wr={},qt={},Zr={},qo;function Xl(){return qo||(qo=1,Object.defineProperty(Zr,"__esModule",{value:!0}),Zr.default='@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;counter-increment:none;counter-reset:none;direction:ltr;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}'),Zr}var jo;function Jc(){if(jo)return qt;jo=1;var e=qt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(qt,"__esModule",{value:!0}),qt.injectCssReset=void 0;const r=e(Xl());function n(){const t=document.createElement("style");t.type="text/css",t.appendChild(document.createTextNode(r.default)),document.documentElement.appendChild(t)}return qt.injectCssReset=n,qt}var yr={};const We=$r(Bl);var jt={};const Ur=$r(Nl),yn=$r(Pl);var rt={},br={},$o;function eh(){if($o)return br;$o=1,Object.defineProperty(br,"__esModule",{value:!0}),br.CloseIcon=void 0;const e=We;function r(n){return(0,e.h)("svg",Object.assign({width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),(0,e.h)("path",{d:"M13.7677 13L12.3535 14.4142L18.3535 20.4142L12.3535 26.4142L13.7677 27.8284L19.7677 21.8284L25.7677 27.8284L27.1819 26.4142L21.1819 20.4142L27.1819 14.4142L25.7677 13L19.7677 19L13.7677 13Z"}))}return br.CloseIcon=r,br}var vr={},Uo;function th(){if(Uo)return vr;Uo=1,Object.defineProperty(vr,"__esModule",{value:!0}),vr.CoinbaseWalletRound=void 0;const e=We;function r(n){return(0,e.h)("svg",Object.assign({width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),(0,e.h)("circle",{cx:"14",cy:"14",r:"14",fill:"#0052FF"}),(0,e.h)("path",{d:"M23.8521 14.0003C23.8521 19.455 19.455 23.8521 14.0003 23.8521C8.54559 23.8521 4.14844 19.455 4.14844 14.0003C4.14844 8.54559 8.54559 4.14844 14.0003 4.14844C19.455 4.14844 23.8521 8.54559 23.8521 14.0003Z",fill:"white"}),(0,e.h)("path",{d:"M11.1855 12.5042C11.1855 12.0477 11.1855 11.7942 11.2835 11.642C11.3814 11.4899 11.4793 11.3377 11.6261 11.287C11.8219 11.1855 12.0178 11.1855 12.5073 11.1855H15.4934C15.983 11.1855 16.1788 11.1855 16.3746 11.287C16.5215 11.3884 16.6683 11.4899 16.7173 11.642C16.8152 11.8449 16.8152 12.0477 16.8152 12.5042V15.4965C16.8152 15.953 16.8152 16.2066 16.7173 16.3587C16.6194 16.5109 16.5215 16.663 16.3746 16.7137C16.1788 16.8152 15.983 16.8152 15.4934 16.8152H12.5073C12.0178 16.8152 11.8219 16.8152 11.6261 16.7137C11.4793 16.6123 11.3324 16.5109 11.2835 16.3587C11.1855 16.1558 11.1855 15.953 11.1855 15.4965V12.5042Z",fill:"#0052FF"}))}return vr.CoinbaseWalletRound=r,vr}var _r={},Ho;function rh(){if(Ho)return _r;Ho=1,Object.defineProperty(_r,"__esModule",{value:!0}),_r.QRCodeIcon=void 0;const e=We;function r(n){return(0,e.h)("svg",Object.assign({width:"18",height:"18",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},n),(0,e.h)("path",{d:"M3 3V8.99939L5 8.99996V5H9V3H3Z"}),(0,e.h)("path",{d:"M15 21L21 21V15.0006L19 15V19L15 19V21Z"}),(0,e.h)("path",{d:"M21 9H19V5H15.0006L15 3H21V9Z"}),(0,e.h)("path",{d:"M3 15V21H8.99939L8.99996 19H5L5 15H3Z"}))}return _r.QRCodeIcon=r,_r}var $t={},$n,Wo;function nh(){if(Wo)return $n;Wo=1;function e(s){this.mode=n.MODE_8BIT_BYTE,this.data=s,this.parsedData=[];for(var f=0,E=this.data.length;f65536?(y[0]=240|(l&1835008)>>>18,y[1]=128|(l&258048)>>>12,y[2]=128|(l&4032)>>>6,y[3]=128|l&63):l>2048?(y[0]=224|(l&61440)>>>12,y[1]=128|(l&4032)>>>6,y[2]=128|l&63):l>128?(y[0]=192|(l&1984)>>>6,y[1]=128|l&63):y[0]=l,this.parsedData.push(y)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}e.prototype={getLength:function(s){return this.parsedData.length},write:function(s){for(var f=0,E=this.parsedData.length;f=7&&this.setupTypeNumber(s),this.dataCache==null&&(this.dataCache=r.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,f)},setupPositionProbePattern:function(s,f){for(var E=-1;E<=7;E++)if(!(s+E<=-1||this.moduleCount<=s+E))for(var y=-1;y<=7;y++)f+y<=-1||this.moduleCount<=f+y||(0<=E&&E<=6&&(y==0||y==6)||0<=y&&y<=6&&(E==0||E==6)||2<=E&&E<=4&&2<=y&&y<=4?this.modules[s+E][f+y]=!0:this.modules[s+E][f+y]=!1)},getBestMaskPattern:function(){for(var s=0,f=0,E=0;E<8;E++){this.makeImpl(!0,E);var y=i.getLostPoint(this);(E==0||s>y)&&(s=y,f=E)}return f},createMovieClip:function(s,f,E){var y=s.createEmptyMovieClip(f,E),l=1;this.make();for(var R=0;R>E&1)==1;this.modules[Math.floor(E/3)][E%3+this.moduleCount-8-3]=y}for(var E=0;E<18;E++){var y=!s&&(f>>E&1)==1;this.modules[E%3+this.moduleCount-8-3][Math.floor(E/3)]=y}},setupTypeInfo:function(s,f){for(var E=this.errorCorrectLevel<<3|f,y=i.getBCHTypeInfo(E),l=0;l<15;l++){var R=!s&&(y>>l&1)==1;l<6?this.modules[l][8]=R:l<8?this.modules[l+1][8]=R:this.modules[this.moduleCount-15+l][8]=R}for(var l=0;l<15;l++){var R=!s&&(y>>l&1)==1;l<8?this.modules[8][this.moduleCount-l-1]=R:l<9?this.modules[8][15-l-1+1]=R:this.modules[8][15-l-1]=R}this.modules[this.moduleCount-8][8]=!s},mapData:function(s,f){for(var E=-1,y=this.moduleCount-1,l=7,R=0,S=this.moduleCount-1;S>0;S-=2)for(S==6&&S--;;){for(var I=0;I<2;I++)if(this.modules[y][S-I]==null){var T=!1;R>>l&1)==1);var q=i.getMask(f,y,S-I);q&&(T=!T),this.modules[y][S-I]=T,l--,l==-1&&(R++,l=7)}if(y+=E,y<0||this.moduleCount<=y){y-=E,E=-E;break}}}},r.PAD0=236,r.PAD1=17,r.createData=function(s,f,E){for(var y=u.getRSBlocks(s,f),l=new m,R=0;RI*8)throw new Error("code length overflow. ("+l.getLengthInBits()+">"+I*8+")");for(l.getLengthInBits()+4<=I*8&&l.put(0,4);l.getLengthInBits()%8!=0;)l.putBit(!1);for(;!(l.getLengthInBits()>=I*8||(l.put(r.PAD0,8),l.getLengthInBits()>=I*8));)l.put(r.PAD1,8);return r.createBytes(l,y)},r.createBytes=function(s,f){for(var E=0,y=0,l=0,R=new Array(f.length),S=new Array(f.length),I=0;I=0?X.get(Y):0}}for(var re=0,D=0;D=0;)f^=i.G15<=0;)f^=i.G18<>>=1;return f},getPatternPosition:function(s){return i.PATTERN_POSITION_TABLE[s-1]},getMask:function(s,f,E){switch(s){case g.PATTERN000:return(f+E)%2==0;case g.PATTERN001:return f%2==0;case g.PATTERN010:return E%3==0;case g.PATTERN011:return(f+E)%3==0;case g.PATTERN100:return(Math.floor(f/2)+Math.floor(E/3))%2==0;case g.PATTERN101:return f*E%2+f*E%3==0;case g.PATTERN110:return(f*E%2+f*E%3)%2==0;case g.PATTERN111:return(f*E%3+(f+E)%2)%2==0;default:throw new Error("bad maskPattern:"+s)}},getErrorCorrectPolynomial:function(s){for(var f=new p([1],0),E=0;E5&&(E+=3+R-5)}for(var y=0;y=256;)s-=255;return c.EXP_TABLE[s]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},a=0;a<8;a++)c.EXP_TABLE[a]=1<>>7-s%8&1)==1},put:function(s,f){for(var E=0;E>>f-E-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(s){var f=Math.floor(this.length/8);this.buffer.length<=f&&this.buffer.push(0),s&&(this.buffer[f]|=128>>>this.length%8),this.length++}};var o=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function h(s){if(this.options={padding:4,width:256,height:256,typeNumber:4,color:"#000000",background:"#ffffff",ecl:"M",image:{svg:"",width:0,height:0}},typeof s=="string"&&(s={content:s}),s)for(var f in s)this.options[f]=s[f];if(typeof this.options.content!="string")throw new Error("Expected 'content' as string!");if(this.options.content.length===0)throw new Error("Expected 'content' to be non-empty!");if(!(this.options.padding>=0))throw new Error("Expected 'padding' value to be non-negative!");if(!(this.options.width>0)||!(this.options.height>0))throw new Error("Expected 'width' or 'height' value to be higher than zero!");function E(T){switch(T){case"L":return t.L;case"M":return t.M;case"Q":return t.Q;case"H":return t.H;default:throw new Error("Unknwon error correction level: "+T)}}function y(T,q){for(var D=l(T),H=1,G=0,X=0,Y=o.length;X<=Y;X++){var re=o[X];if(!re)throw new Error("Content too long: expected "+G+" but got "+D);switch(q){case"L":G=re[0];break;case"M":G=re[1];break;case"Q":G=re[2];break;case"H":G=re[3];break;default:throw new Error("Unknwon error correction level: "+q)}if(D<=G)break;H++}if(H>o.length)throw new Error("Content too long");return H}function l(T){var q=encodeURI(T).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return q.length+(q.length!=T?3:0)}var R=this.options.content,S=y(R,this.options.ecl),I=E(this.options.ecl);this.qrcode=new r(S,I),this.qrcode.addData(R),this.qrcode.make()}return h.prototype.svg=function(s){var f=this.options||{},E=this.qrcode.modules;typeof s>"u"&&(s={container:f.container||"svg"});for(var y=typeof f.pretty<"u"?!!f.pretty:!0,l=y?" ":"",R=y?`\r +`:"",S=f.width,I=f.height,T=E.length,q=S/(T+2*f.padding),D=I/(T+2*f.padding),H=typeof f.join<"u"?!!f.join:!1,G=typeof f.swap<"u"?!!f.swap:!1,X=typeof f.xmlDeclaration<"u"?!!f.xmlDeclaration:!0,Y=typeof f.predefined<"u"?!!f.predefined:!1,re=Y?l+''+R:"",F=l+''+R,d="",_="",C=0;C'+R:d+=l+''+R}}H&&(d=l+'');let te="";if(this.options.image!==void 0&&this.options.image.svg){const $=S*this.options.image.width/100,W=I*this.options.image.height/100,J=S/2-$/2,ee=I/2-W/2;te+=``,te+=this.options.image.svg+R,te+=""}var K="";switch(s.container){case"svg":X&&(K+=''+R),K+=''+R,K+=re+F+d,K+=te,K+="";break;case"svg-viewbox":X&&(K+=''+R),K+=''+R,K+=re+F+d,K+=te,K+="";break;case"g":K+=''+R,K+=re+F+d,K+=te,K+="";break;default:K+=(re+F+d+te).replace(/^\s+/,"");break}return K},$n=h,$n}var Vo;function ih(){if(Vo)return $t;Vo=1;var e=$t.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty($t,"__esModule",{value:!0}),$t.QRCode=void 0;const r=We,n=yn,t=e(nh()),g=i=>{const[c,a]=(0,n.useState)("");return(0,n.useEffect)(()=>{var p,u;const m=new t.default({content:i.content,background:i.bgColor||"#ffffff",color:i.fgColor||"#000000",container:"svg",ecl:"M",width:(p=i.width)!==null&&p!==void 0?p:256,height:(u=i.height)!==null&&u!==void 0?u:256,padding:0,image:i.image}),o=Buffer.from(m.svg(),"utf8").toString("base64");a(`data:image/svg+xml;base64,${o}`)},[i.bgColor,i.content,i.fgColor,i.height,i.image,i.width]),c?(0,r.h)("img",{src:c,alt:"QR Code"}):null};return $t.QRCode=g,$t}var Ut={},Kr={},zo;function sh(){return zo||(zo=1,Object.defineProperty(Kr,"__esModule",{value:!0}),Kr.default=".-cbwsdk-css-reset .-cbwsdk-spinner{display:inline-block}.-cbwsdk-css-reset .-cbwsdk-spinner svg{display:inline-block;animation:2s linear infinite -cbwsdk-spinner-svg}.-cbwsdk-css-reset .-cbwsdk-spinner svg circle{animation:1.9s ease-in-out infinite both -cbwsdk-spinner-circle;display:block;fill:rgba(0,0,0,0);stroke-dasharray:283;stroke-dashoffset:280;stroke-linecap:round;stroke-width:10px;transform-origin:50% 50%}@keyframes -cbwsdk-spinner-svg{0%{transform:rotateZ(0deg)}100%{transform:rotateZ(360deg)}}@keyframes -cbwsdk-spinner-circle{0%,25%{stroke-dashoffset:280;transform:rotate(0)}50%,75%{stroke-dashoffset:75;transform:rotate(45deg)}100%{stroke-dashoffset:280;transform:rotate(360deg)}}"),Kr}var Jo;function oh(){if(Jo)return Ut;Jo=1;var e=Ut.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Spinner=void 0;const r=We,n=e(sh()),t=g=>{var i;const c=(i=g.size)!==null&&i!==void 0?i:64,a=g.color||"#000";return(0,r.h)("div",{class:"-cbwsdk-spinner"},(0,r.h)("style",null,n.default),(0,r.h)("svg",{viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",style:{width:c,height:c}},(0,r.h)("circle",{style:{cx:50,cy:50,r:45,stroke:a}})))};return Ut.Spinner=t,Ut}var Qr={},Go;function ah(){return Go||(Go=1,Object.defineProperty(Qr,"__esModule",{value:!0}),Qr.default=".-cbwsdk-css-reset .-cbwsdk-connect-content{height:430px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-connect-content.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-header{display:flex;align-items:center;justify-content:space-between;margin:0 0 30px}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading{font-style:normal;font-weight:500;font-size:28px;line-height:36px;margin:0}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-layout{display:flex;flex-direction:row}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-left{margin-right:30px;display:flex;flex-direction:column;justify-content:space-between}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-right{flex:25%;margin-right:34px}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-wrapper{width:220px;height:220px;border-radius:12px;display:flex;justify-content:center;align-items:center;background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light{background-color:rgba(255,255,255,.95)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light>p{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark{background-color:rgba(10,11,13,.9)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark>p{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting>p{font-size:12px;font-weight:bold;margin-top:16px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app{border-radius:8px;font-size:14px;line-height:20px;padding:12px;width:339px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.light{background:#eef0f3;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.dark{background:#1e2025;color:#8a919e}.-cbwsdk-css-reset .-cbwsdk-cancel-button{-webkit-appearance:none;border:none;background:none;cursor:pointer;padding:0;margin:0}.-cbwsdk-css-reset .-cbwsdk-cancel-button-x{position:relative;display:block;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-wallet-steps{padding:0 0 0 16px;margin:0;width:100%;list-style:decimal}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item{list-style-type:decimal;display:list-item;font-style:normal;font-weight:400;font-size:16px;line-height:24px;margin-top:20px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item-wrapper{display:flex;align-items:center}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-pad-left{margin-left:6px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon{display:flex;border-radius:50%;height:24px;width:24px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.light{background:#0052ff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.dark{background:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item{align-items:center;display:flex;flex-direction:row;padding:16px 24px;gap:12px;cursor:pointer;border-radius:100px;font-weight:600}.-cbwsdk-css-reset .-cbwsdk-connect-item.light{background:#f5f8ff;color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-connect-item.dark{background:#001033;color:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item-copy-wrapper{margin:0 4px 0 8px}.-cbwsdk-css-reset .-cbwsdk-connect-item-title{margin:0 0 0;font-size:16px;line-height:24px;font-weight:500}.-cbwsdk-css-reset .-cbwsdk-connect-item-description{font-weight:400;font-size:14px;line-height:20px;margin:0}"),Qr}var Zo;function uh(){if(Zo)return rt;Zo=1;var e=rt.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(rt,"__esModule",{value:!0}),rt.CoinbaseWalletSteps=rt.ConnectContent=void 0;const r=e(Ur),n=We,t=tt(),g=Ds(),i=eh(),c=th(),a=rh(),p=ih(),u=oh(),m=e(ah()),o={title:"Coinbase Wallet app",description:"Connect with your self-custody wallet",steps:E},h=y=>y==="light"?"#FFFFFF":"#0A0B0D";function s(y){const{theme:l}=y,R=(0,t.createQrUrl)(y.sessionId,y.sessionSecret,y.linkAPIUrl,y.isParentConnection,y.version,y.chainId),S=o.steps;return(0,n.h)("div",{"data-testid":"connect-content",className:(0,r.default)("-cbwsdk-connect-content",l)},(0,n.h)("style",null,m.default),(0,n.h)("div",{className:"-cbwsdk-connect-content-header"},(0,n.h)("h2",{className:(0,r.default)("-cbwsdk-connect-content-heading",l)},"Scan to connect with our mobile app"),y.onCancel&&(0,n.h)("button",{type:"button",className:"-cbwsdk-cancel-button",onClick:y.onCancel},(0,n.h)(i.CloseIcon,{fill:l==="light"?"#0A0B0D":"#FFFFFF"}))),(0,n.h)("div",{className:"-cbwsdk-connect-content-layout"},(0,n.h)("div",{className:"-cbwsdk-connect-content-column-left"},(0,n.h)(f,{title:o.title,description:o.description,theme:l})),(0,n.h)("div",{className:"-cbwsdk-connect-content-column-right"},(0,n.h)("div",{className:"-cbwsdk-connect-content-qr-wrapper"},(0,n.h)(p.QRCode,{content:R,width:200,height:200,fgColor:"#000",bgColor:"transparent"}),(0,n.h)("input",{type:"hidden",name:"cbw-cbwsdk-version",value:g.LIB_VERSION}),(0,n.h)("input",{type:"hidden",value:R})),(0,n.h)(S,{theme:l}),!y.isConnected&&(0,n.h)("div",{"data-testid":"connecting-spinner",className:(0,r.default)("-cbwsdk-connect-content-qr-connecting",l)},(0,n.h)(u.Spinner,{size:36,color:l==="dark"?"#FFF":"#000"}),(0,n.h)("p",null,"Connecting...")))))}rt.ConnectContent=s;function f({title:y,description:l,theme:R}){return(0,n.h)("div",{className:(0,r.default)("-cbwsdk-connect-item",R)},(0,n.h)("div",null,(0,n.h)(c.CoinbaseWalletRound,null)),(0,n.h)("div",{className:"-cbwsdk-connect-item-copy-wrapper"},(0,n.h)("h3",{className:"-cbwsdk-connect-item-title"},y),(0,n.h)("p",{className:"-cbwsdk-connect-item-description"},l)))}function E({theme:y}){return(0,n.h)("ol",{className:"-cbwsdk-wallet-steps"},(0,n.h)("li",{className:(0,r.default)("-cbwsdk-wallet-steps-item",y)},(0,n.h)("div",{className:"-cbwsdk-wallet-steps-item-wrapper"},"Open Coinbase Wallet app")),(0,n.h)("li",{className:(0,r.default)("-cbwsdk-wallet-steps-item",y)},(0,n.h)("div",{className:"-cbwsdk-wallet-steps-item-wrapper"},(0,n.h)("span",null,"Tap ",(0,n.h)("strong",null,"Scan")," "),(0,n.h)("span",{className:(0,r.default)("-cbwsdk-wallet-steps-pad-left","-cbwsdk-wallet-steps-icon",y)},(0,n.h)(a.QRCodeIcon,{fill:h(y)})))))}return rt.CoinbaseWalletSteps=E,rt}var Ht={},Er={},Ko;function ch(){if(Ko)return Er;Ko=1,Object.defineProperty(Er,"__esModule",{value:!0}),Er.ArrowLeftIcon=void 0;const e=We;function r(n){return(0,e.h)("svg",Object.assign({width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},n),(0,e.h)("path",{d:"M8.60675 0.155884L7.37816 1.28209L12.7723 7.16662H0V8.83328H12.6548L6.82149 14.6666L8 15.8451L15.8201 8.02501L8.60675 0.155884Z"}))}return Er.ArrowLeftIcon=r,Er}var Rr={},Qo;function lh(){if(Qo)return Rr;Qo=1,Object.defineProperty(Rr,"__esModule",{value:!0}),Rr.LaptopIcon=void 0;const e=We;function r(n){return(0,e.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},n),(0,e.h)("path",{d:"M1.8001 2.2002H12.2001V9.40019H1.8001V2.2002ZM3.4001 3.8002V7.80019H10.6001V3.8002H3.4001Z"}),(0,e.h)("path",{d:"M13.4001 10.2002H0.600098C0.600098 11.0838 1.31644 11.8002 2.2001 11.8002H11.8001C12.6838 11.8002 13.4001 11.0838 13.4001 10.2002Z"}))}return Rr.LaptopIcon=r,Rr}var Sr={},Yo;function hh(){if(Yo)return Sr;Yo=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.SafeIcon=void 0;const e=We;function r(n){return(0,e.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},n),(0,e.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.600098 0.600098V11.8001H13.4001V0.600098H0.600098ZM7.0001 9.2001C5.3441 9.2001 4.0001 7.8561 4.0001 6.2001C4.0001 4.5441 5.3441 3.2001 7.0001 3.2001C8.6561 3.2001 10.0001 4.5441 10.0001 6.2001C10.0001 7.8561 8.6561 9.2001 7.0001 9.2001ZM0.600098 12.6001H3.8001V13.4001H0.600098V12.6001ZM10.2001 12.6001H13.4001V13.4001H10.2001V12.6001ZM8.8001 6.2001C8.8001 7.19421 7.99421 8.0001 7.0001 8.0001C6.00598 8.0001 5.2001 7.19421 5.2001 6.2001C5.2001 5.20598 6.00598 4.4001 7.0001 4.4001C7.99421 4.4001 8.8001 5.20598 8.8001 6.2001Z"}))}return Sr.SafeIcon=r,Sr}var Yr={},Xo;function dh(){return Xo||(Xo=1,Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.default=".-cbwsdk-css-reset .-cbwsdk-try-extension{display:flex;margin-top:12px;height:202px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-try-extension.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-column-half{flex:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading{font-style:normal;font-weight:500;font-size:25px;line-height:32px;margin:0;max-width:204px}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta{appearance:none;border:none;background:none;color:#0052ff;cursor:pointer;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.light{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.dark{color:#588af5}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-wrapper{display:flex;align-items:center;margin-top:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-icon{display:block;margin-left:4px;height:14px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list{display:flex;flex-direction:column;justify-content:center;align-items:center;margin:0;padding:0;list-style:none;height:100%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item{display:flex;align-items:center;flex-flow:nowrap;margin-top:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item:first-of-type{margin-top:0}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon-wrapper{display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon{display:flex;height:32px;width:32px;border-radius:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.light{background:#eef0f3}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.dark{background:#1e2025}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy{display:block;font-weight:400;font-size:14px;line-height:20px;padding-left:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.light{color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.dark{color:#8a919e}"),Yr}var ea;function fh(){if(ea)return Ht;ea=1;var e=Ht.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.TryExtensionContent=void 0;const r=e(Ur),n=We,t=yn,g=ch(),i=lh(),c=hh(),a=e(dh());function p({theme:u}){const[m,o]=(0,t.useState)(!1),h=(0,t.useCallback)(()=>{window.open("https://api.wallet.coinbase.com/rpc/v2/desktop/chrome","_blank")},[]),s=(0,t.useCallback)(()=>{m?window.location.reload():(h(),o(!0))},[h,m]);return(0,n.h)("div",{class:(0,r.default)("-cbwsdk-try-extension",u)},(0,n.h)("style",null,a.default),(0,n.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,n.h)("h3",{class:(0,r.default)("-cbwsdk-try-extension-heading",u)},"Or try the Coinbase Wallet browser extension"),(0,n.h)("div",{class:"-cbwsdk-try-extension-cta-wrapper"},(0,n.h)("button",{class:(0,r.default)("-cbwsdk-try-extension-cta",u),onClick:s},m?"Refresh":"Install"),(0,n.h)("div",null,!m&&(0,n.h)(g.ArrowLeftIcon,{class:"-cbwsdk-try-extension-cta-icon",fill:u==="light"?"#0052FF":"#588AF5"})))),(0,n.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,n.h)("ul",{class:"-cbwsdk-try-extension-list"},(0,n.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,n.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,n.h)("span",{class:(0,r.default)("-cbwsdk-try-extension-list-item-icon",u)},(0,n.h)(i.LaptopIcon,{fill:u==="light"?"#0A0B0D":"#FFFFFF"}))),(0,n.h)("div",{class:(0,r.default)("-cbwsdk-try-extension-list-item-copy",u)},"Connect with dapps with just one click on your desktop browser")),(0,n.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,n.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,n.h)("span",{class:(0,r.default)("-cbwsdk-try-extension-list-item-icon",u)},(0,n.h)(c.SafeIcon,{fill:u==="light"?"#0A0B0D":"#FFFFFF"}))),(0,n.h)("div",{class:(0,r.default)("-cbwsdk-try-extension-list-item-copy",u)},"Add an additional layer of security by using a supported Ledger hardware wallet")))))}return Ht.TryExtensionContent=p,Ht}var Xr={},ta;function ph(){return ta||(ta=1,Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.default=".-cbwsdk-css-reset .-cbwsdk-connect-dialog{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.light{background-color:rgba(0,0,0,.5)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.dark{background-color:rgba(50,53,61,.4)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box{display:flex;position:relative;flex-direction:column;transform:scale(1);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box-hidden{opacity:0;transform:scale(0.85)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container{display:block}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container-hidden{display:none}"),Xr}var ra;function gh(){if(ra)return jt;ra=1;var e=jt.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(jt,"__esModule",{value:!0}),jt.ConnectDialog=void 0;const r=e(Ur),n=We,t=yn,g=uh(),i=fh(),c=e(ph()),a=p=>{const{isOpen:u,darkMode:m}=p,[o,h]=(0,t.useState)(!u),[s,f]=(0,t.useState)(!u);(0,t.useEffect)(()=>{const y=[window.setTimeout(()=>{f(!u)},10)];return u?h(!1):y.push(window.setTimeout(()=>{h(!0)},360)),()=>{y.forEach(window.clearTimeout)}},[u]);const E=m?"dark":"light";return(0,n.h)("div",{class:(0,r.default)("-cbwsdk-connect-dialog-container",o&&"-cbwsdk-connect-dialog-container-hidden")},(0,n.h)("style",null,c.default),(0,n.h)("div",{class:(0,r.default)("-cbwsdk-connect-dialog-backdrop",E,s&&"-cbwsdk-connect-dialog-backdrop-hidden")}),(0,n.h)("div",{class:"-cbwsdk-connect-dialog"},(0,n.h)("div",{class:(0,r.default)("-cbwsdk-connect-dialog-box",s&&"-cbwsdk-connect-dialog-box-hidden")},p.connectDisabled?null:(0,n.h)(g.ConnectContent,{theme:E,version:p.version,sessionId:p.sessionId,sessionSecret:p.sessionSecret,linkAPIUrl:p.linkAPIUrl,isConnected:p.isConnected,isParentConnection:p.isParentConnection,chainId:p.chainId,onCancel:p.onCancel}),(0,n.h)(i.TryExtensionContent,{theme:E}))))};return jt.ConnectDialog=a,jt}var na;function mh(){if(na)return yr;na=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.LinkFlow=void 0;const e=We,r=gh();let n=class{constructor(g){this.connected=!1,this.chainId=1,this.isOpen=!1,this.onCancel=null,this.root=null,this.connectDisabled=!1,this.darkMode=g.darkMode,this.version=g.version,this.sessionId=g.sessionId,this.sessionSecret=g.sessionSecret,this.linkAPIUrl=g.linkAPIUrl,this.isParentConnection=g.isParentConnection}attach(g){this.root=document.createElement("div"),this.root.className="-cbwsdk-link-flow-root",g.appendChild(this.root),this.render()}setConnected(g){this.connected!==g&&(this.connected=g,this.render())}setChainId(g){this.chainId!==g&&(this.chainId=g,this.render())}detach(){var g;this.root&&((0,e.render)(null,this.root),(g=this.root.parentElement)===null||g===void 0||g.removeChild(this.root))}setConnectDisabled(g){this.connectDisabled=g}open(g){this.isOpen=!0,this.onCancel=g.onCancel,this.render()}close(){this.isOpen=!1,this.onCancel=null,this.render()}render(){this.root&&(0,e.render)((0,e.h)(r.ConnectDialog,{darkMode:this.darkMode,version:this.version,sessionId:this.sessionId,sessionSecret:this.sessionSecret,linkAPIUrl:this.linkAPIUrl,isOpen:this.isOpen,isConnected:this.connected,isParentConnection:this.isParentConnection,chainId:this.chainId,onCancel:this.onCancel,connectDisabled:this.connectDisabled}),this.root)}};return yr.LinkFlow=n,yr}var en={},tn={},ia;function wh(){return ia||(ia=1,Object.defineProperty(tn,"__esModule",{value:!0}),tn.default=".-cbwsdk-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-expanded .-cbwsdk-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}"),tn}var sa;function Gc(){return sa||(sa=1,function(e){var r=en.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(e,"__esModule",{value:!0}),e.SnackbarInstance=e.SnackbarContainer=e.Snackbar=void 0;const n=r(Ur),t=We,g=yn,i=r(wh()),c="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",a="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=";class p{constructor(h){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=h.darkMode}attach(h){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",h.appendChild(this.root),this.render()}presentItem(h){const s=this.nextItemKey++;return this.items.set(s,h),this.render(),()=>{this.items.delete(s),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&(0,t.render)((0,t.h)("div",null,(0,t.h)(e.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map(([h,s])=>(0,t.h)(e.SnackbarInstance,Object.assign({},s,{key:h}))))),this.root)}}e.Snackbar=p;const u=o=>(0,t.h)("div",{class:(0,n.default)("-cbwsdk-snackbar-container")},(0,t.h)("style",null,i.default),(0,t.h)("div",{class:"-cbwsdk-snackbar"},o.children));e.SnackbarContainer=u;const m=({autoExpand:o,message:h,menuItems:s})=>{const[f,E]=(0,g.useState)(!0),[y,l]=(0,g.useState)(o??!1);(0,g.useEffect)(()=>{const S=[window.setTimeout(()=>{E(!1)},1),window.setTimeout(()=>{l(!0)},1e4)];return()=>{S.forEach(window.clearTimeout)}});const R=()=>{l(!y)};return(0,t.h)("div",{class:(0,n.default)("-cbwsdk-snackbar-instance",f&&"-cbwsdk-snackbar-instance-hidden",y&&"-cbwsdk-snackbar-instance-expanded")},(0,t.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:R},(0,t.h)("img",{src:c,class:"-cbwsdk-snackbar-instance-header-cblogo"})," ",(0,t.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},h),(0,t.h)("div",{class:"-gear-container"},!y&&(0,t.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,t.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,t.h)("img",{src:a,class:"-gear-icon",title:"Expand"}))),s&&s.length>0&&(0,t.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},s.map((S,I)=>(0,t.h)("div",{class:(0,n.default)("-cbwsdk-snackbar-instance-menu-item",S.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:S.onClick,key:I},(0,t.h)("svg",{width:S.svgWidth,height:S.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,t.h)("path",{"fill-rule":S.defaultFillRule,"clip-rule":S.defaultClipRule,d:S.path,fill:"#AAAAAA"})),(0,t.h)("span",{class:(0,n.default)("-cbwsdk-snackbar-instance-menu-item-info",S.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},S.info)))))};e.SnackbarInstance=m}(en)),en}var oa;function Zc(){if(oa)return wr;oa=1,Object.defineProperty(wr,"__esModule",{value:!0}),wr.WalletLinkRelayUI=void 0;const e=Jc(),r=mh(),n=Gc();let t=class{constructor(i){this.standalone=null,this.attached=!1,this.snackbar=new n.Snackbar({darkMode:i.darkMode}),this.linkFlow=new r.LinkFlow({darkMode:i.darkMode,version:i.version,sessionId:i.session.id,sessionSecret:i.session.secret,linkAPIUrl:i.linkAPIUrl,isParentConnection:!1})}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");const i=document.documentElement,c=document.createElement("div");c.className="-cbwsdk-css-reset",i.appendChild(c),this.linkFlow.attach(c),this.snackbar.attach(c),this.attached=!0,(0,e.injectCssReset)()}setConnected(i){this.linkFlow.setConnected(i)}setChainId(i){this.linkFlow.setChainId(i)}setConnectDisabled(i){this.linkFlow.setConnectDisabled(i)}addEthereumChain(){}watchAsset(){}switchEthereumChain(){}requestEthereumAccounts(i){this.linkFlow.open({onCancel:i.onCancel})}hideRequestEthereumAccounts(){this.linkFlow.close()}signEthereumMessage(){}signEthereumTransaction(){}submitEthereumTransaction(){}ethereumAddressFromSignedMessage(){}showConnecting(i){let c;return i.isUnlinkedErrorState?c={autoExpand:!0,message:"Connection lost",menuItems:[{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:i.onResetConnection}]}:c={message:"Confirm on phone",menuItems:[{isRed:!0,info:"Cancel transaction",svgWidth:"11",svgHeight:"11",path:"M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z",defaultFillRule:"inherit",defaultClipRule:"inherit",onClick:i.onCancel},{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:i.onResetConnection}]},this.snackbar.presentItem(c)}reloadUI(){document.location.reload()}inlineAccountsResponse(){return!1}inlineAddEthereumChain(){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}setStandalone(i){this.standalone=i}isStandalone(){var i;return(i=this.standalone)!==null&&i!==void 0?i:!1}};return wr.WalletLinkRelayUI=t,wr}var aa;function Kc(){if(aa)return lr;aa=1,Object.defineProperty(lr,"__esModule",{value:!0}),lr.WalletLinkRelay=void 0;const e=gn(),r=mn(),n=tt(),t=qs(),g=js(),i=$s(),c=Yl(),a=Fs(),p=Zc();let u=class kt extends g.RelayAbstract{constructor(o){var h;super(),this.accountsCallback=null,this.chainCallbackParams={chainId:"",jsonRpcUrl:""},this.chainCallback=null,this.dappDefaultChain=1,this.appName="",this.appLogoUrl=null,this.linkedUpdated=y=>{var l;this.isLinked=y;const R=this.storage.getItem(g.LOCAL_STORAGE_ADDRESSES_KEY);if(y&&(this.session.linked=y),this.isUnlinkedErrorState=!1,R){const S=R.split(" "),I=this.storage.getItem("IsStandaloneSigning")==="true";if(S[0]!==""&&!y&&this.session.linked&&!I){this.isUnlinkedErrorState=!0;const T=this.getSessionIdHash();(l=this.diagnostic)===null||l===void 0||l.log(t.EVENTS.UNLINKED_ERROR_STATE,{sessionIdHash:T})}}},this.metadataUpdated=(y,l)=>{this.storage.setItem(y,l)},this.chainUpdated=(y,l)=>{this.chainCallbackParams.chainId===y&&this.chainCallbackParams.jsonRpcUrl===l||(this.chainCallbackParams={chainId:y,jsonRpcUrl:l},this.chainCallback&&this.chainCallback(y,l))},this.accountUpdated=y=>{this.accountsCallback&&this.accountsCallback([y]),kt.accountRequestCallbackIds.size>0&&(Array.from(kt.accountRequestCallbackIds.values()).forEach(l=>{const R={type:"WEB3_RESPONSE",id:l,response:{method:"requestEthereumAccounts",result:[y]}};this.invokeCallback(Object.assign(Object.assign({},R),{id:l}))}),kt.accountRequestCallbackIds.clear())},this.connectedUpdated=y=>{this.ui.setConnected(y)},this.resetAndReload=this.resetAndReload.bind(this),this.linkAPIUrl=o.linkAPIUrl,this.storage=o.storage,this.options=o;const{session:s,ui:f,connection:E}=this.subscribe();this._session=s,this.connection=E,this.relayEventManager=o.relayEventManager,this.diagnostic=o.diagnosticLogger,this._reloadOnDisconnect=(h=o.reloadOnDisconnect)!==null&&h!==void 0?h:!0,this.ui=f}subscribe(){const o=i.Session.load(this.storage)||new i.Session(this.storage).save(),{linkAPIUrl:h,diagnostic:s}=this,f=new c.WalletLinkConnection({session:o,linkAPIUrl:h,diagnostic:s,listener:this}),{version:E,darkMode:y}=this.options,l=this.options.uiConstructor({linkAPIUrl:h,version:E,darkMode:y,session:o});return f.connect(),{session:o,ui:l,connection:f}}attachUI(){this.ui.attach()}resetAndReload(){Promise.race([this.connection.setSessionMetadata("__destroyed","1"),new Promise(o=>setTimeout(()=>o(null),1e3))]).then(()=>{var o,h;const s=this.ui.isStandalone();(o=this.diagnostic)===null||o===void 0||o.log(t.EVENTS.SESSION_STATE_CHANGE,{method:"relay::resetAndReload",sessionMetadataChange:"__destroyed, 1",sessionIdHash:this.getSessionIdHash()}),this.connection.destroy();const f=i.Session.load(this.storage);if((f==null?void 0:f.id)===this._session.id?this.storage.clear():f&&((h=this.diagnostic)===null||h===void 0||h.log(t.EVENTS.SKIPPED_CLEARING_SESSION,{sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:i.Session.hash(f.id)})),this._reloadOnDisconnect){this.ui.reloadUI();return}this.accountsCallback&&this.accountsCallback([],!0);const{session:E,ui:y,connection:l}=this.subscribe();this._session=E,this.connection=l,this.ui=y,s&&this.ui.setStandalone&&this.ui.setStandalone(!0),this.options.headlessMode||this.attachUI()}).catch(o=>{var h;(h=this.diagnostic)===null||h===void 0||h.log(t.EVENTS.FAILURE,{method:"relay::resetAndReload",message:`failed to reset and reload with ${o}`,sessionIdHash:this.getSessionIdHash()})})}setAppInfo(o,h){this.appName=o,this.appLogoUrl=h}getStorageItem(o){return this.storage.getItem(o)}get session(){return this._session}setStorageItem(o,h){this.storage.setItem(o,h)}signEthereumMessage(o,h,s,f){return this.sendRequest({method:"signEthereumMessage",params:{message:(0,n.hexStringFromBuffer)(o,!0),address:h,addPrefix:s,typedDataJson:f||null}})}ethereumAddressFromSignedMessage(o,h,s){return this.sendRequest({method:"ethereumAddressFromSignedMessage",params:{message:(0,n.hexStringFromBuffer)(o,!0),signature:(0,n.hexStringFromBuffer)(h,!0),addPrefix:s}})}signEthereumTransaction(o){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:o.fromAddress,toAddress:o.toAddress,weiValue:(0,n.bigIntStringFromBN)(o.weiValue),data:(0,n.hexStringFromBuffer)(o.data,!0),nonce:o.nonce,gasPriceInWei:o.gasPriceInWei?(0,n.bigIntStringFromBN)(o.gasPriceInWei):null,maxFeePerGas:o.gasPriceInWei?(0,n.bigIntStringFromBN)(o.gasPriceInWei):null,maxPriorityFeePerGas:o.gasPriceInWei?(0,n.bigIntStringFromBN)(o.gasPriceInWei):null,gasLimit:o.gasLimit?(0,n.bigIntStringFromBN)(o.gasLimit):null,chainId:o.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(o){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:o.fromAddress,toAddress:o.toAddress,weiValue:(0,n.bigIntStringFromBN)(o.weiValue),data:(0,n.hexStringFromBuffer)(o.data,!0),nonce:o.nonce,gasPriceInWei:o.gasPriceInWei?(0,n.bigIntStringFromBN)(o.gasPriceInWei):null,maxFeePerGas:o.maxFeePerGas?(0,n.bigIntStringFromBN)(o.maxFeePerGas):null,maxPriorityFeePerGas:o.maxPriorityFeePerGas?(0,n.bigIntStringFromBN)(o.maxPriorityFeePerGas):null,gasLimit:o.gasLimit?(0,n.bigIntStringFromBN)(o.gasLimit):null,chainId:o.chainId,shouldSubmit:!0}})}submitEthereumTransaction(o,h){return this.sendRequest({method:"submitEthereumTransaction",params:{signedTransaction:(0,n.hexStringFromBuffer)(o,!0),chainId:h}})}scanQRCode(o){return this.sendRequest({method:"scanQRCode",params:{regExp:o}})}getQRCodeUrl(){return(0,n.createQrUrl)(this._session.id,this._session.secret,this.linkAPIUrl,!1,this.options.version,this.dappDefaultChain)}genericRequest(o,h){return this.sendRequest({method:"generic",params:{action:h,data:o}})}sendGenericMessage(o){return this.sendRequest(o)}sendRequest(o){let h=null;const s=(0,n.randomBytesHex)(8),f=y=>{this.publishWeb3RequestCanceledEvent(s),this.handleErrorResponse(s,o.method,y),h==null||h()};return{promise:new Promise((y,l)=>{this.ui.isStandalone()||(h=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:f,onResetConnection:this.resetAndReload})),this.relayEventManager.callbacks.set(s,R=>{if(h==null||h(),(0,a.isErrorResponse)(R))return l(new Error(R.errorMessage));y(R)}),this.ui.isStandalone()?this.sendRequestStandalone(s,o):this.publishWeb3RequestEvent(s,o)}),cancel:f}}setConnectDisabled(o){this.ui.setConnectDisabled(o)}setAccountsCallback(o){this.accountsCallback=o}setChainCallback(o){this.chainCallback=o}setDappDefaultChainCallback(o){this.dappDefaultChain=o,this.ui instanceof p.WalletLinkRelayUI&&this.ui.setChainId(o)}publishWeb3RequestEvent(o,h){var s;const f={type:"WEB3_REQUEST",id:o,request:h},E=i.Session.load(this.storage);(s=this.diagnostic)===null||s===void 0||s.log(t.EVENTS.WEB3_REQUEST,{eventId:f.id,method:`relay::${h.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:E?i.Session.hash(E.id):"",isSessionMismatched:((E==null?void 0:E.id)!==this._session.id).toString()}),this.publishEvent("Web3Request",f,!0).then(y=>{var l;(l=this.diagnostic)===null||l===void 0||l.log(t.EVENTS.WEB3_REQUEST_PUBLISHED,{eventId:f.id,method:`relay::${h.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:E?i.Session.hash(E.id):"",isSessionMismatched:((E==null?void 0:E.id)!==this._session.id).toString()})}).catch(y=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:f.id,response:{method:h.method,errorMessage:y.message}})})}publishWeb3RequestCanceledEvent(o){const h={type:"WEB3_REQUEST_CANCELED",id:o};this.publishEvent("Web3RequestCanceled",h,!1).then()}publishEvent(o,h,s){return this.connection.publishEvent(o,h,s)}handleWeb3ResponseMessage(o){var h;const{response:s}=o;if((h=this.diagnostic)===null||h===void 0||h.log(t.EVENTS.WEB3_RESPONSE,{eventId:o.id,method:`relay::${s.method}`,sessionIdHash:this.getSessionIdHash()}),s.method==="requestEthereumAccounts"){kt.accountRequestCallbackIds.forEach(f=>this.invokeCallback(Object.assign(Object.assign({},o),{id:f}))),kt.accountRequestCallbackIds.clear();return}this.invokeCallback(o)}handleErrorResponse(o,h,s,f){var E;const y=(E=s==null?void 0:s.message)!==null&&E!==void 0?E:(0,e.getMessageFromCode)(f);this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:o,response:{method:h,errorMessage:y,errorCode:f}})}invokeCallback(o){const h=this.relayEventManager.callbacks.get(o.id);h&&(h(o.response),this.relayEventManager.callbacks.delete(o.id))}requestEthereumAccounts(){const o={method:"requestEthereumAccounts",params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},h=(0,n.randomBytesHex)(8),s=E=>{this.publishWeb3RequestCanceledEvent(h),this.handleErrorResponse(h,o.method,E)};return{promise:new Promise((E,y)=>{if(this.relayEventManager.callbacks.set(h,l=>{if(this.ui.hideRequestEthereumAccounts(),(0,a.isErrorResponse)(l))return y(new Error(l.errorMessage));E(l)}),this.ui.inlineAccountsResponse()){const l=R=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:h,response:{method:"requestEthereumAccounts",result:R}})};this.ui.requestEthereumAccounts({onCancel:s,onAccounts:l})}else{const l=e.standardErrors.provider.userRejectedRequest("User denied account authorization");this.ui.requestEthereumAccounts({onCancel:()=>s(l)})}kt.accountRequestCallbackIds.add(h),!this.ui.inlineAccountsResponse()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(h,o)}),cancel:s}}selectProvider(o){const h={method:"selectProvider",params:{providerOptions:o}},s=(0,n.randomBytesHex)(8),f=y=>{this.publishWeb3RequestCanceledEvent(s),this.handleErrorResponse(s,h.method,y)},E=new Promise((y,l)=>{this.relayEventManager.callbacks.set(s,I=>{if((0,a.isErrorResponse)(I))return l(new Error(I.errorMessage));y(I)});const R=I=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:s,response:{method:"selectProvider",result:r.ProviderType.Unselected}})},S=I=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:s,response:{method:"selectProvider",result:I}})};this.ui.selectProvider&&this.ui.selectProvider({onApprove:S,onCancel:R,providerOptions:o})});return{cancel:f,promise:E}}watchAsset(o,h,s,f,E,y){const l={method:"watchAsset",params:{type:o,options:{address:h,symbol:s,decimals:f,image:E},chainId:y}};let R=null;const S=(0,n.randomBytesHex)(8),I=q=>{this.publishWeb3RequestCanceledEvent(S),this.handleErrorResponse(S,l.method,q),R==null||R()};this.ui.inlineWatchAsset()||(R=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:I,onResetConnection:this.resetAndReload}));const T=new Promise((q,D)=>{this.relayEventManager.callbacks.set(S,X=>{if(R==null||R(),(0,a.isErrorResponse)(X))return D(new Error(X.errorMessage));q(X)});const H=X=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:S,response:{method:"watchAsset",result:!1}})},G=()=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:S,response:{method:"watchAsset",result:!0}})};this.ui.inlineWatchAsset()&&this.ui.watchAsset({onApprove:G,onCancel:H,type:o,address:h,symbol:s,decimals:f,image:E,chainId:y}),!this.ui.inlineWatchAsset()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(S,l)});return{cancel:I,promise:T}}addEthereumChain(o,h,s,f,E,y){const l={method:"addEthereumChain",params:{chainId:o,rpcUrls:h,blockExplorerUrls:f,chainName:E,iconUrls:s,nativeCurrency:y}};let R=null;const S=(0,n.randomBytesHex)(8),I=q=>{this.publishWeb3RequestCanceledEvent(S),this.handleErrorResponse(S,l.method,q),R==null||R()};return this.ui.inlineAddEthereumChain(o)||(R=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:I,onResetConnection:this.resetAndReload})),{promise:new Promise((q,D)=>{this.relayEventManager.callbacks.set(S,X=>{if(R==null||R(),(0,a.isErrorResponse)(X))return D(new Error(X.errorMessage));q(X)});const H=X=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:S,response:{method:"addEthereumChain",result:{isApproved:!1,rpcUrl:""}}})},G=X=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:S,response:{method:"addEthereumChain",result:{isApproved:!0,rpcUrl:X}}})};this.ui.inlineAddEthereumChain(o)&&this.ui.addEthereumChain({onCancel:H,onApprove:G,chainId:l.params.chainId,rpcUrls:l.params.rpcUrls,blockExplorerUrls:l.params.blockExplorerUrls,chainName:l.params.chainName,iconUrls:l.params.iconUrls,nativeCurrency:l.params.nativeCurrency}),!this.ui.inlineAddEthereumChain(o)&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(S,l)}),cancel:I}}switchEthereumChain(o,h){const s={method:"switchEthereumChain",params:Object.assign({chainId:o},{address:h})},f=(0,n.randomBytesHex)(8),E=l=>{this.publishWeb3RequestCanceledEvent(f),this.handleErrorResponse(f,s.method,l)};return{promise:new Promise((l,R)=>{this.relayEventManager.callbacks.set(f,T=>{if((0,a.isErrorResponse)(T)&&T.errorCode)return R(e.standardErrors.provider.custom({code:T.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."}));if((0,a.isErrorResponse)(T))return R(new Error(T.errorMessage));l(T)});const S=T=>{var q;if(T){const D=(q=(0,e.getErrorCode)(T))!==null&&q!==void 0?q:e.standardErrorCodes.provider.unsupportedChain;this.handleErrorResponse(f,"switchEthereumChain",T instanceof Error?T:e.standardErrors.provider.unsupportedChain(o),D)}else this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:f,response:{method:"switchEthereumChain",result:{isApproved:!1,rpcUrl:""}}})},I=T=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:f,response:{method:"switchEthereumChain",result:{isApproved:!0,rpcUrl:T}}})};this.ui.switchEthereumChain({onCancel:S,onApprove:I,chainId:s.params.chainId,address:s.params.address}),!this.ui.inlineSwitchEthereumChain()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(f,s)}),cancel:E}}inlineAddEthereumChain(o){return this.ui.inlineAddEthereumChain(o)}getSessionIdHash(){return i.Session.hash(this._session.id)}sendRequestStandalone(o,h){const s=E=>{this.handleErrorResponse(o,h.method,E)},f=E=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:o,response:E})};switch(h.method){case"signEthereumMessage":this.ui.signEthereumMessage({request:h,onSuccess:f,onCancel:s});break;case"signEthereumTransaction":this.ui.signEthereumTransaction({request:h,onSuccess:f,onCancel:s});break;case"submitEthereumTransaction":this.ui.submitEthereumTransaction({request:h,onSuccess:f,onCancel:s});break;case"ethereumAddressFromSignedMessage":this.ui.ethereumAddressFromSignedMessage({request:h,onSuccess:f});break;default:s();break}}};return lr.WalletLinkRelay=u,u.accountRequestCallbackIds=new Set,lr}var Cr={},Wt={},Mr={},ua;function yh(){return ua||(ua=1,function(e){var r=Mr.__createBinding||(Object.create?function(t,g,i,c){c===void 0&&(c=i);var a=Object.getOwnPropertyDescriptor(g,i);(!a||("get"in a?!g.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return g[i]}}),Object.defineProperty(t,c,a)}:function(t,g,i,c){c===void 0&&(c=i),t[c]=g[i]}),n=Mr.__exportStar||function(t,g){for(var i in t)i!=="default"&&!Object.prototype.hasOwnProperty.call(g,i)&&r(g,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(Gc(),e)}(Mr)),Mr}var rn={},ca;function bh(){return ca||(ca=1,Object.defineProperty(rn,"__esModule",{value:!0}),rn.default=".-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s;background-color:rgba(10,11,13,.5)}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box{display:block;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);padding:20px;border-radius:8px;background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box p{display:block;font-weight:400;font-size:14px;line-height:20px;padding-bottom:12px;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box button{appearance:none;border:none;background:none;color:#0052ff;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark{background-color:#0a0b0d;color:#fff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark button{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light{background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light button{color:#0052ff}"),rn}var la;function vh(){if(la)return Wt;la=1;var e=Wt.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.RedirectDialog=void 0;const r=e(Ur),n=We,t=Jc(),g=yh(),i=e(bh());let c=class{constructor(){this.root=null}attach(){const u=document.documentElement;this.root=document.createElement("div"),this.root.className="-cbwsdk-css-reset",u.appendChild(this.root),(0,t.injectCssReset)()}present(u){this.render(u)}clear(){this.render(null)}render(u){this.root&&((0,n.render)(null,this.root),u&&(0,n.render)((0,n.h)(a,Object.assign({},u,{onDismiss:()=>{this.clear()}})),this.root))}};Wt.RedirectDialog=c;const a=({title:p,buttonText:u,darkMode:m,onButtonClick:o,onDismiss:h})=>{const s=m?"dark":"light";return(0,n.h)(g.SnackbarContainer,{darkMode:m},(0,n.h)("div",{class:"-cbwsdk-redirect-dialog"},(0,n.h)("style",null,i.default),(0,n.h)("div",{class:"-cbwsdk-redirect-dialog-backdrop",onClick:h}),(0,n.h)("div",{class:(0,r.default)("-cbwsdk-redirect-dialog-box",s)},(0,n.h)("p",null,p),(0,n.h)("button",{onClick:o},u))))};return Wt}var ha;function Qc(){if(ha)return Cr;ha=1,Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.MobileRelayUI=void 0;const e=vh();let r=class{constructor(t){this.attached=!1,this.darkMode=!1,this.redirectDialog=new e.RedirectDialog,this.darkMode=t.darkMode}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");this.redirectDialog.attach(),this.attached=!0}setConnected(t){}redirectToCoinbaseWallet(t){const g=new URL("https://go.cb-w.com/walletlink");g.searchParams.append("redirect_url",window.location.href),t&&g.searchParams.append("wl_url",t);const i=document.createElement("a");i.target="cbw-opener",i.href=g.href,i.rel="noreferrer noopener",i.click()}openCoinbaseWalletDeeplink(t){this.redirectDialog.present({title:"Redirecting to Coinbase Wallet...",buttonText:"Open",darkMode:this.darkMode,onButtonClick:()=>{this.redirectToCoinbaseWallet(t)}}),setTimeout(()=>{this.redirectToCoinbaseWallet(t)},99)}showConnecting(t){return()=>{this.redirectDialog.clear()}}hideRequestEthereumAccounts(){this.redirectDialog.clear()}requestEthereumAccounts(){}addEthereumChain(){}watchAsset(){}selectProvider(){}switchEthereumChain(){}signEthereumMessage(){}signEthereumTransaction(){}submitEthereumTransaction(){}ethereumAddressFromSignedMessage(){}reloadUI(){}setStandalone(){}setConnectDisabled(){}inlineAccountsResponse(){return!1}inlineAddEthereumChain(){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}isStandalone(){return!1}};return Cr.MobileRelayUI=r,Cr}var da;function Yc(){if(da)return cr;da=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.MobileRelay=void 0;const e=tt(),r=Kc(),n=Qc();let t=class extends r.WalletLinkRelay{constructor(i){var c;super(i),this._enableMobileWalletLink=(c=i.enableMobileWalletLink)!==null&&c!==void 0?c:!1}requestEthereumAccounts(){return this._enableMobileWalletLink?super.requestEthereumAccounts():{promise:new Promise(()=>{const i=(0,e.getLocation)();i.href=`https://go.cb-w.com/dapp?cb_url=${encodeURIComponent(i.href)}`}),cancel:()=>{}}}publishWeb3RequestEvent(i,c){if(super.publishWeb3RequestEvent(i,c),!(this._enableMobileWalletLink&&this.ui instanceof n.MobileRelayUI))return;let a=!1;switch(c.method){case"requestEthereumAccounts":case"connectAndSignIn":a=!0,this.ui.openCoinbaseWalletDeeplink(this.getQRCodeUrl());break;case"switchEthereumChain":return;default:a=!0,this.ui.openCoinbaseWalletDeeplink();break}a&&window.addEventListener("blur",()=>{window.addEventListener("focus",()=>{this.connection.checkUnseenEvents()},{once:!0})},{once:!0})}handleWeb3ResponseMessage(i){super.handleWeb3ResponseMessage(i)}connectAndSignIn(i){if(!this._enableMobileWalletLink)throw new Error("connectAndSignIn is supported only when enableMobileWalletLink is on");return this.sendRequest({method:"connectAndSignIn",params:{appName:this.appName,appLogoUrl:this.appLogoUrl,domain:window.location.hostname,aud:window.location.href,version:"1",type:"eip4361",nonce:i.nonce,iat:new Date().toISOString(),chainId:`eip155:${this.dappDefaultChain}`,statement:i.statement,resources:i.resources}})}};return cr.MobileRelay=t,cr}var nn={exports:{}},Un,fa;function Xc(){return fa||(fa=1,Un=dn().EventEmitter),Un}var Hn,pa;function _h(){if(pa)return Hn;pa=1;function e(f,E){var y=Object.keys(f);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(f);E&&(l=l.filter(function(R){return Object.getOwnPropertyDescriptor(f,R).enumerable})),y.push.apply(y,l)}return y}function r(f){for(var E=1;E0?this.tail.next=l:this.head=l,this.tail=l,++this.length}},{key:"unshift",value:function(y){var l={data:y,next:this.head};this.length===0&&(this.tail=l),this.head=l,++this.length}},{key:"shift",value:function(){if(this.length!==0){var y=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,y}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(y){if(this.length===0)return"";for(var l=this.head,R=""+l.data;l=l.next;)R+=y+l.data;return R}},{key:"concat",value:function(y){if(this.length===0)return u.alloc(0);for(var l=u.allocUnsafe(y>>>0),R=this.head,S=0;R;)s(R.data,l,S),S+=R.data.length,R=R.next;return l}},{key:"consume",value:function(y,l){var R;return yI.length?I.length:y;if(T===I.length?S+=I:S+=I.slice(0,y),y-=T,y===0){T===I.length?(++R,l.next?this.head=l.next:this.head=this.tail=null):(this.head=l,l.data=I.slice(T));break}++R}return this.length-=R,S}},{key:"_getBuffer",value:function(y){var l=u.allocUnsafe(y),R=this.head,S=1;for(R.data.copy(l),y-=R.data.length;R=R.next;){var I=R.data,T=y>I.length?I.length:y;if(I.copy(l,l.length-y,0,T),y-=T,y===0){T===I.length?(++S,R.next?this.head=R.next:this.head=this.tail=null):(this.head=R,R.data=I.slice(T));break}++S}return this.length-=S,l}},{key:h,value:function(y,l){return o(this,r(r({},l),{},{depth:0,customInspect:!1}))}}]),f}(),Hn}var Wn,ga;function el(){if(ga)return Wn;ga=1;function e(c,a){var p=this,u=this._readableState&&this._readableState.destroyed,m=this._writableState&&this._writableState.destroyed;return u||m?(a?a(c):c&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(g,this,c)):process.nextTick(g,this,c)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(c||null,function(o){!a&&o?p._writableState?p._writableState.errorEmitted?process.nextTick(n,p):(p._writableState.errorEmitted=!0,process.nextTick(r,p,o)):process.nextTick(r,p,o):a?(process.nextTick(n,p),a(o)):process.nextTick(n,p)}),this)}function r(c,a){g(c,a),n(c)}function n(c){c._writableState&&!c._writableState.emitClose||c._readableState&&!c._readableState.emitClose||c.emit("close")}function t(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function g(c,a){c.emit("error",a)}function i(c,a){var p=c._readableState,u=c._writableState;p&&p.autoDestroy||u&&u.autoDestroy?c.destroy(a):c.emit("error",a)}return Wn={destroy:e,undestroy:t,errorOrDestroy:i},Wn}var Vn={},ma;function Yt(){if(ma)return Vn;ma=1;function e(a,p){a.prototype=Object.create(p.prototype),a.prototype.constructor=a,a.__proto__=p}var r={};function n(a,p,u){u||(u=Error);function m(h,s,f){return typeof p=="string"?p:p(h,s,f)}var o=function(h){e(s,h);function s(f,E,y){return h.call(this,m(f,E,y))||this}return s}(u);o.prototype.name=u.name,o.prototype.code=a,r[a]=o}function t(a,p){if(Array.isArray(a)){var u=a.length;return a=a.map(function(m){return String(m)}),u>2?"one of ".concat(p," ").concat(a.slice(0,u-1).join(", "),", or ")+a[u-1]:u===2?"one of ".concat(p," ").concat(a[0]," or ").concat(a[1]):"of ".concat(p," ").concat(a[0])}else return"of ".concat(p," ").concat(String(a))}function g(a,p,u){return a.substr(0,p.length)===p}function i(a,p,u){return(u===void 0||u>a.length)&&(u=a.length),a.substring(u-p.length,u)===p}function c(a,p,u){return typeof u!="number"&&(u=0),u+p.length>a.length?!1:a.indexOf(p,u)!==-1}return n("ERR_INVALID_OPT_VALUE",function(a,p){return'The value "'+p+'" is invalid for option "'+a+'"'},TypeError),n("ERR_INVALID_ARG_TYPE",function(a,p,u){var m;typeof p=="string"&&g(p,"not ")?(m="must not be",p=p.replace(/^not /,"")):m="must be";var o;if(i(a," argument"))o="The ".concat(a," ").concat(m," ").concat(t(p,"type"));else{var h=c(a,".")?"property":"argument";o='The "'.concat(a,'" ').concat(h," ").concat(m," ").concat(t(p,"type"))}return o+=". Received type ".concat(typeof u),o},TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",function(a){return"The "+a+" method is not implemented"}),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",function(a){return"Cannot call "+a+" after a stream was destroyed"}),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",function(a){return"Unknown encoding: "+a},TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Vn.codes=r,Vn}var zn,wa;function tl(){if(wa)return zn;wa=1;var e=Yt().codes.ERR_INVALID_OPT_VALUE;function r(t,g,i){return t.highWaterMark!=null?t.highWaterMark:g?t[i]:null}function n(t,g,i,c){var a=r(g,c,i);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var p=c?i:"highWaterMark";throw new e(p,a)}return Math.floor(a)}return t.objectMode?16:16*1024}return zn={getHighWaterMark:n},zn}var Jn,ya;function Eh(){if(ya)return Jn;ya=1,Jn=e;function e(n,t){if(r("noDeprecation"))return n;var g=!1;function i(){if(!g){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),g=!0}return n.apply(this,arguments)}return i}function r(n){try{if(!Zt.localStorage)return!1}catch{return!1}var t=Zt.localStorage[n];return t==null?!1:String(t).toLowerCase()==="true"}return Jn}var Gn,ba;function rl(){if(ba)return Gn;ba=1,Gn=H;function e($){var W=this;this.next=null,this.entry=null,this.finish=function(){K(W,$)}}var r;H.WritableState=q;var n={deprecate:Eh()},t=Xc(),g=wn().Buffer,i=(typeof Zt<"u"?Zt:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function c($){return g.from($)}function a($){return g.isBuffer($)||$ instanceof i}var p=el(),u=tl(),m=u.getHighWaterMark,o=Yt().codes,h=o.ERR_INVALID_ARG_TYPE,s=o.ERR_METHOD_NOT_IMPLEMENTED,f=o.ERR_MULTIPLE_CALLBACK,E=o.ERR_STREAM_CANNOT_PIPE,y=o.ERR_STREAM_DESTROYED,l=o.ERR_STREAM_NULL_VALUES,R=o.ERR_STREAM_WRITE_AFTER_END,S=o.ERR_UNKNOWN_ENCODING,I=p.errorOrDestroy;Qe()(H,t);function T(){}function q($,W,J){r=r||Kt(),$=$||{},typeof J!="boolean"&&(J=W instanceof r),this.objectMode=!!$.objectMode,J&&(this.objectMode=this.objectMode||!!$.writableObjectMode),this.highWaterMark=m(this,$,"writableHighWaterMark",J),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var ee=$.decodeStrings===!1;this.decodeStrings=!ee,this.defaultEncoding=$.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(oe){C(W,oe)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=$.emitClose!==!1,this.autoDestroy=!!$.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}q.prototype.getBuffer=function(){for(var W=this.bufferedRequest,J=[];W;)J.push(W),W=W.next;return J},function(){try{Object.defineProperty(q.prototype,"buffer",{get:n.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var D;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(D=Function.prototype[Symbol.hasInstance],Object.defineProperty(H,Symbol.hasInstance,{value:function(W){return D.call(this,W)?!0:this!==H?!1:W&&W._writableState instanceof q}})):D=function(W){return W instanceof this};function H($){r=r||Kt();var W=this instanceof r;if(!W&&!D.call(H,this))return new H($);this._writableState=new q($,this,W),this.writable=!0,$&&(typeof $.write=="function"&&(this._write=$.write),typeof $.writev=="function"&&(this._writev=$.writev),typeof $.destroy=="function"&&(this._destroy=$.destroy),typeof $.final=="function"&&(this._final=$.final)),t.call(this)}H.prototype.pipe=function(){I(this,new E)};function G($,W){var J=new R;I($,J),process.nextTick(W,J)}function X($,W,J,ee){var oe;return J===null?oe=new l:typeof J!="string"&&!W.objectMode&&(oe=new h("chunk",["string","Buffer"],J)),oe?(I($,oe),process.nextTick(ee,oe),!1):!0}H.prototype.write=function($,W,J){var ee=this._writableState,oe=!1,P=!ee.objectMode&&a($);return P&&!g.isBuffer($)&&($=c($)),typeof W=="function"&&(J=W,W=null),P?W="buffer":W||(W=ee.defaultEncoding),typeof J!="function"&&(J=T),ee.ending?G(this,J):(P||X(this,ee,$,J))&&(ee.pendingcb++,oe=re(this,ee,P,$,W,J)),oe},H.prototype.cork=function(){this._writableState.corked++},H.prototype.uncork=function(){var $=this._writableState;$.corked&&($.corked--,!$.writing&&!$.corked&&!$.bufferProcessing&&$.bufferedRequest&&B(this,$))},H.prototype.setDefaultEncoding=function(W){if(typeof W=="string"&&(W=W.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((W+"").toLowerCase())>-1))throw new S(W);return this._writableState.defaultEncoding=W,this},Object.defineProperty(H.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Y($,W,J){return!$.objectMode&&$.decodeStrings!==!1&&typeof W=="string"&&(W=g.from(W,J)),W}Object.defineProperty(H.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function re($,W,J,ee,oe,P){if(!J){var O=Y(W,ee,oe);ee!==O&&(J=!0,oe="buffer",ee=O)}var Z=W.objectMode?1:ee.length;W.length+=Z;var Q=W.length>5===6?2:l>>4===14?3:l>>3===30?4:l>>6===2?-1:-2}function c(l,R,S){var I=R.length-1;if(I=0?(T>0&&(l.lastNeed=T-1),T):--I=0?(T>0&&(l.lastNeed=T-2),T):--I=0?(T>0&&(T===2?T=0:l.lastNeed=T-3),T):0))}function a(l,R,S){if((R[0]&192)!==128)return l.lastNeed=0,"�";if(l.lastNeed>1&&R.length>1){if((R[1]&192)!==128)return l.lastNeed=1,"�";if(l.lastNeed>2&&R.length>2&&(R[2]&192)!==128)return l.lastNeed=2,"�"}}function p(l){var R=this.lastTotal-this.lastNeed,S=a(this,l);if(S!==void 0)return S;if(this.lastNeed<=l.length)return l.copy(this.lastChar,R,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);l.copy(this.lastChar,R,0,l.length),this.lastNeed-=l.length}function u(l,R){var S=c(this,l,R);if(!this.lastNeed)return l.toString("utf8",R);this.lastTotal=S;var I=l.length-(S-this.lastNeed);return l.copy(this.lastChar,0,I),l.toString("utf8",R,I)}function m(l){var R=l&&l.length?this.write(l):"";return this.lastNeed?R+"�":R}function o(l,R){if((l.length-R)%2===0){var S=l.toString("utf16le",R);if(S){var I=S.charCodeAt(S.length-1);if(I>=55296&&I<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=l[l.length-2],this.lastChar[1]=l[l.length-1],S.slice(0,-1)}return S}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=l[l.length-1],l.toString("utf16le",R,l.length-1)}function h(l){var R=l&&l.length?this.write(l):"";if(this.lastNeed){var S=this.lastTotal-this.lastNeed;return R+this.lastChar.toString("utf16le",0,S)}return R}function s(l,R){var S=(l.length-R)%3;return S===0?l.toString("base64",R):(this.lastNeed=3-S,this.lastTotal=3,S===1?this.lastChar[0]=l[l.length-1]:(this.lastChar[0]=l[l.length-2],this.lastChar[1]=l[l.length-1]),l.toString("base64",R,l.length-S))}function f(l){var R=l&&l.length?this.write(l):"";return this.lastNeed?R+this.lastChar.toString("base64",0,3-this.lastNeed):R}function E(l){return l.toString(this.encoding)}function y(l){return l&&l.length?this.write(l):""}return Kn}var Qn,Ra;function Us(){if(Ra)return Qn;Ra=1;var e=Yt().codes.ERR_STREAM_PREMATURE_CLOSE;function r(i){var c=!1;return function(){if(!c){c=!0;for(var a=arguments.length,p=new Array(a),u=0;u0)if(typeof O!="string"&&!le.objectMode&&Object.getPrototypeOf(O)!==t.prototype&&(O=i(O)),Q)le.endEmitted?T(P,new l):Y(P,le,O,!0);else if(le.ended)T(P,new E);else{if(le.destroyed)return!1;le.reading=!1,le.decoder&&!Z?(O=le.decoder.write(O),le.objectMode||O.length!==0?Y(P,le,O,!1):B(P,le)):Y(P,le,O,!1)}else Q||(le.reading=!1,B(P,le))}return!le.ended&&(le.length=F?P=F:(P--,P|=P>>>1,P|=P>>>2,P|=P>>>4,P|=P>>>8,P|=P>>>16,P++),P}function _(P,O){return P<=0||O.length===0&&O.ended?0:O.objectMode?1:P!==P?O.flowing&&O.length?O.buffer.head.data.length:O.length:(P>O.highWaterMark&&(O.highWaterMark=d(P)),P<=O.length?P:O.ended?O.length:(O.needReadable=!0,0))}G.prototype.read=function(P){p("read",P),P=parseInt(P,10);var O=this._readableState,Z=P;if(P!==0&&(O.emittedReadable=!1),P===0&&O.needReadable&&((O.highWaterMark!==0?O.length>=O.highWaterMark:O.length>0)||O.ended))return p("read: emitReadable",O.length,O.ended),O.length===0&&O.ended?J(this):M(this),null;if(P=_(P,O),P===0&&O.ended)return O.length===0&&J(this),null;var Q=O.needReadable;p("need readable",Q),(O.length===0||O.length-P0?ae=W(P,O):ae=null,ae===null?(O.needReadable=O.length<=O.highWaterMark,P=0):(O.length-=P,O.awaitDrain=0),O.length===0&&(O.ended||(O.needReadable=!0),Z!==P&&O.ended&&J(this)),ae!==null&&this.emit("data",ae),ae};function C(P,O){if(p("onEofChunk"),!O.ended){if(O.decoder){var Z=O.decoder.end();Z&&Z.length&&(O.buffer.push(Z),O.length+=O.objectMode?1:Z.length)}O.ended=!0,O.sync?M(P):(O.needReadable=!1,O.emittedReadable||(O.emittedReadable=!0,x(P)))}}function M(P){var O=P._readableState;p("emitReadable",O.needReadable,O.emittedReadable),O.needReadable=!1,O.emittedReadable||(p("emitReadable",O.flowing),O.emittedReadable=!0,process.nextTick(x,P))}function x(P){var O=P._readableState;p("emitReadable_",O.destroyed,O.length,O.ended),!O.destroyed&&(O.length||O.ended)&&(P.emit("readable"),O.emittedReadable=!1),O.needReadable=!O.flowing&&!O.ended&&O.length<=O.highWaterMark,$(P)}function B(P,O){O.readingMore||(O.readingMore=!0,process.nextTick(j,P,O))}function j(P,O){for(;!O.reading&&!O.ended&&(O.length1&&oe(Q.pipes,P)!==-1)&&!me&&(p("false write response, pause",Q.awaitDrain),Q.awaitDrain++),Z.pause())}function pe(k){p("onerror",k),ye(),P.removeListener("error",pe),r(P,"error")===0&&T(P,k)}D(P,"error",pe);function we(){P.removeListener("finish",je),ye()}P.once("close",we);function je(){p("onfinish"),P.removeListener("close",we),ye()}P.once("finish",je);function ye(){p("unpipe"),Z.unpipe(P)}return P.emit("pipe",Z),Q.flowing||(p("pipe resume"),Z.resume()),P};function A(P){return function(){var Z=P._readableState;p("pipeOnDrain",Z.awaitDrain),Z.awaitDrain&&Z.awaitDrain--,Z.awaitDrain===0&&r(P,"data")&&(Z.flowing=!0,$(P))}}G.prototype.unpipe=function(P){var O=this._readableState,Z={hasUnpiped:!1};if(O.pipesCount===0)return this;if(O.pipesCount===1)return P&&P!==O.pipes?this:(P||(P=O.pipes),O.pipes=null,O.pipesCount=0,O.flowing=!1,P&&P.emit("unpipe",this,Z),this);if(!P){var Q=O.pipes,ae=O.pipesCount;O.pipes=null,O.pipesCount=0,O.flowing=!1;for(var le=0;le0,Q.flowing!==!1&&this.resume()):P==="readable"&&!Q.endEmitted&&!Q.readableListening&&(Q.readableListening=Q.needReadable=!0,Q.flowing=!1,Q.emittedReadable=!1,p("on readable",Q.length,Q.reading),Q.length?M(this):Q.reading||process.nextTick(N,this)),Z},G.prototype.addListener=G.prototype.on,G.prototype.removeListener=function(P,O){var Z=n.prototype.removeListener.call(this,P,O);return P==="readable"&&process.nextTick(b,this),Z},G.prototype.removeAllListeners=function(P){var O=n.prototype.removeAllListeners.apply(this,arguments);return(P==="readable"||P===void 0)&&process.nextTick(b,this),O};function b(P){var O=P._readableState;O.readableListening=P.listenerCount("readable")>0,O.resumeScheduled&&!O.paused?O.flowing=!0:P.listenerCount("data")>0&&P.resume()}function N(P){p("readable nexttick read 0"),P.read(0)}G.prototype.resume=function(){var P=this._readableState;return P.flowing||(p("resume"),P.flowing=!P.readableListening,te(this,P)),P.paused=!1,this};function te(P,O){O.resumeScheduled||(O.resumeScheduled=!0,process.nextTick(K,P,O))}function K(P,O){p("resume",O.reading),O.reading||P.read(0),O.resumeScheduled=!1,P.emit("resume"),$(P),O.flowing&&!O.reading&&P.read(0)}G.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function $(P){var O=P._readableState;for(p("flow",O.flowing);O.flowing&&P.read()!==null;);}G.prototype.wrap=function(P){var O=this,Z=this._readableState,Q=!1;P.on("end",function(){if(p("wrapped end"),Z.decoder&&!Z.ended){var ne=Z.decoder.end();ne&&ne.length&&O.push(ne)}O.push(null)}),P.on("data",function(ne){if(p("wrapped data"),Z.decoder&&(ne=Z.decoder.write(ne)),!(Z.objectMode&&ne==null)&&!(!Z.objectMode&&(!ne||!ne.length))){var fe=O.push(ne);fe||(Q=!0,P.pause())}});for(var ae in P)this[ae]===void 0&&typeof P[ae]=="function"&&(this[ae]=function(fe){return function(){return P[fe].apply(P,arguments)}}(ae));for(var le=0;le=O.length?(O.decoder?Z=O.buffer.join(""):O.buffer.length===1?Z=O.buffer.first():Z=O.buffer.concat(O.length),O.buffer.clear()):Z=O.buffer.consume(P,O.decoder),Z}function J(P){var O=P._readableState;p("endReadable",O.endEmitted),O.endEmitted||(O.ended=!0,process.nextTick(ee,O,P))}function ee(P,O){if(p("endReadableNT",P.endEmitted,P.length),!P.endEmitted&&P.length===0&&(P.endEmitted=!0,O.readable=!1,O.emit("end"),P.autoDestroy)){var Z=O._writableState;(!Z||Z.autoDestroy&&Z.finished)&&O.destroy()}}typeof Symbol=="function"&&(G.from=function(P,O){return I===void 0&&(I=Sh()),I(G,P,O)});function oe(P,O){for(var Z=0,Q=P.length;Z0;return a(R,I,T,function(q){y||(y=q),q&&l.forEach(p),!I&&(l.forEach(p),E(y))})});return s.reduce(u)}return ni=o,ni}var Aa;function sl(){return Aa||(Aa=1,function(e,r){r=e.exports=nl(),r.Stream=r,r.Readable=r,r.Writable=rl(),r.Duplex=Kt(),r.Transform=il(),r.PassThrough=Ch(),r.finished=Us(),r.pipeline=Mh()}(nn,nn.exports)),nn.exports}var ii,Ta;function kh(){if(Ta)return ii;Ta=1;const{Transform:e}=sl();return ii=r=>class ol extends e{constructor(t,g,i,c,a){super(a),this._rate=t,this._capacity=g,this._delimitedSuffix=i,this._hashBitLength=c,this._options=a,this._state=new r,this._state.initialize(t,g),this._finalized=!1}_transform(t,g,i){let c=null;try{this.update(t,g)}catch(a){c=a}i(c)}_flush(t){let g=null;try{this.push(this.digest())}catch(i){g=i}t(g)}update(t,g){if(!Buffer.isBuffer(t)&&typeof t!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return Buffer.isBuffer(t)||(t=Buffer.from(t,g)),this._state.absorb(t),this}digest(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let g=this._state.squeeze(this._hashBitLength/8);return t!==void 0&&(g=g.toString(t)),this._resetState(),g}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const t=new ol(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}},ii}var si,La;function Ih(){if(La)return si;La=1;const{Transform:e}=sl();return si=r=>class al extends e{constructor(t,g,i,c){super(c),this._rate=t,this._capacity=g,this._delimitedSuffix=i,this._options=c,this._state=new r,this._state.initialize(t,g),this._finalized=!1}_transform(t,g,i){let c=null;try{this.update(t,g)}catch(a){c=a}i(c)}_flush(){}_read(t){this.push(this.squeeze(t))}update(t,g){if(!Buffer.isBuffer(t)&&typeof t!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return Buffer.isBuffer(t)||(t=Buffer.from(t,g)),this._state.absorb(t),this}squeeze(t,g){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let i=this._state.squeeze(t);return g!==void 0&&(i=i.toString(g)),i}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const t=new al(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}},si}var oi,Ba;function xh(){if(Ba)return oi;Ba=1;const e=kh(),r=Ih();return oi=function(n){const t=e(n),g=r(n);return function(i,c){switch(typeof i=="string"?i.toLowerCase():i){case"keccak224":return new t(1152,448,null,224,c);case"keccak256":return new t(1088,512,null,256,c);case"keccak384":return new t(832,768,null,384,c);case"keccak512":return new t(576,1024,null,512,c);case"sha3-224":return new t(1152,448,6,224,c);case"sha3-256":return new t(1088,512,6,256,c);case"sha3-384":return new t(832,768,6,384,c);case"sha3-512":return new t(576,1024,6,512,c);case"shake128":return new g(1344,256,31,c);case"shake256":return new g(1088,512,31,c);default:throw new Error("Invald algorithm: "+i)}}},oi}var ai={},Na;function Ah(){if(Na)return ai;Na=1;const e=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];return ai.p1600=function(r){for(let n=0;n<24;++n){const t=r[0]^r[10]^r[20]^r[30]^r[40],g=r[1]^r[11]^r[21]^r[31]^r[41],i=r[2]^r[12]^r[22]^r[32]^r[42],c=r[3]^r[13]^r[23]^r[33]^r[43],a=r[4]^r[14]^r[24]^r[34]^r[44],p=r[5]^r[15]^r[25]^r[35]^r[45],u=r[6]^r[16]^r[26]^r[36]^r[46],m=r[7]^r[17]^r[27]^r[37]^r[47],o=r[8]^r[18]^r[28]^r[38]^r[48],h=r[9]^r[19]^r[29]^r[39]^r[49];let s=o^(i<<1|c>>>31),f=h^(c<<1|i>>>31);const E=r[0]^s,y=r[1]^f,l=r[10]^s,R=r[11]^f,S=r[20]^s,I=r[21]^f,T=r[30]^s,q=r[31]^f,D=r[40]^s,H=r[41]^f;s=t^(a<<1|p>>>31),f=g^(p<<1|a>>>31);const G=r[2]^s,X=r[3]^f,Y=r[12]^s,re=r[13]^f,F=r[22]^s,d=r[23]^f,_=r[32]^s,C=r[33]^f,M=r[42]^s,x=r[43]^f;s=i^(u<<1|m>>>31),f=c^(m<<1|u>>>31);const B=r[4]^s,j=r[5]^f,A=r[14]^s,b=r[15]^f,N=r[24]^s,te=r[25]^f,K=r[34]^s,$=r[35]^f,W=r[44]^s,J=r[45]^f;s=a^(o<<1|h>>>31),f=p^(h<<1|o>>>31);const ee=r[6]^s,oe=r[7]^f,P=r[16]^s,O=r[17]^f,Z=r[26]^s,Q=r[27]^f,ae=r[36]^s,le=r[37]^f,ne=r[46]^s,fe=r[47]^f;s=u^(t<<1|g>>>31),f=m^(g<<1|t>>>31);const He=r[8]^s,me=r[9]^f,he=r[18]^s,ve=r[19]^f,pe=r[28]^s,we=r[29]^f,je=r[38]^s,ye=r[39]^f,k=r[48]^s,w=r[49]^f,v=E,L=y,U=R<<4|l>>>28,V=l<<4|R>>>28,z=S<<3|I>>>29,de=I<<3|S>>>29,ce=q<<9|T>>>23,ue=T<<9|q>>>23,be=D<<18|H>>>14,se=H<<18|D>>>14,_e=G<<1|X>>>31,At=X<<1|G>>>31,Ee=re<<12|Y>>>20,Re=Y<<12|re>>>20,Tt=F<<10|d>>>22,Se=d<<10|F>>>22,Ce=C<<13|_>>>19,Lt=_<<13|C>>>19,Me=M<<2|x>>>30,ke=x<<2|M>>>30,Bt=j<<30|B>>>2,Ie=B<<30|j>>>2,xe=A<<6|b>>>26,Nt=b<<6|A>>>26,Ae=te<<11|N>>>21,Te=N<<11|te>>>21,Pt=K<<15|$>>>17,Le=$<<15|K>>>17,Be=J<<29|W>>>3,Ot=W<<29|J>>>3,Ne=ee<<28|oe>>>4,Pe=oe<<28|ee>>>4,Ft=O<<23|P>>>9,Oe=P<<23|O>>>9,Fe=Z<<25|Q>>>7,at=Q<<25|Z>>>7,ut=ae<<21|le>>>11,ct=le<<21|ae>>>11,lt=fe<<24|ne>>>8,ht=ne<<24|fe>>>8,dt=He<<27|me>>>5,ft=me<<27|He>>>5,pt=he<<20|ve>>>12,gt=ve<<20|he>>>12,mt=we<<7|pe>>>25,wt=pe<<7|we>>>25,yt=je<<8|ye>>>24,bt=ye<<8|je>>>24,vt=k<<14|w>>>18,_t=w<<14|k>>>18;r[0]=v^~Ee&Ae,r[1]=L^~Re&Te,r[10]=Ne^~pt&z,r[11]=Pe^~gt&de,r[20]=_e^~xe&Fe,r[21]=At^~Nt&at,r[30]=dt^~U&Tt,r[31]=ft^~V&Se,r[40]=Bt^~Ft&mt,r[41]=Ie^~Oe&wt,r[2]=Ee^~Ae&ut,r[3]=Re^~Te&ct,r[12]=pt^~z&Ce,r[13]=gt^~de&Lt,r[22]=xe^~Fe&yt,r[23]=Nt^~at&bt,r[32]=U^~Tt&Pt,r[33]=V^~Se&Le,r[42]=Ft^~mt&ce,r[43]=Oe^~wt&ue,r[4]=Ae^~ut&vt,r[5]=Te^~ct&_t,r[14]=z^~Ce&Be,r[15]=de^~Lt&Ot,r[24]=Fe^~yt&be,r[25]=at^~bt&se,r[34]=Tt^~Pt<,r[35]=Se^~Le&ht,r[44]=mt^~ce&Me,r[45]=wt^~ue&ke,r[6]=ut^~vt&v,r[7]=ct^~_t&L,r[16]=Ce^~Be&Ne,r[17]=Lt^~Ot&Pe,r[26]=yt^~be&_e,r[27]=bt^~se&At,r[36]=Pt^~lt&dt,r[37]=Le^~ht&ft,r[46]=ce^~Me&Bt,r[47]=ue^~ke&Ie,r[8]=vt^~v&Ee,r[9]=_t^~L&Re,r[18]=Be^~Ne&pt,r[19]=Ot^~Pe>,r[28]=be^~_e&xe,r[29]=se^~At&Nt,r[38]=lt^~dt&U,r[39]=ht^~ft&V,r[48]=Me^~Bt&Ft,r[49]=ke^~Ie&Oe,r[0]^=e[n*2],r[1]^=e[n*2+1]}},ai}var ui,Pa;function Th(){if(Pa)return ui;Pa=1;const e=Ah();function r(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}return r.prototype.initialize=function(n,t){for(let g=0;g<50;++g)this.state[g]=0;this.blockSize=n/8,this.count=0,this.squeezing=!1},r.prototype.absorb=function(n){for(let t=0;t>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(e.p1600(this.state),this.count=0);return t},r.prototype.copy=function(n){for(let t=0;t<50;++t)n.state[t]=this.state[t];n.blockSize=this.blockSize,n.count=this.count,n.squeezing=this.squeezing},ui=r,ui}var ci,Oa;function Lh(){return Oa||(Oa=1,ci=xh()(Th())),ci}var li,Fa;function ul(){if(Fa)return li;Fa=1;const e=Lh(),r=fn();function n(o){return Buffer.allocUnsafe(o).fill(0)}function t(o,h,s){const f=n(h);return o=i(o),s?o.length"u")throw new Error("Not an array?");if(E=i(s),E!=="dynamic"&&E!==0&&f.length>E)throw new Error("Elements exceed array size: "+E);l=[],s=s.slice(0,s.lastIndexOf("[")),typeof f=="string"&&(f=JSON.parse(f));for(R in f)l.push(a(s,f[R]));if(E==="dynamic"){var S=a("uint256",f.length);l.unshift(S)}return Buffer.concat(l)}else{if(s==="bytes")return f=new Buffer(f),l=Buffer.concat([a("uint256",f.length),f]),f.length%32!==0&&(l=Buffer.concat([l,e.zeros(32-f.length%32)])),l;if(s.startsWith("bytes")){if(E=t(s),E<1||E>32)throw new Error("Invalid bytes width: "+E);return e.setLengthRight(f,32)}else if(s.startsWith("uint")){if(E=t(s),E%8||E<8||E>256)throw new Error("Invalid uint width: "+E);if(y=c(f),y.bitLength()>E)throw new Error("Supplied uint exceeds width: "+E+" vs "+y.bitLength());if(y<0)throw new Error("Supplied uint is negative");return y.toArrayLike(Buffer,"be",32)}else if(s.startsWith("int")){if(E=t(s),E%8||E<8||E>256)throw new Error("Invalid int width: "+E);if(y=c(f),y.bitLength()>E)throw new Error("Supplied int exceeds width: "+E+" vs "+y.bitLength());return y.toTwos(256).toArrayLike(Buffer,"be",32)}else if(s.startsWith("ufixed")){if(E=g(s),y=c(f),y<0)throw new Error("Supplied ufixed is negative");return a("uint256",y.mul(new r(2).pow(new r(E[1]))))}else if(s.startsWith("fixed"))return E=g(s),a("int256",c(f).mul(new r(2).pow(new r(E[1]))))}throw new Error("Unsupported or invalid type: "+s)}function p(s){return s==="string"||s==="bytes"||i(s)==="dynamic"}function u(s){return s.lastIndexOf("]")===s.length-1}function m(s,f){var E=[],y=[],l=32*s.length;for(var R in s){var S=n(s[R]),I=f[R],T=a(S,I);p(S)?(E.push(a("uint256",l)),y.push(T),l+=T.length):E.push(T)}return Buffer.concat(E.concat(y))}function o(s,f){if(s.length!==f.length)throw new Error("Number of types are not matching the values");for(var E,y,l=[],R=0;R32)throw new Error("Invalid bytes width: "+E);l.push(e.setLengthRight(I,E))}else if(S.startsWith("uint")){if(E=t(S),E%8||E<8||E>256)throw new Error("Invalid uint width: "+E);if(y=c(I),y.bitLength()>E)throw new Error("Supplied uint exceeds width: "+E+" vs "+y.bitLength());l.push(y.toArrayLike(Buffer,"be",E/8))}else if(S.startsWith("int")){if(E=t(S),E%8||E<8||E>256)throw new Error("Invalid int width: "+E);if(y=c(I),y.bitLength()>E)throw new Error("Supplied int exceeds width: "+E+" vs "+y.bitLength());l.push(y.toTwos(E).toArrayLike(Buffer,"be",E/8))}else throw new Error("Unsupported or invalid type: "+S)}return Buffer.concat(l)}function h(s,f){return e.keccak(o(s,f))}return hi={rawEncode:m,solidityPack:o,soliditySHA3:h},hi}var di,qa;function Nh(){if(qa)return di;qa=1;const e=ul(),r=Bh(),n={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},t={encodeData(i,c,a,p=!0){const u=["bytes32"],m=[this.hashType(i,a)];if(p){const o=(h,s,f)=>{if(a[s]!==void 0)return["bytes32",f==null?"0x0000000000000000000000000000000000000000000000000000000000000000":e.keccak(this.encodeData(s,f,a,p))];if(f===void 0)throw new Error(`missing value for field ${h} of type ${s}`);if(s==="bytes")return["bytes32",e.keccak(f)];if(s==="string")return typeof f=="string"&&(f=Buffer.from(f,"utf8")),["bytes32",e.keccak(f)];if(s.lastIndexOf("]")===s.length-1){const E=s.slice(0,s.lastIndexOf("[")),y=f.map(l=>o(h,E,l));return["bytes32",e.keccak(r.rawEncode(y.map(([l])=>l),y.map(([,l])=>l)))]}return[s,f]};for(const h of a[i]){const[s,f]=o(h.name,h.type,c[h.name]);u.push(s),m.push(f)}}else for(const o of a[i]){let h=c[o.name];if(h!==void 0)if(o.type==="bytes")u.push("bytes32"),h=e.keccak(h),m.push(h);else if(o.type==="string")u.push("bytes32"),typeof h=="string"&&(h=Buffer.from(h,"utf8")),h=e.keccak(h),m.push(h);else if(a[o.type]!==void 0)u.push("bytes32"),h=e.keccak(this.encodeData(o.type,h,a,p)),m.push(h);else{if(o.type.lastIndexOf("]")===o.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");u.push(o.type),m.push(h)}}return r.rawEncode(u,m)},encodeType(i,c){let a="",p=this.findTypeDependencies(i,c).filter(u=>u!==i);p=[i].concat(p.sort());for(const u of p){if(!c[u])throw new Error("No type definition specified: "+u);a+=u+"("+c[u].map(({name:o,type:h})=>h+" "+o).join(",")+")"}return a},findTypeDependencies(i,c,a=[]){if(i=i.match(/^\w*/)[0],a.includes(i)||c[i]===void 0)return a;a.push(i);for(const p of c[i])for(const u of this.findTypeDependencies(p.type,c,a))!a.includes(u)&&a.push(u);return a},hashStruct(i,c,a,p=!0){return e.keccak(this.encodeData(i,c,a,p))},hashType(i,c){return e.keccak(this.encodeType(i,c))},sanitizeData(i){const c={};for(const a in n.properties)i[a]&&(c[a]=i[a]);return c.types&&(c.types=Object.assign({EIP712Domain:[]},c.types)),c},hash(i,c=!0){const a=this.sanitizeData(i),p=[Buffer.from("1901","hex")];return p.push(this.hashStruct("EIP712Domain",a.domain,a.types,c)),a.primaryType!=="EIP712Domain"&&p.push(this.hashStruct(a.primaryType,a.message,a.types,c)),e.keccak(Buffer.concat(p))}};di={TYPED_MESSAGE_SCHEMA:n,TypedDataUtils:t,hashForSignTypedDataLegacy:function(i){return g(i.data)},hashForSignTypedData_v3:function(i){return t.hash(i.data,!1)},hashForSignTypedData_v4:function(i){return t.hash(i.data)}};function g(i){const c=new Error("Expect argument to be non-empty array");if(typeof i!="object"||!i.length)throw c;const a=i.map(function(m){return m.type==="bytes"?e.toBuffer(m.value):m.value}),p=i.map(function(m){return m.type}),u=i.map(function(m){if(!m.name)throw c;return m.type+" "+m.name});return r.soliditySHA3(["bytes32","bytes32"],[r.soliditySHA3(new Array(i.length).fill("string"),u),r.soliditySHA3(p,a)])}return di}var St={},ja;function Ph(){if(ja)return St;ja=1,Object.defineProperty(St,"__esModule",{value:!0}),St.filterFromParam=St.FilterPolyfill=void 0;const e=mn(),r=tt(),n=5*60*1e3,t={jsonrpc:"2.0",id:0};let g=class{constructor(h){this.logFilters=new Map,this.blockFilters=new Set,this.pendingTransactionFilters=new Set,this.cursors=new Map,this.timeouts=new Map,this.nextFilterId=(0,e.IntNumber)(1),this.REQUEST_THROTTLE_INTERVAL=1e3,this.lastFetchTimestamp=new Date(0),this.resolvers=[],this.provider=h}async newFilter(h){const s=i(h),f=this.makeFilterId(),E=await this.setInitialCursorPosition(f,s.fromBlock);return console.info(`Installing new log filter(${f}):`,s,"initial cursor position:",E),this.logFilters.set(f,s),this.setFilterTimeout(f),(0,r.hexStringFromIntNumber)(f)}async newBlockFilter(){const h=this.makeFilterId(),s=await this.setInitialCursorPosition(h,"latest");return console.info(`Installing new block filter (${h}) with initial cursor position:`,s),this.blockFilters.add(h),this.setFilterTimeout(h),(0,r.hexStringFromIntNumber)(h)}async newPendingTransactionFilter(){const h=this.makeFilterId(),s=await this.setInitialCursorPosition(h,"latest");return console.info(`Installing new block filter (${h}) with initial cursor position:`,s),this.pendingTransactionFilters.add(h),this.setFilterTimeout(h),(0,r.hexStringFromIntNumber)(h)}uninstallFilter(h){const s=(0,r.intNumberFromHexString)(h);return console.info(`Uninstalling filter (${s})`),this.deleteFilter(s),!0}getFilterChanges(h){const s=(0,r.intNumberFromHexString)(h);return this.timeouts.has(s)&&this.setFilterTimeout(s),this.logFilters.has(s)?this.getLogFilterChanges(s):this.blockFilters.has(s)?this.getBlockFilterChanges(s):this.pendingTransactionFilters.has(s)?this.getPendingTransactionFilterChanges(s):Promise.resolve(u())}async getFilterLogs(h){const s=(0,r.intNumberFromHexString)(h),f=this.logFilters.get(s);return f?this.sendAsyncPromise(Object.assign(Object.assign({},t),{method:"eth_getLogs",params:[c(f)]})):u()}makeFilterId(){return(0,e.IntNumber)(++this.nextFilterId)}sendAsyncPromise(h){return new Promise((s,f)=>{this.provider.sendAsync(h,(E,y)=>{if(E)return f(E);if(Array.isArray(y)||y==null)return f(new Error(`unexpected response received: ${JSON.stringify(y)}`));s(y)})})}deleteFilter(h){console.info(`Deleting filter (${h})`),this.logFilters.delete(h),this.blockFilters.delete(h),this.pendingTransactionFilters.delete(h),this.cursors.delete(h),this.timeouts.delete(h)}async getLogFilterChanges(h){const s=this.logFilters.get(h),f=this.cursors.get(h);if(!f||!s)return u();const E=await this.getCurrentBlockHeight(),y=s.toBlock==="latest"?E:s.toBlock;if(f>E||f>Number(s.toBlock))return m();console.info(`Fetching logs from ${f} to ${y} for filter ${h}`);const l=await this.sendAsyncPromise(Object.assign(Object.assign({},t),{method:"eth_getLogs",params:[c(Object.assign(Object.assign({},s),{fromBlock:f,toBlock:y}))]}));if(Array.isArray(l.result)){const R=l.result.map(I=>(0,r.intNumberFromHexString)(I.blockNumber||"0x0")),S=Math.max(...R);if(S&&S>f){const I=(0,e.IntNumber)(S+1);console.info(`Moving cursor position for filter (${h}) from ${f} to ${I}`),this.cursors.set(h,I)}}return l}async getBlockFilterChanges(h){const s=this.cursors.get(h);if(!s)return u();const f=await this.getCurrentBlockHeight();if(s>f)return m();console.info(`Fetching blocks from ${s} to ${f} for filter (${h})`);const E=(await Promise.all((0,r.range)(s,f+1).map(l=>this.getBlockHashByNumber((0,e.IntNumber)(l))))).filter(l=>!!l),y=(0,e.IntNumber)(s+E.length);return console.info(`Moving cursor position for filter (${h}) from ${s} to ${y}`),this.cursors.set(h,y),Object.assign(Object.assign({},t),{result:E})}async getPendingTransactionFilterChanges(h){return Promise.resolve(m())}async setInitialCursorPosition(h,s){const f=await this.getCurrentBlockHeight(),E=typeof s=="number"&&s>f?s:f;return this.cursors.set(h,E),E}setFilterTimeout(h){const s=this.timeouts.get(h);s&&window.clearTimeout(s);const f=window.setTimeout(()=>{console.info(`Filter (${h}) timed out`),this.deleteFilter(h)},n);this.timeouts.set(h,f)}async getCurrentBlockHeight(){const h=new Date;if(h.getTime()-this.lastFetchTimestamp.getTime()>this.REQUEST_THROTTLE_INTERVAL){this.lastFetchTimestamp=h;const s=await this._getCurrentBlockHeight();this.currentBlockHeight=s,this.resolvers.forEach(f=>f(s)),this.resolvers=[]}return this.currentBlockHeight?this.currentBlockHeight:new Promise(s=>this.resolvers.push(s))}async _getCurrentBlockHeight(){const{result:h}=await this.sendAsyncPromise(Object.assign(Object.assign({},t),{method:"eth_blockNumber",params:[]}));return(0,r.intNumberFromHexString)((0,r.ensureHexString)(h))}async getBlockHashByNumber(h){const s=await this.sendAsyncPromise(Object.assign(Object.assign({},t),{method:"eth_getBlockByNumber",params:[(0,r.hexStringFromIntNumber)(h),!1]}));return s.result&&typeof s.result.hash=="string"?(0,r.ensureHexString)(s.result.hash):null}};St.FilterPolyfill=g;function i(o){return{fromBlock:a(o.fromBlock),toBlock:a(o.toBlock),addresses:o.address===void 0?null:Array.isArray(o.address)?o.address:[o.address],topics:o.topics||[]}}St.filterFromParam=i;function c(o){const h={fromBlock:p(o.fromBlock),toBlock:p(o.toBlock),topics:o.topics};return o.addresses!==null&&(h.address=o.addresses),h}function a(o){if(o===void 0||o==="latest"||o==="pending")return"latest";if(o==="earliest")return(0,e.IntNumber)(0);if((0,r.isHexString)(o))return(0,r.intNumberFromHexString)(o);throw new Error(`Invalid block option: ${String(o)}`)}function p(o){return o==="latest"?o:(0,r.hexStringFromIntNumber)(o)}function u(){return Object.assign(Object.assign({},t),{error:{code:-32e3,message:"filter not found"}})}function m(){return Object.assign(Object.assign({},t),{result:[]})}return St}var kr={},Ir={},Vt={},fi,$a;function Hs(){if($a)return fi;$a=1,fi=e;function e(r){r=r||{};var n=r.max||Number.MAX_SAFE_INTEGER,t=typeof r.start<"u"?r.start:Math.floor(Math.random()*n);return function(){return t=t%n,t++}}return fi}var pi,Ua;function Oh(){if(Ua)return pi;Ua=1;const e=(r,n)=>function(){const t=n.promiseModule,g=new Array(arguments.length);for(let i=0;i{n.errorFirst?g.push(function(a,p){if(n.multiArgs){const u=new Array(arguments.length-1);for(let m=1;m{n=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},n);const t=i=>{const c=a=>typeof a=="string"?i===a:a.test(i);return n.include?n.include.some(c):!n.exclude.some(c)};let g;typeof r=="function"?g=function(){return n.excludeMain?r.apply(this,arguments):e(r,n).apply(this,arguments)}:g=Object.create(Object.getPrototypeOf(r));for(const i in r){const c=r[i];g[i]=typeof c=="function"&&t(i)?e(c,n):c}return g},pi}var zt={},sn={},Ha;function Ws(){if(Ha)return sn;Ha=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=dn();function r(g,i,c){try{Reflect.apply(g,i,c)}catch(a){setTimeout(()=>{throw a})}}function n(g){const i=g.length,c=new Array(i);for(let a=0;a0&&([m]=c),m instanceof Error)throw m;const o=new Error(`Unhandled error.${m?` (${m.message})`:""}`);throw o.context=m,o}const u=p[i];if(u===void 0)return!1;if(typeof u=="function")r(u,this,c);else{const m=u.length,o=n(u);for(let h=0;ha+p,g=["sync","latest"];let i=class extends r.default{constructor(p){super(),this._blockResetDuration=p.blockResetDuration||20*n,this._usePastBlocks=p.usePastBlocks||!1,this._currentBlock=null,this._isRunning=!1,this._onNewListener=this._onNewListener.bind(this),this._onRemoveListener=this._onRemoveListener.bind(this),this._resetCurrentBlock=this._resetCurrentBlock.bind(this),this._setupInternalEvents()}async destroy(){this._cancelBlockResetTimeout(),await this._maybeEnd(),super.removeAllListeners()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}async getLatestBlock(){return this._currentBlock?this._currentBlock:await new Promise(u=>this.once("latest",u))}removeAllListeners(p){return p?super.removeAllListeners(p):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener(),this}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(p){g.includes(p)&&this._maybeStart()}_onRemoveListener(){this._getBlockTrackerEventCount()>0||this._maybeEnd()}async _maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),await this._start(),this.emit("_started"))}async _maybeEnd(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),await this._end(),this.emit("_ended"))}_getBlockTrackerEventCount(){return g.map(p=>this.listenerCount(p)).reduce(t)}_shouldUseNewBlock(p){const u=this._currentBlock;if(!u)return!0;const m=c(p),o=c(u);return this._usePastBlocks&&mo}_newPotentialLatest(p){this._shouldUseNewBlock(p)&&this._setCurrentBlock(p)}_setCurrentBlock(p){const u=this._currentBlock;this._currentBlock=p,this.emit("latest",p),this.emit("sync",{oldBlock:u,newBlock:p})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){this._blockResetTimeout&&clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}};zt.BaseBlockTracker=i;function c(a){return Number.parseInt(a,16)}return zt}var gi={},xr={},Ge={};class ll extends TypeError{constructor(r,n){let t;const{message:g,explanation:i,...c}=r,{path:a}=r,p=a.length===0?g:`At path: ${a.join(".")} -- ${g}`;super(i??p),i!=null&&(this.cause=p),Object.assign(this,c),this.name=this.constructor.name,this.failures=()=>t??(t=[r,...n()])}}function Fh(e){return ze(e)&&typeof e[Symbol.iterator]=="function"}function ze(e){return typeof e=="object"&&e!=null}function Va(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;const r=Object.getPrototypeOf(e);return r===null||r===Object.prototype}function qe(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function Dh(e){const{done:r,value:n}=e.next();return r?void 0:n}function qh(e,r,n,t){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:g,branch:i}=r,{type:c}=n,{refinement:a,message:p=`Expected a value of type \`${c}\`${a?` with refinement \`${a}\``:""}, but received: \`${qe(t)}\``}=e;return{value:t,type:c,refinement:a,key:g[g.length-1],path:g,branch:i,...e,message:p}}function*Bs(e,r,n,t){Fh(e)||(e=[e]);for(const g of e){const i=qh(g,r,n,t);i&&(yield i)}}function*Vs(e,r,n={}){const{path:t=[],branch:g=[e],coerce:i=!1,mask:c=!1}=n,a={path:t,branch:g};if(i&&(e=r.coercer(e,a),c&&r.type!=="type"&&ze(r.schema)&&ze(e)&&!Array.isArray(e)))for(const u in e)r.schema[u]===void 0&&delete e[u];let p="valid";for(const u of r.validator(e,a))u.explanation=n.message,p="not_valid",yield[u,void 0];for(let[u,m,o]of r.entries(e,a)){const h=Vs(m,o,{path:u===void 0?t:[...t,u],branch:u===void 0?g:[...g,m],coerce:i,mask:c,message:n.message});for(const s of h)s[0]?(p=s[0].refinement!=null?"not_refined":"not_valid",yield[s[0],void 0]):i&&(m=s[1],u===void 0?e=m:e instanceof Map?e.set(u,m):e instanceof Set?e.add(m):ze(e)&&(m!==void 0||u in e)&&(e[u]=m))}if(p!=="not_valid")for(const u of r.refiner(e,a))u.explanation=n.message,p="not_refined",yield[u,void 0];p==="valid"&&(yield[void 0,e])}class De{constructor(r){const{type:n,schema:t,validator:g,refiner:i,coercer:c=p=>p,entries:a=function*(){}}=r;this.type=n,this.schema=t,this.entries=a,this.coercer=c,g?this.validator=(p,u)=>{const m=g(p,u);return Bs(m,u,this,p)}:this.validator=()=>[],i?this.refiner=(p,u)=>{const m=i(p,u);return Bs(m,u,this,p)}:this.refiner=()=>[]}assert(r,n){return hl(r,this,n)}create(r,n){return dl(r,this,n)}is(r){return zs(r,this)}mask(r,n){return fl(r,this,n)}validate(r,n={}){return Xt(r,this,n)}}function hl(e,r,n){const t=Xt(e,r,{message:n});if(t[0])throw t[0]}function dl(e,r,n){const t=Xt(e,r,{coerce:!0,message:n});if(t[0])throw t[0];return t[1]}function fl(e,r,n){const t=Xt(e,r,{coerce:!0,mask:!0,message:n});if(t[0])throw t[0];return t[1]}function zs(e,r){return!Xt(e,r)[0]}function Xt(e,r,n={}){const t=Vs(e,r,n),g=Dh(t);return g[0]?[new ll(g[0],function*(){for(const c of t)c[0]&&(yield c[0])}),void 0]:[void 0,g[1]]}function jh(...e){const r=e[0].type==="type",n=e.map(g=>g.schema),t=Object.assign({},...n);return r?Wr(t):Hr(t)}function Ve(e,r){return new De({type:e,schema:null,validator:r})}function $h(e,r){return new De({...e,refiner:(n,t)=>n===void 0||e.refiner(n,t),validator(n,t){return n===void 0?!0:(r(n,t),e.validator(n,t))}})}function Uh(e){return new De({type:"dynamic",schema:null,*entries(r,n){yield*e(r,n).entries(r,n)},validator(r,n){return e(r,n).validator(r,n)},coercer(r,n){return e(r,n).coercer(r,n)},refiner(r,n){return e(r,n).refiner(r,n)}})}function Hh(e){let r;return new De({type:"lazy",schema:null,*entries(n,t){r??(r=e()),yield*r.entries(n,t)},validator(n,t){return r??(r=e()),r.validator(n,t)},coercer(n,t){return r??(r=e()),r.coercer(n,t)},refiner(n,t){return r??(r=e()),r.refiner(n,t)}})}function Wh(e,r){const{schema:n}=e,t={...n};for(const g of r)delete t[g];switch(e.type){case"type":return Wr(t);default:return Hr(t)}}function Vh(e){const r=e instanceof De,n=r?{...e.schema}:{...e};for(const t in n)n[t]=pl(n[t]);return r&&e.type==="type"?Wr(n):Hr(n)}function zh(e,r){const{schema:n}=e,t={};for(const g of r)t[g]=n[g];switch(e.type){case"type":return Wr(t);default:return Hr(t)}}function Jh(e,r){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),Ve(e,r)}function Gh(){return Ve("any",()=>!0)}function Zh(e){return new De({type:"array",schema:e,*entries(r){if(e&&Array.isArray(r))for(const[n,t]of r.entries())yield[n,t,e]},coercer(r){return Array.isArray(r)?r.slice():r},validator(r){return Array.isArray(r)||`Expected an array value, but received: ${qe(r)}`}})}function Kh(){return Ve("bigint",e=>typeof e=="bigint")}function Qh(){return Ve("boolean",e=>typeof e=="boolean")}function Yh(){return Ve("date",e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${qe(e)}`)}function Xh(e){const r={},n=e.map(t=>qe(t)).join();for(const t of e)r[t]=t;return new De({type:"enums",schema:r,validator(t){return e.includes(t)||`Expected one of \`${n}\`, but received: ${qe(t)}`}})}function ed(){return Ve("func",e=>typeof e=="function"||`Expected a function, but received: ${qe(e)}`)}function td(e){return Ve("instance",r=>r instanceof e||`Expected a \`${e.name}\` instance, but received: ${qe(r)}`)}function rd(){return Ve("integer",e=>typeof e=="number"&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${qe(e)}`)}function nd(e){return new De({type:"intersection",schema:null,*entries(r,n){for(const t of e)yield*t.entries(r,n)},*validator(r,n){for(const t of e)yield*t.validator(r,n)},*refiner(r,n){for(const t of e)yield*t.refiner(r,n)}})}function id(e){const r=qe(e),n=typeof e;return new De({type:"literal",schema:n==="string"||n==="number"||n==="boolean"?e:null,validator(t){return t===e||`Expected the literal \`${r}\`, but received: ${qe(t)}`}})}function sd(e,r){return new De({type:"map",schema:null,*entries(n){if(e&&r&&n instanceof Map)for(const[t,g]of n.entries())yield[t,t,e],yield[t,g,r]},coercer(n){return n instanceof Map?new Map(n):n},validator(n){return n instanceof Map||`Expected a \`Map\` object, but received: ${qe(n)}`}})}function Js(){return Ve("never",()=>!1)}function od(e){return new De({...e,validator:(r,n)=>r===null||e.validator(r,n),refiner:(r,n)=>r===null||e.refiner(r,n)})}function ad(){return Ve("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${qe(e)}`)}function Hr(e){const r=e?Object.keys(e):[],n=Js();return new De({type:"object",schema:e||null,*entries(t){if(e&&ze(t)){const g=new Set(Object.keys(t));for(const i of r)g.delete(i),yield[i,t[i],e[i]];for(const i of g)yield[i,t[i],n]}},validator(t){return ze(t)||`Expected an object, but received: ${qe(t)}`},coercer(t){return ze(t)?{...t}:t}})}function pl(e){return new De({...e,validator:(r,n)=>r===void 0||e.validator(r,n),refiner:(r,n)=>r===void 0||e.refiner(r,n)})}function ud(e,r){return new De({type:"record",schema:null,*entries(n){if(ze(n))for(const t in n){const g=n[t];yield[t,t,e],yield[t,g,r]}},validator(n){return ze(n)||`Expected an object, but received: ${qe(n)}`}})}function cd(){return Ve("regexp",e=>e instanceof RegExp)}function ld(e){return new De({type:"set",schema:null,*entries(r){if(e&&r instanceof Set)for(const n of r)yield[n,n,e]},coercer(r){return r instanceof Set?new Set(r):r},validator(r){return r instanceof Set||`Expected a \`Set\` object, but received: ${qe(r)}`}})}function gl(){return Ve("string",e=>typeof e=="string"||`Expected a string, but received: ${qe(e)}`)}function hd(e){const r=Js();return new De({type:"tuple",schema:null,*entries(n){if(Array.isArray(n)){const t=Math.max(e.length,n.length);for(let g=0;gn.type).join(" | ");return new De({type:"union",schema:null,coercer(n){for(const t of e){const[g,i]=t.validate(n,{coerce:!0});if(!g)return i}return n},validator(n,t){const g=[];for(const i of e){const[...c]=Vs(n,i,t),[a]=c;if(a[0])for(const[p]of c)p&&g.push(p);else return[]}return[`Expected the value to satisfy a union of \`${r}\`, but received: ${qe(n)}`,...g]}})}function ml(){return Ve("unknown",()=>!0)}function Gs(e,r,n){return new De({...e,coercer:(t,g)=>zs(t,r)?e.coercer(n(t,g),g):e.coercer(t,g)})}function fd(e,r,n={}){return Gs(e,ml(),t=>{const g=typeof r=="function"?r():r;if(t===void 0)return g;if(!n.strict&&Va(t)&&Va(g)){const i={...t};let c=!1;for(const a in g)i[a]===void 0&&(i[a]=g[a],c=!0);if(c)return i}return t})}function pd(e){return Gs(e,gl(),r=>r.trim())}function gd(e){return It(e,"empty",r=>{const n=wl(r);return n===0||`Expected an empty ${e.type} but received one with a size of \`${n}\``})}function wl(e){return e instanceof Map||e instanceof Set?e.size:e.length}function md(e,r,n={}){const{exclusive:t}=n;return It(e,"max",g=>t?gt?g>r:g>=r||`Expected a ${e.type} greater than ${t?"":"or equal to "}${r} but received \`${g}\``)}function yd(e){return It(e,"nonempty",r=>wl(r)>0||`Expected a nonempty ${e.type} but received an empty one`)}function bd(e,r){return It(e,"pattern",n=>r.test(n)||`Expected a ${e.type} matching \`/${r.source}/\` but received "${n}"`)}function vd(e,r,n=r){const t=`Expected a ${e.type}`,g=r===n?`of \`${r}\``:`between \`${r}\` and \`${n}\``;return It(e,"size",i=>{if(typeof i=="number"||i instanceof Date)return r<=i&&i<=n||`${t} ${g} but received \`${i}\``;if(i instanceof Map||i instanceof Set){const{size:c}=i;return r<=c&&c<=n||`${t} with a size ${g} but received one with a size of \`${c}\``}else{const{length:c}=i;return r<=c&&c<=n||`${t} with a length ${g} but received one with a length of \`${c}\``}})}function It(e,r,n){return new De({...e,*refiner(t,g){yield*e.refiner(t,g);const i=n(t,g),c=Bs(i,g,e,t);for(const a of c)yield{...a,refinement:r}}})}const _d=Object.freeze(Object.defineProperty({__proto__:null,Struct:De,StructError:ll,any:Gh,array:Zh,assert:hl,assign:jh,bigint:Kh,boolean:Qh,coerce:Gs,create:dl,date:Yh,defaulted:fd,define:Ve,deprecated:$h,dynamic:Uh,empty:gd,enums:Xh,func:ed,instance:td,integer:rd,intersection:nd,is:zs,lazy:Hh,literal:id,map:sd,mask:fl,max:md,min:wd,never:Js,nonempty:yd,nullable:od,number:ad,object:Hr,omit:Wh,optional:pl,partial:Vh,pattern:bd,pick:zh,record:ud,refine:It,regexp:cd,set:ld,size:vd,string:gl,struct:Jh,trimmed:pd,tuple:hd,type:Wr,union:dd,unknown:ml,validate:Xt},Symbol.toStringTag,{value:"Module"})),xt=$r(_d);var za;function ot(){if(za)return Ge;za=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.assertExhaustive=Ge.assertStruct=Ge.assert=Ge.AssertionError=void 0;const e=xt;function r(u){return typeof u=="object"&&u!==null&&"message"in u}function n(u){var m,o;return typeof((o=(m=u==null?void 0:u.prototype)===null||m===void 0?void 0:m.constructor)===null||o===void 0?void 0:o.name)=="string"}function t(u){const m=r(u)?u.message:String(u);return m.endsWith(".")?m.slice(0,-1):m}function g(u,m){return n(u)?new u({message:m}):u({message:m})}class i extends Error{constructor(m){super(m.message),this.code="ERR_ASSERTION"}}Ge.AssertionError=i;function c(u,m="Assertion failed.",o=i){if(!u)throw m instanceof Error?m:g(o,m)}Ge.assert=c;function a(u,m,o="Assertion failed",h=i){try{(0,e.assert)(u,m)}catch(s){throw g(h,`${o}: ${t(s)}.`)}}Ge.assertStruct=a;function p(u){throw new Error("Invalid branch reached. Should be detected during compilation.")}return Ge.assertExhaustive=p,Ge}var Ar={},Ja;function yl(){if(Ja)return Ar;Ja=1,Object.defineProperty(Ar,"__esModule",{value:!0}),Ar.base64=void 0;const e=xt,r=ot(),n=(t,g={})=>{var i,c;const a=(i=g.paddingRequired)!==null&&i!==void 0?i:!1,p=(c=g.characterSet)!==null&&c!==void 0?c:"base64";let u;p==="base64"?u=String.raw`[A-Za-z0-9+\/]`:((0,r.assert)(p==="base64url"),u=String.raw`[-_A-Za-z0-9]`);let m;return a?m=new RegExp(`^(?:${u}{4})*(?:${u}{3}=|${u}{2}==)?$`,"u"):m=new RegExp(`^(?:${u}{4})*(?:${u}{2,3}|${u}{3}=|${u}{2}==)?$`,"u"),(0,e.pattern)(t,m)};return Ar.base64=n,Ar}var ge={},mi={},Ga;function bn(){return Ga||(Ga=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.remove0x=e.add0x=e.assertIsStrictHexString=e.assertIsHexString=e.isStrictHexString=e.isHexString=e.StrictHexStruct=e.HexStruct=void 0;const r=xt,n=ot();e.HexStruct=(0,r.pattern)((0,r.string)(),/^(?:0x)?[0-9a-f]+$/iu),e.StrictHexStruct=(0,r.pattern)((0,r.string)(),/^0x[0-9a-f]+$/iu);function t(u){return(0,r.is)(u,e.HexStruct)}e.isHexString=t;function g(u){return(0,r.is)(u,e.StrictHexStruct)}e.isStrictHexString=g;function i(u){(0,n.assert)(t(u),"Value must be a hexadecimal string.")}e.assertIsHexString=i;function c(u){(0,n.assert)(g(u),'Value must be a hexadecimal string, starting with "0x".')}e.assertIsStrictHexString=c;function a(u){return u.startsWith("0x")?u:u.startsWith("0X")?`0x${u.substring(2)}`:`0x${u}`}e.add0x=a;function p(u){return u.startsWith("0x")||u.startsWith("0X")?u.substring(2):u}e.remove0x=p}(mi)),mi}var Za;function bl(){if(Za)return ge;Za=1,Object.defineProperty(ge,"__esModule",{value:!0}),ge.createDataView=ge.concatBytes=ge.valueToBytes=ge.stringToBytes=ge.numberToBytes=ge.signedBigIntToBytes=ge.bigIntToBytes=ge.hexToBytes=ge.bytesToString=ge.bytesToNumber=ge.bytesToSignedBigInt=ge.bytesToBigInt=ge.bytesToHex=ge.assertIsBytes=ge.isBytes=void 0;const e=ot(),r=bn(),n=48,t=58,g=87;function i(){const D=[];return()=>{if(D.length===0)for(let H=0;H<256;H++)D.push(H.toString(16).padStart(2,"0"));return D}}const c=i();function a(D){return D instanceof Uint8Array}ge.isBytes=a;function p(D){(0,e.assert)(a(D),"Value must be a Uint8Array.")}ge.assertIsBytes=p;function u(D){if(p(D),D.length===0)return"0x";const H=c(),G=new Array(D.length);for(let X=0;X=BigInt(0),"Value must be a non-negative bigint.");const H=D.toString(16);return f(H)}ge.bigIntToBytes=E;function y(D,H){(0,e.assert)(H>0);const G=D>>BigInt(31);return!((~D&G)+(D&~G)>>BigInt(H*8+-1))}function l(D,H){(0,e.assert)(typeof D=="bigint","Value must be a bigint."),(0,e.assert)(typeof H=="number","Byte length must be a number."),(0,e.assert)(H>0,"Byte length must be greater than 0."),(0,e.assert)(y(D,H),"Byte length is too small to represent the given value.");let G=D;const X=new Uint8Array(H);for(let Y=0;Y>=BigInt(8);return X.reverse()}ge.signedBigIntToBytes=l;function R(D){(0,e.assert)(typeof D=="number","Value must be a number."),(0,e.assert)(D>=0,"Value must be a non-negative number."),(0,e.assert)(Number.isSafeInteger(D),"Value is not a safe integer. Use `bigIntToBytes` instead.");const H=D.toString(16);return f(H)}ge.numberToBytes=R;function S(D){return(0,e.assert)(typeof D=="string","Value must be a string."),new TextEncoder().encode(D)}ge.stringToBytes=S;function I(D){if(typeof D=="bigint")return E(D);if(typeof D=="number")return R(D);if(typeof D=="string")return D.startsWith("0x")?f(D):S(D);if(a(D))return D;throw new TypeError(`Unsupported value type: "${typeof D}".`)}ge.valueToBytes=I;function T(D){const H=new Array(D.length);let G=0;for(let Y=0;Ya.call(p,u,m,this))}get(a){return r(this,n,"f").get(a)}has(a){return r(this,n,"f").has(a)}keys(){return r(this,n,"f").keys()}values(){return r(this,n,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map(([a,p])=>`${String(a)} => ${String(p)}`).join(", ")} `:""}}`}}et.FrozenMap=g;class i{constructor(a){t.set(this,void 0),e(this,t,new Set(a),"f"),Object.freeze(this)}get size(){return r(this,t,"f").size}[(t=new WeakMap,Symbol.iterator)](){return r(this,t,"f")[Symbol.iterator]()}entries(){return r(this,t,"f").entries()}forEach(a,p){return r(this,t,"f").forEach((u,m,o)=>a.call(p,u,m,this))}has(a){return r(this,t,"f").has(a)}keys(){return r(this,t,"f").keys()}values(){return r(this,t,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map(a=>String(a)).join(", ")} `:""}}`}}return et.FrozenSet=i,Object.freeze(g),Object.freeze(g.prototype),Object.freeze(i),Object.freeze(i.prototype),et}var wi={},Xa;function Cd(){return Xa||(Xa=1,Object.defineProperty(wi,"__esModule",{value:!0})),wi}var yi={},eu;function Md(){return eu||(eu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getJsonRpcIdValidator=e.assertIsJsonRpcError=e.isJsonRpcError=e.assertIsJsonRpcFailure=e.isJsonRpcFailure=e.assertIsJsonRpcSuccess=e.isJsonRpcSuccess=e.assertIsJsonRpcResponse=e.isJsonRpcResponse=e.assertIsPendingJsonRpcResponse=e.isPendingJsonRpcResponse=e.JsonRpcResponseStruct=e.JsonRpcFailureStruct=e.JsonRpcSuccessStruct=e.PendingJsonRpcResponseStruct=e.assertIsJsonRpcRequest=e.isJsonRpcRequest=e.assertIsJsonRpcNotification=e.isJsonRpcNotification=e.JsonRpcNotificationStruct=e.JsonRpcRequestStruct=e.JsonRpcParamsStruct=e.JsonRpcErrorStruct=e.JsonRpcIdStruct=e.JsonRpcVersionStruct=e.jsonrpc2=e.getJsonSize=e.isValidJson=e.JsonStruct=e.UnsafeJsonStruct=void 0;const r=xt,n=ot(),t=()=>(0,r.define)("finite number",T=>(0,r.is)(T,(0,r.number)())&&Number.isFinite(T));e.UnsafeJsonStruct=(0,r.union)([(0,r.literal)(null),(0,r.boolean)(),t(),(0,r.string)(),(0,r.array)((0,r.lazy)(()=>e.UnsafeJsonStruct)),(0,r.record)((0,r.string)(),(0,r.lazy)(()=>e.UnsafeJsonStruct))]),e.JsonStruct=(0,r.define)("Json",(T,q)=>{function D(H,G){const Y=[...G.validator(H,q)];return Y.length>0?Y:!0}try{const H=D(T,e.UnsafeJsonStruct);return H!==!0?H:D(JSON.parse(JSON.stringify(T)),e.UnsafeJsonStruct)}catch(H){return H instanceof RangeError?"Circular reference detected":!1}});function g(T){return(0,r.is)(T,e.JsonStruct)}e.isValidJson=g;function i(T){(0,n.assertStruct)(T,e.JsonStruct,"Invalid JSON value");const q=JSON.stringify(T);return new TextEncoder().encode(q).byteLength}e.getJsonSize=i,e.jsonrpc2="2.0",e.JsonRpcVersionStruct=(0,r.literal)(e.jsonrpc2),e.JsonRpcIdStruct=(0,r.nullable)((0,r.union)([(0,r.number)(),(0,r.string)()])),e.JsonRpcErrorStruct=(0,r.object)({code:(0,r.integer)(),message:(0,r.string)(),data:(0,r.optional)(e.JsonStruct),stack:(0,r.optional)((0,r.string)())}),e.JsonRpcParamsStruct=(0,r.optional)((0,r.union)([(0,r.record)((0,r.string)(),e.JsonStruct),(0,r.array)(e.JsonStruct)])),e.JsonRpcRequestStruct=(0,r.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,method:(0,r.string)(),params:e.JsonRpcParamsStruct}),e.JsonRpcNotificationStruct=(0,r.omit)(e.JsonRpcRequestStruct,["id"]);function c(T){return(0,r.is)(T,e.JsonRpcNotificationStruct)}e.isJsonRpcNotification=c;function a(T,q){(0,n.assertStruct)(T,e.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",q)}e.assertIsJsonRpcNotification=a;function p(T){return(0,r.is)(T,e.JsonRpcRequestStruct)}e.isJsonRpcRequest=p;function u(T,q){(0,n.assertStruct)(T,e.JsonRpcRequestStruct,"Invalid JSON-RPC request",q)}e.assertIsJsonRpcRequest=u,e.PendingJsonRpcResponseStruct=(0,r.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:(0,r.optional)((0,r.unknown)()),error:(0,r.optional)(e.JsonRpcErrorStruct)}),e.JsonRpcSuccessStruct=(0,r.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:e.JsonStruct}),e.JsonRpcFailureStruct=(0,r.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,error:e.JsonRpcErrorStruct}),e.JsonRpcResponseStruct=(0,r.union)([e.JsonRpcSuccessStruct,e.JsonRpcFailureStruct]);function m(T){return(0,r.is)(T,e.PendingJsonRpcResponseStruct)}e.isPendingJsonRpcResponse=m;function o(T,q){(0,n.assertStruct)(T,e.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",q)}e.assertIsPendingJsonRpcResponse=o;function h(T){return(0,r.is)(T,e.JsonRpcResponseStruct)}e.isJsonRpcResponse=h;function s(T,q){(0,n.assertStruct)(T,e.JsonRpcResponseStruct,"Invalid JSON-RPC response",q)}e.assertIsJsonRpcResponse=s;function f(T){return(0,r.is)(T,e.JsonRpcSuccessStruct)}e.isJsonRpcSuccess=f;function E(T,q){(0,n.assertStruct)(T,e.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",q)}e.assertIsJsonRpcSuccess=E;function y(T){return(0,r.is)(T,e.JsonRpcFailureStruct)}e.isJsonRpcFailure=y;function l(T,q){(0,n.assertStruct)(T,e.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",q)}e.assertIsJsonRpcFailure=l;function R(T){return(0,r.is)(T,e.JsonRpcErrorStruct)}e.isJsonRpcError=R;function S(T,q){(0,n.assertStruct)(T,e.JsonRpcErrorStruct,"Invalid JSON-RPC error",q)}e.assertIsJsonRpcError=S;function I(T){const{permitEmptyString:q,permitFractions:D,permitNull:H}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},T);return X=>!!(typeof X=="number"&&(D||Number.isInteger(X))||typeof X=="string"&&(q||X.length>0)||H&&X===null)}e.getJsonRpcIdValidator=I}(yi)),yi}var bi={},tu;function kd(){return tu||(tu=1,Object.defineProperty(bi,"__esModule",{value:!0})),bi}var nt={},on={exports:{}},vi,ru;function Id(){if(ru)return vi;ru=1;var e=1e3,r=e*60,n=r*60,t=n*24,g=t*7,i=t*365.25;vi=function(m,o){o=o||{};var h=typeof m;if(h==="string"&&m.length>0)return c(m);if(h==="number"&&isFinite(m))return o.long?p(m):a(m);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(m))};function c(m){if(m=String(m),!(m.length>100)){var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(m);if(o){var h=parseFloat(o[1]),s=(o[2]||"ms").toLowerCase();switch(s){case"years":case"year":case"yrs":case"yr":case"y":return h*i;case"weeks":case"week":case"w":return h*g;case"days":case"day":case"d":return h*t;case"hours":case"hour":case"hrs":case"hr":case"h":return h*n;case"minutes":case"minute":case"mins":case"min":case"m":return h*r;case"seconds":case"second":case"secs":case"sec":case"s":return h*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return h;default:return}}}}function a(m){var o=Math.abs(m);return o>=t?Math.round(m/t)+"d":o>=n?Math.round(m/n)+"h":o>=r?Math.round(m/r)+"m":o>=e?Math.round(m/e)+"s":m+"ms"}function p(m){var o=Math.abs(m);return o>=t?u(m,o,t,"day"):o>=n?u(m,o,n,"hour"):o>=r?u(m,o,r,"minute"):o>=e?u(m,o,e,"second"):m+" ms"}function u(m,o,h,s){var f=o>=h*1.5;return Math.round(m/h)+" "+s+(f?"s":"")}return vi}var _i,nu;function xd(){if(nu)return _i;nu=1;function e(r){t.debug=t,t.default=t,t.coerce=u,t.disable=a,t.enable=i,t.enabled=p,t.humanize=Id(),t.destroy=m,Object.keys(r).forEach(o=>{t[o]=r[o]}),t.names=[],t.skips=[],t.formatters={};function n(o){let h=0;for(let s=0;s{if(D==="%%")return"%";T++;const G=t.formatters[H];if(typeof G=="function"){const X=l[T];D=G.call(R,X),l.splice(T,1),T--}return D}),t.formatArgs.call(R,l),(R.log||t.log).apply(R,l)}return y.namespace=o,y.useColors=t.useColors(),y.color=t.selectColor(o),y.extend=g,y.destroy=t.destroy,Object.defineProperty(y,"enabled",{enumerable:!0,configurable:!1,get:()=>s!==null?s:(f!==t.namespaces&&(f=t.namespaces,E=t.enabled(o)),E),set:l=>{s=l}}),typeof t.init=="function"&&t.init(y),y}function g(o,h){const s=t(this.namespace+(typeof h>"u"?":":h)+o);return s.log=this.log,s}function i(o){t.save(o),t.namespaces=o,t.names=[],t.skips=[];const h=(typeof o=="string"?o:"").trim().replace(" ",",").split(",").filter(Boolean);for(const s of h)s[0]==="-"?t.skips.push(s.slice(1)):t.names.push(s)}function c(o,h){let s=0,f=0,E=-1,y=0;for(;s"-"+h)].join(",");return t.enable(""),o}function p(o){for(const h of t.skips)if(c(o,h))return!1;for(const h of t.names)if(c(o,h))return!0;return!1}function u(o){return o instanceof Error?o.stack||o.message:o}function m(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}return _i=e,_i}var iu;function Ad(){return iu||(iu=1,function(e,r){var n={};r.formatArgs=g,r.save=i,r.load=c,r.useColors=t,r.storage=a(),r.destroy=(()=>{let u=!1;return()=>{u||(u=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),r.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function t(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let u;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(u=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(u[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function g(u){if(u[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+u[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const m="color: "+this.color;u.splice(1,0,m,"color: inherit");let o=0,h=0;u[0].replace(/%[a-zA-Z%]/g,s=>{s!=="%%"&&(o++,s==="%c"&&(h=o))}),u.splice(h,0,m)}r.log=console.debug||console.log||(()=>{});function i(u){try{u?r.storage.setItem("debug",u):r.storage.removeItem("debug")}catch{}}function c(){let u;try{u=r.storage.getItem("debug")}catch{}return!u&&typeof process<"u"&&"env"in process&&(u=n.DEBUG),u}function a(){try{return localStorage}catch{}}e.exports=xd()(r);const{formatters:p}=e.exports;p.j=function(u){try{return JSON.stringify(u)}catch(m){return"[UnexpectedJSONParseError]: "+m.message}}}(on,on.exports)),on.exports}var su;function Td(){if(su)return nt;su=1;var e=nt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(nt,"__esModule",{value:!0}),nt.createModuleLogger=nt.createProjectLogger=void 0;const n=(0,e(Ad()).default)("metamask");function t(i){return n.extend(i)}nt.createProjectLogger=t;function g(i,c){return i.extend(c)}return nt.createModuleLogger=g,nt}var Ei={},ou;function Ld(){return ou||(ou=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.calculateNumberSize=e.calculateStringSize=e.isASCII=e.isPlainObject=e.ESCAPE_CHARACTERS_REGEXP=e.JsonSize=e.hasProperty=e.isObject=e.isNullOrUndefined=e.isNonEmptyArray=void 0;function r(u){return Array.isArray(u)&&u.length>0}e.isNonEmptyArray=r;function n(u){return u==null}e.isNullOrUndefined=n;function t(u){return!!u&&typeof u=="object"&&!Array.isArray(u)}e.isObject=t;const g=(u,m)=>Object.hasOwnProperty.call(u,m);e.hasProperty=g,function(u){u[u.Null=4]="Null",u[u.Comma=1]="Comma",u[u.Wrapper=1]="Wrapper",u[u.True=4]="True",u[u.False=5]="False",u[u.Quote=1]="Quote",u[u.Colon=1]="Colon",u[u.Date=24]="Date"}(e.JsonSize||(e.JsonSize={})),e.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu;function i(u){if(typeof u!="object"||u===null)return!1;try{let m=u;for(;Object.getPrototypeOf(m)!==null;)m=Object.getPrototypeOf(m);return Object.getPrototypeOf(u)===m}catch{return!1}}e.isPlainObject=i;function c(u){return u.charCodeAt(0)<=127}e.isASCII=c;function a(u){var m;return u.split("").reduce((h,s)=>c(s)?h+1:h+2,0)+((m=u.match(e.ESCAPE_CHARACTERS_REGEXP))!==null&&m!==void 0?m:[]).length}e.calculateStringSize=a;function p(u){return u.toString().length}e.calculateNumberSize=p}(Ei)),Ei}var Ke={},au;function Bd(){if(au)return Ke;au=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.hexToBigInt=Ke.hexToNumber=Ke.bigIntToHex=Ke.numberToHex=void 0;const e=ot(),r=bn(),n=c=>((0,e.assert)(typeof c=="number","Value must be a number."),(0,e.assert)(c>=0,"Value must be a non-negative number."),(0,e.assert)(Number.isSafeInteger(c),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,r.add0x)(c.toString(16)));Ke.numberToHex=n;const t=c=>((0,e.assert)(typeof c=="bigint","Value must be a bigint."),(0,e.assert)(c>=0,"Value must be a non-negative bigint."),(0,r.add0x)(c.toString(16)));Ke.bigIntToHex=t;const g=c=>{(0,r.assertIsHexString)(c);const a=parseInt(c,16);return(0,e.assert)(Number.isSafeInteger(a),"Value is not a safe integer. Use `hexToBigInt` instead."),a};Ke.hexToNumber=g;const i=c=>((0,r.assertIsHexString)(c),BigInt((0,r.add0x)(c)));return Ke.hexToBigInt=i,Ke}var Ri={},uu;function Nd(){return uu||(uu=1,Object.defineProperty(Ri,"__esModule",{value:!0})),Ri}var Si={},cu;function Pd(){return cu||(cu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.timeSince=e.inMilliseconds=e.Duration=void 0,function(i){i[i.Millisecond=1]="Millisecond",i[i.Second=1e3]="Second",i[i.Minute=6e4]="Minute",i[i.Hour=36e5]="Hour",i[i.Day=864e5]="Day",i[i.Week=6048e5]="Week",i[i.Year=31536e6]="Year"}(e.Duration||(e.Duration={}));const r=i=>Number.isInteger(i)&&i>=0,n=(i,c)=>{if(!r(i))throw new Error(`"${c}" must be a non-negative integer. Received: "${i}".`)};function t(i,c){return n(i,"count"),i*c}e.inMilliseconds=t;function g(i){return n(i,"timestamp"),Date.now()-i}e.timeSince=g}(Si)),Si}var Ci={},lu;function Od(){return lu||(lu=1,Object.defineProperty(Ci,"__esModule",{value:!0})),Ci}var Mi={},an={exports:{}},ki,hu;function vn(){if(hu)return ki;hu=1;const e="2.0.0",r=256,n=Number.MAX_SAFE_INTEGER||9007199254740991,t=16,g=r-6;return ki={MAX_LENGTH:r,MAX_SAFE_COMPONENT_LENGTH:t,MAX_SAFE_BUILD_LENGTH:g,MAX_SAFE_INTEGER:n,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},ki}var Ii,du;function _n(){if(du)return Ii;du=1;var e={};return Ii=typeof process=="object"&&e&&e.NODE_DEBUG&&/\bsemver\b/i.test(e.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{},Ii}var fu;function Vr(){return fu||(fu=1,function(e,r){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:t,MAX_LENGTH:g}=vn(),i=_n();r=e.exports={};const c=r.re=[],a=r.safeRe=[],p=r.src=[],u=r.t={};let m=0;const o="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",g],[o,t]],s=E=>{for(const[y,l]of h)E=E.split(`${y}*`).join(`${y}{0,${l}}`).split(`${y}+`).join(`${y}{1,${l}}`);return E},f=(E,y,l)=>{const R=s(y),S=m++;i(E,S,y),u[E]=S,p[S]=y,c[S]=new RegExp(y,l?"g":void 0),a[S]=new RegExp(R,l?"g":void 0)};f("NUMERICIDENTIFIER","0|[1-9]\\d*"),f("NUMERICIDENTIFIERLOOSE","\\d+"),f("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${o}*`),f("MAINVERSION",`(${p[u.NUMERICIDENTIFIER]})\\.(${p[u.NUMERICIDENTIFIER]})\\.(${p[u.NUMERICIDENTIFIER]})`),f("MAINVERSIONLOOSE",`(${p[u.NUMERICIDENTIFIERLOOSE]})\\.(${p[u.NUMERICIDENTIFIERLOOSE]})\\.(${p[u.NUMERICIDENTIFIERLOOSE]})`),f("PRERELEASEIDENTIFIER",`(?:${p[u.NUMERICIDENTIFIER]}|${p[u.NONNUMERICIDENTIFIER]})`),f("PRERELEASEIDENTIFIERLOOSE",`(?:${p[u.NUMERICIDENTIFIERLOOSE]}|${p[u.NONNUMERICIDENTIFIER]})`),f("PRERELEASE",`(?:-(${p[u.PRERELEASEIDENTIFIER]}(?:\\.${p[u.PRERELEASEIDENTIFIER]})*))`),f("PRERELEASELOOSE",`(?:-?(${p[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${p[u.PRERELEASEIDENTIFIERLOOSE]})*))`),f("BUILDIDENTIFIER",`${o}+`),f("BUILD",`(?:\\+(${p[u.BUILDIDENTIFIER]}(?:\\.${p[u.BUILDIDENTIFIER]})*))`),f("FULLPLAIN",`v?${p[u.MAINVERSION]}${p[u.PRERELEASE]}?${p[u.BUILD]}?`),f("FULL",`^${p[u.FULLPLAIN]}$`),f("LOOSEPLAIN",`[v=\\s]*${p[u.MAINVERSIONLOOSE]}${p[u.PRERELEASELOOSE]}?${p[u.BUILD]}?`),f("LOOSE",`^${p[u.LOOSEPLAIN]}$`),f("GTLT","((?:<|>)?=?)"),f("XRANGEIDENTIFIERLOOSE",`${p[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),f("XRANGEIDENTIFIER",`${p[u.NUMERICIDENTIFIER]}|x|X|\\*`),f("XRANGEPLAIN",`[v=\\s]*(${p[u.XRANGEIDENTIFIER]})(?:\\.(${p[u.XRANGEIDENTIFIER]})(?:\\.(${p[u.XRANGEIDENTIFIER]})(?:${p[u.PRERELEASE]})?${p[u.BUILD]}?)?)?`),f("XRANGEPLAINLOOSE",`[v=\\s]*(${p[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${p[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${p[u.XRANGEIDENTIFIERLOOSE]})(?:${p[u.PRERELEASELOOSE]})?${p[u.BUILD]}?)?)?`),f("XRANGE",`^${p[u.GTLT]}\\s*${p[u.XRANGEPLAIN]}$`),f("XRANGELOOSE",`^${p[u.GTLT]}\\s*${p[u.XRANGEPLAINLOOSE]}$`),f("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),f("COERCE",`${p[u.COERCEPLAIN]}(?:$|[^\\d])`),f("COERCEFULL",p[u.COERCEPLAIN]+`(?:${p[u.PRERELEASE]})?(?:${p[u.BUILD]})?(?:$|[^\\d])`),f("COERCERTL",p[u.COERCE],!0),f("COERCERTLFULL",p[u.COERCEFULL],!0),f("LONETILDE","(?:~>?)"),f("TILDETRIM",`(\\s*)${p[u.LONETILDE]}\\s+`,!0),r.tildeTrimReplace="$1~",f("TILDE",`^${p[u.LONETILDE]}${p[u.XRANGEPLAIN]}$`),f("TILDELOOSE",`^${p[u.LONETILDE]}${p[u.XRANGEPLAINLOOSE]}$`),f("LONECARET","(?:\\^)"),f("CARETTRIM",`(\\s*)${p[u.LONECARET]}\\s+`,!0),r.caretTrimReplace="$1^",f("CARET",`^${p[u.LONECARET]}${p[u.XRANGEPLAIN]}$`),f("CARETLOOSE",`^${p[u.LONECARET]}${p[u.XRANGEPLAINLOOSE]}$`),f("COMPARATORLOOSE",`^${p[u.GTLT]}\\s*(${p[u.LOOSEPLAIN]})$|^$`),f("COMPARATOR",`^${p[u.GTLT]}\\s*(${p[u.FULLPLAIN]})$|^$`),f("COMPARATORTRIM",`(\\s*)${p[u.GTLT]}\\s*(${p[u.LOOSEPLAIN]}|${p[u.XRANGEPLAIN]})`,!0),r.comparatorTrimReplace="$1$2$3",f("HYPHENRANGE",`^\\s*(${p[u.XRANGEPLAIN]})\\s+-\\s+(${p[u.XRANGEPLAIN]})\\s*$`),f("HYPHENRANGELOOSE",`^\\s*(${p[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${p[u.XRANGEPLAINLOOSE]})\\s*$`),f("STAR","(<|>)?=?\\s*\\*"),f("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),f("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(an,an.exports)),an.exports}var xi,pu;function Zs(){if(pu)return xi;pu=1;const e=Object.freeze({loose:!0}),r=Object.freeze({});return xi=t=>t?typeof t!="object"?e:t:r,xi}var Ai,gu;function vl(){if(gu)return Ai;gu=1;const e=/^[0-9]+$/,r=(t,g)=>{const i=e.test(t),c=e.test(g);return i&&c&&(t=+t,g=+g),t===g?0:i&&!c?-1:c&&!i?1:tr(g,t)},Ai}var Ti,mu;function Ue(){if(mu)return Ti;mu=1;const e=_n(),{MAX_LENGTH:r,MAX_SAFE_INTEGER:n}=vn(),{safeRe:t,t:g}=Vr(),i=Zs(),{compareIdentifiers:c}=vl();class a{constructor(u,m){if(m=i(m),u instanceof a){if(u.loose===!!m.loose&&u.includePrerelease===!!m.includePrerelease)return u;u=u.version}else if(typeof u!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof u}".`);if(u.length>r)throw new TypeError(`version is longer than ${r} characters`);e("SemVer",u,m),this.options=m,this.loose=!!m.loose,this.includePrerelease=!!m.includePrerelease;const o=u.trim().match(m.loose?t[g.LOOSE]:t[g.FULL]);if(!o)throw new TypeError(`Invalid Version: ${u}`);if(this.raw=u,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map(h=>{if(/^[0-9]+$/.test(h)){const s=+h;if(s>=0&&s=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(m===this.prerelease.join(".")&&o===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(h)}}if(m){let s=[m,h];o===!1&&(s=[m]),c(this.prerelease[0],m)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${u}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return Ti=a,Ti}var Li,wu;function er(){if(wu)return Li;wu=1;const e=Ue();return Li=(n,t,g=!1)=>{if(n instanceof e)return n;try{return new e(n,t)}catch(i){if(!g)return null;throw i}},Li}var Bi,yu;function Fd(){if(yu)return Bi;yu=1;const e=er();return Bi=(n,t)=>{const g=e(n,t);return g?g.version:null},Bi}var Ni,bu;function Dd(){if(bu)return Ni;bu=1;const e=er();return Ni=(n,t)=>{const g=e(n.trim().replace(/^[=v]+/,""),t);return g?g.version:null},Ni}var Pi,vu;function qd(){if(vu)return Pi;vu=1;const e=Ue();return Pi=(n,t,g,i,c)=>{typeof g=="string"&&(c=i,i=g,g=void 0);try{return new e(n instanceof e?n.version:n,g).inc(t,i,c).version}catch{return null}},Pi}var Oi,_u;function jd(){if(_u)return Oi;_u=1;const e=er();return Oi=(n,t)=>{const g=e(n,null,!0),i=e(t,null,!0),c=g.compare(i);if(c===0)return null;const a=c>0,p=a?g:i,u=a?i:g,m=!!p.prerelease.length;if(!!u.prerelease.length&&!m)return!u.patch&&!u.minor?"major":p.patch?"patch":p.minor?"minor":"major";const h=m?"pre":"";return g.major!==i.major?h+"major":g.minor!==i.minor?h+"minor":g.patch!==i.patch?h+"patch":"prerelease"},Oi}var Fi,Eu;function $d(){if(Eu)return Fi;Eu=1;const e=Ue();return Fi=(n,t)=>new e(n,t).major,Fi}var Di,Ru;function Ud(){if(Ru)return Di;Ru=1;const e=Ue();return Di=(n,t)=>new e(n,t).minor,Di}var qi,Su;function Hd(){if(Su)return qi;Su=1;const e=Ue();return qi=(n,t)=>new e(n,t).patch,qi}var ji,Cu;function Wd(){if(Cu)return ji;Cu=1;const e=er();return ji=(n,t)=>{const g=e(n,t);return g&&g.prerelease.length?g.prerelease:null},ji}var $i,Mu;function Ye(){if(Mu)return $i;Mu=1;const e=Ue();return $i=(n,t,g)=>new e(n,g).compare(new e(t,g)),$i}var Ui,ku;function Vd(){if(ku)return Ui;ku=1;const e=Ye();return Ui=(n,t,g)=>e(t,n,g),Ui}var Hi,Iu;function zd(){if(Iu)return Hi;Iu=1;const e=Ye();return Hi=(n,t)=>e(n,t,!0),Hi}var Wi,xu;function Ks(){if(xu)return Wi;xu=1;const e=Ue();return Wi=(n,t,g)=>{const i=new e(n,g),c=new e(t,g);return i.compare(c)||i.compareBuild(c)},Wi}var Vi,Au;function Jd(){if(Au)return Vi;Au=1;const e=Ks();return Vi=(n,t)=>n.sort((g,i)=>e(g,i,t)),Vi}var zi,Tu;function Gd(){if(Tu)return zi;Tu=1;const e=Ks();return zi=(n,t)=>n.sort((g,i)=>e(i,g,t)),zi}var Ji,Lu;function En(){if(Lu)return Ji;Lu=1;const e=Ye();return Ji=(n,t,g)=>e(n,t,g)>0,Ji}var Gi,Bu;function Qs(){if(Bu)return Gi;Bu=1;const e=Ye();return Gi=(n,t,g)=>e(n,t,g)<0,Gi}var Zi,Nu;function _l(){if(Nu)return Zi;Nu=1;const e=Ye();return Zi=(n,t,g)=>e(n,t,g)===0,Zi}var Ki,Pu;function El(){if(Pu)return Ki;Pu=1;const e=Ye();return Ki=(n,t,g)=>e(n,t,g)!==0,Ki}var Qi,Ou;function Ys(){if(Ou)return Qi;Ou=1;const e=Ye();return Qi=(n,t,g)=>e(n,t,g)>=0,Qi}var Yi,Fu;function Xs(){if(Fu)return Yi;Fu=1;const e=Ye();return Yi=(n,t,g)=>e(n,t,g)<=0,Yi}var Xi,Du;function Rl(){if(Du)return Xi;Du=1;const e=_l(),r=El(),n=En(),t=Ys(),g=Qs(),i=Xs();return Xi=(a,p,u,m)=>{switch(p){case"===":return typeof a=="object"&&(a=a.version),typeof u=="object"&&(u=u.version),a===u;case"!==":return typeof a=="object"&&(a=a.version),typeof u=="object"&&(u=u.version),a!==u;case"":case"=":case"==":return e(a,u,m);case"!=":return r(a,u,m);case">":return n(a,u,m);case">=":return t(a,u,m);case"<":return g(a,u,m);case"<=":return i(a,u,m);default:throw new TypeError(`Invalid operator: ${p}`)}},Xi}var es,qu;function Zd(){if(qu)return es;qu=1;const e=Ue(),r=er(),{safeRe:n,t}=Vr();return es=(i,c)=>{if(i instanceof e)return i;if(typeof i=="number"&&(i=String(i)),typeof i!="string")return null;c=c||{};let a=null;if(!c.rtl)a=i.match(c.includePrerelease?n[t.COERCEFULL]:n[t.COERCE]);else{const s=c.includePrerelease?n[t.COERCERTLFULL]:n[t.COERCERTL];let f;for(;(f=s.exec(i))&&(!a||a.index+a[0].length!==i.length);)(!a||f.index+f[0].length!==a.index+a[0].length)&&(a=f),s.lastIndex=f.index+f[1].length+f[2].length;s.lastIndex=-1}if(a===null)return null;const p=a[2],u=a[3]||"0",m=a[4]||"0",o=c.includePrerelease&&a[5]?`-${a[5]}`:"",h=c.includePrerelease&&a[6]?`+${a[6]}`:"";return r(`${p}.${u}.${m}${o}${h}`,c)},es}var ts,ju;function Kd(){if(ju)return ts;ju=1;class e{constructor(){this.max=1e3,this.map=new Map}get(n){const t=this.map.get(n);if(t!==void 0)return this.map.delete(n),this.map.set(n,t),t}delete(n){return this.map.delete(n)}set(n,t){if(!this.delete(n)&&t!==void 0){if(this.map.size>=this.max){const i=this.map.keys().next().value;this.delete(i)}this.map.set(n,t)}return this}}return ts=e,ts}var rs,$u;function Xe(){if($u)return rs;$u=1;const e=/\s+/g;class r{constructor(_,C){if(C=g(C),_ instanceof r)return _.loose===!!C.loose&&_.includePrerelease===!!C.includePrerelease?_:new r(_.raw,C);if(_ instanceof i)return this.raw=_.value,this.set=[[_]],this.formatted=void 0,this;if(this.options=C,this.loose=!!C.loose,this.includePrerelease=!!C.includePrerelease,this.raw=_.trim().replace(e," "),this.set=this.raw.split("||").map(M=>this.parseRange(M.trim())).filter(M=>M.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const M=this.set[0];if(this.set=this.set.filter(x=>!E(x[0])),this.set.length===0)this.set=[M];else if(this.set.length>1){for(const x of this.set)if(x.length===1&&y(x[0])){this.set=[x];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let _=0;_0&&(this.formatted+="||");const C=this.set[_];for(let M=0;M0&&(this.formatted+=" "),this.formatted+=C[M].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(_){const M=((this.options.includePrerelease&&s)|(this.options.loose&&f))+":"+_,x=t.get(M);if(x)return x;const B=this.options.loose,j=B?p[u.HYPHENRANGELOOSE]:p[u.HYPHENRANGE];_=_.replace(j,re(this.options.includePrerelease)),c("hyphen replace",_),_=_.replace(p[u.COMPARATORTRIM],m),c("comparator trim",_),_=_.replace(p[u.TILDETRIM],o),c("tilde trim",_),_=_.replace(p[u.CARETTRIM],h),c("caret trim",_);let A=_.split(" ").map(K=>R(K,this.options)).join(" ").split(/\s+/).map(K=>Y(K,this.options));B&&(A=A.filter(K=>(c("loose invalid filter",K,this.options),!!K.match(p[u.COMPARATORLOOSE])))),c("range list",A);const b=new Map,N=A.map(K=>new i(K,this.options));for(const K of N){if(E(K))return[K];b.set(K.value,K)}b.size>1&&b.has("")&&b.delete("");const te=[...b.values()];return t.set(M,te),te}intersects(_,C){if(!(_ instanceof r))throw new TypeError("a Range is required");return this.set.some(M=>l(M,C)&&_.set.some(x=>l(x,C)&&M.every(B=>x.every(j=>B.intersects(j,C)))))}test(_){if(!_)return!1;if(typeof _=="string")try{_=new a(_,this.options)}catch{return!1}for(let C=0;Cd.value==="<0.0.0-0",y=d=>d.value==="",l=(d,_)=>{let C=!0;const M=d.slice();let x=M.pop();for(;C&&M.length;)C=M.every(B=>x.intersects(B,_)),x=M.pop();return C},R=(d,_)=>(c("comp",d,_),d=q(d,_),c("caret",d),d=I(d,_),c("tildes",d),d=H(d,_),c("xrange",d),d=X(d,_),c("stars",d),d),S=d=>!d||d.toLowerCase()==="x"||d==="*",I=(d,_)=>d.trim().split(/\s+/).map(C=>T(C,_)).join(" "),T=(d,_)=>{const C=_.loose?p[u.TILDELOOSE]:p[u.TILDE];return d.replace(C,(M,x,B,j,A)=>{c("tilde",d,M,x,B,j,A);let b;return S(x)?b="":S(B)?b=`>=${x}.0.0 <${+x+1}.0.0-0`:S(j)?b=`>=${x}.${B}.0 <${x}.${+B+1}.0-0`:A?(c("replaceTilde pr",A),b=`>=${x}.${B}.${j}-${A} <${x}.${+B+1}.0-0`):b=`>=${x}.${B}.${j} <${x}.${+B+1}.0-0`,c("tilde return",b),b})},q=(d,_)=>d.trim().split(/\s+/).map(C=>D(C,_)).join(" "),D=(d,_)=>{c("caret",d,_);const C=_.loose?p[u.CARETLOOSE]:p[u.CARET],M=_.includePrerelease?"-0":"";return d.replace(C,(x,B,j,A,b)=>{c("caret",d,x,B,j,A,b);let N;return S(B)?N="":S(j)?N=`>=${B}.0.0${M} <${+B+1}.0.0-0`:S(A)?B==="0"?N=`>=${B}.${j}.0${M} <${B}.${+j+1}.0-0`:N=`>=${B}.${j}.0${M} <${+B+1}.0.0-0`:b?(c("replaceCaret pr",b),B==="0"?j==="0"?N=`>=${B}.${j}.${A}-${b} <${B}.${j}.${+A+1}-0`:N=`>=${B}.${j}.${A}-${b} <${B}.${+j+1}.0-0`:N=`>=${B}.${j}.${A}-${b} <${+B+1}.0.0-0`):(c("no pr"),B==="0"?j==="0"?N=`>=${B}.${j}.${A}${M} <${B}.${j}.${+A+1}-0`:N=`>=${B}.${j}.${A}${M} <${B}.${+j+1}.0-0`:N=`>=${B}.${j}.${A} <${+B+1}.0.0-0`),c("caret return",N),N})},H=(d,_)=>(c("replaceXRanges",d,_),d.split(/\s+/).map(C=>G(C,_)).join(" ")),G=(d,_)=>{d=d.trim();const C=_.loose?p[u.XRANGELOOSE]:p[u.XRANGE];return d.replace(C,(M,x,B,j,A,b)=>{c("xRange",d,M,x,B,j,A,b);const N=S(B),te=N||S(j),K=te||S(A),$=K;return x==="="&&$&&(x=""),b=_.includePrerelease?"-0":"",N?x===">"||x==="<"?M="<0.0.0-0":M="*":x&&$?(te&&(j=0),A=0,x===">"?(x=">=",te?(B=+B+1,j=0,A=0):(j=+j+1,A=0)):x==="<="&&(x="<",te?B=+B+1:j=+j+1),x==="<"&&(b="-0"),M=`${x+B}.${j}.${A}${b}`):te?M=`>=${B}.0.0${b} <${+B+1}.0.0-0`:K&&(M=`>=${B}.${j}.0${b} <${B}.${+j+1}.0-0`),c("xRange return",M),M})},X=(d,_)=>(c("replaceStars",d,_),d.trim().replace(p[u.STAR],"")),Y=(d,_)=>(c("replaceGTE0",d,_),d.trim().replace(p[_.includePrerelease?u.GTE0PRE:u.GTE0],"")),re=d=>(_,C,M,x,B,j,A,b,N,te,K,$)=>(S(M)?C="":S(x)?C=`>=${M}.0.0${d?"-0":""}`:S(B)?C=`>=${M}.${x}.0${d?"-0":""}`:j?C=`>=${C}`:C=`>=${C}${d?"-0":""}`,S(N)?b="":S(te)?b=`<${+N+1}.0.0-0`:S(K)?b=`<${N}.${+te+1}.0-0`:$?b=`<=${N}.${te}.${K}-${$}`:d?b=`<${N}.${te}.${+K+1}-0`:b=`<=${b}`,`${C} ${b}`.trim()),F=(d,_,C)=>{for(let M=0;M0){const x=d[M].semver;if(x.major===_.major&&x.minor===_.minor&&x.patch===_.patch)return!0}return!1}return!0};return rs}var ns,Uu;function Rn(){if(Uu)return ns;Uu=1;const e=Symbol("SemVer ANY");class r{static get ANY(){return e}constructor(m,o){if(o=n(o),m instanceof r){if(m.loose===!!o.loose)return m;m=m.value}m=m.trim().split(/\s+/).join(" "),c("comparator",m,o),this.options=o,this.loose=!!o.loose,this.parse(m),this.semver===e?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(m){const o=this.options.loose?t[g.COMPARATORLOOSE]:t[g.COMPARATOR],h=m.match(o);if(!h)throw new TypeError(`Invalid comparator: ${m}`);this.operator=h[1]!==void 0?h[1]:"",this.operator==="="&&(this.operator=""),h[2]?this.semver=new a(h[2],this.options.loose):this.semver=e}toString(){return this.value}test(m){if(c("Comparator.test",m,this.options.loose),this.semver===e||m===e)return!0;if(typeof m=="string")try{m=new a(m,this.options)}catch{return!1}return i(m,this.operator,this.semver,this.options)}intersects(m,o){if(!(m instanceof r))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new p(m.value,o).test(this.value):m.operator===""?m.value===""?!0:new p(this.value,o).test(m.semver):(o=n(o),o.includePrerelease&&(this.value==="<0.0.0-0"||m.value==="<0.0.0-0")||!o.includePrerelease&&(this.value.startsWith("<0.0.0")||m.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&m.operator.startsWith(">")||this.operator.startsWith("<")&&m.operator.startsWith("<")||this.semver.version===m.semver.version&&this.operator.includes("=")&&m.operator.includes("=")||i(this.semver,"<",m.semver,o)&&this.operator.startsWith(">")&&m.operator.startsWith("<")||i(this.semver,">",m.semver,o)&&this.operator.startsWith("<")&&m.operator.startsWith(">")))}}ns=r;const n=Zs(),{safeRe:t,t:g}=Vr(),i=Rl(),c=_n(),a=Ue(),p=Xe();return ns}var is,Hu;function Sn(){if(Hu)return is;Hu=1;const e=Xe();return is=(n,t,g)=>{try{t=new e(t,g)}catch{return!1}return t.test(n)},is}var ss,Wu;function Qd(){if(Wu)return ss;Wu=1;const e=Xe();return ss=(n,t)=>new e(n,t).set.map(g=>g.map(i=>i.value).join(" ").trim().split(" ")),ss}var os,Vu;function Yd(){if(Vu)return os;Vu=1;const e=Ue(),r=Xe();return os=(t,g,i)=>{let c=null,a=null,p=null;try{p=new r(g,i)}catch{return null}return t.forEach(u=>{p.test(u)&&(!c||a.compare(u)===-1)&&(c=u,a=new e(c,i))}),c},os}var as,zu;function Xd(){if(zu)return as;zu=1;const e=Ue(),r=Xe();return as=(t,g,i)=>{let c=null,a=null,p=null;try{p=new r(g,i)}catch{return null}return t.forEach(u=>{p.test(u)&&(!c||a.compare(u)===1)&&(c=u,a=new e(c,i))}),c},as}var us,Ju;function ef(){if(Ju)return us;Ju=1;const e=Ue(),r=Xe(),n=En();return us=(g,i)=>{g=new r(g,i);let c=new e("0.0.0");if(g.test(c)||(c=new e("0.0.0-0"),g.test(c)))return c;c=null;for(let a=0;a{const o=new e(m.semver.version);switch(m.operator){case">":o.prerelease.length===0?o.patch++:o.prerelease.push(0),o.raw=o.format();case"":case">=":(!u||n(o,u))&&(u=o);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${m.operator}`)}}),u&&(!c||n(c,u))&&(c=u)}return c&&g.test(c)?c:null},us}var cs,Gu;function tf(){if(Gu)return cs;Gu=1;const e=Xe();return cs=(n,t)=>{try{return new e(n,t).range||"*"}catch{return null}},cs}var ls,Zu;function eo(){if(Zu)return ls;Zu=1;const e=Ue(),r=Rn(),{ANY:n}=r,t=Xe(),g=Sn(),i=En(),c=Qs(),a=Xs(),p=Ys();return ls=(m,o,h,s)=>{m=new e(m,s),o=new t(o,s);let f,E,y,l,R;switch(h){case">":f=i,E=a,y=c,l=">",R=">=";break;case"<":f=c,E=p,y=i,l="<",R="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(g(m,o,s))return!1;for(let S=0;S{D.semver===n&&(D=new r(">=0.0.0")),T=T||D,q=q||D,f(D.semver,T.semver,s)?T=D:y(D.semver,q.semver,s)&&(q=D)}),T.operator===l||T.operator===R||(!q.operator||q.operator===l)&&E(m,q.semver))return!1;if(q.operator===R&&y(m,q.semver))return!1}return!0},ls}var hs,Ku;function rf(){if(Ku)return hs;Ku=1;const e=eo();return hs=(n,t,g)=>e(n,t,">",g),hs}var ds,Qu;function nf(){if(Qu)return ds;Qu=1;const e=eo();return ds=(n,t,g)=>e(n,t,"<",g),ds}var fs,Yu;function sf(){if(Yu)return fs;Yu=1;const e=Xe();return fs=(n,t,g)=>(n=new e(n,g),t=new e(t,g),n.intersects(t,g)),fs}var ps,Xu;function of(){if(Xu)return ps;Xu=1;const e=Sn(),r=Ye();return ps=(n,t,g)=>{const i=[];let c=null,a=null;const p=n.sort((h,s)=>r(h,s,g));for(const h of p)e(h,t,g)?(a=h,c||(c=h)):(a&&i.push([c,a]),a=null,c=null);c&&i.push([c,null]);const u=[];for(const[h,s]of i)h===s?u.push(h):!s&&h===p[0]?u.push("*"):s?h===p[0]?u.push(`<=${s}`):u.push(`${h} - ${s}`):u.push(`>=${h}`);const m=u.join(" || "),o=typeof t.raw=="string"?t.raw:String(t);return m.length{if(o===h)return!0;o=new e(o,s),h=new e(h,s);let f=!1;e:for(const E of o.set){for(const y of h.set){const l=p(E,y,s);if(f=f||l!==null,l)continue e}if(f)return!1}return!0},c=[new r(">=0.0.0-0")],a=[new r(">=0.0.0")],p=(o,h,s)=>{if(o===h)return!0;if(o.length===1&&o[0].semver===n){if(h.length===1&&h[0].semver===n)return!0;s.includePrerelease?o=c:o=a}if(h.length===1&&h[0].semver===n){if(s.includePrerelease)return!0;h=a}const f=new Set;let E,y;for(const H of o)H.operator===">"||H.operator===">="?E=u(E,H,s):H.operator==="<"||H.operator==="<="?y=m(y,H,s):f.add(H.semver);if(f.size>1)return null;let l;if(E&&y){if(l=g(E.semver,y.semver,s),l>0)return null;if(l===0&&(E.operator!==">="||y.operator!=="<="))return null}for(const H of f){if(E&&!t(H,String(E),s)||y&&!t(H,String(y),s))return null;for(const G of h)if(!t(H,String(G),s))return!1;return!0}let R,S,I,T,q=y&&!s.includePrerelease&&y.semver.prerelease.length?y.semver:!1,D=E&&!s.includePrerelease&&E.semver.prerelease.length?E.semver:!1;q&&q.prerelease.length===1&&y.operator==="<"&&q.prerelease[0]===0&&(q=!1);for(const H of h){if(T=T||H.operator===">"||H.operator===">=",I=I||H.operator==="<"||H.operator==="<=",E){if(D&&H.semver.prerelease&&H.semver.prerelease.length&&H.semver.major===D.major&&H.semver.minor===D.minor&&H.semver.patch===D.patch&&(D=!1),H.operator===">"||H.operator===">="){if(R=u(E,H,s),R===H&&R!==E)return!1}else if(E.operator===">="&&!t(E.semver,String(H),s))return!1}if(y){if(q&&H.semver.prerelease&&H.semver.prerelease.length&&H.semver.major===q.major&&H.semver.minor===q.minor&&H.semver.patch===q.patch&&(q=!1),H.operator==="<"||H.operator==="<="){if(S=m(y,H,s),S===H&&S!==y)return!1}else if(y.operator==="<="&&!t(y.semver,String(H),s))return!1}if(!H.operator&&(y||E)&&l!==0)return!1}return!(E&&I&&!y&&l!==0||y&&T&&!E&&l!==0||D||q)},u=(o,h,s)=>{if(!o)return h;const f=g(o.semver,h.semver,s);return f>0?o:f<0||h.operator===">"&&o.operator===">="?h:o},m=(o,h,s)=>{if(!o)return h;const f=g(o.semver,h.semver,s);return f<0?o:f>0||h.operator==="<"&&o.operator==="<="?h:o};return gs=i,gs}var ms,tc;function uf(){if(tc)return ms;tc=1;const e=Vr(),r=vn(),n=Ue(),t=vl(),g=er(),i=Fd(),c=Dd(),a=qd(),p=jd(),u=$d(),m=Ud(),o=Hd(),h=Wd(),s=Ye(),f=Vd(),E=zd(),y=Ks(),l=Jd(),R=Gd(),S=En(),I=Qs(),T=_l(),q=El(),D=Ys(),H=Xs(),G=Rl(),X=Zd(),Y=Rn(),re=Xe(),F=Sn(),d=Qd(),_=Yd(),C=Xd(),M=ef(),x=tf(),B=eo(),j=rf(),A=nf(),b=sf(),N=of(),te=af();return ms={parse:g,valid:i,clean:c,inc:a,diff:p,major:u,minor:m,patch:o,prerelease:h,compare:s,rcompare:f,compareLoose:E,compareBuild:y,sort:l,rsort:R,gt:S,lt:I,eq:T,neq:q,gte:D,lte:H,cmp:G,coerce:X,Comparator:Y,Range:re,satisfies:F,toComparators:d,maxSatisfying:_,minSatisfying:C,minVersion:M,validRange:x,outside:B,gtr:j,ltr:A,intersects:b,simplifyRange:N,subset:te,SemVer:n,re:e.re,src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:r.SEMVER_SPEC_VERSION,RELEASE_TYPES:r.RELEASE_TYPES,compareIdentifiers:t.compareIdentifiers,rcompareIdentifiers:t.rcompareIdentifiers},ms}var rc;function cf(){return rc||(rc=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.satisfiesVersionRange=e.gtRange=e.gtVersion=e.assertIsSemVerRange=e.assertIsSemVerVersion=e.isValidSemVerRange=e.isValidSemVerVersion=e.VersionRangeStruct=e.VersionStruct=void 0;const r=uf(),n=xt,t=ot();e.VersionStruct=(0,n.refine)((0,n.string)(),"Version",o=>(0,r.valid)(o)===null?`Expected SemVer version, got "${o}"`:!0),e.VersionRangeStruct=(0,n.refine)((0,n.string)(),"Version range",o=>(0,r.validRange)(o)===null?`Expected SemVer range, got "${o}"`:!0);function g(o){return(0,n.is)(o,e.VersionStruct)}e.isValidSemVerVersion=g;function i(o){return(0,n.is)(o,e.VersionRangeStruct)}e.isValidSemVerRange=i;function c(o){(0,t.assertStruct)(o,e.VersionStruct)}e.assertIsSemVerVersion=c;function a(o){(0,t.assertStruct)(o,e.VersionRangeStruct)}e.assertIsSemVerRange=a;function p(o,h){return(0,r.gt)(o,h)}e.gtVersion=p;function u(o,h){return(0,r.gtr)(o,h)}e.gtRange=u;function m(o,h){return(0,r.satisfies)(o,h,{includePrerelease:!0})}e.satisfiesVersionRange=m}(Mi)),Mi}var nc;function lf(){return nc||(nc=1,function(e){var r=xr.__createBinding||(Object.create?function(t,g,i,c){c===void 0&&(c=i);var a=Object.getOwnPropertyDescriptor(g,i);(!a||("get"in a?!g.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return g[i]}}),Object.defineProperty(t,c,a)}:function(t,g,i,c){c===void 0&&(c=i),t[c]=g[i]}),n=xr.__exportStar||function(t,g){for(var i in t)i!=="default"&&!Object.prototype.hasOwnProperty.call(g,i)&&r(g,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(ot(),e),n(yl(),e),n(bl(),e),n(Ed(),e),n(Rd(),e),n(Sd(),e),n(Cd(),e),n(bn(),e),n(Md(),e),n(kd(),e),n(Td(),e),n(Ld(),e),n(Bd(),e),n(Nd(),e),n(Pd(),e),n(Od(),e),n(cf(),e)}(xr)),xr}var ic;function hf(){return ic||(ic=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createModuleLogger=e.projectLogger=void 0;const r=lf();Object.defineProperty(e,"createModuleLogger",{enumerable:!0,get:function(){return r.createModuleLogger}}),e.projectLogger=(0,r.createProjectLogger)("eth-block-tracker")}(gi)),gi}var sc;function df(){if(sc)return Vt;sc=1;var e=Vt.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.PollingBlockTracker=void 0;const r=e(Hs()),n=e(Oh()),t=cl(),g=hf(),i=(0,g.createModuleLogger)(g.projectLogger,"polling-block-tracker"),c=(0,r.default)(),a=1e3;let p=class extends t.BaseBlockTracker{constructor(o={}){var h;if(!o.provider)throw new Error("PollingBlockTracker - no provider specified.");super(Object.assign(Object.assign({},o),{blockResetDuration:(h=o.blockResetDuration)!==null&&h!==void 0?h:o.pollingInterval})),this._provider=o.provider,this._pollingInterval=o.pollingInterval||20*a,this._retryTimeout=o.retryTimeout||this._pollingInterval/10,this._keepEventLoopActive=o.keepEventLoopActive===void 0?!0:o.keepEventLoopActive,this._setSkipCacheFlag=o.setSkipCacheFlag||!1}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}async _start(){this._synchronize()}async _end(){}async _synchronize(){for(var o;this._isRunning;)try{await this._updateLatestBlock();const h=u(this._pollingInterval,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await h}catch(h){const s=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block: +${(o=h.stack)!==null&&o!==void 0?o:h}`);try{this.emit("error",s)}catch{console.error(s)}const f=u(this._retryTimeout,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await f}}async _updateLatestBlock(){const o=await this._fetchLatestBlock();this._newPotentialLatest(o)}async _fetchLatestBlock(){const o={jsonrpc:"2.0",id:c(),method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(o.skipCache=!0),i("Making request",o);const h=await(0,n.default)(s=>this._provider.sendAsync(o,s))();if(i("Got response",h),h.error)throw new Error(`PollingBlockTracker - encountered error fetching block: +${h.error.message}`);return h.result}};Vt.PollingBlockTracker=p;function u(m,o){return new Promise(h=>{const s=setTimeout(h,m);s.unref&&o&&s.unref()})}return Vt}var Jt={},oc;function ff(){if(oc)return Jt;oc=1;var e=Jt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.SubscribeBlockTracker=void 0;const r=e(Hs()),n=cl(),t=(0,r.default)();let g=class extends n.BaseBlockTracker{constructor(c={}){if(!c.provider)throw new Error("SubscribeBlockTracker - no provider specified.");super(c),this._provider=c.provider,this._subscriptionId=null}async checkForLatestBlock(){return await this.getLatestBlock()}async _start(){if(this._subscriptionId===void 0||this._subscriptionId===null)try{const c=await this._call("eth_blockNumber");this._subscriptionId=await this._call("eth_subscribe","newHeads"),this._provider.on("data",this._handleSubData.bind(this)),this._newPotentialLatest(c)}catch(c){this.emit("error",c)}}async _end(){if(this._subscriptionId!==null&&this._subscriptionId!==void 0)try{await this._call("eth_unsubscribe",this._subscriptionId),this._subscriptionId=null}catch(c){this.emit("error",c)}}_call(c,...a){return new Promise((p,u)=>{this._provider.sendAsync({id:t(),method:c,params:a,jsonrpc:"2.0"},(m,o)=>{m?u(m):p(o.result)})})}_handleSubData(c,a){var p;a.method==="eth_subscription"&&((p=a.params)===null||p===void 0?void 0:p.subscription)===this._subscriptionId&&this._newPotentialLatest(a.params.result.number)}};return Jt.SubscribeBlockTracker=g,Jt}var ac;function pf(){return ac||(ac=1,function(e){var r=Ir.__createBinding||(Object.create?function(t,g,i,c){c===void 0&&(c=i),Object.defineProperty(t,c,{enumerable:!0,get:function(){return g[i]}})}:function(t,g,i,c){c===void 0&&(c=i),t[c]=g[i]}),n=Ir.__exportStar||function(t,g){for(var i in t)i!=="default"&&!Object.prototype.hasOwnProperty.call(g,i)&&r(g,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(df(),e),n(ff(),e)}(Ir)),Ir}var Lr={},Br={},Nr={},uc;function Sl(){if(uc)return Nr;uc=1,Object.defineProperty(Nr,"__esModule",{value:!0}),Nr.getUniqueId=void 0;const e=4294967295;let r=Math.floor(Math.random()*e);function n(){return r=(r+1)%e,r}return Nr.getUniqueId=n,Nr}var cc;function gf(){if(cc)return Br;cc=1,Object.defineProperty(Br,"__esModule",{value:!0}),Br.createIdRemapMiddleware=void 0;const e=Sl();function r(){return(n,t,g,i)=>{const c=n.id,a=e.getUniqueId();n.id=a,t.id=a,g(p=>{n.id=c,t.id=c,p()})}}return Br.createIdRemapMiddleware=r,Br}var Pr={},lc;function mf(){if(lc)return Pr;lc=1,Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.createAsyncMiddleware=void 0;function e(r){return async(n,t,g,i)=>{let c;const a=new Promise(o=>{c=o});let p=null,u=!1;const m=async()=>{u=!0,g(o=>{p=o,c()}),await a};try{await r(n,t,m),u?(await a,p(null)):i(null)}catch(o){p?p(o):i(o)}}}return Pr.createAsyncMiddleware=e,Pr}var Or={},hc;function wf(){if(hc)return Or;hc=1,Object.defineProperty(Or,"__esModule",{value:!0}),Or.createScaffoldMiddleware=void 0;function e(r){return(n,t,g,i)=>{const c=r[n.method];return c===void 0?g():typeof c=="function"?c(n,t,g,i):(t.result=c,i())}}return Or.createScaffoldMiddleware=e,Or}var Gt={},un={},dc;function yf(){if(dc)return un;dc=1,Object.defineProperty(un,"__esModule",{value:!0});const e=dn();function r(g,i,c){try{Reflect.apply(g,i,c)}catch(a){setTimeout(()=>{throw a})}}function n(g){const i=g.length,c=new Array(i);for(let a=0;a0&&([m]=c),m instanceof Error)throw m;const o=new Error(`Unhandled error.${m?` (${m.message})`:""}`);throw o.context=m,o}const u=p[i];if(u===void 0)return!1;if(typeof u=="function")r(u,this,c);else{const m=u.length,o=n(u);for(let h=0;h"u"&&(E=g()),a(h,"",0,[],void 0,0,E);var y;try{t.length===0?y=JSON.stringify(h,s,f):y=JSON.stringify(h,o(s),f)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;n.length!==0;){var l=n.pop();l.length===4?Object.defineProperty(l[0],l[1],l[3]):l[0][l[1]]=l[2]}}return y}function c(h,s,f,E){var y=Object.getOwnPropertyDescriptor(E,f);y.get!==void 0?y.configurable?(Object.defineProperty(E,f,{value:h}),n.push([E,f,s,y])):t.push([s,f,h]):(E[f]=h,n.push([E,f,s]))}function a(h,s,f,E,y,l,R){l+=1;var S;if(typeof h=="object"&&h!==null){for(S=0;SR.depthLimit){c(e,h,s,y);return}if(typeof R.edgesLimit<"u"&&f+1>R.edgesLimit){c(e,h,s,y);return}if(E.push(h),Array.isArray(h))for(S=0;Ss?1:0}function u(h,s,f,E){typeof E>"u"&&(E=g());var y=m(h,"",0,[],void 0,0,E)||h,l;try{t.length===0?l=JSON.stringify(y,s,f):l=JSON.stringify(y,o(s),f)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;n.length!==0;){var R=n.pop();R.length===4?Object.defineProperty(R[0],R[1],R[3]):R[0][R[1]]=R[2]}}return l}function m(h,s,f,E,y,l,R){l+=1;var S;if(typeof h=="object"&&h!==null){for(S=0;SR.depthLimit){c(e,h,s,y);return}if(typeof R.edgesLimit<"u"&&f+1>R.edgesLimit){c(e,h,s,y);return}if(E.push(h),Array.isArray(h))for(S=0;S0)for(var E=0;E=1e3&&i<=4999}function g(i,c){if(c!=="[Circular]")return c}return Ct}var bs={},Mt={},gc;function ro(){return gc||(gc=1,Object.defineProperty(Mt,"__esModule",{value:!0}),Mt.errorValues=Mt.errorCodes=void 0,Mt.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},Mt.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}),Mt}var mc;function Cl(){return mc||(mc=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const r=ro(),n=to(),t=r.errorCodes.rpc.internal,g="Unspecified error message. This is a bug, please report it.",i={code:t,message:c(t)};e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function c(h,s=g){if(Number.isInteger(h)){const f=h.toString();if(o(r.errorValues,f))return r.errorValues[f].message;if(u(h))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return s}e.getMessageFromCode=c;function a(h){if(!Number.isInteger(h))return!1;const s=h.toString();return!!(r.errorValues[s]||u(h))}e.isValidCode=a;function p(h,{fallbackError:s=i,shouldIncludeStack:f=!1}={}){var E,y;if(!s||!Number.isInteger(s.code)||typeof s.message!="string")throw new Error("Must provide fallback error with integer number code and string message.");if(h instanceof n.EthereumRpcError)return h.serialize();const l={};if(h&&typeof h=="object"&&!Array.isArray(h)&&o(h,"code")&&a(h.code)){const S=h;l.code=S.code,S.message&&typeof S.message=="string"?(l.message=S.message,o(S,"data")&&(l.data=S.data)):(l.message=c(l.code),l.data={originalError:m(h)})}else{l.code=s.code;const S=(E=h)===null||E===void 0?void 0:E.message;l.message=S&&typeof S=="string"?S:s.message,l.data={originalError:m(h)}}const R=(y=h)===null||y===void 0?void 0:y.stack;return f&&h&&R&&typeof R=="string"&&(l.stack=R),l}e.serializeError=p;function u(h){return h>=-32099&&h<=-32e3}function m(h){return h&&typeof h=="object"&&!Array.isArray(h)?Object.assign({},h):h}function o(h,s){return Object.prototype.hasOwnProperty.call(h,s)}}(bs)),bs}var Fr={},wc;function vf(){if(wc)return Fr;wc=1,Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.ethErrors=void 0;const e=to(),r=Cl(),n=ro();Fr.ethErrors={rpc:{parse:c=>t(n.errorCodes.rpc.parse,c),invalidRequest:c=>t(n.errorCodes.rpc.invalidRequest,c),invalidParams:c=>t(n.errorCodes.rpc.invalidParams,c),methodNotFound:c=>t(n.errorCodes.rpc.methodNotFound,c),internal:c=>t(n.errorCodes.rpc.internal,c),server:c=>{if(!c||typeof c!="object"||Array.isArray(c))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:a}=c;if(!Number.isInteger(a)||a>-32005||a<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return t(a,c)},invalidInput:c=>t(n.errorCodes.rpc.invalidInput,c),resourceNotFound:c=>t(n.errorCodes.rpc.resourceNotFound,c),resourceUnavailable:c=>t(n.errorCodes.rpc.resourceUnavailable,c),transactionRejected:c=>t(n.errorCodes.rpc.transactionRejected,c),methodNotSupported:c=>t(n.errorCodes.rpc.methodNotSupported,c),limitExceeded:c=>t(n.errorCodes.rpc.limitExceeded,c)},provider:{userRejectedRequest:c=>g(n.errorCodes.provider.userRejectedRequest,c),unauthorized:c=>g(n.errorCodes.provider.unauthorized,c),unsupportedMethod:c=>g(n.errorCodes.provider.unsupportedMethod,c),disconnected:c=>g(n.errorCodes.provider.disconnected,c),chainDisconnected:c=>g(n.errorCodes.provider.chainDisconnected,c),custom:c=>{if(!c||typeof c!="object"||Array.isArray(c))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:a,message:p,data:u}=c;if(!p||typeof p!="string")throw new Error('"message" must be a nonempty string');return new e.EthereumProviderError(a,p,u)}}};function t(c,a){const[p,u]=i(a);return new e.EthereumRpcError(c,p||r.getMessageFromCode(c),u)}function g(c,a){const[p,u]=i(a);return new e.EthereumProviderError(c,p||r.getMessageFromCode(c),u)}function i(c){if(c){if(typeof c=="string")return[c];if(typeof c=="object"&&!Array.isArray(c)){const{message:a,data:p}=c;if(a&&typeof a!="string")throw new Error("Must specify string message.");return[a||void 0,p]}}return[]}return Fr}var yc;function _f(){return yc||(yc=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const r=to();Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return r.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return r.EthereumProviderError}});const n=Cl();Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return n.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return n.getMessageFromCode}});const t=vf();Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return t.ethErrors}});const g=ro();Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return g.errorCodes}})}(ws)),ws}var bc;function Ml(){if(bc)return Gt;bc=1;var e=Gt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.JsonRpcEngine=void 0;const r=e(yf()),n=_f();let t=class it extends r.default{constructor(){super(),this._middleware=[]}push(c){this._middleware.push(c)}handle(c,a){if(a&&typeof a!="function")throw new Error('"callback" must be a function if provided.');return Array.isArray(c)?a?this._handleBatch(c,a):this._handleBatch(c):a?this._handle(c,a):this._promiseHandle(c)}asMiddleware(){return async(c,a,p,u)=>{try{const[m,o,h]=await it._runAllMiddleware(c,a,this._middleware);return o?(await it._runReturnHandlers(h),u(m)):p(async s=>{try{await it._runReturnHandlers(h)}catch(f){return s(f)}return s()})}catch(m){return u(m)}}}async _handleBatch(c,a){try{const p=await Promise.all(c.map(this._promiseHandle.bind(this)));return a?a(null,p):p}catch(p){if(a)return a(p);throw p}}_promiseHandle(c){return new Promise(a=>{this._handle(c,(p,u)=>{a(u)})})}async _handle(c,a){if(!c||Array.isArray(c)||typeof c!="object"){const o=new n.EthereumRpcError(n.errorCodes.rpc.invalidRequest,`Requests must be plain objects. Received: ${typeof c}`,{request:c});return a(o,{id:void 0,jsonrpc:"2.0",error:o})}if(typeof c.method!="string"){const o=new n.EthereumRpcError(n.errorCodes.rpc.invalidRequest,`Must specify a string method. Received: ${typeof c.method}`,{request:c});return a(o,{id:c.id,jsonrpc:"2.0",error:o})}const p=Object.assign({},c),u={id:p.id,jsonrpc:p.jsonrpc};let m=null;try{await this._processRequest(p,u)}catch(o){m=o}return m&&(delete u.result,u.error||(u.error=n.serializeError(m))),a(m,u)}async _processRequest(c,a){const[p,u,m]=await it._runAllMiddleware(c,a,this._middleware);if(it._checkForCompletion(c,a,u),await it._runReturnHandlers(m),p)throw p}static async _runAllMiddleware(c,a,p){const u=[];let m=null,o=!1;for(const h of p)if([m,o]=await it._runMiddleware(c,a,h,u),o)break;return[m,o,u.reverse()]}static _runMiddleware(c,a,p,u){return new Promise(m=>{const o=s=>{const f=s||a.error;f&&(a.error=n.serializeError(f)),m([f,!0])},h=s=>{a.error?o(a.error):(s&&(typeof s!="function"&&o(new n.EthereumRpcError(n.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof s}" for request: +${g(c)}`,{request:c})),u.push(s)),m([null,!1]))};try{p(c,a,h,o)}catch(s){o(s)}})}static async _runReturnHandlers(c){for(const a of c)await new Promise((p,u)=>{a(m=>m?u(m):p())})}static _checkForCompletion(c,a,p){if(!("result"in a)&&!("error"in a))throw new n.EthereumRpcError(n.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request: +${g(c)}`,{request:c});if(!p)throw new n.EthereumRpcError(n.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request: +${g(c)}`,{request:c})}};Gt.JsonRpcEngine=t;function g(i){return JSON.stringify(i,null,2)}return Gt}var Dr={},vc;function Ef(){if(vc)return Dr;vc=1,Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.mergeMiddleware=void 0;const e=Ml();function r(n){const t=new e.JsonRpcEngine;return n.forEach(g=>t.push(g)),t.asMiddleware()}return Dr.mergeMiddleware=r,Dr}var _c;function kl(){return _c||(_c=1,function(e){var r=Lr.__createBinding||(Object.create?function(t,g,i,c){c===void 0&&(c=i),Object.defineProperty(t,c,{enumerable:!0,get:function(){return g[i]}})}:function(t,g,i,c){c===void 0&&(c=i),t[c]=g[i]}),n=Lr.__exportStar||function(t,g){for(var i in t)i!=="default"&&!Object.prototype.hasOwnProperty.call(g,i)&&r(g,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(gf(),e),n(mf(),e),n(wf(),e),n(Sl(),e),n(Ml(),e),n(Ef(),e)}(Lr)),Lr}var vs={},cn={};const no=$r(Al);var ln={},Ec;function Il(){if(Ec)return ln;Ec=1,Object.defineProperty(ln,"__esModule",{value:!0});var e=no,r=function(){function n(t){if(this._maxConcurrency=t,this._queue=[],t<=0)throw new Error("semaphore must be initialized to a positive value");this._value=t}return n.prototype.acquire=function(){var t=this,g=this.isLocked(),i=new Promise(function(c){return t._queue.push(c)});return g||this._dispatch(),i},n.prototype.runExclusive=function(t){return e.__awaiter(this,void 0,void 0,function(){var g,i,c;return e.__generator(this,function(a){switch(a.label){case 0:return[4,this.acquire()];case 1:g=a.sent(),i=g[0],c=g[1],a.label=2;case 2:return a.trys.push([2,,4,5]),[4,t(i)];case 3:return[2,a.sent()];case 4:return c(),[7];case 5:return[2]}})})},n.prototype.isLocked=function(){return this._value<=0},n.prototype.release=function(){if(this._maxConcurrency>1)throw new Error("this method is unavailabel on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){var t=this._currentReleaser;this._currentReleaser=void 0,t()}},n.prototype._dispatch=function(){var t=this,g=this._queue.shift();if(g){var i=!1;this._currentReleaser=function(){i||(i=!0,t._value++,t._dispatch())},g([this._value--,this._currentReleaser])}},n}();return ln.default=r,ln}var Rc;function Rf(){if(Rc)return cn;Rc=1,Object.defineProperty(cn,"__esModule",{value:!0});var e=no,r=Il(),n=function(){function t(){this._semaphore=new r.default(1)}return t.prototype.acquire=function(){return e.__awaiter(this,void 0,void 0,function(){var g,i;return e.__generator(this,function(c){switch(c.label){case 0:return[4,this._semaphore.acquire()];case 1:return g=c.sent(),i=g[1],[2,i]}})})},t.prototype.runExclusive=function(g){return this._semaphore.runExclusive(function(){return g()})},t.prototype.isLocked=function(){return this._semaphore.isLocked()},t.prototype.release=function(){this._semaphore.release()},t}();return cn.default=n,cn}var qr={},Sc;function Sf(){if(Sc)return qr;Sc=1,Object.defineProperty(qr,"__esModule",{value:!0}),qr.withTimeout=void 0;var e=no;function r(n,t,g){var i=this;return g===void 0&&(g=new Error("timeout")),{acquire:function(){return new Promise(function(c,a){return e.__awaiter(i,void 0,void 0,function(){var p,u,m;return e.__generator(this,function(o){switch(o.label){case 0:return p=!1,setTimeout(function(){p=!0,a(g)},t),[4,n.acquire()];case 1:return u=o.sent(),p?(m=Array.isArray(u)?u[1]:u,m()):c(u),[2]}})})})},runExclusive:function(c){return e.__awaiter(this,void 0,void 0,function(){var a,p;return e.__generator(this,function(u){switch(u.label){case 0:a=function(){},u.label=1;case 1:return u.trys.push([1,,7,8]),[4,this.acquire()];case 2:return p=u.sent(),Array.isArray(p)?(a=p[1],[4,c(p[0])]):[3,4];case 3:return[2,u.sent()];case 4:return a=p,[4,c()];case 5:return[2,u.sent()];case 6:return[3,8];case 7:return a(),[7];case 8:return[2]}})})},release:function(){n.release()},isLocked:function(){return n.isLocked()}}}return qr.withTimeout=r,qr}var Cc;function Cf(){return Cc||(Cc=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.withTimeout=e.Semaphore=e.Mutex=void 0;var r=Rf();Object.defineProperty(e,"Mutex",{enumerable:!0,get:function(){return r.default}});var n=Il();Object.defineProperty(e,"Semaphore",{enumerable:!0,get:function(){return n.default}});var t=Sf();Object.defineProperty(e,"withTimeout",{enumerable:!0,get:function(){return t.withTimeout}})}(vs)),vs}var _s,Mc;function Mf(){if(Mc)return _s;Mc=1,_s=r;var e=Object.prototype.hasOwnProperty;function r(){for(var n={},t=0;tfunction(...c){const a=t.promiseModule;return new a((p,u)=>{t.multiArgs?c.push((...o)=>{t.errorFirst?o[0]?u(o):(o.shift(),p(o)):p(o)}):t.errorFirst?c.push((o,h)=>{o?u(o):p(h)}):c.push(p),Reflect.apply(n,this===g?i:this,c)})},r=new WeakMap;return Rs=(n,t)=>{t={exclude:[/.+(?:Sync|Stream)$/],errorFirst:!0,promiseModule:Promise,...t};const g=typeof n;if(!(n!==null&&(g==="object"||g==="function")))throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${n===null?"null":g}\``);const i=(p,u)=>{let m=r.get(p);if(m||(m={},r.set(p,m)),u in m)return m[u];const o=y=>typeof y=="string"||typeof u=="symbol"?u===y:y.test(u),h=Reflect.getOwnPropertyDescriptor(p,u),s=h===void 0||h.writable||h.configurable,E=(t.include?t.include.some(o):!t.exclude.some(o))&&s;return m[u]=E,E},c=new WeakMap,a=new Proxy(n,{apply(p,u,m){const o=c.get(p);if(o)return Reflect.apply(o,u,m);const h=t.excludeMain?p:e(p,t,a,p);return c.set(p,h),Reflect.apply(h,u,m)},get(p,u){const m=p[u];if(!i(p,u)||m===Function.prototype[u])return m;const o=c.get(m);if(o)return o;if(typeof m=="function"){const h=e(m,t,a,p);return c.set(m,h),h}return m}});return a},Rs}var Ss,xc;function io(){if(xc)return Ss;xc=1;const e=Ws().default;class r extends e{constructor(){super(),this.updates=[]}async initialize(){}async update(){throw new Error("BaseFilter - no update method specified")}addResults(t){this.updates=this.updates.concat(t),t.forEach(g=>this.emit("update",g))}addInitialResults(t){}getChangesAndClear(){const t=this.updates;return this.updates=[],t}}return Ss=r,Ss}var Cs,Ac;function xf(){if(Ac)return Cs;Ac=1;const e=io();class r extends e{constructor(){super(),this.allResults=[]}async update(){throw new Error("BaseFilterWithHistory - no update method specified")}addResults(t){this.allResults=this.allResults.concat(t),super.addResults(t)}addInitialResults(t){this.allResults=this.allResults.concat(t),super.addInitialResults(t)}getAllResults(){return this.allResults}}return Cs=r,Cs}var Ms,Tc;function zr(){if(Tc)return Ms;Tc=1,Ms={minBlockRef:e,maxBlockRef:r,sortBlockRefs:n,bnToHex:t,blockRefIsNumber:g,hexToInt:i,incrementHexInt:c,intToHex:a,unsafeRandomBytes:p};function e(...m){return n(m)[0]}function r(...m){const o=n(m);return o[o.length-1]}function n(m){return m.sort((o,h)=>o==="latest"||h==="earliest"?1:h==="latest"||o==="earliest"?-1:i(o)-i(h))}function t(m){return"0x"+m.toString(16)}function g(m){return m&&!["earliest","latest","pending"].includes(m)}function i(m){return m==null?m:Number.parseInt(m,16)}function c(m){if(m==null)return m;const o=i(m);return a(o+1)}function a(m){if(m==null)return m;let o=m.toString(16);return o.length%2&&(o="0"+o),"0x"+o}function p(m){let o="0x";for(let h=0;hh.toLowerCase()))}async initialize({currentBlock:m}){let o=this.params.fromBlock;["latest","pending"].includes(o)&&(o=m),o==="earliest"&&(o="0x0"),this.params.fromBlock=o;const h=c(this.params.toBlock,m),s=Object.assign({},this.params,{toBlock:h}),f=await this._fetchLogs(s);this.addInitialResults(f)}async update({oldBlock:m,newBlock:o}){const h=o;let s;m?s=i(m):s=o;const f=Object.assign({},this.params,{fromBlock:s,toBlock:h}),y=(await this._fetchLogs(f)).filter(l=>this.matchLog(l));this.addResults(y)}async _fetchLogs(m){return await r(h=>this.ethQuery.getLogs(m,h))()}matchLog(m){if(g(this.params.fromBlock)>=g(m.blockNumber)||a(this.params.toBlock)&&g(this.params.toBlock)<=g(m.blockNumber))return!1;const o=m.address&&m.address.toLowerCase();return this.params.address&&o&&!this.params.address.includes(o)?!1:this.params.topics.every((s,f)=>{let E=m.topics[f];if(!E)return!1;E=E.toLowerCase();let y=Array.isArray(s)?s:[s];return y.includes(null)?!0:(y=y.map(S=>S.toLowerCase()),y.includes(E))})}}return ks=p,ks}var Is,Bc;function so(){if(Bc)return Is;Bc=1,Is=e;async function e({provider:i,fromBlock:c,toBlock:a}){c||(c=a);const p=r(c),m=r(a)-p+1,o=Array(m).fill().map((s,f)=>p+f).map(n);let h=await Promise.all(o.map(s=>g(i,"eth_getBlockByNumber",[s,!1])));return h=h.filter(s=>s!==null),h}function r(i){return i==null?i:Number.parseInt(i,16)}function n(i){return i==null?i:"0x"+i.toString(16)}function t(i,c){return new Promise((a,p)=>{i.sendAsync(c,(u,m)=>{u?p(u):m.error?p(m.error):m.result?a(m.result):p(new Error("Result was empty"))})})}async function g(i,c,a){for(let p=0;p<3;p++)try{return await t(i,{id:1,jsonrpc:"2.0",method:c,params:a})}catch(u){console.error(`provider.sendAsync failed: ${u.stack||u.message||u}`)}return null}return Is}var xs,Nc;function Tf(){if(Nc)return xs;Nc=1;const e=io(),r=so(),{incrementHexInt:n}=zr();class t extends e{constructor({provider:i,params:c}){super(),this.type="block",this.provider=i}async update({oldBlock:i,newBlock:c}){const a=c,p=n(i),m=(await r({provider:this.provider,fromBlock:p,toBlock:a})).map(o=>o.hash);this.addResults(m)}}return xs=t,xs}var As,Pc;function Lf(){if(Pc)return As;Pc=1;const e=io(),r=so(),{incrementHexInt:n}=zr();class t extends e{constructor({provider:i}){super(),this.type="tx",this.provider=i}async update({oldBlock:i}){const c=i,a=n(i),p=await r({provider:this.provider,fromBlock:a,toBlock:c}),u=[];for(const m of p)u.push(...m.transactions);this.addResults(u)}}return As=t,As}var Ts,Oc;function Bf(){if(Oc)return Ts;Oc=1;const e=Cf().Mutex,{createAsyncMiddleware:r,createScaffoldMiddleware:n}=kl(),t=Af(),g=Tf(),i=Lf(),{intToHex:c,hexToInt:a}=zr();Ts=p;function p({blockTracker:s,provider:f}){let E=0,y={};const l=new e,R=o({mutex:l}),S=n({eth_newFilter:R(u(T)),eth_newBlockFilter:R(u(q)),eth_newPendingTransactionFilter:R(u(D)),eth_uninstallFilter:R(m(X)),eth_getFilterChanges:R(m(H)),eth_getFilterLogs:R(m(G))}),I=async({oldBlock:_,newBlock:C})=>{if(y.length===0)return;const M=await l.acquire();try{await Promise.all(h(y).map(async x=>{try{await x.update({oldBlock:_,newBlock:C})}catch(B){console.error(B)}}))}catch(x){console.error(x)}M()};return S.newLogFilter=T,S.newBlockFilter=q,S.newPendingTransactionFilter=D,S.uninstallFilter=X,S.getFilterChanges=H,S.getFilterLogs=G,S.destroy=()=>{F()},S;async function T(_){const C=new t({provider:f,params:_});return await Y(C),C}async function q(){const _=new g({provider:f});return await Y(_),_}async function D(){const _=new i({provider:f});return await Y(_),_}async function H(_){const C=a(_),M=y[C];if(!M)throw new Error(`No filter for index "${C}"`);return M.getChangesAndClear()}async function G(_){const C=a(_),M=y[C];if(!M)throw new Error(`No filter for index "${C}"`);let x=[];return M.type==="log"&&(x=M.getAllResults()),x}async function X(_){const C=a(_),x=!!y[C];return x&&await re(C),x}async function Y(_){const C=h(y).length,M=await s.getLatestBlock();await _.initialize({currentBlock:M}),E++,y[E]=_,_.id=E,_.idHex=c(E);const x=h(y).length;return d({prevFilterCount:C,newFilterCount:x}),E}async function re(_){const C=h(y).length;delete y[_];const M=h(y).length;d({prevFilterCount:C,newFilterCount:M})}async function F(){const _=h(y).length;y={},d({prevFilterCount:_,newFilterCount:0})}function d({prevFilterCount:_,newFilterCount:C}){if(_===0&&C>0){s.on("sync",I);return}if(_>0&&C===0){s.removeListener("sync",I);return}}}function u(s){return m(async(...f)=>{const E=await s(...f);return c(E.id)})}function m(s){return r(async(f,E)=>{const y=await s.apply(null,f.params);E.result=y})}function o({mutex:s}){return f=>async(E,y,l,R)=>{(await s.acquire())(),f(E,y,l,R)}}function h(s,f){const E=[];for(let y in s)E.push(s[y]);return E}return Ts}var Ls,Fc;function Nf(){if(Fc)return Ls;Fc=1;const e=Ws().default,{createAsyncMiddleware:r,createScaffoldMiddleware:n}=kl(),t=Bf(),{unsafeRandomBytes:g,incrementHexInt:i}=zr(),c=so();Ls=a;function a({blockTracker:u,provider:m}){const o={},h=t({blockTracker:u,provider:m});let s=!1;const f=new e,E=n({eth_subscribe:r(y),eth_unsubscribe:r(l)});return E.destroy=S,{events:f,middleware:E};async function y(I,T){if(s)throw new Error("SubscriptionManager - attempting to use after destroying");const q=I.params[0],D=g(16);let H;switch(q){case"newHeads":H=G({subId:D});break;case"logs":const Y=I.params[1],re=await h.newLogFilter(Y);H=X({subId:D,filter:re});break;default:throw new Error(`SubscriptionManager - unsupported subscription type "${q}"`)}o[D]=H,T.result=D;return;function G({subId:Y}){const re={type:q,destroy:async()=>{u.removeListener("sync",re.update)},update:async({oldBlock:F,newBlock:d})=>{const _=d,C=i(F);(await c({provider:m,fromBlock:C,toBlock:_})).map(p).filter(B=>B!==null).forEach(B=>{R(Y,B)})}};return u.on("sync",re.update),re}function X({subId:Y,filter:re}){return re.on("update",d=>R(Y,d)),{type:q,destroy:async()=>await h.uninstallFilter(re.idHex)}}}async function l(I,T){if(s)throw new Error("SubscriptionManager - attempting to use after destroying");const q=I.params[0],D=o[q];if(!D){T.result=!1;return}delete o[q],await D.destroy(),T.result=!0}function R(I,T){f.emit("notification",{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:I,result:T}})}function S(){f.removeAllListeners();for(const I in o)o[I].destroy(),delete o[I];s=!0}}function p(u){return u==null?null:{hash:u.hash,parentHash:u.parentHash,sha3Uncles:u.sha3Uncles,miner:u.miner,stateRoot:u.stateRoot,transactionsRoot:u.transactionsRoot,receiptsRoot:u.receiptsRoot,logsBloom:u.logsBloom,difficulty:u.difficulty,number:u.number,gasLimit:u.gasLimit,gasUsed:u.gasUsed,nonce:u.nonce,mixHash:u.mixHash,timestamp:u.timestamp,extraData:u.extraData}}return Ls}var Dc;function Pf(){if(Dc)return kr;Dc=1,Object.defineProperty(kr,"__esModule",{value:!0}),kr.SubscriptionManager=void 0;const e=pf(),r=Nf(),n=()=>{};let t=class{constructor(i){const c=new e.PollingBlockTracker({provider:i,pollingInterval:15e3,setSkipCacheFlag:!0}),{events:a,middleware:p}=r({blockTracker:c,provider:i});this.events=a,this.subscriptionMiddleware=p}async handleRequest(i){const c={};return await this.subscriptionMiddleware(i,c,n,n),c}destroy(){this.subscriptionMiddleware.destroy()}};return kr.SubscriptionManager=t,kr}var qc;function Ns(){if(qc)return Dt;qc=1;var e=Dt.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.CoinbaseWalletProvider=void 0;const r=e(fn()),n=Tl(),t=gn(),g=tt(),i=Yc(),c=js(),a=$s(),p=Fs(),u=e(Nh()),m=qs(),o=Ph(),h=Pf(),s="DefaultChainId",f="DefaultJsonRpcUrl";let E=class extends n.EventEmitter{constructor(l){var R,S;super(),this._filterPolyfill=new o.FilterPolyfill(this),this._subscriptionManager=new h.SubscriptionManager(this),this._relay=null,this._addresses=[],this.hasMadeFirstChainChangedEmission=!1,this.setProviderInfo=this.setProviderInfo.bind(this),this.updateProviderInfo=this.updateProviderInfo.bind(this),this.getChainId=this.getChainId.bind(this),this.setAppInfo=this.setAppInfo.bind(this),this.enable=this.enable.bind(this),this.close=this.close.bind(this),this.send=this.send.bind(this),this.sendAsync=this.sendAsync.bind(this),this.request=this.request.bind(this),this._setAddresses=this._setAddresses.bind(this),this.scanQRCode=this.scanQRCode.bind(this),this.genericRequest=this.genericRequest.bind(this),this._chainIdFromOpts=l.chainId,this._jsonRpcUrlFromOpts=l.jsonRpcUrl,this._overrideIsMetaMask=l.overrideIsMetaMask,this._relayProvider=l.relayProvider,this._storage=l.storage,this._relayEventManager=l.relayEventManager,this.diagnostic=l.diagnosticLogger,this.reloadOnDisconnect=!0,this.isCoinbaseWallet=(R=l.overrideIsCoinbaseWallet)!==null&&R!==void 0?R:!0,this.isCoinbaseBrowser=(S=l.overrideIsCoinbaseBrowser)!==null&&S!==void 0?S:!1,this.qrUrl=l.qrUrl;const I=this.getChainId(),T=(0,g.prepend0x)(I.toString(16));this.emit("connect",{chainIdStr:T});const q=this._storage.getItem(c.LOCAL_STORAGE_ADDRESSES_KEY);if(q){const D=q.split(" ");D[0]!==""&&(this._addresses=D.map(H=>(0,g.ensureAddressString)(H)),this.emit("accountsChanged",D))}this._subscriptionManager.events.on("notification",D=>{this.emit("message",{type:D.method,data:D.params})}),this._isAuthorized()&&this.initializeRelay(),window.addEventListener("message",D=>{var H;if(!(D.origin!==location.origin||D.source!==window)&&D.data.type==="walletLinkMessage"&&D.data.data.action==="dappChainSwitched"){const G=D.data.data.chainId,X=(H=D.data.data.jsonRpcUrl)!==null&&H!==void 0?H:this.jsonRpcUrl;this.updateProviderInfo(X,Number(G))}})}get selectedAddress(){return this._addresses[0]||void 0}get networkVersion(){return this.getChainId().toString(10)}get chainId(){return(0,g.prepend0x)(this.getChainId().toString(16))}get isWalletLink(){return!0}get isMetaMask(){return this._overrideIsMetaMask}get host(){return this.jsonRpcUrl}get connected(){return!0}isConnected(){return!0}get jsonRpcUrl(){var l;return(l=this._storage.getItem(f))!==null&&l!==void 0?l:this._jsonRpcUrlFromOpts}set jsonRpcUrl(l){this._storage.setItem(f,l)}disableReloadOnDisconnect(){this.reloadOnDisconnect=!1}setProviderInfo(l,R){this.isCoinbaseBrowser||(this._chainIdFromOpts=R,this._jsonRpcUrlFromOpts=l),this.updateProviderInfo(this.jsonRpcUrl,this.getChainId())}updateProviderInfo(l,R){this.jsonRpcUrl=l;const S=this.getChainId();this._storage.setItem(s,R.toString(10)),((0,g.ensureIntNumber)(R)!==S||!this.hasMadeFirstChainChangedEmission)&&(this.emit("chainChanged",this.getChainId()),this.hasMadeFirstChainChangedEmission=!0)}async watchAsset(l,R,S,I,T,q){const H=await(await this.initializeRelay()).watchAsset(l,R,S,I,T,q==null?void 0:q.toString()).promise;return(0,p.isErrorResponse)(H)?!1:!!H.result}async addEthereumChain(l,R,S,I,T,q){var D,H;if((0,g.ensureIntNumber)(l)===this.getChainId())return!1;const G=await this.initializeRelay(),X=G.inlineAddEthereumChain(l.toString());!this._isAuthorized()&&!X&&await G.requestEthereumAccounts().promise;const Y=await G.addEthereumChain(l.toString(),R,T,S,I,q).promise;return(0,p.isErrorResponse)(Y)?!1:(((D=Y.result)===null||D===void 0?void 0:D.isApproved)===!0&&this.updateProviderInfo(R[0],l),((H=Y.result)===null||H===void 0?void 0:H.isApproved)===!0)}async switchEthereumChain(l){const S=await(await this.initializeRelay()).switchEthereumChain(l.toString(10),this.selectedAddress||void 0).promise;if((0,p.isErrorResponse)(S)){if(!S.errorCode)return;throw S.errorCode===t.standardErrorCodes.provider.unsupportedChain?t.standardErrors.provider.unsupportedChain():t.standardErrors.provider.custom({message:S.errorMessage,code:S.errorCode})}const I=S.result;I.isApproved&&I.rpcUrl.length>0&&this.updateProviderInfo(I.rpcUrl,l)}setAppInfo(l,R){this.initializeRelay().then(S=>S.setAppInfo(l,R))}async enable(){var l;return(l=this.diagnostic)===null||l===void 0||l.log(m.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::enable",addresses_length:this._addresses.length,sessionIdHash:this._relay?a.Session.hash(this._relay.session.id):void 0}),this._isAuthorized()?[...this._addresses]:await this.send("eth_requestAccounts")}async close(){(await this.initializeRelay()).resetAndReload()}send(l,R){try{const S=this._send(l,R);if(S instanceof Promise)return S.catch(I=>{throw(0,t.serializeError)(I,l)})}catch(S){throw(0,t.serializeError)(S,l)}}_send(l,R){if(typeof l=="string"){const I=l,T=Array.isArray(R)?R:R!==void 0?[R]:[],q={jsonrpc:"2.0",id:0,method:I,params:T};return this._sendRequestAsync(q).then(D=>D.result)}if(typeof R=="function"){const I=l,T=R;return this._sendAsync(I,T)}if(Array.isArray(l))return l.map(T=>this._sendRequest(T));const S=l;return this._sendRequest(S)}async sendAsync(l,R){try{return this._sendAsync(l,R).catch(S=>{throw(0,t.serializeError)(S,l)})}catch(S){return Promise.reject((0,t.serializeError)(S,l))}}async _sendAsync(l,R){if(typeof R!="function")throw new Error("callback is required");if(Array.isArray(l)){const I=R;this._sendMultipleRequestsAsync(l).then(T=>I(null,T)).catch(T=>I(T,null));return}const S=R;return this._sendRequestAsync(l).then(I=>S(null,I)).catch(I=>S(I,null))}async request(l){try{return this._request(l).catch(R=>{throw(0,t.serializeError)(R,l.method)})}catch(R){return Promise.reject((0,t.serializeError)(R,l.method))}}async _request(l){if(!l||typeof l!="object"||Array.isArray(l))throw t.standardErrors.rpc.invalidRequest({message:"Expected a single, non-array, object argument.",data:l});const{method:R,params:S}=l;if(typeof R!="string"||R.length===0)throw t.standardErrors.rpc.invalidRequest({message:"'args.method' must be a non-empty string.",data:l});if(S!==void 0&&!Array.isArray(S)&&(typeof S!="object"||S===null))throw t.standardErrors.rpc.invalidRequest({message:"'args.params' must be an object or array if provided.",data:l});const I=S===void 0?[]:S,T=this._relayEventManager.makeRequestId();return(await this._sendRequestAsync({method:R,params:I,jsonrpc:"2.0",id:T})).result}async scanQRCode(l){const S=await(await this.initializeRelay()).scanQRCode((0,g.ensureRegExpString)(l)).promise;if((0,p.isErrorResponse)(S))throw(0,t.serializeError)(S.errorMessage,"scanQRCode");if(typeof S.result!="string")throw(0,t.serializeError)("result was not a string","scanQRCode");return S.result}async genericRequest(l,R){const I=await(await this.initializeRelay()).genericRequest(l,R).promise;if((0,p.isErrorResponse)(I))throw(0,t.serializeError)(I.errorMessage,"generic");if(typeof I.result!="string")throw(0,t.serializeError)("result was not a string","generic");return I.result}async connectAndSignIn(l){var R;(R=this.diagnostic)===null||R===void 0||R.log(m.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::connectAndSignIn",sessionIdHash:this._relay?a.Session.hash(this._relay.session.id):void 0});let S;try{const T=await this.initializeRelay();if(!(T instanceof i.MobileRelay))throw new Error("connectAndSignIn is only supported on mobile");if(S=await T.connectAndSignIn(l).promise,(0,p.isErrorResponse)(S))throw new Error(S.errorMessage)}catch(T){throw typeof T.message=="string"&&T.message.match(/(denied|rejected)/i)?t.standardErrors.provider.userRejectedRequest("User denied account authorization"):T}if(!S.result)throw new Error("accounts received is empty");const{accounts:I}=S.result;return this._setAddresses(I),this.isCoinbaseBrowser||await this.switchEthereumChain(this.getChainId()),S.result}async selectProvider(l){const S=await(await this.initializeRelay()).selectProvider(l).promise;if((0,p.isErrorResponse)(S))throw(0,t.serializeError)(S.errorMessage,"selectProvider");if(typeof S.result!="string")throw(0,t.serializeError)("result was not a string","selectProvider");return S.result}supportsSubscriptions(){return!1}subscribe(){throw new Error("Subscriptions are not supported")}unsubscribe(){throw new Error("Subscriptions are not supported")}disconnect(){return!0}_sendRequest(l){const R={jsonrpc:"2.0",id:l.id},{method:S}=l;if(R.result=this._handleSynchronousMethods(l),R.result===void 0)throw new Error(`Coinbase Wallet does not support calling ${S} synchronously without a callback. Please provide a callback parameter to call ${S} asynchronously.`);return R}_setAddresses(l,R){if(!Array.isArray(l))throw new Error("addresses is not an array");const S=l.map(I=>(0,g.ensureAddressString)(I));JSON.stringify(S)!==JSON.stringify(this._addresses)&&(this._addresses=S,this.emit("accountsChanged",this._addresses),this._storage.setItem(c.LOCAL_STORAGE_ADDRESSES_KEY,S.join(" ")))}_sendRequestAsync(l){return new Promise((R,S)=>{try{const I=this._handleSynchronousMethods(l);if(I!==void 0)return R({jsonrpc:"2.0",id:l.id,result:I});const T=this._handleAsynchronousFilterMethods(l);if(T!==void 0){T.then(D=>R(Object.assign(Object.assign({},D),{id:l.id}))).catch(D=>S(D));return}const q=this._handleSubscriptionMethods(l);if(q!==void 0){q.then(D=>R({jsonrpc:"2.0",id:l.id,result:D.result})).catch(D=>S(D));return}}catch(I){return S(I)}this._handleAsynchronousMethods(l).then(I=>I&&R(Object.assign(Object.assign({},I),{id:l.id}))).catch(I=>S(I))})}_sendMultipleRequestsAsync(l){return Promise.all(l.map(R=>this._sendRequestAsync(R)))}_handleSynchronousMethods(l){const{method:R}=l,S=l.params||[];switch(R){case"eth_accounts":return this._eth_accounts();case"eth_coinbase":return this._eth_coinbase();case"eth_uninstallFilter":return this._eth_uninstallFilter(S);case"net_version":return this._net_version();case"eth_chainId":return this._eth_chainId();default:return}}async _handleAsynchronousMethods(l){const{method:R}=l,S=l.params||[];switch(R){case"eth_requestAccounts":return this._eth_requestAccounts();case"eth_sign":return this._eth_sign(S);case"eth_ecRecover":return this._eth_ecRecover(S);case"personal_sign":return this._personal_sign(S);case"personal_ecRecover":return this._personal_ecRecover(S);case"eth_signTransaction":return this._eth_signTransaction(S);case"eth_sendRawTransaction":return this._eth_sendRawTransaction(S);case"eth_sendTransaction":return this._eth_sendTransaction(S);case"eth_signTypedData_v1":return this._eth_signTypedData_v1(S);case"eth_signTypedData_v2":return this._throwUnsupportedMethodError();case"eth_signTypedData_v3":return this._eth_signTypedData_v3(S);case"eth_signTypedData_v4":case"eth_signTypedData":return this._eth_signTypedData_v4(S);case"cbWallet_arbitrary":return this._cbwallet_arbitrary(S);case"wallet_addEthereumChain":return this._wallet_addEthereumChain(S);case"wallet_switchEthereumChain":return this._wallet_switchEthereumChain(S);case"wallet_watchAsset":return this._wallet_watchAsset(S)}return(await this.initializeRelay()).makeEthereumJSONRPCRequest(l,this.jsonRpcUrl).catch(T=>{var q;throw(T.code===t.standardErrorCodes.rpc.methodNotFound||T.code===t.standardErrorCodes.rpc.methodNotSupported)&&((q=this.diagnostic)===null||q===void 0||q.log(m.EVENTS.METHOD_NOT_IMPLEMENTED,{method:l.method,sessionIdHash:this._relay?a.Session.hash(this._relay.session.id):void 0})),T})}_handleAsynchronousFilterMethods(l){const{method:R}=l,S=l.params||[];switch(R){case"eth_newFilter":return this._eth_newFilter(S);case"eth_newBlockFilter":return this._eth_newBlockFilter();case"eth_newPendingTransactionFilter":return this._eth_newPendingTransactionFilter();case"eth_getFilterChanges":return this._eth_getFilterChanges(S);case"eth_getFilterLogs":return this._eth_getFilterLogs(S)}}_handleSubscriptionMethods(l){switch(l.method){case"eth_subscribe":case"eth_unsubscribe":return this._subscriptionManager.handleRequest(l)}}_isKnownAddress(l){try{const R=(0,g.ensureAddressString)(l);return this._addresses.map(I=>(0,g.ensureAddressString)(I)).includes(R)}catch{}return!1}_ensureKnownAddress(l){var R;if(!this._isKnownAddress(l))throw(R=this.diagnostic)===null||R===void 0||R.log(m.EVENTS.UNKNOWN_ADDRESS_ENCOUNTERED),new Error("Unknown Ethereum address")}_prepareTransactionParams(l){const R=l.from?(0,g.ensureAddressString)(l.from):this.selectedAddress;if(!R)throw new Error("Ethereum address is unavailable");this._ensureKnownAddress(R);const S=l.to?(0,g.ensureAddressString)(l.to):null,I=l.value!=null?(0,g.ensureBN)(l.value):new r.default(0),T=l.data?(0,g.ensureBuffer)(l.data):Buffer.alloc(0),q=l.nonce!=null?(0,g.ensureIntNumber)(l.nonce):null,D=l.gasPrice!=null?(0,g.ensureBN)(l.gasPrice):null,H=l.maxFeePerGas!=null?(0,g.ensureBN)(l.maxFeePerGas):null,G=l.maxPriorityFeePerGas!=null?(0,g.ensureBN)(l.maxPriorityFeePerGas):null,X=l.gas!=null?(0,g.ensureBN)(l.gas):null,Y=l.chainId?(0,g.ensureIntNumber)(l.chainId):this.getChainId();return{fromAddress:R,toAddress:S,weiValue:I,data:T,nonce:q,gasPriceInWei:D,maxFeePerGas:H,maxPriorityFeePerGas:G,gasLimit:X,chainId:Y}}_isAuthorized(){return this._addresses.length>0}_requireAuthorization(){if(!this._isAuthorized())throw t.standardErrors.provider.unauthorized({})}_throwUnsupportedMethodError(){throw t.standardErrors.provider.unsupportedMethod({})}async _signEthereumMessage(l,R,S,I){this._ensureKnownAddress(R);try{const q=await(await this.initializeRelay()).signEthereumMessage(l,R,S,I).promise;if((0,p.isErrorResponse)(q))throw new Error(q.errorMessage);return{jsonrpc:"2.0",id:0,result:q.result}}catch(T){throw typeof T.message=="string"&&T.message.match(/(denied|rejected)/i)?t.standardErrors.provider.userRejectedRequest("User denied message signature"):T}}async _ethereumAddressFromSignedMessage(l,R,S){const T=await(await this.initializeRelay()).ethereumAddressFromSignedMessage(l,R,S).promise;if((0,p.isErrorResponse)(T))throw new Error(T.errorMessage);return{jsonrpc:"2.0",id:0,result:T.result}}_eth_accounts(){return[...this._addresses]}_eth_coinbase(){return this.selectedAddress||null}_net_version(){return this.getChainId().toString(10)}_eth_chainId(){return(0,g.hexStringFromIntNumber)(this.getChainId())}getChainId(){const l=this._storage.getItem(s);if(!l)return(0,g.ensureIntNumber)(this._chainIdFromOpts);const R=parseInt(l,10);return(0,g.ensureIntNumber)(R)}async _eth_requestAccounts(){var l;if((l=this.diagnostic)===null||l===void 0||l.log(m.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::_eth_requestAccounts",addresses_length:this._addresses.length,sessionIdHash:this._relay?a.Session.hash(this._relay.session.id):void 0}),this._isAuthorized())return Promise.resolve({jsonrpc:"2.0",id:0,result:this._addresses});let R;try{if(R=await(await this.initializeRelay()).requestEthereumAccounts().promise,(0,p.isErrorResponse)(R))throw new Error(R.errorMessage)}catch(S){throw typeof S.message=="string"&&S.message.match(/(denied|rejected)/i)?t.standardErrors.provider.userRejectedRequest("User denied account authorization"):S}if(!R.result)throw new Error("accounts received is empty");return this._setAddresses(R.result),this.isCoinbaseBrowser||await this.switchEthereumChain(this.getChainId()),{jsonrpc:"2.0",id:0,result:this._addresses}}_eth_sign(l){this._requireAuthorization();const R=(0,g.ensureAddressString)(l[0]),S=(0,g.ensureBuffer)(l[1]);return this._signEthereumMessage(S,R,!1)}_eth_ecRecover(l){const R=(0,g.ensureBuffer)(l[0]),S=(0,g.ensureBuffer)(l[1]);return this._ethereumAddressFromSignedMessage(R,S,!1)}_personal_sign(l){this._requireAuthorization();const R=(0,g.ensureBuffer)(l[0]),S=(0,g.ensureAddressString)(l[1]);return this._signEthereumMessage(R,S,!0)}_personal_ecRecover(l){const R=(0,g.ensureBuffer)(l[0]),S=(0,g.ensureBuffer)(l[1]);return this._ethereumAddressFromSignedMessage(R,S,!0)}async _eth_signTransaction(l){this._requireAuthorization();const R=this._prepareTransactionParams(l[0]||{});try{const I=await(await this.initializeRelay()).signEthereumTransaction(R).promise;if((0,p.isErrorResponse)(I))throw new Error(I.errorMessage);return{jsonrpc:"2.0",id:0,result:I.result}}catch(S){throw typeof S.message=="string"&&S.message.match(/(denied|rejected)/i)?t.standardErrors.provider.userRejectedRequest("User denied transaction signature"):S}}async _eth_sendRawTransaction(l){const R=(0,g.ensureBuffer)(l[0]),I=await(await this.initializeRelay()).submitEthereumTransaction(R,this.getChainId()).promise;if((0,p.isErrorResponse)(I))throw new Error(I.errorMessage);return{jsonrpc:"2.0",id:0,result:I.result}}async _eth_sendTransaction(l){this._requireAuthorization();const R=this._prepareTransactionParams(l[0]||{});try{const I=await(await this.initializeRelay()).signAndSubmitEthereumTransaction(R).promise;if((0,p.isErrorResponse)(I))throw new Error(I.errorMessage);return{jsonrpc:"2.0",id:0,result:I.result}}catch(S){throw typeof S.message=="string"&&S.message.match(/(denied|rejected)/i)?t.standardErrors.provider.userRejectedRequest("User denied transaction signature"):S}}async _eth_signTypedData_v1(l){this._requireAuthorization();const R=(0,g.ensureParsedJSONObject)(l[0]),S=(0,g.ensureAddressString)(l[1]);this._ensureKnownAddress(S);const I=u.default.hashForSignTypedDataLegacy({data:R}),T=JSON.stringify(R,null,2);return this._signEthereumMessage(I,S,!1,T)}async _eth_signTypedData_v3(l){this._requireAuthorization();const R=(0,g.ensureAddressString)(l[0]),S=(0,g.ensureParsedJSONObject)(l[1]);this._ensureKnownAddress(R);const I=u.default.hashForSignTypedData_v3({data:S}),T=JSON.stringify(S,null,2);return this._signEthereumMessage(I,R,!1,T)}async _eth_signTypedData_v4(l){this._requireAuthorization();const R=(0,g.ensureAddressString)(l[0]),S=(0,g.ensureParsedJSONObject)(l[1]);this._ensureKnownAddress(R);const I=u.default.hashForSignTypedData_v4({data:S}),T=JSON.stringify(S,null,2);return this._signEthereumMessage(I,R,!1,T)}async _cbwallet_arbitrary(l){const R=l[0],S=l[1];if(typeof S!="string")throw new Error("parameter must be a string");if(typeof R!="object"||R===null)throw new Error("parameter must be an object");return{jsonrpc:"2.0",id:0,result:await this.genericRequest(R,S)}}async _wallet_addEthereumChain(l){var R,S,I,T;const q=l[0];if(((R=q.rpcUrls)===null||R===void 0?void 0:R.length)===0)return{jsonrpc:"2.0",id:0,error:{code:2,message:"please pass in at least 1 rpcUrl"}};if(!q.chainName||q.chainName.trim()==="")throw t.standardErrors.rpc.invalidParams("chainName is a required field");if(!q.nativeCurrency)throw t.standardErrors.rpc.invalidParams("nativeCurrency is a required field");const D=parseInt(q.chainId,16);return await this.addEthereumChain(D,(S=q.rpcUrls)!==null&&S!==void 0?S:[],(I=q.blockExplorerUrls)!==null&&I!==void 0?I:[],q.chainName,(T=q.iconUrls)!==null&&T!==void 0?T:[],q.nativeCurrency)?{jsonrpc:"2.0",id:0,result:null}:{jsonrpc:"2.0",id:0,error:{code:2,message:"unable to add ethereum chain"}}}async _wallet_switchEthereumChain(l){const R=l[0];return await this.switchEthereumChain(parseInt(R.chainId,16)),{jsonrpc:"2.0",id:0,result:null}}async _wallet_watchAsset(l){const R=Array.isArray(l)?l[0]:l;if(!R.type)throw t.standardErrors.rpc.invalidParams("Type is required");if((R==null?void 0:R.type)!=="ERC20")throw t.standardErrors.rpc.invalidParams(`Asset of type '${R.type}' is not supported`);if(!(R!=null&&R.options))throw t.standardErrors.rpc.invalidParams("Options are required");if(!(R!=null&&R.options.address))throw t.standardErrors.rpc.invalidParams("Address is required");const S=this.getChainId(),{address:I,symbol:T,image:q,decimals:D}=R.options;return{jsonrpc:"2.0",id:0,result:await this.watchAsset(R.type,I,T,D,q,S)}}_eth_uninstallFilter(l){const R=(0,g.ensureHexString)(l[0]);return this._filterPolyfill.uninstallFilter(R)}async _eth_newFilter(l){const R=l[0];return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newFilter(R)}}async _eth_newBlockFilter(){return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newBlockFilter()}}async _eth_newPendingTransactionFilter(){return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newPendingTransactionFilter()}}_eth_getFilterChanges(l){const R=(0,g.ensureHexString)(l[0]);return this._filterPolyfill.getFilterChanges(R)}_eth_getFilterLogs(l){const R=(0,g.ensureHexString)(l[0]);return this._filterPolyfill.getFilterLogs(R)}initializeRelay(){return this._relay?Promise.resolve(this._relay):this._relayProvider().then(l=>(l.setAccountsCallback((R,S)=>this._setAddresses(R,S)),l.setChainCallback((R,S)=>{this.updateProviderInfo(S,parseInt(R,10))}),l.setDappDefaultChainCallback(this._chainIdFromOpts),this._relay=l,l))}};return Dt.CoinbaseWalletProvider=E,Dt}var jr={},jc;function Of(){if(jc)return jr;jc=1,Object.defineProperty(jr,"__esModule",{value:!0}),jr.RelayEventManager=void 0;const e=tt();let r=class{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%2147483647;const t=this._nextRequestId,g=(0,e.prepend0x)(t.toString(16));return this.callbacks.get(g)&&this.callbacks.delete(g),t}};return jr.RelayEventManager=r,jr}var $c;function Uc(){if($c)return tr;$c=1,Object.defineProperty(tr,"__esModule",{value:!0}),tr.CoinbaseWalletSDK=void 0;const e=Ol(),r=Fl(),n=tt(),t=$l(),g=Ns(),i=Yc(),c=Qc(),a=Of(),p=Zc(),u=Kc(),m=Ds();let o=class xl{constructor(s){var f,E,y;this._appName="",this._appLogoUrl=null,this._relay=null,this._relayEventManager=null;const l=s.linkAPIUrl||r.LINK_API_URL;typeof s.overrideIsMetaMask>"u"?this._overrideIsMetaMask=!1:this._overrideIsMetaMask=s.overrideIsMetaMask,this._overrideIsCoinbaseWallet=(f=s.overrideIsCoinbaseWallet)!==null&&f!==void 0?f:!0,this._overrideIsCoinbaseBrowser=(E=s.overrideIsCoinbaseBrowser)!==null&&E!==void 0?E:!1,this._diagnosticLogger=s.diagnosticLogger,this._reloadOnDisconnect=(y=s.reloadOnDisconnect)!==null&&y!==void 0?y:!0;const R=new URL(l),S=`${R.protocol}//${R.host}`;if(this._storage=new t.ScopedLocalStorage(`-walletlink:${S}`),this._storage.setItem("version",xl.VERSION),this.walletExtension||this.coinbaseBrowser)return;this._relayEventManager=new a.RelayEventManager;const I=(0,n.isMobileWeb)(),T=s.uiConstructor||(D=>I?new c.MobileRelayUI(D):new p.WalletLinkRelayUI(D)),q={linkAPIUrl:l,version:m.LIB_VERSION,darkMode:!!s.darkMode,headlessMode:!!s.headlessMode,uiConstructor:T,storage:this._storage,relayEventManager:this._relayEventManager,diagnosticLogger:this._diagnosticLogger,reloadOnDisconnect:this._reloadOnDisconnect,enableMobileWalletLink:s.enableMobileWalletLink};this._relay=I?new i.MobileRelay(q):new u.WalletLinkRelay(q),this.setAppInfo(s.appName,s.appLogoUrl),!s.headlessMode&&this._relay.attachUI()}makeWeb3Provider(s="",f=1){const E=this.walletExtension;if(E)return this.isCipherProvider(E)||E.setProviderInfo(s,f),this._reloadOnDisconnect===!1&&typeof E.disableReloadOnDisconnect=="function"&&E.disableReloadOnDisconnect(),E;const y=this.coinbaseBrowser;if(y)return y;const l=this._relay;if(!l||!this._relayEventManager||!this._storage)throw new Error("Relay not initialized, should never happen");return s||l.setConnectDisabled(!0),new g.CoinbaseWalletProvider({relayProvider:()=>Promise.resolve(l),relayEventManager:this._relayEventManager,storage:this._storage,jsonRpcUrl:s,chainId:f,qrUrl:this.getQrUrl(),diagnosticLogger:this._diagnosticLogger,overrideIsMetaMask:this._overrideIsMetaMask,overrideIsCoinbaseWallet:this._overrideIsCoinbaseWallet,overrideIsCoinbaseBrowser:this._overrideIsCoinbaseBrowser})}setAppInfo(s,f){var E;this._appName=s||"DApp",this._appLogoUrl=f||(0,n.getFavicon)();const y=this.walletExtension;y?this.isCipherProvider(y)||y.setAppInfo(this._appName,this._appLogoUrl):(E=this._relay)===null||E===void 0||E.setAppInfo(this._appName,this._appLogoUrl)}disconnect(){var s;const f=this===null||this===void 0?void 0:this.walletExtension;f?f.close():(s=this._relay)===null||s===void 0||s.resetAndReload()}getQrUrl(){var s,f;return(f=(s=this._relay)===null||s===void 0?void 0:s.getQRCodeUrl())!==null&&f!==void 0?f:null}getCoinbaseWalletLogo(s,f=240){return(0,e.walletLogo)(s,f)}get walletExtension(){var s;return(s=window.coinbaseWalletExtension)!==null&&s!==void 0?s:window.walletLinkExtension}get coinbaseBrowser(){var s,f;try{const E=(s=window.ethereum)!==null&&s!==void 0?s:(f=window.top)===null||f===void 0?void 0:f.ethereum;return E&&"isCoinbaseBrowser"in E&&E.isCoinbaseBrowser?E:void 0}catch{return}}isCipherProvider(s){return typeof s.isCipher=="boolean"&&s.isCipher}};return tr.CoinbaseWalletSDK=o,o.VERSION=m.LIB_VERSION,tr}var Hc;function Ff(){return Hc||(Hc=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CoinbaseWalletProvider=e.CoinbaseWalletSDK=void 0;const r=Uc(),n=Ns();var t=Uc();Object.defineProperty(e,"CoinbaseWalletSDK",{enumerable:!0,get:function(){return t.CoinbaseWalletSDK}});var g=Ns();Object.defineProperty(e,"CoinbaseWalletProvider",{enumerable:!0,get:function(){return g.CoinbaseWalletProvider}}),e.default=r.CoinbaseWalletSDK,typeof window<"u"&&(window.CoinbaseWalletSDK=r.CoinbaseWalletSDK,window.CoinbaseWalletProvider=n.CoinbaseWalletProvider,window.WalletLink=r.CoinbaseWalletSDK,window.WalletLinkProvider=n.CoinbaseWalletProvider)}(xn)),xn}var Df=Ff();const qf=Ll(Df),c0=Object.freeze(Object.defineProperty({__proto__:null,default:qf},Symbol.toStringTag,{value:"Module"}));export{c0 as i}; diff --git a/app/dist/assets/index-DZIMxoKS.js b/app/dist/assets/index-DZIMxoKS.js new file mode 100644 index 0000000..7093097 --- /dev/null +++ b/app/dist/assets/index-DZIMxoKS.js @@ -0,0 +1,47 @@ +import{f as _1,l as v1}from"./index-vLeYm_sl.js";import{r as E1}from"./index-Bmo1X34e.js";import{r as s0,a as a0,b as Vr}from"./sha3-DMa6LAII.js";import{r as j1}from"./events-DQ172AOg.js";function P1(e,o){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function w1(){if(typeof WebSocket<"u")return WebSocket;if(typeof global.WebSocket<"u")return global.WebSocket;if(typeof window.WebSocket<"u")return window.WebSocket;if(typeof self.WebSocket<"u")return self.WebSocket;throw new Error("`WebSocket` is not supported in this environment")}const A1=w1(),T1=Object.freeze(Object.defineProperty({__proto__:null,WebSocket:A1},Symbol.toStringTag,{value:"Module"}));var Tc={},rn={},Sr={},nn={},on={},sn={},an={},rf;function u0(){if(rf)return an;rf=1,Object.defineProperty(an,"__esModule",{value:!0}),an.getSDKVersion=void 0;const e=()=>"9.1.0";return an.getSDKVersion=e,an}var un={},nf;function I1(){if(nf)return un;nf=1,Object.defineProperty(un,"__esModule",{value:!0}),un.generateRequestId=void 0;const e=n=>n.toString(16).padStart(2,"0"),o=n=>{const i=new Uint8Array(n/2);return window.crypto.getRandomValues(i),Array.from(i,e).join("")},r=()=>typeof window<"u"?o(10):new Date().getTime().toString(36);return un.generateRequestId=r,un}var of;function c0(){if(of)return sn;of=1,Object.defineProperty(sn,"__esModule",{value:!0}),sn.MessageFormatter=void 0;const e=u0(),o=I1();class r{}return sn.MessageFormatter=r,r.makeRequest=(n,i)=>({id:(0,o.generateRequestId)(),method:n,params:i,env:{sdkVersion:(0,e.getSDKVersion)()}}),r.makeResponse=(n,i,a)=>({id:n,success:!0,version:a,data:i}),r.makeErrorResponse=(n,i,a)=>({id:n,success:!1,error:i,version:a}),sn}var ar={},sf;function Er(){if(sf)return ar;sf=1,Object.defineProperty(ar,"__esModule",{value:!0}),ar.RestrictedMethods=ar.Methods=void 0;var e;(function(r){r.sendTransactions="sendTransactions",r.rpcCall="rpcCall",r.getChainInfo="getChainInfo",r.getSafeInfo="getSafeInfo",r.getTxBySafeTxHash="getTxBySafeTxHash",r.getSafeBalances="getSafeBalances",r.signMessage="signMessage",r.signTypedMessage="signTypedMessage",r.getEnvironmentInfo="getEnvironmentInfo",r.getOffChainSignature="getOffChainSignature",r.requestAddressBook="requestAddressBook",r.wallet_getPermissions="wallet_getPermissions",r.wallet_requestPermissions="wallet_requestPermissions"})(e||(ar.Methods=e={}));var o;return function(r){r.requestAddressBook="requestAddressBook"}(o||(ar.RestrictedMethods=o={})),ar}var af;function S1(){return af||(af=1,function(e){var o=on.__createBinding||(Object.create?function(a,t,s,u){u===void 0&&(u=s);var d=Object.getOwnPropertyDescriptor(t,s);(!d||("get"in d?!t.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(a,u,d)}:function(a,t,s,u){u===void 0&&(u=s),a[u]=t[s]}),r=on.__exportStar||function(a,t){for(var s in a)s!=="default"&&!Object.prototype.hasOwnProperty.call(t,s)&&o(t,a,s)};Object.defineProperty(e,"__esModule",{value:!0});const n=c0();class i{constructor(t=null,s=!1){this.allowedOrigins=null,this.callbacks=new Map,this.debugMode=!1,this.isServer=typeof window>"u",this.isValidMessage=({origin:u,data:d,source:f})=>{const c=!d,m=!this.isServer&&f===window.parent,g=typeof d.version<"u"&&parseInt(d.version.split(".")[0]),h=typeof g=="number"&&g>=1;let b=!0;return Array.isArray(this.allowedOrigins)&&(b=this.allowedOrigins.find(p=>p.test(u))!==void 0),!c&&m&&h&&b},this.logIncomingMessage=u=>{console.info(`Safe Apps SDK v1: A message was received from origin ${u.origin}. `,u.data)},this.onParentMessage=u=>{this.isValidMessage(u)&&(this.debugMode&&this.logIncomingMessage(u),this.handleIncomingMessage(u.data))},this.handleIncomingMessage=u=>{const{id:d}=u,f=this.callbacks.get(d);f&&(f(u),this.callbacks.delete(d))},this.send=(u,d)=>{const f=n.MessageFormatter.makeRequest(u,d);if(this.isServer)throw new Error("Window doesn't exist");return window.parent.postMessage(f,"*"),new Promise((c,m)=>{this.callbacks.set(f.id,g=>{if(!g.success){m(new Error(g.error));return}c(g)})})},this.allowedOrigins=t,this.debugMode=s,this.isServer||window.addEventListener("message",this.onParentMessage)}}e.default=i,r(Er(),e)}(on)),on}var cn={},dn={},fn={},uf;function R1(){if(uf)return fn;uf=1,Object.defineProperty(fn,"__esModule",{value:!0}),fn.isObjectEIP712TypedData=void 0;const e=o=>typeof o=="object"&&o!=null&&"domain"in o&&"types"in o&&"message"in o;return fn.isObjectEIP712TypedData=e,fn}var Ic={},cf;function B1(){return cf||(cf=1,Object.defineProperty(Ic,"__esModule",{value:!0})),Ic}var Sc={},df;function O1(){return df||(df=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TransferDirection=e.TransactionStatus=e.TokenType=e.Operation=void 0;var o=E1();Object.defineProperty(e,"Operation",{enumerable:!0,get:function(){return o.Operation}}),Object.defineProperty(e,"TokenType",{enumerable:!0,get:function(){return o.TokenType}}),Object.defineProperty(e,"TransactionStatus",{enumerable:!0,get:function(){return o.TransactionStatus}}),Object.defineProperty(e,"TransferDirection",{enumerable:!0,get:function(){return o.TransferDirection}})}(Sc)),Sc}var Rc={},ff;function C1(){return ff||(ff=1,Object.defineProperty(Rc,"__esModule",{value:!0}),Er()),Rc}var lf;function Xc(){return lf||(lf=1,function(e){var o=dn.__createBinding||(Object.create?function(n,i,a,t){t===void 0&&(t=a);var s=Object.getOwnPropertyDescriptor(i,a);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,t,s)}:function(n,i,a,t){t===void 0&&(t=a),n[t]=i[a]}),r=dn.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&o(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(R1(),e),r(B1(),e),r(O1(),e),r(C1(),e)}(dn)),dn}var mf;function x1(){if(mf)return cn;mf=1,Object.defineProperty(cn,"__esModule",{value:!0}),cn.TXs=void 0;const e=Er(),o=Xc();class r{constructor(i){this.communicator=i}async getBySafeTxHash(i){if(!i)throw new Error("Invalid safeTxHash");return(await this.communicator.send(e.Methods.getTxBySafeTxHash,{safeTxHash:i})).data}async signMessage(i){const a={message:i};return(await this.communicator.send(e.Methods.signMessage,a)).data}async signTypedMessage(i){if(!(0,o.isObjectEIP712TypedData)(i))throw new Error("Invalid typed data");return(await this.communicator.send(e.Methods.signTypedMessage,{typedData:i})).data}async send({txs:i,params:a}){if(!i||!i.length)throw new Error("No transactions were passed");const t={txs:i,params:a};return(await this.communicator.send(e.Methods.sendTransactions,t)).data}}return cn.TXs=r,cn}var ln={},mn={},bf;function Qc(){return bf||(bf=1,Object.defineProperty(mn,"__esModule",{value:!0}),mn.RPC_CALLS=void 0,mn.RPC_CALLS={eth_call:"eth_call",eth_gasPrice:"eth_gasPrice",eth_getLogs:"eth_getLogs",eth_getBalance:"eth_getBalance",eth_getCode:"eth_getCode",eth_getBlockByHash:"eth_getBlockByHash",eth_getBlockByNumber:"eth_getBlockByNumber",eth_getStorageAt:"eth_getStorageAt",eth_getTransactionByHash:"eth_getTransactionByHash",eth_getTransactionReceipt:"eth_getTransactionReceipt",eth_getTransactionCount:"eth_getTransactionCount",eth_estimateGas:"eth_estimateGas",safe_setSettings:"safe_setSettings"}),mn}var hf;function q1(){if(hf)return ln;hf=1,Object.defineProperty(ln,"__esModule",{value:!0}),ln.Eth=void 0;const e=Qc(),o=Er(),r={defaultBlockParam:(i="latest")=>i,returnFullTxObjectParam:(i=!1)=>i,blockNumberToHex:i=>Number.isInteger(i)?`0x${i.toString(16)}`:i};class n{constructor(a){this.communicator=a,this.call=this.buildRequest({call:e.RPC_CALLS.eth_call,formatters:[null,r.defaultBlockParam]}),this.getBalance=this.buildRequest({call:e.RPC_CALLS.eth_getBalance,formatters:[null,r.defaultBlockParam]}),this.getCode=this.buildRequest({call:e.RPC_CALLS.eth_getCode,formatters:[null,r.defaultBlockParam]}),this.getStorageAt=this.buildRequest({call:e.RPC_CALLS.eth_getStorageAt,formatters:[null,r.blockNumberToHex,r.defaultBlockParam]}),this.getPastLogs=this.buildRequest({call:e.RPC_CALLS.eth_getLogs}),this.getBlockByHash=this.buildRequest({call:e.RPC_CALLS.eth_getBlockByHash,formatters:[null,r.returnFullTxObjectParam]}),this.getBlockByNumber=this.buildRequest({call:e.RPC_CALLS.eth_getBlockByNumber,formatters:[r.blockNumberToHex,r.returnFullTxObjectParam]}),this.getTransactionByHash=this.buildRequest({call:e.RPC_CALLS.eth_getTransactionByHash}),this.getTransactionReceipt=this.buildRequest({call:e.RPC_CALLS.eth_getTransactionReceipt}),this.getTransactionCount=this.buildRequest({call:e.RPC_CALLS.eth_getTransactionCount,formatters:[null,r.defaultBlockParam]}),this.getGasPrice=this.buildRequest({call:e.RPC_CALLS.eth_gasPrice}),this.getEstimateGas=t=>this.buildRequest({call:e.RPC_CALLS.eth_estimateGas})([t]),this.setSafeSettings=this.buildRequest({call:e.RPC_CALLS.safe_setSettings})}buildRequest(a){const{call:t,formatters:s}=a;return async u=>{s&&Array.isArray(u)&&s.forEach((c,m)=>{c&&(u[m]=c(u[m]))});const d={call:t,params:u||[]};return(await this.communicator.send(o.Methods.rpcCall,d)).data}}}return ln.Eth=n,ln}var ur={},Bc={},Oc={},bn={},hn={},yf;function M1(){return yf||(yf=1,Object.defineProperty(hn,"__esModule",{value:!0}),hn.version=void 0,hn.version="1.0.8"),hn}var gf;function Wr(){if(gf)return bn;gf=1,Object.defineProperty(bn,"__esModule",{value:!0}),bn.BaseError=void 0;const e=M1();class o extends Error{constructor(n,i={}){var u;const a=i.cause instanceof o?i.cause.details:(u=i.cause)!=null&&u.message?i.cause.message:i.details,t=i.cause instanceof o&&i.cause.docsPath||i.docsPath,s=[n||"An error occurred.","",...i.metaMessages?[...i.metaMessages,""]:[],...t?[`Docs: https://abitype.dev${t}`]:[],...a?[`Details: ${a}`]:[],`Version: abitype@${e.version}`].join(` +`);super(s),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,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),i.cause&&(this.cause=i.cause),this.details=a,this.docsPath=t,this.metaMessages=i.metaMessages,this.shortMessage=n}}return bn.BaseError=o,bn}var Bo={},pf;function k1(){if(pf)return Bo;pf=1,Object.defineProperty(Bo,"__esModule",{value:!0}),Bo.narrow=e;function e(o){return o}return Bo}var Oo={},Co={},xo={},qo={},dt={},_f;function Cu(){if(_f)return dt;_f=1,Object.defineProperty(dt,"__esModule",{value:!0}),dt.isTupleRegex=dt.integerRegex=dt.bytesRegex=void 0,dt.execTyped=e;function e(o,r){const n=o.exec(r);return n==null?void 0:n.groups}return dt.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,dt.integerRegex=/^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)?$/,dt.isTupleRegex=/^\(.+?\).*?$/,dt}var vf;function d0(){if(vf)return qo;vf=1,Object.defineProperty(qo,"__esModule",{value:!0}),qo.formatAbiParameter=r;const e=Cu(),o=/^tuple(?(\[(\d*)\])*)$/;function r(n){let i=n.type;if(o.test(n.type)&&"components"in n){i="(";const a=n.components.length;for(let s=0;s[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/;function r(E){return o.test(E)}function n(E){return(0,e.execTyped)(o,E)}const i=/^event (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/;function a(E){return i.test(E)}function t(E){return(0,e.execTyped)(i,E)}const s=/^function (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)(?: (?external|public{1}))?(?: (?pure|view|nonpayable|payable{1}))?(?: returns\s?\((?.*?)\))?$/;function u(E){return s.test(E)}function d(E){return(0,e.execTyped)(s,E)}const f=/^struct (?[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?.*?)\}$/;function c(E){return f.test(E)}function m(E){return(0,e.execTyped)(f,E)}const g=/^constructor\((?.*?)\)(?:\s(?payable{1}))?$/;function h(E){return g.test(E)}function b(E){return(0,e.execTyped)(g,E)}const p=/^fallback\(\) external(?:\s(?payable{1}))?$/;function _(E){return p.test(E)}function j(E){return(0,e.execTyped)(p,E)}const P=/^receive\(\) external payable$/;function v(E){return P.test(E)}return Ee.modifiers=new Set(["memory","indexed","storage","calldata"]),Ee.eventModifiers=new Set(["indexed"]),Ee.functionModifiers=new Set(["calldata","memory","storage"]),Ee}var ko={},bt={},Af;function xu(){if(Af)return bt;Af=1,Object.defineProperty(bt,"__esModule",{value:!0}),bt.UnknownSolidityTypeError=bt.UnknownTypeError=bt.InvalidAbiItemError=void 0;const e=Wr();class o extends e.BaseError{constructor({signature:a}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(a,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}bt.InvalidAbiItemError=o;class r extends e.BaseError{constructor({type:a}){super("Unknown type.",{metaMessages:[`Type "${a}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}bt.UnknownTypeError=r;class n extends e.BaseError{constructor({type:a}){super("Unknown type.",{metaMessages:[`Type "${a}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}return bt.UnknownSolidityTypeError=n,bt}var Re={},Tf;function ro(){if(Tf)return Re;Tf=1,Object.defineProperty(Re,"__esModule",{value:!0}),Re.InvalidAbiTypeParameterError=Re.InvalidFunctionModifierError=Re.InvalidModifierError=Re.SolidityProtectedKeywordError=Re.InvalidParameterError=Re.InvalidAbiParametersError=Re.InvalidAbiParameterError=void 0;const e=Wr();class o extends e.BaseError{constructor({param:d}){super("Failed to parse ABI parameter.",{details:`parseAbiParameter(${JSON.stringify(d,null,2)})`,docsPath:"/api/human#parseabiparameter-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParameterError"})}}Re.InvalidAbiParameterError=o;class r extends e.BaseError{constructor({params:d}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(d,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}Re.InvalidAbiParametersError=r;class n extends e.BaseError{constructor({param:d}){super("Invalid ABI parameter.",{details:d}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}Re.InvalidParameterError=n;class i extends e.BaseError{constructor({param:d,name:f}){super("Invalid ABI parameter.",{details:d,metaMessages:[`"${f}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}Re.SolidityProtectedKeywordError=i;class a extends e.BaseError{constructor({param:d,type:f,modifier:c}){super("Invalid ABI parameter.",{details:d,metaMessages:[`Modifier "${c}" not allowed${f?` in "${f}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}Re.InvalidModifierError=a;class t extends e.BaseError{constructor({param:d,type:f,modifier:c}){super("Invalid ABI parameter.",{details:d,metaMessages:[`Modifier "${c}" not allowed${f?` in "${f}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${c}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}Re.InvalidFunctionModifierError=t;class s extends e.BaseError{constructor({abiParameter:d}){super("Invalid ABI parameter.",{details:JSON.stringify(d,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}return Re.InvalidAbiTypeParameterError=s,Re}var ht={},If;function ed(){if(If)return ht;If=1,Object.defineProperty(ht,"__esModule",{value:!0}),ht.InvalidStructSignatureError=ht.UnknownSignatureError=ht.InvalidSignatureError=void 0;const e=Wr();class o extends e.BaseError{constructor({signature:a,type:t}){super(`Invalid ${t} signature.`,{details:a}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}ht.InvalidSignatureError=o;class r extends e.BaseError{constructor({signature:a}){super("Unknown signature.",{details:a}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}ht.UnknownSignatureError=r;class n extends e.BaseError{constructor({signature:a}){super("Invalid struct signature.",{details:a,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}return ht.InvalidStructSignatureError=n,ht}var yn={},Sf;function m0(){if(Sf)return yn;Sf=1,Object.defineProperty(yn,"__esModule",{value:!0}),yn.CircularReferenceError=void 0;const e=Wr();class o extends e.BaseError{constructor({type:n}){super("Circular reference detected.",{metaMessages:[`Struct "${n}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}return yn.CircularReferenceError=o,yn}var He={},gn={},Rf;function b0(){if(Rf)return gn;Rf=1,Object.defineProperty(gn,"__esModule",{value:!0}),gn.InvalidParenthesisError=void 0;const e=Wr();class o extends e.BaseError{constructor({current:n,depth:i}){super("Unbalanced parentheses.",{metaMessages:[`"${n.trim()}" has too many ${i>0?"opening":"closing"} parentheses.`],details:`Depth "${i}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}return gn.InvalidParenthesisError=o,gn}var Rr={},Bf;function $1(){if(Bf)return Rr;Bf=1,Object.defineProperty(Rr,"__esModule",{value:!0}),Rr.parameterCache=void 0,Rr.getParameterCacheKey=e;function e(o,r,n){let i="";if(n)for(const a of Object.entries(n)){if(!a)continue;let t="";for(const s of a[1])t+=`[${s.type}${s.name?`:${s.name}`:""}]`;i+=`(${a[0]}{${t}})`}return r?`${r}:${o}${i}`:o}return Rr.parameterCache=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]),Rr}var Of;function Gr(){if(Of)return He;Of=1,Object.defineProperty(He,"__esModule",{value:!0}),He.parseSignature=s,He.parseFunctionSignature=u,He.parseEventSignature=d,He.parseErrorSignature=f,He.parseConstructorSignature=c,He.parseFallbackSignature=m,He.parseAbiParameter=p,He.splitParameters=_,He.isSolidityType=j,He.isSolidityKeyword=v,He.isValidDataLocation=E;const e=Cu(),o=xu(),r=ro(),n=ed(),i=b0(),a=$1(),t=Kr();function s(l,y={}){if((0,t.isFunctionSignature)(l))return u(l,y);if((0,t.isEventSignature)(l))return d(l,y);if((0,t.isErrorSignature)(l))return f(l,y);if((0,t.isConstructorSignature)(l))return c(l,y);if((0,t.isFallbackSignature)(l))return m(l);if((0,t.isReceiveSignature)(l))return{type:"receive",stateMutability:"payable"};throw new n.UnknownSignatureError({signature:l})}function u(l,y={}){const I=(0,t.execFunctionSignature)(l);if(!I)throw new n.InvalidSignatureError({signature:l,type:"function"});const w=_(I.parameters),B=[],q=w.length;for(let O=0;O[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,h=/^\((?.+?)\)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,b=/^u?int$/;function p(l,y){var k,$;const I=(0,a.getParameterCacheKey)(l,y==null?void 0:y.type,y==null?void 0:y.structs);if(a.parameterCache.has(I))return a.parameterCache.get(I);const w=e.isTupleRegex.test(l),B=(0,e.execTyped)(w?h:g,l);if(!B)throw new r.InvalidParameterError({param:l});if(B.name&&v(B.name))throw new r.SolidityProtectedKeywordError({param:l,name:B.name});const q=B.name?{name:B.name}:{},T=B.modifier==="indexed"?{indexed:!0}:{},O=(y==null?void 0:y.structs)??{};let A,x={};if(w){A="tuple";const M=_(B.type),S=[],R=M.length;for(let C=0;C[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\[\d*?\])+?)?$/;function d(f,c,m=new Set){const g=[],h=f.length;for(let b=0;br(o,t)}return No}var zo={},Uo={},ne={},pn={},Hf;function St(){if(Hf)return pn;Hf=1,Object.defineProperty(pn,"__esModule",{value:!0}),pn.formatAbiItem=o,pn.formatAbiParams=r;const e=_e();function o(i,{includeName:a=!1}={}){if(i.type!=="function"&&i.type!=="event"&&i.type!=="error")throw new e.InvalidDefinitionTypeError(i.type);return`${i.name}(${r(i.inputs,{includeName:a})})`}function r(i,{includeName:a=!1}={}){return i?i.map(t=>n(t,{includeName:a})).join(a?", ":","):""}function n(i,{includeName:a}){return i.type.startsWith("tuple")?`(${r(i.components,{includeName:a})})${i.type.slice(5)}`:i.type+(a&&i.name?` ${i.name}`:"")}return pn}var Lo={},Do={},Nf;function ke(){if(Nf)return Do;Nf=1,Object.defineProperty(Do,"__esModule",{value:!0}),Do.isHex=e;function e(o,{strict:r=!0}={}){return!o||typeof o!="string"?!1:r?/^0x[0-9a-fA-F]*$/.test(o):o.startsWith("0x")}return Do}var zf;function Ve(){if(zf)return Lo;zf=1,Object.defineProperty(Lo,"__esModule",{value:!0}),Lo.size=o;const e=ke();function o(r){return(0,e.isHex)(r,{strict:!1})?Math.ceil((r.length-2)/2):r.length}return Lo}var Or={},_n={},Uf;function L1(){return Uf||(Uf=1,Object.defineProperty(_n,"__esModule",{value:!0}),_n.version=void 0,_n.version="2.23.0"),_n}var Lf;function se(){if(Lf)return Or;Lf=1,Object.defineProperty(Or,"__esModule",{value:!0}),Or.BaseError=void 0,Or.setErrorConfig=r;const e=L1();let o={getDocsUrl:({docsBaseUrl:a,docsPath:t="",docsSlug:s})=>t?`${a??"https://viem.sh"}${t}${s?`#${s}`:""}`:void 0,version:`viem@${e.version}`};function r(a){o=a}class n extends Error{constructor(t,s={}){var m;const u=(()=>{var g;return s.cause instanceof n?s.cause.details:(g=s.cause)!=null&&g.message?s.cause.message:s.details})(),d=s.cause instanceof n&&s.cause.docsPath||s.docsPath,f=(m=o.getDocsUrl)==null?void 0:m.call(o,{...s,docsPath:d}),c=[t||"An error occurred.","",...s.metaMessages?[...s.metaMessages,""]:[],...f?[`Docs: ${f}`]:[],...u?[`Details: ${u}`]:[],...o.version?[`Version: ${o.version}`]:[]].join(` +`);super(c,s.cause?{cause:s.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=u,this.docsPath=d,this.metaMessages=s.metaMessages,this.name=s.name??this.name,this.shortMessage=t,this.version=e.version}walk(t){return i(this,t)}}Or.BaseError=n;function i(a,t){return t!=null&&t(a)?a:a&&typeof a=="object"&&"cause"in a&&a.cause!==void 0?i(a.cause,t):t?null:a}return Or}var Df;function _e(){if(Df)return ne;Df=1,Object.defineProperty(ne,"__esModule",{value:!0}),ne.UnsupportedPackedAbiType=ne.InvalidDefinitionTypeError=ne.InvalidArrayError=ne.InvalidAbiDecodingTypeError=ne.InvalidAbiEncodingTypeError=ne.DecodeLogTopicsMismatch=ne.DecodeLogDataMismatch=ne.BytesSizeMismatchError=ne.AbiItemAmbiguityError=ne.AbiFunctionSignatureNotFoundError=ne.AbiFunctionOutputsNotFoundError=ne.AbiFunctionNotFoundError=ne.AbiEventNotFoundError=ne.AbiEventSignatureNotFoundError=ne.AbiEventSignatureEmptyTopicsError=ne.AbiErrorSignatureNotFoundError=ne.AbiErrorNotFoundError=ne.AbiErrorInputsNotFoundError=ne.AbiEncodingLengthMismatchError=ne.AbiEncodingBytesSizeMismatchError=ne.AbiEncodingArrayLengthMismatchError=ne.AbiDecodingZeroDataError=ne.AbiDecodingDataSizeTooSmallError=ne.AbiDecodingDataSizeInvalidError=ne.AbiConstructorParamsNotFoundError=ne.AbiConstructorNotFoundError=void 0;const e=St(),o=Ve(),r=se();class n extends r.BaseError{constructor({docsPath:A}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(` +`),{docsPath:A,name:"AbiConstructorNotFoundError"})}}ne.AbiConstructorNotFoundError=n;class i extends r.BaseError{constructor({docsPath:A}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(` +`),{docsPath:A,name:"AbiConstructorParamsNotFoundError"})}}ne.AbiConstructorParamsNotFoundError=i;class a extends r.BaseError{constructor({data:A,size:x}){super([`Data size of ${x} bytes is invalid.`,"Size must be in increments of 32 bytes (size % 32 === 0)."].join(` +`),{metaMessages:[`Data: ${A} (${x} bytes)`],name:"AbiDecodingDataSizeInvalidError"})}}ne.AbiDecodingDataSizeInvalidError=a;class t extends r.BaseError{constructor({data:A,params:x,size:F}){super([`Data size of ${F} bytes is too small for given parameters.`].join(` +`),{metaMessages:[`Params: (${(0,e.formatAbiParams)(x,{includeName:!0})})`,`Data: ${A} (${F} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=A,this.params=x,this.size=F}}ne.AbiDecodingDataSizeTooSmallError=t;class s extends r.BaseError{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}}ne.AbiDecodingZeroDataError=s;class u extends r.BaseError{constructor({expectedLength:A,givenLength:x,type:F}){super([`ABI encoding array length mismatch for type ${F}.`,`Expected length: ${A}`,`Given length: ${x}`].join(` +`),{name:"AbiEncodingArrayLengthMismatchError"})}}ne.AbiEncodingArrayLengthMismatchError=u;class d extends r.BaseError{constructor({expectedSize:A,value:x}){super(`Size of bytes "${x}" (bytes${(0,o.size)(x)}) does not match expected size (bytes${A}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}ne.AbiEncodingBytesSizeMismatchError=d;class f extends r.BaseError{constructor({expectedLength:A,givenLength:x}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${A}`,`Given length (values): ${x}`].join(` +`),{name:"AbiEncodingLengthMismatchError"})}}ne.AbiEncodingLengthMismatchError=f;class c extends r.BaseError{constructor(A,{docsPath:x}){super([`Arguments (\`args\`) were provided to "${A}", but "${A}" on the ABI does not contain any parameters (\`inputs\`).`,"Cannot encode error result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the inputs exist on it."].join(` +`),{docsPath:x,name:"AbiErrorInputsNotFoundError"})}}ne.AbiErrorInputsNotFoundError=c;class m extends r.BaseError{constructor(A,{docsPath:x}={}){super([`Error ${A?`"${A}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it."].join(` +`),{docsPath:x,name:"AbiErrorNotFoundError"})}}ne.AbiErrorNotFoundError=m;class g extends r.BaseError{constructor(A,{docsPath:x}){super([`Encoded error signature "${A}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${A}.`].join(` +`),{docsPath:x,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=A}}ne.AbiErrorSignatureNotFoundError=g;class h extends r.BaseError{constructor({docsPath:A}){super("Cannot extract event signature from empty topics.",{docsPath:A,name:"AbiEventSignatureEmptyTopicsError"})}}ne.AbiEventSignatureEmptyTopicsError=h;class b extends r.BaseError{constructor(A,{docsPath:x}){super([`Encoded event signature "${A}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${A}.`].join(` +`),{docsPath:x,name:"AbiEventSignatureNotFoundError"})}}ne.AbiEventSignatureNotFoundError=b;class p extends r.BaseError{constructor(A,{docsPath:x}={}){super([`Event ${A?`"${A}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join(` +`),{docsPath:x,name:"AbiEventNotFoundError"})}}ne.AbiEventNotFoundError=p;class _ extends r.BaseError{constructor(A,{docsPath:x}={}){super([`Function ${A?`"${A}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(` +`),{docsPath:x,name:"AbiFunctionNotFoundError"})}}ne.AbiFunctionNotFoundError=_;class j extends r.BaseError{constructor(A,{docsPath:x}){super([`Function "${A}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join(` +`),{docsPath:x,name:"AbiFunctionOutputsNotFoundError"})}}ne.AbiFunctionOutputsNotFoundError=j;class P extends r.BaseError{constructor(A,{docsPath:x}){super([`Encoded function signature "${A}" not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${A}.`].join(` +`),{docsPath:x,name:"AbiFunctionSignatureNotFoundError"})}}ne.AbiFunctionSignatureNotFoundError=P;class v extends r.BaseError{constructor(A,x){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${A.type}\` in \`${(0,e.formatAbiItem)(A.abiItem)}\`, and`,`\`${x.type}\` in \`${(0,e.formatAbiItem)(x.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}ne.AbiItemAmbiguityError=v;class E extends r.BaseError{constructor({expectedSize:A,givenSize:x}){super(`Expected bytes${A}, got bytes${x}.`,{name:"BytesSizeMismatchError"})}}ne.BytesSizeMismatchError=E;class l extends r.BaseError{constructor({abiItem:A,data:x,params:F,size:k}){super([`Data size of ${k} bytes is too small for non-indexed event parameters.`].join(` +`),{metaMessages:[`Params: (${(0,e.formatAbiParams)(F,{includeName:!0})})`,`Data: ${x} (${k} bytes)`],name:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=A,this.data=x,this.params=F,this.size=k}}ne.DecodeLogDataMismatch=l;class y extends r.BaseError{constructor({abiItem:A,param:x}){super([`Expected a topic for indexed event parameter${x.name?` "${x.name}"`:""} on event "${(0,e.formatAbiItem)(A,{includeName:!0})}".`].join(` +`),{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=A}}ne.DecodeLogTopicsMismatch=y;class I extends r.BaseError{constructor(A,{docsPath:x}){super([`Type "${A}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(` +`),{docsPath:x,name:"InvalidAbiEncodingType"})}}ne.InvalidAbiEncodingTypeError=I;class w extends r.BaseError{constructor(A,{docsPath:x}){super([`Type "${A}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(` +`),{docsPath:x,name:"InvalidAbiDecodingType"})}}ne.InvalidAbiDecodingTypeError=w;class B extends r.BaseError{constructor(A){super([`Value "${A}" is not a valid array.`].join(` +`),{name:"InvalidArrayError"})}}ne.InvalidArrayError=B;class q extends r.BaseError{constructor(A){super([`"${A}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(` +`),{name:"InvalidDefinitionTypeError"})}}ne.InvalidDefinitionTypeError=q;class T extends r.BaseError{constructor(A){super(`Type "${A}" is not supported for packed encoding.`,{name:"UnsupportedPackedAbiType"})}}return ne.UnsupportedPackedAbiType=T,ne}var vn={},Gf;function h0(){if(Gf)return vn;Gf=1,Object.defineProperty(vn,"__esModule",{value:!0}),vn.FilterTypeNotSupportedError=void 0;const e=se();class o extends e.BaseError{constructor(n){super(`Filter type "${n}" is not supported.`,{name:"FilterTypeNotSupportedError"})}}return vn.FilterTypeNotSupportedError=o,vn}var Ht={},Cr={},yt={},Vf;function Mu(){if(Vf)return yt;Vf=1,Object.defineProperty(yt,"__esModule",{value:!0}),yt.InvalidBytesLengthError=yt.SizeExceedsPaddingSizeError=yt.SliceOffsetOutOfBoundsError=void 0;const e=se();class o extends e.BaseError{constructor({offset:a,position:t,size:s}){super(`Slice ${t==="start"?"starting":"ending"} at offset "${a}" is out-of-bounds (size: ${s}).`,{name:"SliceOffsetOutOfBoundsError"})}}yt.SliceOffsetOutOfBoundsError=o;class r extends e.BaseError{constructor({size:a,targetSize:t,type:s}){super(`${s.charAt(0).toUpperCase()}${s.slice(1).toLowerCase()} size (${a}) exceeds padding size (${t}).`,{name:"SizeExceedsPaddingSizeError"})}}yt.SizeExceedsPaddingSizeError=r;class n extends e.BaseError{constructor({size:a,targetSize:t,type:s}){super(`${s.charAt(0).toUpperCase()}${s.slice(1).toLowerCase()} is expected to be ${t} ${s} long, but is ${a} ${s} long.`,{name:"InvalidBytesLengthError"})}}return yt.InvalidBytesLengthError=n,yt}var Wf;function Zt(){if(Wf)return Cr;Wf=1,Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.pad=o,Cr.padHex=r,Cr.padBytes=n;const e=Mu();function o(i,{dir:a,size:t=32}={}){return typeof i=="string"?r(i,{dir:a,size:t}):n(i,{dir:a,size:t})}function r(i,{dir:a,size:t=32}={}){if(t===null)return i;const s=i.replace("0x","");if(s.length>t*2)throw new e.SizeExceedsPaddingSizeError({size:Math.ceil(s.length/2),targetSize:t,type:"hex"});return`0x${s[a==="right"?"padEnd":"padStart"](t*2,"0")}`}function n(i,{dir:a,size:t=32}={}){if(t===null)return i;if(i.length>t)throw new e.SizeExceedsPaddingSizeError({size:i.length,targetSize:t,type:"bytes"});const s=new Uint8Array(t);for(let u=0;uc)throw new e.SizeOverflowError({givenSize:(0,o.size)(f),maxSize:c})}function a(f,c){const m=typeof c=="string"?{to:c}:c,g=m.to;return g==="number"?u(f,m):g==="bigint"?t(f,m):g==="string"?d(f,m):g==="boolean"?s(f,m):(0,n.hexToBytes)(f,m)}function t(f,c={}){const{signed:m}=c;c.size&&i(f,{size:c.size});const g=BigInt(f);if(!m)return g;const h=(f.length-2)/2,b=(1n<c.toString(16).padStart(2,"0"));function i(f,c={}){return typeof f=="number"||typeof f=="bigint"?s(f,c):typeof f=="string"?d(f,c):typeof f=="boolean"?a(f,c):t(f,c)}function a(f,c={}){const m=`0x${Number(f)}`;return typeof c.size=="number"?((0,r.assertSize)(m,{size:c.size}),(0,o.pad)(m,{size:c.size})):m}function t(f,c={}){let m="";for(let h=0;hb||h=u.zero&&g<=u.nine)return g-u.zero;if(g>=u.A&&g<=u.F)return g-(u.A-10);if(g>=u.a&&g<=u.f)return g-(u.a-10)}function f(g,h={}){let b=g;h.size&&((0,n.assertSize)(b,{size:h.size}),b=(0,r.pad)(b,{dir:"right",size:h.size}));let p=b.slice(2);p.length%2&&(p=`0${p}`);const _=p.length/2,j=new Uint8Array(_);for(let P=0,v=0;P<_;P++){const E=d(p.charCodeAt(v++)),l=d(p.charCodeAt(v++));if(E===void 0||l===void 0)throw new e.BaseError(`Invalid byte sequence ("${p[v-2]}${p[v-1]}" in "${p}").`);j[P]=E*16+l}return j}function c(g,h){const b=(0,i.numberToHex)(g,h);return f(b)}function m(g,h={}){const b=a.encode(g);return typeof h.size=="number"?((0,n.assertSize)(b,{size:h.size}),(0,r.pad)(b,{dir:"right",size:h.size})):b}return Ht}var Vo={},Qf;function Ne(){if(Qf)return Vo;Qf=1,Object.defineProperty(Vo,"__esModule",{value:!0}),Vo.keccak256=i;const e=s0(),o=ke(),r=he(),n=te();function i(a,t){const s=t||"hex",u=(0,e.keccak_256)((0,o.isHex)(a,{strict:!1})?(0,r.toBytes)(a):a);return s==="bytes"?u:(0,n.toHex)(u)}return Vo}var En={},Wo={},Ko={},el;function D1(){if(el)return Ko;el=1,Object.defineProperty(Ko,"__esModule",{value:!0}),Ko.hashSignature=n;const e=he(),o=Ne(),r=i=>(0,o.keccak256)((0,e.toBytes)(i));function n(i){return r(i)}return Ko}var jn={},Zo={},tl;function G1(){if(tl)return Zo;tl=1,Object.defineProperty(Zo,"__esModule",{value:!0}),Zo.normalizeSignature=o;const e=se();function o(r){let n=!0,i="",a=0,t="",s=!1;for(let u=0;u{const i=typeof n=="string"?n:(0,e.formatAbiItem)(n);return(0,o.normalizeSignature)(i)};return jn.toSignature=r,jn}var nl;function ku(){if(nl)return Wo;nl=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.toSignatureHash=r;const e=D1(),o=td();function r(n){return(0,e.hashSignature)((0,o.toSignature)(n))}return Wo}var ol;function Jr(){if(ol)return En;ol=1,Object.defineProperty(En,"__esModule",{value:!0}),En.toEventSelector=void 0;const e=ku();return En.toEventSelector=e.toSignatureHash,En}var Pn={},wn={},il;function ot(){if(il)return wn;il=1,Object.defineProperty(wn,"__esModule",{value:!0}),wn.InvalidAddressError=void 0;const e=se();class o extends e.BaseError{constructor({address:n}){super(`Address "${n}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}return wn.InvalidAddressError=o,wn}var Cc={},An={},sl;function no(){if(sl)return An;sl=1,Object.defineProperty(An,"__esModule",{value:!0}),An.LruMap=void 0;class e extends Map{constructor(r){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=r}get(r){const n=super.get(r);return super.has(r)&&n!==void 0&&(this.delete(r),super.set(r,n)),n}set(r,n){if(super.set(r,n),this.maxSize&&this.size>this.maxSize){const i=this.keys().next().value;i&&this.delete(i)}return this}}return An.LruMap=e,An}var Tn={},al;function Je(){if(al)return Tn;al=1,Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.checksumAddress=t,Tn.getAddress=s;const e=ot(),o=he(),r=Ne(),n=no(),i=We(),a=new n.LruMap(8192);function t(u,d){if(a.has(`${u}.${d}`))return a.get(`${u}.${d}`);const f=d?`${d}${u.toLowerCase()}`:u.substring(2).toLowerCase(),c=(0,r.keccak256)((0,o.stringToBytes)(f),"bytes"),m=(d?f.substring(`${d}0x`.length):f).split("");for(let h=0;h<40;h+=2)c[h>>1]>>4>=8&&m[h]&&(m[h]=m[h].toUpperCase()),(c[h>>1]&15)>=8&&m[h+1]&&(m[h+1]=m[h+1].toUpperCase());const g=`0x${m.join("")}`;return a.set(`${u}.${d}`,g),g}function s(u,d){if(!(0,i.isAddress)(u,{strict:!1}))throw new e.InvalidAddressError({address:u});return t(u,d)}return Tn}var ul;function We(){return ul||(ul=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isAddressCache=void 0,e.isAddress=i;const o=no(),r=Je(),n=/^0x[a-fA-F0-9]{40}$/;e.isAddressCache=new o.LruMap(8192);function i(a,t){const{strict:s=!0}=t??{},u=`${a}.${s}`;if(e.isAddressCache.has(u))return e.isAddressCache.get(u);const d=n.test(a)?a.toLowerCase()===a?!0:s?(0,r.checksumAddress)(a)===a:!0:!1;return e.isAddressCache.set(u,d),d}}(Cc)),Cc}var xr={},cl;function Fe(){if(cl)return xr;cl=1,Object.defineProperty(xr,"__esModule",{value:!0}),xr.concat=e,xr.concatBytes=o,xr.concatHex=r;function e(n){return typeof n[0]=="string"?r(n):o(n)}function o(n){let i=0;for(const s of n)i+=s.length;const a=new Uint8Array(i);let t=0;for(const s of n)a.set(s,t),t+=s.length;return a}function r(n){return`0x${n.reduce((i,a)=>i+a.replace("0x",""),"")}`}return xr}var qr={},dl;function it(){if(dl)return qr;dl=1,Object.defineProperty(qr,"__esModule",{value:!0}),qr.slice=n,qr.sliceBytes=t,qr.sliceHex=s;const e=Mu(),o=ke(),r=Ve();function n(u,d,f,{strict:c}={}){return(0,o.isHex)(u,{strict:!1})?s(u,d,f,{strict:c}):t(u,d,f,{strict:c})}function i(u,d){if(typeof d=="number"&&d>0&&d>(0,r.size)(u)-1)throw new e.SliceOffsetOutOfBoundsError({offset:d,position:"start",size:(0,r.size)(u)})}function a(u,d,f){if(typeof d=="number"&&typeof f=="number"&&(0,r.size)(u)!==f-d)throw new e.SliceOffsetOutOfBoundsError({offset:f,position:"end",size:(0,r.size)(u)})}function t(u,d,f,{strict:c}={}){i(u,d);const m=u.slice(d,f);return c&&a(m,d,f),m}function s(u,d,f,{strict:c}={}){i(u,d);const m=`0x${u.replace("0x","").slice((d??0)*2,(f??u.length)*2)}`;return c&&a(m,d,f),m}return qr}var pt={},fl;function Fu(){return fl||(fl=1,Object.defineProperty(pt,"__esModule",{value:!0}),pt.integerRegex=pt.bytesRegex=pt.arrayRegex=void 0,pt.arrayRegex=/^(.*)\[([0-9]*)\]$/,pt.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,pt.integerRegex=/^(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)?$/),pt}var ll;function st(){if(ll)return Pn;ll=1,Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.encodeAbiParameters=c,Pn.getArrayComponents=l;const e=_e(),o=ot(),r=se(),n=Zr(),i=We(),a=Fe(),t=Zt(),s=Ve(),u=it(),d=te(),f=Fu();function c(y,I){if(y.length!==I.length)throw new e.AbiEncodingLengthMismatchError({expectedLength:y.length,givenLength:I.length});const w=m({params:y,values:I}),B=h(w);return B.length===0?"0x":B}function m({params:y,values:I}){const w=[];for(let B=0;B0?(0,a.concat)([A,O]):A}}if(q)return{dynamic:!0,encoded:O}}return{dynamic:!1,encoded:(0,a.concat)(T.map(({encoded:O})=>O))}}function _(y,{param:I}){const[,w]=I.type.split("bytes"),B=(0,s.size)(y);if(!w){let q=y;return B%32!==0&&(q=(0,t.padHex)(q,{dir:"right",size:Math.ceil((y.length-2)/2/32)*32})),{dynamic:!0,encoded:(0,a.concat)([(0,t.padHex)((0,d.numberToHex)(B,{size:32})),q])}}if(B!==Number.parseInt(w))throw new e.AbiEncodingBytesSizeMismatchError({expectedSize:Number.parseInt(w),value:y});return{dynamic:!1,encoded:(0,t.padHex)(y,{dir:"right"})}}function j(y){if(typeof y!="boolean")throw new r.BaseError(`Invalid boolean value: "${y}" (type: ${typeof y}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:(0,t.padHex)((0,d.boolToHex)(y))}}function P(y,{signed:I,size:w=256}){if(typeof w=="number"){const B=2n**(BigInt(w)-(I?1n:0n))-1n,q=I?-B-1n:0n;if(y>B||yq))}}function l(y){const I=y.match(/^(.*)\[(\d+)?\]$/);return I?[I[2]?Number(I[2]):null,I[1]]:void 0}return Pn}var Mr={},In={},ml;function jr(){if(ml)return In;ml=1,Object.defineProperty(In,"__esModule",{value:!0}),In.toFunctionSelector=void 0;const e=it(),o=ku(),r=n=>(0,e.slice)((0,o.toSignatureHash)(n),0,4);return In.toFunctionSelector=r,In}var bl;function Rt(){if(bl)return Mr;bl=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.getAbiItem=a,Mr.isArgOfType=t,Mr.getAmbiguousTypes=s;const e=_e(),o=ke(),r=We(),n=Jr(),i=jr();function a(u){const{abi:d,args:f=[],name:c}=u,m=(0,o.isHex)(c,{strict:!1}),g=d.filter(b=>m?b.type==="function"?(0,i.toFunctionSelector)(b)===c:b.type==="event"?(0,n.toEventSelector)(b)===c:!1:"name"in b&&b.name===c);if(g.length===0)return;if(g.length===1)return g[0];let h;for(const b of g){if(!("inputs"in b))continue;if(!f||f.length===0){if(!b.inputs||b.inputs.length===0)return b;continue}if(!b.inputs||b.inputs.length===0||b.inputs.length!==f.length)continue;if(f.every((_,j)=>{const P="inputs"in b&&b.inputs[j];return P?t(_,P):!1})){if(h&&"inputs"in h&&h.inputs){const _=s(b.inputs,h.inputs,f);if(_)throw new e.AbiItemAmbiguityError({abiItem:b,type:_[0]},{abiItem:h,type:_[1]})}h=b}}return h||g[0]}function t(u,d){const f=typeof u,c=d.type;switch(c){case"address":return(0,r.isAddress)(u,{strict:!1});case"bool":return f==="boolean";case"function":return f==="string";case"string":return f==="string";default:return c==="tuple"&&"components"in d?Object.values(d.components).every((m,g)=>t(Object.values(u)[g],m)):/^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(c)?f==="number"||f==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(c)?f==="string"||u instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(c)?Array.isArray(u)&&u.every(m=>t(m,{...d,type:c.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function s(u,d,f){for(const c in u){const m=u[c],g=d[c];if(m.type==="tuple"&&g.type==="tuple"&&"components"in m&&"components"in g)return s(m.components,g.components,f[c]);const h=[m.type,g.type];if(h.includes("address")&&h.includes("bytes20")?!0:h.includes("address")&&h.includes("string")?(0,r.isAddress)(f[c],{strict:!1}):h.includes("address")&&h.includes("bytes")?(0,r.isAddress)(f[c],{strict:!1}):!1)return h}}return Mr}var hl;function Pr(){if(hl)return Uo;hl=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.encodeEventTopics=d;const e=_e(),o=h0(),r=he(),n=Ne(),i=Jr(),a=st(),t=St(),s=Rt(),u="/docs/contract/encodeEventTopics";function d(c){var P;const{abi:m,eventName:g,args:h}=c;let b=m[0];if(g){const v=(0,s.getAbiItem)({abi:m,name:g});if(!v)throw new e.AbiEventNotFoundError(g,{docsPath:u});b=v}if(b.type!=="event")throw new e.AbiEventNotFoundError(void 0,{docsPath:u});const p=(0,t.formatAbiItem)(b),_=(0,i.toEventSelector)(p);let j=[];if(h&&"inputs"in b){const v=(P=b.inputs)==null?void 0:P.filter(l=>"indexed"in l&&l.indexed),E=Array.isArray(h)?h:Object.values(h).length>0?(v==null?void 0:v.map(l=>h[l.name]))??[]:[];E.length>0&&(j=(v==null?void 0:v.map((l,y)=>Array.isArray(E[y])?E[y].map((I,w)=>f({param:l,value:E[y][w]})):typeof E[y]<"u"&&E[y]!==null?f({param:l,value:E[y]}):null))??[])}return[_,...j]}function f({param:c,value:m}){if(c.type==="string"||c.type==="bytes")return(0,n.keccak256)((0,r.toBytes)(m));if(c.type==="tuple"||c.type.match(/^(.*)\[(\d+)?\]$/))throw new o.FilterTypeNotSupportedError(c.type);return(0,a.encodeAbiParameters)([c],[m])}return Uo}var Jo={},yl;function $u(){if(yl)return Jo;yl=1,Object.defineProperty(Jo,"__esModule",{value:!0}),Jo.createFilterRequestScope=e;function e(o,{method:r}){var i,a;const n={};return o.transport.type==="fallback"&&((a=(i=o.transport).onResponse)==null||a.call(i,({method:t,response:s,status:u,transport:d})=>{u==="success"&&r===t&&(n[s]=d.request)})),t=>n[t]||o.request}return Jo}var gl;function rd(){if(gl)return zo;gl=1,Object.defineProperty(zo,"__esModule",{value:!0}),zo.createContractEventFilter=n;const e=Pr(),o=te(),r=$u();async function n(i,a){const{address:t,abi:s,args:u,eventName:d,fromBlock:f,strict:c,toBlock:m}=a,g=(0,r.createFilterRequestScope)(i,{method:"eth_newFilter"}),h=d?(0,e.encodeEventTopics)({abi:s,args:u,eventName:d}):void 0,b=await i.request({method:"eth_newFilter",params:[{address:t,fromBlock:typeof f=="bigint"?(0,o.numberToHex)(f):f,toBlock:typeof m=="bigint"?(0,o.numberToHex)(m):m,topics:h}]});return{abi:s,args:u,eventName:d,id:b,request:g(b),strict:!!c,type:"event"}}return zo}var Yo={},Xo={},pl;function Be(){if(pl)return Xo;pl=1,Object.defineProperty(Xo,"__esModule",{value:!0}),Xo.parseAccount=e;function e(o){return typeof o=="string"?{address:o,type:"json-rpc"}:o}return Xo}var Qo={},ei={},_l;function y0(){if(_l)return ei;_l=1,Object.defineProperty(ei,"__esModule",{value:!0}),ei.prepareEncodeFunctionData=a;const e=_e(),o=jr(),r=St(),n=Rt(),i="/docs/contract/encodeFunctionData";function a(t){const{abi:s,args:u,functionName:d}=t;let f=s[0];if(d){const c=(0,n.getAbiItem)({abi:s,args:u,name:d});if(!c)throw new e.AbiFunctionNotFoundError(d,{docsPath:i});f=c}if(f.type!=="function")throw new e.AbiFunctionNotFoundError(void 0,{docsPath:i});return{abi:[f],functionName:(0,o.toFunctionSelector)((0,r.formatAbiItem)(f))}}return ei}var vl;function Ye(){if(vl)return Qo;vl=1,Object.defineProperty(Qo,"__esModule",{value:!0}),Qo.encodeFunctionData=n;const e=Fe(),o=st(),r=y0();function n(i){const{args:a}=i,{abi:t,functionName:s}=(()=>{var c;return i.abi.length===1&&((c=i.functionName)!=null&&c.startsWith("0x"))?i:(0,r.prepareEncodeFunctionData)(i)})(),u=t[0],d=s,f="inputs"in u&&u.inputs?(0,o.encodeAbiParameters)(u.inputs,a??[]):void 0;return(0,e.concatHex)([d,f??"0x"])}return Qo}var ti={},xe={},_t={},El;function nd(){return El||(El=1,Object.defineProperty(_t,"__esModule",{value:!0}),_t.solidityPanic=_t.solidityError=_t.panicReasons=void 0,_t.panicReasons={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},_t.solidityError={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},_t.solidityPanic={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}),_t}var ri={},ni={},oi={},vt={},jl;function g0(){if(jl)return vt;jl=1,Object.defineProperty(vt,"__esModule",{value:!0}),vt.RecursiveReadLimitExceededError=vt.PositionOutOfBoundsError=vt.NegativeOffsetError=void 0;const e=se();class o extends e.BaseError{constructor({offset:a}){super(`Offset \`${a}\` cannot be negative.`,{name:"NegativeOffsetError"})}}vt.NegativeOffsetError=o;class r extends e.BaseError{constructor({length:a,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${a}\`).`,{name:"PositionOutOfBoundsError"})}}vt.PositionOutOfBoundsError=r;class n extends e.BaseError{constructor({count:a,limit:t}){super(`Recursive read limit of \`${t}\` exceeded (recursive read count: \`${a}\`).`,{name:"RecursiveReadLimitExceededError"})}}return vt.RecursiveReadLimitExceededError=n,vt}var Pl;function oo(){if(Pl)return oi;Pl=1,Object.defineProperty(oi,"__esModule",{value:!0}),oi.createCursor=r;const e=g0(),o={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 e.RecursiveReadLimitExceededError({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(n){if(n<0||n>this.bytes.length-1)throw new e.PositionOutOfBoundsError({length:this.bytes.length,position:n})},decrementPosition(n){if(n<0)throw new e.NegativeOffsetError({offset:n});const i=this.position-n;this.assertPosition(i),this.position=i},getReadCount(n){return this.positionReadCount.get(n||this.position)||0},incrementPosition(n){if(n<0)throw new e.NegativeOffsetError({offset:n});const i=this.position+n;this.assertPosition(i),this.position=i},inspectByte(n){const i=n??this.position;return this.assertPosition(i),this.bytes[i]},inspectBytes(n,i){const a=i??this.position;return this.assertPosition(a+n-1),this.bytes.subarray(a,a+n)},inspectUint8(n){const i=n??this.position;return this.assertPosition(i),this.bytes[i]},inspectUint16(n){const i=n??this.position;return this.assertPosition(i+1),this.dataView.getUint16(i)},inspectUint24(n){const i=n??this.position;return this.assertPosition(i+2),(this.dataView.getUint16(i)<<8)+this.dataView.getUint8(i+2)},inspectUint32(n){const i=n??this.position;return this.assertPosition(i+3),this.dataView.getUint32(i)},pushByte(n){this.assertPosition(this.position),this.bytes[this.position]=n,this.position++},pushBytes(n){this.assertPosition(this.position+n.length-1),this.bytes.set(n,this.position),this.position+=n.length},pushUint8(n){this.assertPosition(this.position),this.bytes[this.position]=n,this.position++},pushUint16(n){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,n),this.position+=2},pushUint24(n){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,n>>8),this.dataView.setUint8(this.position+2,n&255),this.position+=3},pushUint32(n){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,n),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const n=this.inspectByte();return this.position++,n},readBytes(n,i){this.assertReadLimit(),this._touch();const a=this.inspectBytes(n);return this.position+=i??n,a},readUint8(){this.assertReadLimit(),this._touch();const n=this.inspectUint8();return this.position+=1,n},readUint16(){this.assertReadLimit(),this._touch();const n=this.inspectUint16();return this.position+=2,n},readUint24(){this.assertReadLimit(),this._touch();const n=this.inspectUint24();return this.position+=3,n},readUint32(){this.assertReadLimit(),this._touch();const n=this.inspectUint32();return this.position+=4,n},get remaining(){return this.bytes.length-this.position},setPosition(n){const i=this.position;return this.assertPosition(n),this.position=n,()=>this.position=i},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const n=this.getReadCount();this.positionReadCount.set(this.position,n+1),n>0&&this.recursiveReadCount++}};function r(n,{recursiveReadLimit:i=8192}={}){const a=Object.create(o);return a.bytes=n,a.dataView=new DataView(n.buffer,n.byteOffset,n.byteLength),a.positionReadCount=new Map,a.recursiveReadLimit=i,a}return oi}var zt={},wl;function od(){if(wl)return zt;wl=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.fromBytes=i,zt.bytesToBigInt=a,zt.bytesToBool=t,zt.bytesToNumber=s,zt.bytesToString=u;const e=Zr(),o=Jt(),r=Ie(),n=te();function i(d,f){const c=typeof f=="string"?{to:f}:f,m=c.to;return m==="number"?s(d,c):m==="bigint"?a(d,c):m==="boolean"?t(d,c):m==="string"?u(d,c):(0,n.bytesToHex)(d,c)}function a(d,f={}){typeof f.size<"u"&&(0,r.assertSize)(d,{size:f.size});const c=(0,n.bytesToHex)(d,f);return(0,r.hexToBigInt)(c,f)}function t(d,f={}){let c=d;if(typeof f.size<"u"&&((0,r.assertSize)(c,{size:f.size}),c=(0,o.trim)(c)),c.length>1||c[0]>1)throw new e.InvalidBytesBooleanError(c);return!!c[0]}function s(d,f={}){typeof f.size<"u"&&(0,r.assertSize)(d,{size:f.size});const c=(0,n.bytesToHex)(d,f);return(0,r.hexToNumber)(c,f)}function u(d,f={}){let c=d;return typeof f.size<"u"&&((0,r.assertSize)(c,{size:f.size}),c=(0,o.trim)(c,{dir:"right"})),new TextDecoder().decode(c)}return zt}var Al;function Yt(){if(Al)return ni;Al=1,Object.defineProperty(ni,"__esModule",{value:!0}),ni.decodeAbiParameters=f;const e=_e(),o=Je(),r=oo(),n=Ve(),i=it(),a=Jt(),t=od(),s=he(),u=te(),d=st();function f(l,y){const I=typeof y=="string"?(0,s.hexToBytes)(y):y,w=(0,r.createCursor)(I);if((0,n.size)(I)===0&&l.length>0)throw new e.AbiDecodingZeroDataError;if((0,n.size)(y)&&(0,n.size)(y)<32)throw new e.AbiDecodingDataSizeTooSmallError({data:typeof y=="string"?y:(0,u.bytesToHex)(y),params:l,size:(0,n.size)(y)});let B=0;const q=[];for(let T=0;T48?(0,t.bytesToBigInt)(B,{signed:I}):(0,t.bytesToNumber)(B,{signed:I}),32]}function P(l,y,{staticPosition:I}){const w=y.components.length===0||y.components.some(({name:T})=>!T),B=w?[]:{};let q=0;if(E(y)){const T=(0,t.bytesToNumber)(l.readBytes(g)),O=I+T;for(let A=0;Ag.type==="error"&&f===(0,n.toFunctionSelector)((0,a.formatAbiItem)(g)));if(!m)throw new o.AbiErrorSignatureNotFoundError(f,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:m,args:"inputs"in m&&m.inputs&&m.inputs.length>0?(0,i.decodeAbiParameters)(m.inputs,(0,r.slice)(d,4)):void 0,errorName:m.name}}return ri}var ii={},Sn={},Il;function Ce(){if(Il)return Sn;Il=1,Object.defineProperty(Sn,"__esModule",{value:!0}),Sn.stringify=void 0;const e=(o,r,n)=>JSON.stringify(o,(i,a)=>{const t=typeof a=="bigint"?a.toString():a;return typeof r=="function"?r(i,t):t},n);return Sn.stringify=e,Sn}var Sl;function p0(){if(Sl)return ii;Sl=1,Object.defineProperty(ii,"__esModule",{value:!0}),ii.formatAbiItemWithArgs=o;const e=Ce();function o({abiItem:r,args:n,includeFunctionName:i=!0,includeName:a=!1}){if("name"in r&&"inputs"in r&&r.inputs)return`${i?r.name:""}(${r.inputs.map((t,s)=>`${a&&t.name?`${t.name}: `:""}${typeof n[s]=="object"?(0,e.stringify)(n[s]):n[s]}`).join(", ")})`}return ii}var si={},Et={},Rl;function io(){return Rl||(Rl=1,Object.defineProperty(Et,"__esModule",{value:!0}),Et.weiUnits=Et.gweiUnits=Et.etherUnits=void 0,Et.etherUnits={gwei:9,wei:18},Et.gweiUnits={ether:-9,wei:9},Et.weiUnits={ether:-18,gwei:-9}),Et}var ai={},Bl;function Nu(){if(Bl)return ai;Bl=1,Object.defineProperty(ai,"__esModule",{value:!0}),ai.formatUnits=e;function e(o,r){let n=o.toString();const i=n.startsWith("-");i&&(n=n.slice(1)),n=n.padStart(r,"0");let[a,t]=[n.slice(0,n.length-r),n.slice(n.length-r)];return t=t.replace(/(0+)$/,""),`${i?"-":""}${a||"0"}${t?`.${t}`:""}`}return ai}var Ol;function so(){if(Ol)return si;Ol=1,Object.defineProperty(si,"__esModule",{value:!0}),si.formatEther=r;const e=io(),o=Nu();function r(n,i="wei"){return(0,o.formatUnits)(n,e.etherUnits[i])}return si}var ui={},Cl;function wr(){if(Cl)return ui;Cl=1,Object.defineProperty(ui,"__esModule",{value:!0}),ui.formatGwei=r;const e=io(),o=Nu();function r(n,i="wei"){return(0,o.formatUnits)(n,e.gweiUnits[i])}return ui}var jt={},xl;function id(){if(xl)return jt;xl=1,Object.defineProperty(jt,"__esModule",{value:!0}),jt.StateAssignmentConflictError=jt.AccountStateConflictError=void 0,jt.prettyStateMapping=n,jt.prettyStateOverride=i;const e=se();class o extends e.BaseError{constructor({address:t}){super(`State for account "${t}" is set multiple times.`,{name:"AccountStateConflictError"})}}jt.AccountStateConflictError=o;class r extends e.BaseError{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}jt.StateAssignmentConflictError=r;function n(a){return a.reduce((t,{slot:s,value:u})=>`${t} ${s}: ${u} +`,"")}function i(a){return a.reduce((t,{address:s,...u})=>{let d=`${t} ${s}: +`;return u.nonce&&(d+=` nonce: ${u.nonce} +`),u.balance&&(d+=` balance: ${u.balance} +`),u.code&&(d+=` code: ${u.code} +`),u.state&&(d+=` state: +`,d+=n(u.state)),u.stateDiff&&(d+=` stateDiff: +`,d+=n(u.stateDiff)),d},` State Override: +`).slice(0,-1)}return jt}var pe={},ql;function Ke(){if(ql)return pe;ql=1,Object.defineProperty(pe,"__esModule",{value:!0}),pe.WaitForTransactionReceiptTimeoutError=pe.TransactionReceiptNotFoundError=pe.TransactionNotFoundError=pe.TransactionExecutionError=pe.InvalidStorageKeySizeError=pe.InvalidSerializedTransactionError=pe.InvalidSerializedTransactionTypeError=pe.InvalidSerializableTransactionError=pe.InvalidLegacyVError=pe.FeeConflictError=void 0,pe.prettyPrint=n;const e=so(),o=wr(),r=se();function n(h){const b=Object.entries(h).map(([_,j])=>j===void 0||j===!1?null:[_,j]).filter(Boolean),p=b.reduce((_,[j])=>Math.max(_,j.length),0);return b.map(([_,j])=>` ${`${_}:`.padEnd(p+1)} ${j}`).join(` +`)}class i extends r.BaseError{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join(` +`),{name:"FeeConflictError"})}}pe.FeeConflictError=i;class a extends r.BaseError{constructor({v:b}){super(`Invalid \`v\` value "${b}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}pe.InvalidLegacyVError=a;class t extends r.BaseError{constructor({transaction:b}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",n(b),"}","","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"})}}pe.InvalidSerializableTransactionError=t;class s extends r.BaseError{constructor({serializedType:b}){super(`Serialized transaction type "${b}" is invalid.`,{name:"InvalidSerializedTransactionType"}),Object.defineProperty(this,"serializedType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.serializedType=b}}pe.InvalidSerializedTransactionTypeError=s;class u extends r.BaseError{constructor({attributes:b,serializedTransaction:p,type:_}){const j=Object.entries(b).map(([P,v])=>typeof v>"u"?P:void 0).filter(Boolean);super(`Invalid serialized transaction of type "${_}" was provided.`,{metaMessages:[`Serialized Transaction: "${p}"`,j.length>0?`Missing Attributes: ${j.join(", ")}`:""].filter(Boolean),name:"InvalidSerializedTransactionError"}),Object.defineProperty(this,"serializedTransaction",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.serializedTransaction=p,this.type=_}}pe.InvalidSerializedTransactionError=u;class d extends r.BaseError{constructor({storageKey:b}){super(`Size for storage key "${b}" is invalid. Expected 32 bytes. Got ${Math.floor((b.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}pe.InvalidStorageKeySizeError=d;class f extends r.BaseError{constructor(b,{account:p,docsPath:_,chain:j,data:P,gas:v,gasPrice:E,maxFeePerGas:l,maxPriorityFeePerGas:y,nonce:I,to:w,value:B}){var T;const q=n({chain:j&&`${j==null?void 0:j.name} (id: ${j==null?void 0:j.id})`,from:p==null?void 0:p.address,to:w,value:typeof B<"u"&&`${(0,e.formatEther)(B)} ${((T=j==null?void 0:j.nativeCurrency)==null?void 0:T.symbol)||"ETH"}`,data:P,gas:v,gasPrice:typeof E<"u"&&`${(0,o.formatGwei)(E)} gwei`,maxFeePerGas:typeof l<"u"&&`${(0,o.formatGwei)(l)} gwei`,maxPriorityFeePerGas:typeof y<"u"&&`${(0,o.formatGwei)(y)} gwei`,nonce:I});super(b.shortMessage,{cause:b,docsPath:_,metaMessages:[...b.metaMessages?[...b.metaMessages," "]:[],"Request Arguments:",q].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=b}}pe.TransactionExecutionError=f;class c extends r.BaseError{constructor({blockHash:b,blockNumber:p,blockTag:_,hash:j,index:P}){let v="Transaction";_&&P!==void 0&&(v=`Transaction at block time "${_}" at index "${P}"`),b&&P!==void 0&&(v=`Transaction at block hash "${b}" at index "${P}"`),p&&P!==void 0&&(v=`Transaction at block number "${p}" at index "${P}"`),j&&(v=`Transaction with hash "${j}"`),super(`${v} could not be found.`,{name:"TransactionNotFoundError"})}}pe.TransactionNotFoundError=c;class m extends r.BaseError{constructor({hash:b}){super(`Transaction receipt with hash "${b}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}pe.TransactionReceiptNotFoundError=m;class g extends r.BaseError{constructor({hash:b}){super(`Timed out while waiting for transaction with hash "${b}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}return pe.WaitForTransactionReceiptTimeoutError=g,pe}var cr={},Ml;function sd(){if(Ml)return cr;Ml=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.getUrl=cr.getContractAddress=void 0;const e=r=>r;cr.getContractAddress=e;const o=r=>r;return cr.getUrl=o,cr}var kl;function Xt(){if(kl)return xe;kl=1,Object.defineProperty(xe,"__esModule",{value:!0}),xe.RawContractError=xe.CounterfactualDeploymentFailedError=xe.ContractFunctionZeroDataError=xe.ContractFunctionRevertedError=xe.ContractFunctionExecutionError=xe.CallExecutionError=void 0;const e=Be(),o=nd(),r=Hu(),n=St(),i=p0(),a=Rt(),t=so(),s=wr(),u=_e(),d=se(),f=id(),c=Ke(),m=sd();class g extends d.BaseError{constructor(v,{account:E,docsPath:l,chain:y,data:I,gas:w,gasPrice:B,maxFeePerGas:q,maxPriorityFeePerGas:T,nonce:O,to:A,value:x,stateOverride:F}){var M;const k=E?(0,e.parseAccount)(E):void 0;let $=(0,c.prettyPrint)({from:k==null?void 0:k.address,to:A,value:typeof x<"u"&&`${(0,t.formatEther)(x)} ${((M=y==null?void 0:y.nativeCurrency)==null?void 0:M.symbol)||"ETH"}`,data:I,gas:w,gasPrice:typeof B<"u"&&`${(0,s.formatGwei)(B)} gwei`,maxFeePerGas:typeof q<"u"&&`${(0,s.formatGwei)(q)} gwei`,maxPriorityFeePerGas:typeof T<"u"&&`${(0,s.formatGwei)(T)} gwei`,nonce:O});F&&($+=` +${(0,f.prettyStateOverride)(F)}`),super(v.shortMessage,{cause:v,docsPath:l,metaMessages:[...v.metaMessages?[...v.metaMessages," "]:[],"Raw Call Arguments:",$].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=v}}xe.CallExecutionError=g;class h extends d.BaseError{constructor(v,{abi:E,args:l,contractAddress:y,docsPath:I,functionName:w,sender:B}){const q=(0,a.getAbiItem)({abi:E,args:l,name:w}),T=q?(0,i.formatAbiItemWithArgs)({abiItem:q,args:l,includeFunctionName:!1,includeName:!1}):void 0,O=q?(0,n.formatAbiItem)(q,{includeName:!0}):void 0,A=(0,c.prettyPrint)({address:y&&(0,m.getContractAddress)(y),function:O,args:T&&T!=="()"&&`${[...Array((w==null?void 0:w.length)??0).keys()].map(()=>" ").join("")}${T}`,sender:B});super(v.shortMessage||`An unknown error occurred while executing the contract function "${w}".`,{cause:v,docsPath:I,metaMessages:[...v.metaMessages?[...v.metaMessages," "]:[],A&&"Contract Call:",A].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=E,this.args=l,this.cause=v,this.contractAddress=y,this.functionName=w,this.sender=B}}xe.ContractFunctionExecutionError=h;class b extends d.BaseError{constructor({abi:v,data:E,functionName:l,message:y}){let I,w,B,q;if(E&&E!=="0x")try{w=(0,r.decodeErrorResult)({abi:v,data:E});const{abiItem:O,errorName:A,args:x}=w;if(A==="Error")q=x[0];else if(A==="Panic"){const[F]=x;q=o.panicReasons[F]}else{const F=O?(0,n.formatAbiItem)(O,{includeName:!0}):void 0,k=O&&x?(0,i.formatAbiItemWithArgs)({abiItem:O,args:x,includeFunctionName:!1,includeName:!1}):void 0;B=[F?`Error: ${F}`:"",k&&k!=="()"?` ${[...Array((A==null?void 0:A.length)??0).keys()].map(()=>" ").join("")}${k}`:""]}}catch(O){I=O}else y&&(q=y);let T;I instanceof u.AbiErrorSignatureNotFoundError&&(T=I.signature,B=[`Unable to decode signature "${T}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${T}.`]),super(q&&q!=="execution reverted"||T?[`The contract function "${l}" reverted with the following ${T?"signature":"reason"}:`,q||T].join(` +`):`The contract function "${l}" reverted.`,{cause:I,metaMessages:B,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"raw",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=w,this.raw=E,this.reason=q,this.signature=T}}xe.ContractFunctionRevertedError=b;class p extends d.BaseError{constructor({functionName:v}){super(`The contract function "${v}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${v}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError"})}}xe.ContractFunctionZeroDataError=p;class _ extends d.BaseError{constructor({factory:v}){super(`Deployment for counterfactual contract call failed${v?` for factory "${v}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"})}}xe.CounterfactualDeploymentFailedError=_;class j extends d.BaseError{constructor({data:v,message:E}){super(E||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=v}}return xe.RawContractError=j,xe}var De={},Fl;function at(){if(Fl)return De;Fl=1,Object.defineProperty(De,"__esModule",{value:!0}),De.TimeoutError=De.SocketClosedError=De.RpcRequestError=De.WebSocketRequestError=De.HttpRequestError=void 0;const e=Ce(),o=se(),r=sd();class n extends o.BaseError{constructor({body:d,cause:f,details:c,headers:m,status:g,url:h}){super("HTTP request failed.",{cause:f,details:c,metaMessages:[g&&`Status: ${g}`,`URL: ${(0,r.getUrl)(h)}`,d&&`Request body: ${(0,e.stringify)(d)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=d,this.headers=m,this.status=g,this.url=h}}De.HttpRequestError=n;class i extends o.BaseError{constructor({body:d,cause:f,details:c,url:m}){super("WebSocket request failed.",{cause:f,details:c,metaMessages:[`URL: ${(0,r.getUrl)(m)}`,d&&`Request body: ${(0,e.stringify)(d)}`].filter(Boolean),name:"WebSocketRequestError"})}}De.WebSocketRequestError=i;class a extends o.BaseError{constructor({body:d,error:f,url:c}){super("RPC Request failed.",{cause:f,details:f.message,metaMessages:[`URL: ${(0,r.getUrl)(c)}`,`Request body: ${(0,e.stringify)(d)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=f.code,this.data=f.data}}De.RpcRequestError=a;class t extends o.BaseError{constructor({url:d}={}){super("The socket has been closed.",{metaMessages:[d&&`URL: ${(0,r.getUrl)(d)}`].filter(Boolean),name:"SocketClosedError"})}}De.SocketClosedError=t;class s extends o.BaseError{constructor({body:d,url:f}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${(0,r.getUrl)(f)}`,`Request body: ${(0,e.stringify)(d)}`],name:"TimeoutError"})}}return De.TimeoutError=s,De}var oe={},$l;function Ar(){if($l)return oe;$l=1,Object.defineProperty(oe,"__esModule",{value:!0}),oe.UnknownRpcError=oe.SwitchChainError=oe.ChainDisconnectedError=oe.ProviderDisconnectedError=oe.UnsupportedProviderMethodError=oe.UnauthorizedProviderError=oe.UserRejectedRequestError=oe.JsonRpcVersionUnsupportedError=oe.LimitExceededRpcError=oe.MethodNotSupportedRpcError=oe.TransactionRejectedRpcError=oe.ResourceUnavailableRpcError=oe.ResourceNotFoundRpcError=oe.InvalidInputRpcError=oe.InternalRpcError=oe.InvalidParamsRpcError=oe.MethodNotFoundRpcError=oe.InvalidRequestRpcError=oe.ParseRpcError=oe.ProviderRpcError=oe.RpcError=void 0;const e=se(),o=at(),r=-1;class n extends e.BaseError{constructor(w,{code:B,docsPath:q,metaMessages:T,name:O,shortMessage:A}){super(A,{cause:w,docsPath:q,metaMessages:T||(w==null?void 0:w.metaMessages),name:O||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=O||w.name,this.code=w instanceof o.RpcRequestError?w.code:B??r}}oe.RpcError=n;class i extends n{constructor(w,B){super(w,B),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=B.data}}oe.ProviderRpcError=i;class a extends n{constructor(w){super(w,{code:a.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}oe.ParseRpcError=a,Object.defineProperty(a,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class t extends n{constructor(w){super(w,{code:t.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}oe.InvalidRequestRpcError=t,Object.defineProperty(t,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class s extends n{constructor(w,{method:B}={}){super(w,{code:s.code,name:"MethodNotFoundRpcError",shortMessage:`The method${B?` "${B}"`:""} does not exist / is not available.`})}}oe.MethodNotFoundRpcError=s,Object.defineProperty(s,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class u extends n{constructor(w){super(w,{code:u.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(` +`)})}}oe.InvalidParamsRpcError=u,Object.defineProperty(u,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class d extends n{constructor(w){super(w,{code:d.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}oe.InternalRpcError=d,Object.defineProperty(d,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class f extends n{constructor(w){super(w,{code:f.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(` +`)})}}oe.InvalidInputRpcError=f,Object.defineProperty(f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class c extends n{constructor(w){super(w,{code:c.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}oe.ResourceNotFoundRpcError=c,Object.defineProperty(c,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class m extends n{constructor(w){super(w,{code:m.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}oe.ResourceUnavailableRpcError=m,Object.defineProperty(m,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class g extends n{constructor(w){super(w,{code:g.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}oe.TransactionRejectedRpcError=g,Object.defineProperty(g,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class h extends n{constructor(w,{method:B}={}){super(w,{code:h.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${B?` "${B}"`:""} is not supported.`})}}oe.MethodNotSupportedRpcError=h,Object.defineProperty(h,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class b extends n{constructor(w){super(w,{code:b.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}oe.LimitExceededRpcError=b,Object.defineProperty(b,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class p extends n{constructor(w){super(w,{code:p.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}oe.JsonRpcVersionUnsupportedError=p,Object.defineProperty(p,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class _ extends i{constructor(w){super(w,{code:_.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}oe.UserRejectedRequestError=_,Object.defineProperty(_,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class j extends i{constructor(w){super(w,{code:j.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}oe.UnauthorizedProviderError=j,Object.defineProperty(j,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class P extends i{constructor(w,{method:B}={}){super(w,{code:P.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${B?` " ${B}"`:""}.`})}}oe.UnsupportedProviderMethodError=P,Object.defineProperty(P,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class v extends i{constructor(w){super(w,{code:v.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}oe.ProviderDisconnectedError=v,Object.defineProperty(v,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class E extends i{constructor(w){super(w,{code:E.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}oe.ChainDisconnectedError=E,Object.defineProperty(E,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class l extends i{constructor(w){super(w,{code:l.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}oe.SwitchChainError=l,Object.defineProperty(l,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class y extends n{constructor(w){super(w,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}return oe.UnknownRpcError=y,oe}var Hl;function Qt(){if(Hl)return ti;Hl=1,Object.defineProperty(ti,"__esModule",{value:!0}),ti.getContractError=t;const e=_e(),o=se(),r=Xt(),n=at(),i=Ar(),a=3;function t(s,{abi:u,address:d,args:f,docsPath:c,functionName:m,sender:g}){const h=s instanceof r.RawContractError?s:s instanceof o.BaseError?s.walk(E=>"data"in E)||s.walk():{},{code:b,data:p,details:_,message:j,shortMessage:P}=h,v=s instanceof e.AbiDecodingZeroDataError?new r.ContractFunctionZeroDataError({functionName:m}):[a,i.InternalRpcError.code].includes(b)&&(p||_||j||P)?new r.ContractFunctionRevertedError({abi:u,data:typeof p=="object"?p.data:p,functionName:m,message:h instanceof n.RpcRequestError?_:P??j}):s;return new r.ContractFunctionExecutionError(v,{abi:u,args:f,contractAddress:d,docsPath:c,functionName:m,sender:g})}return ti}var ci={},di={},fi={},li={},Nl;function _0(){if(Nl)return li;Nl=1,Object.defineProperty(li,"__esModule",{value:!0}),li.publicKeyToAddress=r;const e=Je(),o=Ne();function r(n){const i=(0,o.keccak256)(`0x${n.substring(4)}`).substring(26);return(0,e.checksumAddress)(`0x${i}`)}return li}var mi={},xc={},Pt={},Ut={},zl;function v0(){if(zl)return Ut;zl=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.HashMD=void 0,Ut.setBigUint64=r,Ut.Chi=n,Ut.Maj=i;const e=a0(),o=Vr();function r(t,s,u,d){if(typeof t.setBigUint64=="function")return t.setBigUint64(s,u,d);const f=BigInt(32),c=BigInt(4294967295),m=Number(u>>f&c),g=Number(u&c),h=d?4:0,b=d?0:4;t.setUint32(s+h,m,d),t.setUint32(s+b,g,d)}function n(t,s,u){return t&s^~t&u}function i(t,s,u){return t&s^t&u^s&u}class a extends o.Hash{constructor(s,u,d,f){super(),this.blockLen=s,this.outputLen=u,this.padOffset=d,this.isLE=f,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(s),this.view=(0,o.createView)(this.buffer)}update(s){(0,e.aexists)(this);const{view:u,buffer:d,blockLen:f}=this;s=(0,o.toBytes)(s);const c=s.length;for(let m=0;mf-m&&(this.process(d,0),m=0);for(let _=m;_p.length)throw new Error("_sha2: outputLen bigger than state");for(let _=0;_>>3,l=(0,o.rotr)(v,17)^(0,o.rotr)(v,19)^v>>>10;i[j]=l+i[j-7]+E+i[j-16]|0}let{A:f,B:c,C:m,D:g,E:h,F:b,G:p,H:_}=this;for(let j=0;j<64;j++){const P=(0,o.rotr)(h,6)^(0,o.rotr)(h,11)^(0,o.rotr)(h,25),v=_+P+(0,e.Chi)(h,b,p)+r[j]+i[j]|0,l=((0,o.rotr)(f,2)^(0,o.rotr)(f,13)^(0,o.rotr)(f,22))+(0,e.Maj)(f,c,m)|0;_=p,p=b,b=h,h=g+v|0,g=m,m=c,c=f,f=v+l|0}f=f+this.A|0,c=c+this.B|0,m=m+this.C|0,g=g+this.D|0,h=h+this.E|0,b=b+this.F|0,p=p+this.G|0,_=_+this.H|0,this.set(f,c,m,g,h,b,p,_)}roundClean(){i.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}Pt.SHA256=a;class t extends a{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}return Pt.sha256=(0,o.wrapConstructor)(()=>new a),Pt.sha224=(0,o.wrapConstructor)(()=>new t),Pt}var Rn={},qc={},Ll;function V1(){return Ll||(Ll=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.hmac=e.HMAC=void 0;const o=a0(),r=Vr();class n extends r.Hash{constructor(t,s){super(),this.finished=!1,this.destroyed=!1,(0,o.ahash)(t);const u=(0,r.toBytes)(s);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const d=this.blockLen,f=new Uint8Array(d);f.set(u.length>d?t.create().update(u).digest():u);for(let c=0;cnew n(a,t).update(s).digest();e.hmac=i,e.hmac.create=(a,t)=>new n(a,t)}(qc)),qc}var Mc={},dr={},ye={},ce={},Dl;function Wt(){if(Dl)return ce;Dl=1;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(ce,"__esModule",{value:!0}),ce.notImplemented=ce.bitMask=void 0,ce.isBytes=n,ce.abytes=i,ce.abool=a,ce.bytesToHex=s,ce.numberToHexUnpadded=u,ce.hexToNumber=d,ce.hexToBytes=m,ce.bytesToNumberBE=g,ce.bytesToNumberLE=h,ce.numberToBytesBE=b,ce.numberToBytesLE=p,ce.numberToVarBytesBE=_,ce.ensureBytes=j,ce.concatBytes=P,ce.equalBytes=v,ce.utf8ToBytes=E,ce.inRange=y,ce.aInRange=I,ce.bitLen=w,ce.bitGet=B,ce.bitSet=q,ce.createHmacDrbg=x,ce.validateObject=k,ce.memoized=M;const e=BigInt(0),o=BigInt(1),r=BigInt(2);function n(S){return S instanceof Uint8Array||ArrayBuffer.isView(S)&&S.constructor.name==="Uint8Array"}function i(S){if(!n(S))throw new Error("Uint8Array expected")}function a(S,R){if(typeof R!="boolean")throw new Error(S+" boolean expected, got "+R)}const t=Array.from({length:256},(S,R)=>R.toString(16).padStart(2,"0"));function s(S){i(S);let R="";for(let C=0;C=f._0&&S<=f._9)return S-f._0;if(S>=f.A&&S<=f.F)return S-(f.A-10);if(S>=f.a&&S<=f.f)return S-(f.a-10)}function m(S){if(typeof S!="string")throw new Error("hex string expected, got "+typeof S);const R=S.length,C=R/2;if(R%2)throw new Error("hex string expected, got unpadded hex of length "+R);const H=new Uint8Array(C);for(let N=0,D=0;Ntypeof S=="bigint"&&e<=S;function y(S,R,C){return l(S)&&l(R)&&l(C)&&R<=S&&Se;S>>=o,R+=1);return R}function B(S,R){return S>>BigInt(R)&o}function q(S,R,C){return S|(C?o:e)<(r<new Uint8Array(S),A=S=>Uint8Array.from(S);function x(S,R,C){if(typeof S!="number"||S<2)throw new Error("hashLen must be a number");if(typeof R!="number"||R<2)throw new Error("qByteLen must be a number");if(typeof C!="function")throw new Error("hmacFn must be a function");let H=O(S),N=O(S),D=0;const G=()=>{H.fill(1),N.fill(0),D=0},V=(...K)=>C(N,H,...K),W=(K=O())=>{N=V(A([0]),K),H=V(),K.length!==0&&(N=V(A([1]),K),H=V())},J=()=>{if(D++>=1e3)throw new Error("drbg: tried 1000 values");let K=0;const ee=[];for(;K{G(),W(K);let ae;for(;!(ae=ee(J()));)W();return G(),ae}}const F={bigint:S=>typeof S=="bigint",function:S=>typeof S=="function",boolean:S=>typeof S=="boolean",string:S=>typeof S=="string",stringOrUint8Array:S=>typeof S=="string"||n(S),isSafeInteger:S=>Number.isSafeInteger(S),array:S=>Array.isArray(S),field:(S,R)=>R.Fp.isValid(S),hash:S=>typeof S=="function"&&Number.isSafeInteger(S.outputLen)};function k(S,R,C={}){const H=(N,D,G)=>{const V=F[D];if(typeof V!="function")throw new Error("invalid validator function");const W=S[N];if(!(G&&W===void 0)&&!V(W,S))throw new Error("param "+String(N)+" is invalid. Expected "+D+", got "+W)};for(const[N,D]of Object.entries(R))H(N,D,!1);for(const[N,D]of Object.entries(C))H(N,D,!0);return S}const $=()=>{throw new Error("not implemented")};ce.notImplemented=$;function M(S){const R=new WeakMap;return(C,...H)=>{const N=R.get(C);if(N!==void 0)return N;const D=S(C,...H);return R.set(C,D),D}}return ce}var Gl;function zu(){if(Gl)return ye;Gl=1,Object.defineProperty(ye,"__esModule",{value:!0}),ye.isNegativeLE=void 0,ye.mod=u,ye.pow=d,ye.pow2=f,ye.invert=c,ye.tonelliShanks=m,ye.FpSqrt=g,ye.validateField=p,ye.FpPow=_,ye.FpInvertBatch=j,ye.FpDiv=P,ye.FpLegendre=v,ye.FpIsSquare=E,ye.nLength=l,ye.Field=y,ye.FpSqrtOdd=I,ye.FpSqrtEven=w,ye.hashToPrivateScalar=B,ye.getFieldBytesLength=q,ye.getMinHashLength=T,ye.mapHashToField=O;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=Wt(),o=BigInt(0),r=BigInt(1),n=BigInt(2),i=BigInt(3),a=BigInt(4),t=BigInt(5),s=BigInt(8);function u(A,x){const F=A%x;return F>=o?F:x+F}function d(A,x,F){if(xo;)x&r&&(k=k*A%F),A=A*A%F,x>>=r;return k}function f(A,x,F){let k=A;for(;x-- >o;)k*=k,k%=F;return k}function c(A,x){if(A===o)throw new Error("invert: expected non-zero number");if(x<=o)throw new Error("invert: expected positive modulus, got "+x);let F=u(A,x),k=x,$=o,M=r;for(;F!==o;){const R=k/F,C=k%F,H=$-M*R;k=F,F=C,$=M,M=H}if(k!==r)throw new Error("invert: does not exist");return u($,x)}function m(A){const x=(A-r)/n;let F,k,$;for(F=A-r,k=0;F%n===o;F/=n,k++);for($=n;$1e3)throw new Error("Cannot find square root: likely non-prime P");if(k===1){const S=(A+r)/a;return function(C,H){const N=C.pow(H,S);if(!C.eql(C.sqr(N),H))throw new Error("Cannot find square root");return N}}const M=(F+r)/n;return function(R,C){if(R.pow(C,x)===R.neg(R.ONE))throw new Error("Cannot find square root");let H=k,N=R.pow(R.mul(R.ONE,$),F),D=R.pow(C,M),G=R.pow(C,F);for(;!R.eql(G,R.ONE);){if(R.eql(G,R.ZERO))return R.ZERO;let V=1;for(let J=R.sqr(G);V(u(A,x)&r)===r;ye.isNegativeLE=h;const b=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function p(A){const x={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},F=b.reduce((k,$)=>(k[$]="function",k),x);return(0,e.validateObject)(A,F)}function _(A,x,F){if(Fo;)F&r&&(k=A.mul(k,$)),$=A.sqr($),F>>=r;return k}function j(A,x){const F=new Array(x.length),k=x.reduce((M,S,R)=>A.is0(S)?M:(F[R]=M,A.mul(M,S)),A.ONE),$=A.inv(k);return x.reduceRight((M,S,R)=>A.is0(S)?M:(F[R]=A.mul(M,F[R]),A.mul(M,S)),$),F}function P(A,x,F){return A.mul(x,typeof F=="bigint"?c(F,A.ORDER):A.inv(F))}function v(A){const x=(A-r)/n;return(F,k)=>F.pow(k,x)}function E(A){const x=v(A.ORDER);return F=>{const k=x(A,F);return A.eql(k,A.ZERO)||A.eql(k,A.ONE)}}function l(A,x){const F=x!==void 0?x:A.toString(2).length,k=Math.ceil(F/8);return{nBitLength:F,nByteLength:k}}function y(A,x,F=!1,k={}){if(A<=o)throw new Error("invalid field: expected ORDER > 0, got "+A);const{nBitLength:$,nByteLength:M}=l(A,x);if(M>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let S;const R=Object.freeze({ORDER:A,isLE:F,BITS:$,BYTES:M,MASK:(0,e.bitMask)($),ZERO:o,ONE:r,create:C=>u(C,A),isValid:C=>{if(typeof C!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof C);return o<=C&&CC===o,isOdd:C=>(C&r)===r,neg:C=>u(-C,A),eql:(C,H)=>C===H,sqr:C=>u(C*C,A),add:(C,H)=>u(C+H,A),sub:(C,H)=>u(C-H,A),mul:(C,H)=>u(C*H,A),pow:(C,H)=>_(R,C,H),div:(C,H)=>u(C*c(H,A),A),sqrN:C=>C*C,addN:(C,H)=>C+H,subN:(C,H)=>C-H,mulN:(C,H)=>C*H,inv:C=>c(C,A),sqrt:k.sqrt||(C=>(S||(S=g(A)),S(R,C))),invertBatch:C=>j(R,C),cmov:(C,H,N)=>N?H:C,toBytes:C=>F?(0,e.numberToBytesLE)(C,M):(0,e.numberToBytesBE)(C,M),fromBytes:C=>{if(C.length!==M)throw new Error("Field.fromBytes: expected "+M+" bytes, got "+C.length);return F?(0,e.bytesToNumberLE)(C):(0,e.bytesToNumberBE)(C)}});return Object.freeze(R)}function I(A,x){if(!A.isOdd)throw new Error("Field doesn't have isOdd");const F=A.sqrt(x);return A.isOdd(F)?F:A.neg(F)}function w(A,x){if(!A.isOdd)throw new Error("Field doesn't have isOdd");const F=A.sqrt(x);return A.isOdd(F)?A.neg(F):F}function B(A,x,F=!1){A=(0,e.ensureBytes)("privateHash",A);const k=A.length,$=l(x).nByteLength+8;if($<24||k<$||k>1024)throw new Error("hashToPrivateScalar: expected "+$+"-1024 bytes of input, got "+k);const M=F?(0,e.bytesToNumberLE)(A):(0,e.bytesToNumberBE)(A);return u(M,x-r)+r}function q(A){if(typeof A!="bigint")throw new Error("field order must be bigint");const x=A.toString(2).length;return Math.ceil(x/8)}function T(A){const x=q(A);return x+Math.ceil(x/2)}function O(A,x,F=!1){const k=A.length,$=q(x),M=T(x);if(k<16||k1024)throw new Error("expected "+M+"-1024 bytes of input, got "+k);const S=F?(0,e.bytesToNumberLE)(A):(0,e.bytesToNumberBE)(A),R=u(S,x-r)+r;return F?(0,e.numberToBytesLE)(R,$):(0,e.numberToBytesBE)(R,$)}return ye}var Vl;function W1(){if(Vl)return dr;Vl=1,Object.defineProperty(dr,"__esModule",{value:!0}),dr.wNAF=m,dr.pippenger=g,dr.precomputeMSMUnsafe=h,dr.validateBasic=b;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=zu(),o=Wt(),r=BigInt(0),n=BigInt(1);function i(p,_){const j=_.negate();return p?j:_}function a(p,_){if(!Number.isSafeInteger(p)||p<=0||p>_)throw new Error("invalid window size, expected [1.."+_+"], got W="+p)}function t(p,_){a(p,_);const j=Math.ceil(_/p)+1,P=2**(p-1);return{windows:j,windowSize:P}}function s(p,_){if(!Array.isArray(p))throw new Error("array expected");p.forEach((j,P)=>{if(!(j instanceof _))throw new Error("invalid point at index "+P)})}function u(p,_){if(!Array.isArray(p))throw new Error("array of scalars expected");p.forEach((j,P)=>{if(!_.isValid(j))throw new Error("invalid scalar at index "+P)})}const d=new WeakMap,f=new WeakMap;function c(p){return f.get(p)||1}function m(p,_){return{constTimeNegate:i,hasPrecomputes(j){return c(j)!==1},unsafeLadder(j,P,v=p.ZERO){let E=j;for(;P>r;)P&n&&(v=v.add(E)),E=E.double(),P>>=n;return v},precomputeWindow(j,P){const{windows:v,windowSize:E}=t(P,_),l=[];let y=j,I=y;for(let w=0;w>=q,A>l&&(A-=B,v+=n);const x=O,F=O+Math.abs(A)-1,k=T%2!==0,$=A<0;A===0?I=I.add(i(k,P[x])):y=y.add(i($,P[F]))}return{p:y,f:I}},wNAFUnsafe(j,P,v,E=p.ZERO){const{windows:l,windowSize:y}=t(j,_),I=BigInt(2**j-1),w=2**j,B=BigInt(j);for(let q=0;q>=B,O>y&&(O-=w,v+=n),O===0)continue;let A=P[T+Math.abs(O)-1];O<0&&(A=A.negate()),E=E.add(A)}return E},getPrecomputes(j,P,v){let E=d.get(P);return E||(E=this.precomputeWindow(P,j),j!==1&&d.set(P,v(E))),E},wNAFCached(j,P,v){const E=c(j);return this.wNAF(E,this.getPrecomputes(E,j,v),P)},wNAFCachedUnsafe(j,P,v,E){const l=c(j);return l===1?this.unsafeLadder(j,P,E):this.wNAFUnsafe(l,this.getPrecomputes(l,j,v),P,E)},setWindowSize(j,P){a(P,_),f.set(j,P),d.delete(j)}}}function g(p,_,j,P){if(s(j,p),u(P,_),j.length!==P.length)throw new Error("arrays of points and scalars must have equal length");const v=p.ZERO,E=(0,o.bitLen)(BigInt(j.length)),l=E>12?E-3:E>4?E-2:E?2:1,y=(1<=0;q-=l){I.fill(v);for(let O=0;O>BigInt(q)&BigInt(y));I[x]=I[x].add(j[O])}let T=v;for(let O=I.length-1,A=v;O>0;O--)A=A.add(I[O]),T=T.add(A);if(B=B.add(T),q!==0)for(let O=0;O{const B=[];for(let q=0,T=w;q{if(u(w,_),w.length>j.length)throw new Error("array of scalars must be smaller than array of points");let B=v;for(let q=0;q>T&y);x&&(B=B.add(I[O][x-1]))}}return B}}function b(p){return(0,e.validateField)(p.Fp),(0,o.validateObject)(p,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,e.nLength)(p.n,p.nBitLength),...p,p:p.Fp.ORDER})}return dr}var Wl;function E0(){return Wl||(Wl=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DER=e.DERErr=void 0,e.weierstrassPoints=b,e.weierstrass=_,e.SWUFpSqrtRatio=j,e.mapToCurveSimpleSWU=P;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const o=W1(),r=zu(),n=Wt(),i=Wt();function a(v){v.lowS!==void 0&&(0,i.abool)("lowS",v.lowS),v.prehash!==void 0&&(0,i.abool)("prehash",v.prehash)}function t(v){const E=(0,o.validateBasic)(v);n.validateObject(E,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:l,Fp:y,a:I}=E;if(l){if(!y.eql(I,y.ZERO))throw new Error("invalid endomorphism, can only be defined for Koblitz curves that have a=0");if(typeof l!="object"||typeof l.beta!="bigint"||typeof l.splitScalar!="function")throw new Error("invalid endomorphism, expected beta: bigint and splitScalar: function")}return Object.freeze({...E})}const{bytesToNumberBE:s,hexToBytes:u}=n;class d extends Error{constructor(E=""){super(E)}}e.DERErr=d,e.DER={Err:d,_tlv:{encode:(v,E)=>{const{Err:l}=e.DER;if(v<0||v>256)throw new l("tlv.encode: wrong tag");if(E.length&1)throw new l("tlv.encode: unpadded data");const y=E.length/2,I=n.numberToHexUnpadded(y);if(I.length/2&128)throw new l("tlv.encode: long form length too big");const w=y>127?n.numberToHexUnpadded(I.length/2|128):"";return n.numberToHexUnpadded(v)+w+I+E},decode(v,E){const{Err:l}=e.DER;let y=0;if(v<0||v>256)throw new l("tlv.encode: wrong tag");if(E.length<2||E[y++]!==v)throw new l("tlv.decode: wrong tlv");const I=E[y++],w=!!(I&128);let B=0;if(!w)B=I;else{const T=I&127;if(!T)throw new l("tlv.decode(long): indefinite length not supported");if(T>4)throw new l("tlv.decode(long): byte length is too big");const O=E.subarray(y,y+T);if(O.length!==T)throw new l("tlv.decode: length bytes not complete");if(O[0]===0)throw new l("tlv.decode(long): zero leftmost byte");for(const A of O)B=B<<8|A;if(y+=T,B<128)throw new l("tlv.decode(long): not minimal encoding")}const q=E.subarray(y,y+B);if(q.length!==B)throw new l("tlv.decode: wrong value length");return{v:q,l:E.subarray(y+B)}}},_int:{encode(v){const{Err:E}=e.DER;if(v{const C=S.toAffine();return n.concatBytes(Uint8Array.from([4]),l.toBytes(C.x),l.toBytes(C.y))}),w=E.fromBytes||(M=>{const S=M.subarray(1),R=l.fromBytes(S.subarray(0,l.BYTES)),C=l.fromBytes(S.subarray(l.BYTES,2*l.BYTES));return{x:R,y:C}});function B(M){const{a:S,b:R}=E,C=l.sqr(M),H=l.mul(C,M);return l.add(l.add(H,l.mul(M,S)),R)}if(!l.eql(l.sqr(E.Gy),B(E.Gx)))throw new Error("bad generator point: equation left != right");function q(M){return n.inRange(M,c,E.n)}function T(M){const{allowedPrivateKeyLengths:S,nByteLength:R,wrapPrivateKey:C,n:H}=E;if(S&&typeof M!="bigint"){if(n.isBytes(M)&&(M=n.bytesToHex(M)),typeof M!="string"||!S.includes(M.length))throw new Error("invalid private key");M=M.padStart(R*2,"0")}let N;try{N=typeof M=="bigint"?M:n.bytesToNumberBE((0,i.ensureBytes)("private key",M,R))}catch{throw new Error("invalid private key, expected hex or "+R+" bytes, got "+typeof M)}return C&&(N=(0,r.mod)(N,H)),n.aInRange("private key",N,c,H),N}function O(M){if(!(M instanceof F))throw new Error("ProjectivePoint expected")}const A=(0,i.memoized)((M,S)=>{const{px:R,py:C,pz:H}=M;if(l.eql(H,l.ONE))return{x:R,y:C};const N=M.is0();S==null&&(S=N?l.ONE:l.inv(H));const D=l.mul(R,S),G=l.mul(C,S),V=l.mul(H,S);if(N)return{x:l.ZERO,y:l.ZERO};if(!l.eql(V,l.ONE))throw new Error("invZ was invalid");return{x:D,y:G}}),x=(0,i.memoized)(M=>{if(M.is0()){if(E.allowInfinityPoint&&!l.is0(M.py))return;throw new Error("bad point: ZERO")}const{x:S,y:R}=M.toAffine();if(!l.isValid(S)||!l.isValid(R))throw new Error("bad point: x or y not FE");const C=l.sqr(R),H=B(S);if(!l.eql(C,H))throw new Error("bad point: equation left != right");if(!M.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class F{constructor(S,R,C){if(this.px=S,this.py=R,this.pz=C,S==null||!l.isValid(S))throw new Error("x required");if(R==null||!l.isValid(R))throw new Error("y required");if(C==null||!l.isValid(C))throw new Error("z required");Object.freeze(this)}static fromAffine(S){const{x:R,y:C}=S||{};if(!S||!l.isValid(R)||!l.isValid(C))throw new Error("invalid affine point");if(S instanceof F)throw new Error("projective point not allowed");const H=N=>l.eql(N,l.ZERO);return H(R)&&H(C)?F.ZERO:new F(R,C,l.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(S){const R=l.invertBatch(S.map(C=>C.pz));return S.map((C,H)=>C.toAffine(R[H])).map(F.fromAffine)}static fromHex(S){const R=F.fromAffine(w((0,i.ensureBytes)("pointHex",S)));return R.assertValidity(),R}static fromPrivateKey(S){return F.BASE.multiply(T(S))}static msm(S,R){return(0,o.pippenger)(F,y,S,R)}_setWindowSize(S){$.setWindowSize(this,S)}assertValidity(){x(this)}hasEvenY(){const{y:S}=this.toAffine();if(l.isOdd)return!l.isOdd(S);throw new Error("Field doesn't support isOdd")}equals(S){O(S);const{px:R,py:C,pz:H}=this,{px:N,py:D,pz:G}=S,V=l.eql(l.mul(R,G),l.mul(N,H)),W=l.eql(l.mul(C,G),l.mul(D,H));return V&&W}negate(){return new F(this.px,l.neg(this.py),this.pz)}double(){const{a:S,b:R}=E,C=l.mul(R,g),{px:H,py:N,pz:D}=this;let G=l.ZERO,V=l.ZERO,W=l.ZERO,J=l.mul(H,H),re=l.mul(N,N),K=l.mul(D,D),ee=l.mul(H,N);return ee=l.add(ee,ee),W=l.mul(H,D),W=l.add(W,W),G=l.mul(S,W),V=l.mul(C,K),V=l.add(G,V),G=l.sub(re,V),V=l.add(re,V),V=l.mul(G,V),G=l.mul(ee,G),W=l.mul(C,W),K=l.mul(S,K),ee=l.sub(J,K),ee=l.mul(S,ee),ee=l.add(ee,W),W=l.add(J,J),J=l.add(W,J),J=l.add(J,K),J=l.mul(J,ee),V=l.add(V,J),K=l.mul(N,D),K=l.add(K,K),J=l.mul(K,ee),G=l.sub(G,J),W=l.mul(K,re),W=l.add(W,W),W=l.add(W,W),new F(G,V,W)}add(S){O(S);const{px:R,py:C,pz:H}=this,{px:N,py:D,pz:G}=S;let V=l.ZERO,W=l.ZERO,J=l.ZERO;const re=E.a,K=l.mul(E.b,g);let ee=l.mul(R,N),ae=l.mul(C,D),Y=l.mul(H,G),X=l.add(R,C),Q=l.add(N,D);X=l.mul(X,Q),Q=l.add(ee,ae),X=l.sub(X,Q),Q=l.add(R,H);let Z=l.add(N,G);return Q=l.mul(Q,Z),Z=l.add(ee,Y),Q=l.sub(Q,Z),Z=l.add(C,H),V=l.add(D,G),Z=l.mul(Z,V),V=l.add(ae,Y),Z=l.sub(Z,V),J=l.mul(re,Q),V=l.mul(K,Y),J=l.add(V,J),V=l.sub(ae,J),J=l.add(ae,J),W=l.mul(V,J),ae=l.add(ee,ee),ae=l.add(ae,ee),Y=l.mul(re,Y),Q=l.mul(K,Q),ae=l.add(ae,Y),Y=l.sub(ee,Y),Y=l.mul(re,Y),Q=l.add(Q,Y),ee=l.mul(ae,Q),W=l.add(W,ee),ee=l.mul(Z,Q),V=l.mul(X,V),V=l.sub(V,ee),ee=l.mul(X,ae),J=l.mul(Z,J),J=l.add(J,ee),new F(V,W,J)}subtract(S){return this.add(S.negate())}is0(){return this.equals(F.ZERO)}wNAF(S){return $.wNAFCached(this,S,F.normalizeZ)}multiplyUnsafe(S){const{endo:R,n:C}=E;n.aInRange("scalar",S,f,C);const H=F.ZERO;if(S===f)return H;if(this.is0()||S===c)return this;if(!R||$.hasPrecomputes(this))return $.wNAFCachedUnsafe(this,S,F.normalizeZ);let{k1neg:N,k1:D,k2neg:G,k2:V}=R.splitScalar(S),W=H,J=H,re=this;for(;D>f||V>f;)D&c&&(W=W.add(re)),V&c&&(J=J.add(re)),re=re.double(),D>>=c,V>>=c;return N&&(W=W.negate()),G&&(J=J.negate()),J=new F(l.mul(J.px,R.beta),J.py,J.pz),W.add(J)}multiply(S){const{endo:R,n:C}=E;n.aInRange("scalar",S,c,C);let H,N;if(R){const{k1neg:D,k1:G,k2neg:V,k2:W}=R.splitScalar(S);let{p:J,f:re}=this.wNAF(G),{p:K,f:ee}=this.wNAF(W);J=$.constTimeNegate(D,J),K=$.constTimeNegate(V,K),K=new F(l.mul(K.px,R.beta),K.py,K.pz),H=J.add(K),N=re.add(ee)}else{const{p:D,f:G}=this.wNAF(S);H=D,N=G}return F.normalizeZ([H,N])[0]}multiplyAndAddUnsafe(S,R,C){const H=F.BASE,N=(G,V)=>V===f||V===c||!G.equals(H)?G.multiplyUnsafe(V):G.multiply(V),D=N(this,R).add(N(S,C));return D.is0()?void 0:D}toAffine(S){return A(this,S)}isTorsionFree(){const{h:S,isTorsionFree:R}=E;if(S===c)return!0;if(R)return R(F,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:S,clearCofactor:R}=E;return S===c?this:R?R(F,this):this.multiplyUnsafe(E.h)}toRawBytes(S=!0){return(0,i.abool)("isCompressed",S),this.assertValidity(),I(F,this,S)}toHex(S=!0){return(0,i.abool)("isCompressed",S),n.bytesToHex(this.toRawBytes(S))}}F.BASE=new F(E.Gx,E.Gy,l.ONE),F.ZERO=new F(l.ZERO,l.ONE,l.ZERO);const k=E.nBitLength,$=(0,o.wNAF)(F,E.endo?Math.ceil(k/2):k);return{CURVE:E,ProjectivePoint:F,normPrivateKeyToScalar:T,weierstrassEquation:B,isWithinCurveOrder:q}}function p(v){const E=(0,o.validateBasic)(v);return n.validateObject(E,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...E})}function _(v){const E=p(v),{Fp:l,n:y}=E,I=l.BYTES+1,w=2*l.BYTES+1;function B(Y){return(0,r.mod)(Y,y)}function q(Y){return(0,r.invert)(Y,y)}const{ProjectivePoint:T,normPrivateKeyToScalar:O,weierstrassEquation:A,isWithinCurveOrder:x}=b({...E,toBytes(Y,X,Q){const Z=X.toAffine(),L=l.toBytes(Z.x),fe=n.concatBytes;return(0,i.abool)("isCompressed",Q),Q?fe(Uint8Array.from([X.hasEvenY()?2:3]),L):fe(Uint8Array.from([4]),L,l.toBytes(Z.y))},fromBytes(Y){const X=Y.length,Q=Y[0],Z=Y.subarray(1);if(X===I&&(Q===2||Q===3)){const L=n.bytesToNumberBE(Z);if(!n.inRange(L,c,l.ORDER))throw new Error("Point is not on curve");const fe=A(L);let be;try{be=l.sqrt(fe)}catch(we){const Te=we instanceof Error?": "+we.message:"";throw new Error("Point is not on curve"+Te)}const de=(be&c)===c;return(Q&1)===1!==de&&(be=l.neg(be)),{x:L,y:be}}else if(X===w&&Q===4){const L=l.fromBytes(Z.subarray(0,l.BYTES)),fe=l.fromBytes(Z.subarray(l.BYTES,2*l.BYTES));return{x:L,y:fe}}else{const L=I,fe=w;throw new Error("invalid Point, expected length of "+L+", or uncompressed "+fe+", got "+X)}}}),F=Y=>n.bytesToHex(n.numberToBytesBE(Y,E.nByteLength));function k(Y){const X=y>>c;return Y>X}function $(Y){return k(Y)?B(-Y):Y}const M=(Y,X,Q)=>n.bytesToNumberBE(Y.slice(X,Q));class S{constructor(X,Q,Z){this.r=X,this.s=Q,this.recovery=Z,this.assertValidity()}static fromCompact(X){const Q=E.nByteLength;return X=(0,i.ensureBytes)("compactSignature",X,Q*2),new S(M(X,0,Q),M(X,Q,2*Q))}static fromDER(X){const{r:Q,s:Z}=e.DER.toSig((0,i.ensureBytes)("DER",X));return new S(Q,Z)}assertValidity(){n.aInRange("r",this.r,c,y),n.aInRange("s",this.s,c,y)}addRecoveryBit(X){return new S(this.r,this.s,X)}recoverPublicKey(X){const{r:Q,s:Z,recovery:L}=this,fe=G((0,i.ensureBytes)("msgHash",X));if(L==null||![0,1,2,3].includes(L))throw new Error("recovery id invalid");const be=L===2||L===3?Q+E.n:Q;if(be>=l.ORDER)throw new Error("recovery id 2 or 3 invalid");const de=L&1?"03":"02",Ae=T.fromHex(de+F(be)),we=q(be),Te=B(-fe*we),Se=B(Z*we),Oe=T.BASE.multiplyAndAddUnsafe(Ae,Te,Se);if(!Oe)throw new Error("point at infinify");return Oe.assertValidity(),Oe}hasHighS(){return k(this.s)}normalizeS(){return this.hasHighS()?new S(this.r,B(-this.s),this.recovery):this}toDERRawBytes(){return n.hexToBytes(this.toDERHex())}toDERHex(){return e.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return n.hexToBytes(this.toCompactHex())}toCompactHex(){return F(this.r)+F(this.s)}}const R={isValidPrivateKey(Y){try{return O(Y),!0}catch{return!1}},normPrivateKeyToScalar:O,randomPrivateKey:()=>{const Y=(0,r.getMinHashLength)(E.n);return(0,r.mapHashToField)(E.randomBytes(Y),E.n)},precompute(Y=8,X=T.BASE){return X._setWindowSize(Y),X.multiply(BigInt(3)),X}};function C(Y,X=!0){return T.fromPrivateKey(Y).toRawBytes(X)}function H(Y){const X=n.isBytes(Y),Q=typeof Y=="string",Z=(X||Q)&&Y.length;return X?Z===I||Z===w:Q?Z===2*I||Z===2*w:Y instanceof T}function N(Y,X,Q=!0){if(H(Y))throw new Error("first arg must be private key");if(!H(X))throw new Error("second arg must be public key");return T.fromHex(X).multiply(O(Y)).toRawBytes(Q)}const D=E.bits2int||function(Y){if(Y.length>8192)throw new Error("input is too large");const X=n.bytesToNumberBE(Y),Q=Y.length*8-E.nBitLength;return Q>0?X>>BigInt(Q):X},G=E.bits2int_modN||function(Y){return B(D(Y))},V=n.bitMask(E.nBitLength);function W(Y){return n.aInRange("num < 2^"+E.nBitLength,Y,f,V),n.numberToBytesBE(Y,E.nByteLength)}function J(Y,X,Q=re){if(["recovered","canonical"].some(Ze=>Ze in Q))throw new Error("sign() legacy options not supported");const{hash:Z,randomBytes:L}=E;let{lowS:fe,prehash:be,extraEntropy:de}=Q;fe==null&&(fe=!0),Y=(0,i.ensureBytes)("msgHash",Y),a(Q),be&&(Y=(0,i.ensureBytes)("prehashed msgHash",Z(Y)));const Ae=G(Y),we=O(X),Te=[W(we),W(Ae)];if(de!=null&&de!==!1){const Ze=de===!0?L(l.BYTES):de;Te.push((0,i.ensureBytes)("extraEntropy",Ze))}const Se=n.concatBytes(...Te),Oe=Ae;function $e(Ze){const ze=D(Ze);if(!x(ze))return;const $t=q(ze),lt=T.BASE.multiply(ze).toAffine(),Ue=B(lt.x);if(Ue===f)return;const mt=B($t*B(Oe+Ue*we));if(mt===f)return;let ct=(lt.x===Ue?0:2)|Number(lt.y&c),Xe=mt;return fe&&k(mt)&&(Xe=$(mt),ct^=1),new S(Ue,Xe,ct)}return{seed:Se,k2sig:$e}}const re={lowS:E.lowS,prehash:!1},K={lowS:E.lowS,prehash:!1};function ee(Y,X,Q=re){const{seed:Z,k2sig:L}=J(Y,X,Q),fe=E;return n.createHmacDrbg(fe.hash.outputLen,fe.nByteLength,fe.hmac)(Z,L)}T.BASE._setWindowSize(8);function ae(Y,X,Q,Z=K){var ct;const L=Y;X=(0,i.ensureBytes)("msgHash",X),Q=(0,i.ensureBytes)("publicKey",Q);const{lowS:fe,prehash:be,format:de}=Z;if(a(Z),"strict"in Z)throw new Error("options.strict was renamed to lowS");if(de!==void 0&&de!=="compact"&&de!=="der")throw new Error("format must be compact or der");const Ae=typeof L=="string"||n.isBytes(L),we=!Ae&&!de&&typeof L=="object"&&L!==null&&typeof L.r=="bigint"&&typeof L.s=="bigint";if(!Ae&&!we)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let Te,Se;try{if(we&&(Te=new S(L.r,L.s)),Ae){try{de!=="compact"&&(Te=S.fromDER(L))}catch(Xe){if(!(Xe instanceof e.DER.Err))throw Xe}!Te&&de!=="der"&&(Te=S.fromCompact(L))}Se=T.fromHex(Q)}catch{return!1}if(!Te||fe&&Te.hasHighS())return!1;be&&(X=E.hash(X));const{r:Oe,s:$e}=Te,Ze=G(X),ze=q($e),$t=B(Ze*ze),lt=B(Oe*ze),Ue=(ct=T.BASE.multiplyAndAddUnsafe(Se,$t,lt))==null?void 0:ct.toAffine();return Ue?B(Ue.x)===Oe:!1}return{CURVE:E,getPublicKey:C,getSharedSecret:N,sign:ee,verify:ae,ProjectivePoint:T,Signature:S,utils:R}}function j(v,E){const l=v.ORDER;let y=f;for(let $=l-c;$%m===f;$/=m)y+=c;const I=y,w=m<{let S=x,R=v.pow(M,O),C=v.sqr(R);C=v.mul(C,M);let H=v.mul($,C);H=v.pow(H,T),H=v.mul(H,R),R=v.mul(H,M),C=v.mul(H,$);let N=v.mul(C,R);H=v.pow(N,A);let D=v.eql(H,v.ONE);R=v.mul(C,F),H=v.mul(N,S),C=v.cmov(R,C,D),N=v.cmov(H,N,D);for(let G=I;G>c;G--){let V=G-m;V=m<{let C=v.sqr(R);const H=v.mul(S,R);C=v.mul(C,H);let N=v.pow(C,$);N=v.mul(N,H);const D=v.mul(N,M),G=v.mul(v.sqr(N),R),V=v.eql(G,S);let W=v.cmov(D,N,V);return{isValid:V,value:W}}}return k}function P(v,E){if((0,r.validateField)(v),!v.isValid(E.A)||!v.isValid(E.B)||!v.isValid(E.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const l=j(v,E.Z);if(!v.isOdd)throw new Error("Fp.isOdd is not implemented!");return y=>{let I,w,B,q,T,O,A,x;I=v.sqr(y),I=v.mul(I,E.Z),w=v.sqr(I),w=v.add(w,I),B=v.add(w,v.ONE),B=v.mul(B,E.B),q=v.cmov(E.Z,v.neg(w),!v.eql(w,v.ZERO)),q=v.mul(q,E.A),w=v.sqr(B),O=v.sqr(q),T=v.mul(O,E.A),w=v.add(w,T),w=v.mul(w,B),O=v.mul(O,q),T=v.mul(O,E.B),w=v.add(w,T),A=v.mul(I,B);const{isValid:F,value:k}=l(w,O);x=v.mul(I,y),x=v.mul(x,k),A=v.cmov(A,B,F),x=v.cmov(x,k,F);const $=v.isOdd(y)===v.isOdd(x);return x=v.cmov(v.neg(x),x,$),A=v.div(A,q),{x:A,y:x}}}}(Mc)),Mc}var Kl;function K1(){if(Kl)return Rn;Kl=1,Object.defineProperty(Rn,"__esModule",{value:!0}),Rn.getHash=n,Rn.createCurve=i;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=V1(),o=Vr(),r=E0();function n(a){return{hash:a,hmac:(t,...s)=>(0,e.hmac)(a,t,(0,o.concatBytes)(...s)),randomBytes:o.randomBytes}}function i(a,t){const s=u=>(0,r.weierstrass)({...a,...n(u)});return{...s(t),create:s}}return Rn}var Lt={},Zl;function Z1(){if(Zl)return Lt;Zl=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.expand_message_xmd=t,Lt.expand_message_xof=s,Lt.hash_to_field=u,Lt.isogenyMap=d,Lt.createHasher=f;const e=zu(),o=Wt(),r=o.bytesToNumberBE;function n(c,m){if(a(c),a(m),c<0||c>=1<<8*m)throw new Error("invalid I2OSP input: "+c);const g=Array.from({length:m}).fill(0);for(let h=m-1;h>=0;h--)g[h]=c&255,c>>>=8;return new Uint8Array(g)}function i(c,m){const g=new Uint8Array(c.length);for(let h=0;h255&&(m=h((0,o.concatBytes)((0,o.utf8ToBytes)("H2C-OVERSIZE-DST-"),m)));const{outputLen:b,blockLen:p}=h,_=Math.ceil(g/b);if(g>65535||_>255)throw new Error("expand_message_xmd: invalid lenInBytes");const j=(0,o.concatBytes)(m,n(m.length,1)),P=n(0,p),v=n(g,2),E=new Array(_),l=h((0,o.concatBytes)(P,c,v,n(0,1),j));E[0]=h((0,o.concatBytes)(l,n(1,1),j));for(let I=1;I<=_;I++){const w=[i(l,E[I-1]),n(I+1,1),j];E[I]=h((0,o.concatBytes)(...w))}return(0,o.concatBytes)(...E).slice(0,g)}function s(c,m,g,h,b){if((0,o.abytes)(c),(0,o.abytes)(m),a(g),m.length>255){const p=Math.ceil(2*h/8);m=b.create({dkLen:p}).update((0,o.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(m).digest()}if(g>65535||m.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return b.create({dkLen:g}).update(c).update(n(g,2)).update(m).update(n(m.length,1)).digest()}function u(c,m,g){(0,o.validateObject)(g,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:h,k:b,m:p,hash:_,expand:j,DST:P}=g;(0,o.abytes)(c),a(m);const v=typeof P=="string"?(0,o.utf8ToBytes)(P):P,E=h.toString(2).length,l=Math.ceil((E+b)/8),y=m*p*l;let I;if(j==="xmd")I=t(c,v,y,_);else if(j==="xof")I=s(c,v,y,b,_);else if(j==="_internal_pass")I=c;else throw new Error('expand must be "xmd" or "xof"');const w=new Array(m);for(let B=0;BArray.from(h).reverse());return(h,b)=>{const[p,_,j,P]=g.map(v=>v.reduce((E,l)=>c.add(c.mul(E,h),l)));return h=c.div(p,_),b=c.mul(b,c.div(j,P)),{x:h,y:b}}}function f(c,m,g){if(typeof m!="function")throw new Error("mapToCurve() must be defined");return{hashToCurve(h,b){const p=u(h,2,{...g,DST:g.DST,...b}),_=c.fromAffine(m(p[0])),j=c.fromAffine(m(p[1])),P=_.add(j).clearCofactor();return P.assertValidity(),P},encodeToCurve(h,b){const p=u(h,1,{...g,DST:g.encodeDST,...b}),_=c.fromAffine(m(p[0])).clearCofactor();return _.assertValidity(),_},mapToCurve(h){if(!Array.isArray(h))throw new Error("mapToCurve: expected array of bigints");for(const p of h)if(typeof p!="bigint")throw new Error("mapToCurve: expected array of bigints");const b=c.fromAffine(m(h)).clearCofactor();return b.assertValidity(),b}}}return Lt}var Jl;function ao(){return Jl||(Jl=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.encodeToCurve=e.hashToCurve=e.schnorr=e.secp256k1=void 0;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const o=ad(),r=Vr(),n=K1(),i=Z1(),a=zu(),t=Wt(),s=E0(),u=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),d=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),f=BigInt(1),c=BigInt(2),m=($,M)=>($+M/c)/M;function g($){const M=u,S=BigInt(3),R=BigInt(6),C=BigInt(11),H=BigInt(22),N=BigInt(23),D=BigInt(44),G=BigInt(88),V=$*$*$%M,W=V*V*$%M,J=(0,a.pow2)(W,S,M)*W%M,re=(0,a.pow2)(J,S,M)*W%M,K=(0,a.pow2)(re,c,M)*V%M,ee=(0,a.pow2)(K,C,M)*K%M,ae=(0,a.pow2)(ee,H,M)*ee%M,Y=(0,a.pow2)(ae,D,M)*ae%M,X=(0,a.pow2)(Y,G,M)*Y%M,Q=(0,a.pow2)(X,D,M)*ae%M,Z=(0,a.pow2)(Q,S,M)*W%M,L=(0,a.pow2)(Z,N,M)*ee%M,fe=(0,a.pow2)(L,R,M)*V%M,be=(0,a.pow2)(fe,c,M);if(!h.eql(h.sqr(be),$))throw new Error("Cannot find square root");return be}const h=(0,a.Field)(u,void 0,void 0,{sqrt:g});e.secp256k1=(0,n.createCurve)({a:BigInt(0),b:BigInt(7),Fp:h,n:d,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:$=>{const M=d,S=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),R=-f*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),C=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),H=S,N=BigInt("0x100000000000000000000000000000000"),D=m(H*$,M),G=m(-R*$,M);let V=(0,a.mod)($-D*S-G*C,M),W=(0,a.mod)(-D*R-G*H,M);const J=V>N,re=W>N;if(J&&(V=M-V),re&&(W=M-W),V>N||W>N)throw new Error("splitScalar: Endomorphism failed, k="+$);return{k1neg:J,k1:V,k2neg:re,k2:W}}}},o.sha256);const b=BigInt(0),p={};function _($,...M){let S=p[$];if(S===void 0){const R=(0,o.sha256)(Uint8Array.from($,C=>C.charCodeAt(0)));S=(0,t.concatBytes)(R,R),p[$]=S}return(0,o.sha256)((0,t.concatBytes)(S,...M))}const j=$=>$.toRawBytes(!0).slice(1),P=$=>(0,t.numberToBytesBE)($,32),v=$=>(0,a.mod)($,u),E=$=>(0,a.mod)($,d),l=e.secp256k1.ProjectivePoint,y=($,M,S)=>l.BASE.multiplyAndAddUnsafe($,M,S);function I($){let M=e.secp256k1.utils.normPrivateKeyToScalar($),S=l.fromPrivateKey(M);return{scalar:S.hasEvenY()?M:E(-M),bytes:j(S)}}function w($){(0,t.aInRange)("x",$,f,u);const M=v($*$),S=v(M*$+BigInt(7));let R=g(S);R%c!==b&&(R=v(-R));const C=new l($,R,f);return C.assertValidity(),C}const B=t.bytesToNumberBE;function q(...$){return E(B(_("BIP0340/challenge",...$)))}function T($){return I($).bytes}function O($,M,S=(0,r.randomBytes)(32)){const R=(0,t.ensureBytes)("message",$),{bytes:C,scalar:H}=I(M),N=(0,t.ensureBytes)("auxRand",S,32),D=P(H^B(_("BIP0340/aux",N))),G=_("BIP0340/nonce",D,C,R),V=E(B(G));if(V===b)throw new Error("sign failed: k is zero");const{bytes:W,scalar:J}=I(V),re=q(W,C,R),K=new Uint8Array(64);if(K.set(W,0),K.set(P(E(J+re*H)),32),!A(K,R,C))throw new Error("sign: Invalid signature produced");return K}function A($,M,S){const R=(0,t.ensureBytes)("signature",$,64),C=(0,t.ensureBytes)("message",M),H=(0,t.ensureBytes)("publicKey",S,32);try{const N=w(B(H)),D=B(R.subarray(0,32));if(!(0,t.inRange)(D,f,u))return!1;const G=B(R.subarray(32,64));if(!(0,t.inRange)(G,f,d))return!1;const V=q(P(D),j(N),C),W=y(N,G,E(-V));return!(!W||!W.hasEvenY()||W.toAffine().x!==D)}catch{return!1}}e.schnorr={getPublicKey:T,sign:O,verify:A,utils:{randomPrivateKey:e.secp256k1.utils.randomPrivateKey,lift_x:w,pointToBytes:j,numberToBytesBE:t.numberToBytesBE,bytesToNumberBE:t.bytesToNumberBE,taggedHash:_,mod:a.mod}};const x=(0,i.isogenyMap)(h,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map($=>$.map(M=>BigInt(M)))),F=(0,s.mapToCurveSimpleSWU)(h,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:h.create(BigInt("-11"))}),k=(0,i.createHasher)(e.secp256k1.ProjectivePoint,$=>{const{x:M,y:S}=F(h.create($[0]));return x(M,S)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:h.ORDER,m:1,k:128,expand:"xmd",hash:o.sha256});e.hashToCurve=k.hashToCurve,e.encodeToCurve=k.encodeToCurve}(xc)),xc}var Yl;function ud(){if(Yl)return mi;Yl=1,Object.defineProperty(mi,"__esModule",{value:!0}),mi.recoverPublicKey=n;const e=ke(),o=Ie(),r=te();async function n({hash:a,signature:t}){const s=(0,e.isHex)(a)?a:(0,r.toHex)(a),{secp256k1:u}=await Promise.resolve().then(()=>ao());return`0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){const{r:h,s:b,v:p,yParity:_}=t,j=Number(_??p),P=i(j);return new u.Signature((0,o.hexToBigInt)(h),(0,o.hexToBigInt)(b)).addRecoveryBit(P)}const c=(0,e.isHex)(t)?t:(0,r.toHex)(t),m=(0,o.hexToNumber)(`0x${c.slice(130)}`),g=i(m);return u.Signature.fromCompact(c.substring(2,130)).addRecoveryBit(g)})().recoverPublicKey(s.substring(2)).toHex(!1)}`}function i(a){if(a===0||a===1)return a;if(a===27)return 0;if(a===28)return 1;throw new Error("Invalid yParityOrV value")}return mi}var Xl;function er(){if(Xl)return fi;Xl=1,Object.defineProperty(fi,"__esModule",{value:!0}),fi.recoverAddress=r;const e=_0(),o=ud();async function r({hash:n,signature:i}){return(0,e.publicKeyToAddress)(await(0,o.recoverPublicKey)({hash:n,signature:i}))}return fi}var bi={},kr={},Ql;function uo(){if(Ql)return kr;Ql=1,Object.defineProperty(kr,"__esModule",{value:!0}),kr.toRlp=i,kr.bytesToRlp=a,kr.hexToRlp=t;const e=se(),o=oo(),r=he(),n=te();function i(c,m="hex"){const g=s(c),h=(0,o.createCursor)(new Uint8Array(g.length));return g.encode(h),m==="hex"?(0,n.bytesToHex)(h.bytes):h.bytes}function a(c,m="bytes"){return i(c,m)}function t(c,m="hex"){return i(c,m)}function s(c){return Array.isArray(c)?u(c.map(m=>s(m))):d(c)}function u(c){const m=c.reduce((b,p)=>b+p.length,0),g=f(m);return{length:m<=55?1+m:1+g+m,encode(b){m<=55?b.pushByte(192+m):(b.pushByte(247+g),g===1?b.pushUint8(m):g===2?b.pushUint16(m):g===3?b.pushUint24(m):b.pushUint32(m));for(const{encode:p}of c)p(b)}}}function d(c){const m=typeof c=="string"?(0,r.hexToBytes)(c):c,g=f(m.length);return{length:m.length===1&&m[0]<128?1:m.length<=55?1+m.length:1+g+m.length,encode(b){m.length===1&&m[0]<128?b.pushBytes(m):m.length<=55?(b.pushByte(128+m.length),b.pushBytes(m)):(b.pushByte(183+g),g===1?b.pushUint8(m.length):g===2?b.pushUint16(m.length):g===3?b.pushUint24(m.length):b.pushUint32(m.length),b.pushBytes(m))}}}function f(c){if(c<2**8)return 1;if(c<2**16)return 2;if(c<2**24)return 3;if(c<2**32)return 4;throw new e.BaseError("Length is too large.")}return kr}var em;function J1(){if(em)return bi;em=1,Object.defineProperty(bi,"__esModule",{value:!0}),bi.hashAuthorization=a;const e=Fe(),o=he(),r=te(),n=uo(),i=Ne();function a(t){const{chainId:s,contractAddress:u,nonce:d,to:f}=t,c=(0,i.keccak256)((0,e.concatHex)(["0x05",(0,n.toRlp)([s?(0,r.numberToHex)(s):"0x",u,d?(0,r.numberToHex)(d):"0x"])]));return f==="bytes"?(0,o.hexToBytes)(c):c}return bi}var tm;function j0(){if(tm)return di;tm=1,Object.defineProperty(di,"__esModule",{value:!0}),di.recoverAuthorizationAddress=r;const e=er(),o=J1();async function r(n){const{authorization:i,signature:a}=n;return(0,e.recoverAddress)({hash:(0,o.hashAuthorization)(i),signature:a??i})}return di}var hi={},Bn={},rm;function P0(){if(rm)return Bn;rm=1,Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.EstimateGasExecutionError=void 0;const e=so(),o=wr(),r=se(),n=Ke();class i extends r.BaseError{constructor(t,{account:s,docsPath:u,chain:d,data:f,gas:c,gasPrice:m,maxFeePerGas:g,maxPriorityFeePerGas:h,nonce:b,to:p,value:_}){var P;const j=(0,n.prettyPrint)({from:s==null?void 0:s.address,to:p,value:typeof _<"u"&&`${(0,e.formatEther)(_)} ${((P=d==null?void 0:d.nativeCurrency)==null?void 0:P.symbol)||"ETH"}`,data:f,gas:c,gasPrice:typeof m<"u"&&`${(0,o.formatGwei)(m)} gwei`,maxFeePerGas:typeof g<"u"&&`${(0,o.formatGwei)(g)} gwei`,maxPriorityFeePerGas:typeof h<"u"&&`${(0,o.formatGwei)(h)} gwei`,nonce:b});super(t.shortMessage,{cause:t,docsPath:u,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Estimate Gas Arguments:",j].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}return Bn.EstimateGasExecutionError=i,Bn}var le={},nm;function Bt(){if(nm)return le;nm=1,Object.defineProperty(le,"__esModule",{value:!0}),le.UnknownNodeError=le.TipAboveFeeCapError=le.TransactionTypeNotSupportedError=le.IntrinsicGasTooLowError=le.IntrinsicGasTooHighError=le.InsufficientFundsError=le.NonceMaxValueError=le.NonceTooLowError=le.NonceTooHighError=le.FeeCapTooLowError=le.FeeCapTooHighError=le.ExecutionRevertedError=void 0;const e=wr(),o=se();class r extends o.BaseError{constructor({cause:b,message:p}={}){var j;const _=(j=p==null?void 0:p.replace("execution reverted: ",""))==null?void 0:j.replace("execution reverted","");super(`Execution reverted ${_?`with reason: ${_}`:"for an unknown reason"}.`,{cause:b,name:"ExecutionRevertedError"})}}le.ExecutionRevertedError=r,Object.defineProperty(r,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(r,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class n extends o.BaseError{constructor({cause:b,maxFeePerGas:p}={}){super(`The fee cap (\`maxFeePerGas\`${p?` = ${(0,e.formatGwei)(p)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:b,name:"FeeCapTooHighError"})}}le.FeeCapTooHighError=n,Object.defineProperty(n,"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 i extends o.BaseError{constructor({cause:b,maxFeePerGas:p}={}){super(`The fee cap (\`maxFeePerGas\`${p?` = ${(0,e.formatGwei)(p)}`:""} gwei) cannot be lower than the block base fee.`,{cause:b,name:"FeeCapTooLowError"})}}le.FeeCapTooLowError=i,Object.defineProperty(i,"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 a extends o.BaseError{constructor({cause:b,nonce:p}={}){super(`Nonce provided for the transaction ${p?`(${p}) `:""}is higher than the next one expected.`,{cause:b,name:"NonceTooHighError"})}}le.NonceTooHighError=a,Object.defineProperty(a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class t extends o.BaseError{constructor({cause:b,nonce:p}={}){super([`Nonce provided for the transaction ${p?`(${p}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(` +`),{cause:b,name:"NonceTooLowError"})}}le.NonceTooLowError=t,Object.defineProperty(t,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class s extends o.BaseError{constructor({cause:b,nonce:p}={}){super(`Nonce provided for the transaction ${p?`(${p}) `:""}exceeds the maximum allowed nonce.`,{cause:b,name:"NonceMaxValueError"})}}le.NonceMaxValueError=s,Object.defineProperty(s,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class u extends o.BaseError{constructor({cause:b}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(` +`),{cause:b,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"})}}le.InsufficientFundsError=u,Object.defineProperty(u,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class d extends o.BaseError{constructor({cause:b,gas:p}={}){super(`The amount of gas ${p?`(${p}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:b,name:"IntrinsicGasTooHighError"})}}le.IntrinsicGasTooHighError=d,Object.defineProperty(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class f extends o.BaseError{constructor({cause:b,gas:p}={}){super(`The amount of gas ${p?`(${p}) `:""}provided for the transaction is too low.`,{cause:b,name:"IntrinsicGasTooLowError"})}}le.IntrinsicGasTooLowError=f,Object.defineProperty(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class c extends o.BaseError{constructor({cause:b}){super("The transaction type is not supported for this chain.",{cause:b,name:"TransactionTypeNotSupportedError"})}}le.TransactionTypeNotSupportedError=c,Object.defineProperty(c,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class m extends o.BaseError{constructor({cause:b,maxPriorityFeePerGas:p,maxFeePerGas:_}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${p?` = ${(0,e.formatGwei)(p)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${_?` = ${(0,e.formatGwei)(_)} gwei`:""}).`].join(` +`),{cause:b,name:"TipAboveFeeCapError"})}}le.TipAboveFeeCapError=m,Object.defineProperty(m,"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 g extends o.BaseError{constructor({cause:b}){super(`An error occurred while executing: ${b==null?void 0:b.shortMessage}`,{cause:b,name:"UnknownNodeError"})}}return le.UnknownNodeError=g,le}var On={},om;function co(){if(om)return On;om=1,Object.defineProperty(On,"__esModule",{value:!0}),On.containsNodeError=i,On.getNodeError=a;const e=se(),o=Bt(),r=at(),n=Ar();function i(t){return t instanceof n.TransactionRejectedRpcError||t instanceof n.InvalidInputRpcError||t instanceof r.RpcRequestError&&t.code===o.ExecutionRevertedError.code}function a(t,s){const u=(t.details||"").toLowerCase(),d=t instanceof e.BaseError?t.walk(f=>(f==null?void 0:f.code)===o.ExecutionRevertedError.code):t;return d instanceof e.BaseError?new o.ExecutionRevertedError({cause:t,message:d.details}):o.ExecutionRevertedError.nodeMessage.test(u)?new o.ExecutionRevertedError({cause:t,message:t.details}):o.FeeCapTooHighError.nodeMessage.test(u)?new o.FeeCapTooHighError({cause:t,maxFeePerGas:s==null?void 0:s.maxFeePerGas}):o.FeeCapTooLowError.nodeMessage.test(u)?new o.FeeCapTooLowError({cause:t,maxFeePerGas:s==null?void 0:s.maxFeePerGas}):o.NonceTooHighError.nodeMessage.test(u)?new o.NonceTooHighError({cause:t,nonce:s==null?void 0:s.nonce}):o.NonceTooLowError.nodeMessage.test(u)?new o.NonceTooLowError({cause:t,nonce:s==null?void 0:s.nonce}):o.NonceMaxValueError.nodeMessage.test(u)?new o.NonceMaxValueError({cause:t,nonce:s==null?void 0:s.nonce}):o.InsufficientFundsError.nodeMessage.test(u)?new o.InsufficientFundsError({cause:t}):o.IntrinsicGasTooHighError.nodeMessage.test(u)?new o.IntrinsicGasTooHighError({cause:t,gas:s==null?void 0:s.gas}):o.IntrinsicGasTooLowError.nodeMessage.test(u)?new o.IntrinsicGasTooLowError({cause:t,gas:s==null?void 0:s.gas}):o.TransactionTypeNotSupportedError.nodeMessage.test(u)?new o.TransactionTypeNotSupportedError({cause:t}):o.TipAboveFeeCapError.nodeMessage.test(u)?new o.TipAboveFeeCapError({cause:t,maxFeePerGas:s==null?void 0:s.maxFeePerGas,maxPriorityFeePerGas:s==null?void 0:s.maxPriorityFeePerGas}):new o.UnknownNodeError({cause:t})}return On}var im;function w0(){if(im)return hi;im=1,Object.defineProperty(hi,"__esModule",{value:!0}),hi.getEstimateGasError=n;const e=P0(),o=Bt(),r=co();function n(i,{docsPath:a,...t}){const s=(()=>{const u=(0,r.getNodeError)(i,t);return u instanceof o.UnknownNodeError?i:u})();return new e.EstimateGasExecutionError(s,{docsPath:a,...t})}return hi}var yi={},sm;function Yr(){if(sm)return yi;sm=1,Object.defineProperty(yi,"__esModule",{value:!0}),yi.extract=e;function e(o,{format:r}){if(!r)return{};const n={};function i(t){const s=Object.keys(t);for(const u of s)u in o&&(n[u]=o[u]),t[u]&&typeof t[u]=="object"&&!Array.isArray(t[u])&&i(t[u])}const a=r(o||{});return i(a),n}return yi}var kc={},gi={},am;function fo(){if(am)return gi;am=1,Object.defineProperty(gi,"__esModule",{value:!0}),gi.defineFormatter=e;function e(o,r){return({exclude:n,format:i})=>({exclude:n,format:a=>{const t=r(a);if(n)for(const s of n)delete t[s];return{...t,...i(a)}},type:o})}return gi}var um;function Ot(){return um||(um=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.defineTransactionRequest=e.rpcTransactionType=void 0,e.formatTransactionRequest=n;const o=te(),r=fo();e.rpcTransactionType={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function n(a){const t={};return typeof a.authorizationList<"u"&&(t.authorizationList=i(a.authorizationList)),typeof a.accessList<"u"&&(t.accessList=a.accessList),typeof a.blobVersionedHashes<"u"&&(t.blobVersionedHashes=a.blobVersionedHashes),typeof a.blobs<"u"&&(typeof a.blobs[0]!="string"?t.blobs=a.blobs.map(s=>(0,o.bytesToHex)(s)):t.blobs=a.blobs),typeof a.data<"u"&&(t.data=a.data),typeof a.from<"u"&&(t.from=a.from),typeof a.gas<"u"&&(t.gas=(0,o.numberToHex)(a.gas)),typeof a.gasPrice<"u"&&(t.gasPrice=(0,o.numberToHex)(a.gasPrice)),typeof a.maxFeePerBlobGas<"u"&&(t.maxFeePerBlobGas=(0,o.numberToHex)(a.maxFeePerBlobGas)),typeof a.maxFeePerGas<"u"&&(t.maxFeePerGas=(0,o.numberToHex)(a.maxFeePerGas)),typeof a.maxPriorityFeePerGas<"u"&&(t.maxPriorityFeePerGas=(0,o.numberToHex)(a.maxPriorityFeePerGas)),typeof a.nonce<"u"&&(t.nonce=(0,o.numberToHex)(a.nonce)),typeof a.to<"u"&&(t.to=a.to),typeof a.type<"u"&&(t.type=e.rpcTransactionType[a.type]),typeof a.value<"u"&&(t.value=(0,o.numberToHex)(a.value)),t}e.defineTransactionRequest=(0,r.defineFormatter)("transactionRequest",n);function i(a){return a.map(t=>({address:t.contractAddress,r:t.r,s:t.s,chainId:(0,o.numberToHex)(t.chainId),nonce:(0,o.numberToHex)(t.nonce),...typeof t.yParity<"u"?{yParity:(0,o.numberToHex)(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:(0,o.numberToHex)(t.v)}:{}}))}}(kc)),kc}var Fr={},cm;function cd(){if(cm)return Fr;cm=1,Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.serializeStateMapping=a,Fr.serializeAccountStateOverride=t,Fr.serializeStateOverride=s;const e=ot(),o=Mu(),r=id(),n=We(),i=te();function a(u){if(!(!u||u.length===0))return u.reduce((d,{slot:f,value:c})=>{if(f.length!==66)throw new o.InvalidBytesLengthError({size:f.length,targetSize:66,type:"hex"});if(c.length!==66)throw new o.InvalidBytesLengthError({size:c.length,targetSize:66,type:"hex"});return d[f]=c,d},{})}function t(u){const{balance:d,nonce:f,state:c,stateDiff:m,code:g}=u,h={};if(g!==void 0&&(h.code=g),d!==void 0&&(h.balance=(0,i.numberToHex)(d)),f!==void 0&&(h.nonce=(0,i.numberToHex)(f)),c!==void 0&&(h.state=a(c)),m!==void 0){if(h.state)throw new r.StateAssignmentConflictError;h.stateDiff=a(m)}return h}function s(u){if(!u)return;const d={};for(const{address:f,...c}of u){if(!(0,n.isAddress)(f,{strict:!1}))throw new e.InvalidAddressError({address:f});if(d[f])throw new r.AccountStateConflictError({address:f});d[f]=t(c)}return d}return Fr}var pi={},U={},dm;function dd(){return dm||(dm=1,Object.defineProperty(U,"__esModule",{value:!0}),U.minInt144=U.minInt136=U.minInt128=U.minInt120=U.minInt112=U.minInt104=U.minInt96=U.minInt88=U.minInt80=U.minInt72=U.minInt64=U.minInt56=U.minInt48=U.minInt40=U.minInt32=U.minInt24=U.minInt16=U.minInt8=U.maxInt256=U.maxInt248=U.maxInt240=U.maxInt232=U.maxInt224=U.maxInt216=U.maxInt208=U.maxInt200=U.maxInt192=U.maxInt184=U.maxInt176=U.maxInt168=U.maxInt160=U.maxInt152=U.maxInt144=U.maxInt136=U.maxInt128=U.maxInt120=U.maxInt112=U.maxInt104=U.maxInt96=U.maxInt88=U.maxInt80=U.maxInt72=U.maxInt64=U.maxInt56=U.maxInt48=U.maxInt40=U.maxInt32=U.maxInt24=U.maxInt16=U.maxInt8=void 0,U.maxUint256=U.maxUint248=U.maxUint240=U.maxUint232=U.maxUint224=U.maxUint216=U.maxUint208=U.maxUint200=U.maxUint192=U.maxUint184=U.maxUint176=U.maxUint168=U.maxUint160=U.maxUint152=U.maxUint144=U.maxUint136=U.maxUint128=U.maxUint120=U.maxUint112=U.maxUint104=U.maxUint96=U.maxUint88=U.maxUint80=U.maxUint72=U.maxUint64=U.maxUint56=U.maxUint48=U.maxUint40=U.maxUint32=U.maxUint24=U.maxUint16=U.maxUint8=U.minInt256=U.minInt248=U.minInt240=U.minInt232=U.minInt224=U.minInt216=U.minInt208=U.minInt200=U.minInt192=U.minInt184=U.minInt176=U.minInt168=U.minInt160=U.minInt152=void 0,U.maxInt8=2n**(8n-1n)-1n,U.maxInt16=2n**(16n-1n)-1n,U.maxInt24=2n**(24n-1n)-1n,U.maxInt32=2n**(32n-1n)-1n,U.maxInt40=2n**(40n-1n)-1n,U.maxInt48=2n**(48n-1n)-1n,U.maxInt56=2n**(56n-1n)-1n,U.maxInt64=2n**(64n-1n)-1n,U.maxInt72=2n**(72n-1n)-1n,U.maxInt80=2n**(80n-1n)-1n,U.maxInt88=2n**(88n-1n)-1n,U.maxInt96=2n**(96n-1n)-1n,U.maxInt104=2n**(104n-1n)-1n,U.maxInt112=2n**(112n-1n)-1n,U.maxInt120=2n**(120n-1n)-1n,U.maxInt128=2n**(128n-1n)-1n,U.maxInt136=2n**(136n-1n)-1n,U.maxInt144=2n**(144n-1n)-1n,U.maxInt152=2n**(152n-1n)-1n,U.maxInt160=2n**(160n-1n)-1n,U.maxInt168=2n**(168n-1n)-1n,U.maxInt176=2n**(176n-1n)-1n,U.maxInt184=2n**(184n-1n)-1n,U.maxInt192=2n**(192n-1n)-1n,U.maxInt200=2n**(200n-1n)-1n,U.maxInt208=2n**(208n-1n)-1n,U.maxInt216=2n**(216n-1n)-1n,U.maxInt224=2n**(224n-1n)-1n,U.maxInt232=2n**(232n-1n)-1n,U.maxInt240=2n**(240n-1n)-1n,U.maxInt248=2n**(248n-1n)-1n,U.maxInt256=2n**(256n-1n)-1n,U.minInt8=-(2n**(8n-1n)),U.minInt16=-(2n**(16n-1n)),U.minInt24=-(2n**(24n-1n)),U.minInt32=-(2n**(32n-1n)),U.minInt40=-(2n**(40n-1n)),U.minInt48=-(2n**(48n-1n)),U.minInt56=-(2n**(56n-1n)),U.minInt64=-(2n**(64n-1n)),U.minInt72=-(2n**(72n-1n)),U.minInt80=-(2n**(80n-1n)),U.minInt88=-(2n**(88n-1n)),U.minInt96=-(2n**(96n-1n)),U.minInt104=-(2n**(104n-1n)),U.minInt112=-(2n**(112n-1n)),U.minInt120=-(2n**(120n-1n)),U.minInt128=-(2n**(128n-1n)),U.minInt136=-(2n**(136n-1n)),U.minInt144=-(2n**(144n-1n)),U.minInt152=-(2n**(152n-1n)),U.minInt160=-(2n**(160n-1n)),U.minInt168=-(2n**(168n-1n)),U.minInt176=-(2n**(176n-1n)),U.minInt184=-(2n**(184n-1n)),U.minInt192=-(2n**(192n-1n)),U.minInt200=-(2n**(200n-1n)),U.minInt208=-(2n**(208n-1n)),U.minInt216=-(2n**(216n-1n)),U.minInt224=-(2n**(224n-1n)),U.minInt232=-(2n**(232n-1n)),U.minInt240=-(2n**(240n-1n)),U.minInt248=-(2n**(248n-1n)),U.minInt256=-(2n**(256n-1n)),U.maxUint8=2n**8n-1n,U.maxUint16=2n**16n-1n,U.maxUint24=2n**24n-1n,U.maxUint32=2n**32n-1n,U.maxUint40=2n**40n-1n,U.maxUint48=2n**48n-1n,U.maxUint56=2n**56n-1n,U.maxUint64=2n**64n-1n,U.maxUint72=2n**72n-1n,U.maxUint80=2n**80n-1n,U.maxUint88=2n**88n-1n,U.maxUint96=2n**96n-1n,U.maxUint104=2n**104n-1n,U.maxUint112=2n**112n-1n,U.maxUint120=2n**120n-1n,U.maxUint128=2n**128n-1n,U.maxUint136=2n**136n-1n,U.maxUint144=2n**144n-1n,U.maxUint152=2n**152n-1n,U.maxUint160=2n**160n-1n,U.maxUint168=2n**168n-1n,U.maxUint176=2n**176n-1n,U.maxUint184=2n**184n-1n,U.maxUint192=2n**192n-1n,U.maxUint200=2n**200n-1n,U.maxUint208=2n**208n-1n,U.maxUint216=2n**216n-1n,U.maxUint224=2n**224n-1n,U.maxUint232=2n**232n-1n,U.maxUint240=2n**240n-1n,U.maxUint248=2n**248n-1n,U.maxUint256=2n**256n-1n),U}var fm;function Ct(){if(fm)return pi;fm=1,Object.defineProperty(pi,"__esModule",{value:!0}),pi.assertRequest=t;const e=Be(),o=dd(),r=ot(),n=Bt(),i=Ke(),a=We();function t(s){const{account:u,gasPrice:d,maxFeePerGas:f,maxPriorityFeePerGas:c,to:m}=s,g=u?(0,e.parseAccount)(u):void 0;if(g&&!(0,a.isAddress)(g.address))throw new r.InvalidAddressError({address:g.address});if(m&&!(0,a.isAddress)(m))throw new r.InvalidAddressError({address:m});if(typeof d<"u"&&(typeof f<"u"||typeof c<"u"))throw new i.FeeConflictError;if(f&&f>o.maxUint256)throw new n.FeeCapTooHighError({maxFeePerGas:f});if(c&&f&&c>f)throw new n.TipAboveFeeCapError({maxFeePerGas:f,maxPriorityFeePerGas:c})}return pi}var Fc={},Cn={},wt={},lm;function Uu(){if(lm)return wt;lm=1,Object.defineProperty(wt,"__esModule",{value:!0}),wt.MaxFeePerGasTooLowError=wt.Eip1559FeesNotSupportedError=wt.BaseFeeScalarError=void 0;const e=wr(),o=se();class r extends o.BaseError{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}wt.BaseFeeScalarError=r;class n extends o.BaseError{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}wt.Eip1559FeesNotSupportedError=n;class i extends o.BaseError{constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${(0,e.formatGwei)(t)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}return wt.MaxFeePerGasTooLowError=i,wt}var xn={},_i={},qn={},mm;function fd(){if(mm)return qn;mm=1,Object.defineProperty(qn,"__esModule",{value:!0}),qn.BlockNotFoundError=void 0;const e=se();class o extends e.BaseError{constructor({blockHash:n,blockNumber:i}){let a="Block";n&&(a=`Block at hash "${n}"`),i&&(a=`Block at number "${i}"`),super(`${a} could not be found.`,{name:"BlockNotFoundError"})}}return qn.BlockNotFoundError=o,qn}var $r={},$c={},bm;function lo(){return bm||(bm=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.defineTransaction=e.transactionType=void 0,e.formatTransaction=n;const o=Ie(),r=fo();e.transactionType={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function n(a){const t={...a,blockHash:a.blockHash?a.blockHash:null,blockNumber:a.blockNumber?BigInt(a.blockNumber):null,chainId:a.chainId?(0,o.hexToNumber)(a.chainId):void 0,gas:a.gas?BigInt(a.gas):void 0,gasPrice:a.gasPrice?BigInt(a.gasPrice):void 0,maxFeePerBlobGas:a.maxFeePerBlobGas?BigInt(a.maxFeePerBlobGas):void 0,maxFeePerGas:a.maxFeePerGas?BigInt(a.maxFeePerGas):void 0,maxPriorityFeePerGas:a.maxPriorityFeePerGas?BigInt(a.maxPriorityFeePerGas):void 0,nonce:a.nonce?(0,o.hexToNumber)(a.nonce):void 0,to:a.to?a.to:null,transactionIndex:a.transactionIndex?Number(a.transactionIndex):null,type:a.type?e.transactionType[a.type]:void 0,typeHex:a.type?a.type:void 0,value:a.value?BigInt(a.value):void 0,v:a.v?BigInt(a.v):void 0};return a.authorizationList&&(t.authorizationList=i(a.authorizationList)),t.yParity=(()=>{if(a.yParity)return Number(a.yParity);if(typeof t.v=="bigint"){if(t.v===0n||t.v===27n)return 0;if(t.v===1n||t.v===28n)return 1;if(t.v>=35n)return t.v%2n===0n?1:0}})(),t.type==="legacy"&&(delete t.accessList,delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas,delete t.yParity),t.type==="eip2930"&&(delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),t.type==="eip1559"&&delete t.maxFeePerBlobGas,t}e.defineTransaction=(0,r.defineFormatter)("transaction",n);function i(a){return a.map(t=>({contractAddress:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}}($c)),$c}var hm;function Lu(){if(hm)return $r;hm=1,Object.defineProperty($r,"__esModule",{value:!0}),$r.defineBlock=void 0,$r.formatBlock=r;const e=fo(),o=lo();function r(n){const i=(n.transactions??[]).map(a=>typeof a=="string"?a:(0,o.formatTransaction)(a));return{...n,baseFeePerGas:n.baseFeePerGas?BigInt(n.baseFeePerGas):null,blobGasUsed:n.blobGasUsed?BigInt(n.blobGasUsed):void 0,difficulty:n.difficulty?BigInt(n.difficulty):void 0,excessBlobGas:n.excessBlobGas?BigInt(n.excessBlobGas):void 0,gasLimit:n.gasLimit?BigInt(n.gasLimit):void 0,gasUsed:n.gasUsed?BigInt(n.gasUsed):void 0,hash:n.hash?n.hash:null,logsBloom:n.logsBloom?n.logsBloom:null,nonce:n.nonce?n.nonce:null,number:n.number?BigInt(n.number):null,size:n.size?BigInt(n.size):void 0,timestamp:n.timestamp?BigInt(n.timestamp):void 0,transactions:i,totalDifficulty:n.totalDifficulty?BigInt(n.totalDifficulty):null}}return $r.defineBlock=(0,e.defineFormatter)("block",r),$r}var ym;function Xr(){if(ym)return _i;ym=1,Object.defineProperty(_i,"__esModule",{value:!0}),_i.getBlock=n;const e=fd(),o=te(),r=Lu();async function n(i,{blockHash:a,blockNumber:t,blockTag:s,includeTransactions:u}={}){var h,b,p;const d=s??"latest",f=u??!1,c=t!==void 0?(0,o.numberToHex)(t):void 0;let m=null;if(a?m=await i.request({method:"eth_getBlockByHash",params:[a,f]},{dedupe:!0}):m=await i.request({method:"eth_getBlockByNumber",params:[c||d,f]},{dedupe:!!c}),!m)throw new e.BlockNotFoundError({blockHash:a,blockNumber:t});return(((p=(b=(h=i.chain)==null?void 0:h.formatters)==null?void 0:b.block)==null?void 0:p.format)||r.formatBlock)(m)}return _i}var vi={},gm;function ld(){if(gm)return vi;gm=1,Object.defineProperty(vi,"__esModule",{value:!0}),vi.getGasPrice=e;async function e(o){const r=await o.request({method:"eth_gasPrice"});return BigInt(r)}return vi}var pm;function A0(){if(pm)return xn;pm=1,Object.defineProperty(xn,"__esModule",{value:!0}),xn.estimateMaxPriorityFeePerGas=a,xn.internal_estimateMaxPriorityFeePerGas=t;const e=Uu(),o=Ie(),r=me(),n=Xr(),i=ld();async function a(s,u){return t(s,u)}async function t(s,u){var m,g;const{block:d,chain:f=s.chain,request:c}=u||{};try{const h=((m=f==null?void 0:f.fees)==null?void 0:m.maxPriorityFeePerGas)??((g=f==null?void 0:f.fees)==null?void 0:g.defaultPriorityFee);if(typeof h=="function"){const p=d||await(0,r.getAction)(s,n.getBlock,"getBlock")({}),_=await h({block:p,client:s,request:c});if(_===null)throw new Error;return _}if(typeof h<"u")return h;const b=await s.request({method:"eth_maxPriorityFeePerGas"});return(0,o.hexToBigInt)(b)}catch{const[h,b]=await Promise.all([d?Promise.resolve(d):(0,r.getAction)(s,n.getBlock,"getBlock")({}),(0,r.getAction)(s,i.getGasPrice,"getGasPrice")({})]);if(typeof h.baseFeePerGas!="bigint")throw new e.Eip1559FeesNotSupportedError;const p=b-h.baseFeePerGas;return p<0n?0n:p}}return xn}var _m;function T0(){if(_m)return Cn;_m=1,Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.estimateFeesPerGas=a,Cn.internal_estimateFeesPerGas=t;const e=Uu(),o=me(),r=A0(),n=Xr(),i=ld();async function a(s,u){return t(s,u)}async function t(s,u){var P,v;const{block:d,chain:f=s.chain,request:c,type:m="eip1559"}=u||{},g=await(async()=>{var E,l;return typeof((E=f==null?void 0:f.fees)==null?void 0:E.baseFeeMultiplier)=="function"?f.fees.baseFeeMultiplier({block:d,client:s,request:c}):((l=f==null?void 0:f.fees)==null?void 0:l.baseFeeMultiplier)??1.2})();if(g<1)throw new e.BaseFeeScalarError;const b=10**(((P=g.toString().split(".")[1])==null?void 0:P.length)??0),p=E=>E*BigInt(Math.ceil(g*b))/BigInt(b),_=d||await(0,o.getAction)(s,n.getBlock,"getBlock")({});if(typeof((v=f==null?void 0:f.fees)==null?void 0:v.estimateFeesPerGas)=="function"){const E=await f.fees.estimateFeesPerGas({block:d,client:s,multiply:p,request:c,type:m});if(E!==null)return E}if(m==="eip1559"){if(typeof _.baseFeePerGas!="bigint")throw new e.Eip1559FeesNotSupportedError;const E=typeof(c==null?void 0:c.maxPriorityFeePerGas)=="bigint"?c.maxPriorityFeePerGas:await(0,r.internal_estimateMaxPriorityFeePerGas)(s,{block:_,chain:f,request:c}),l=p(_.baseFeePerGas);return{maxFeePerGas:(c==null?void 0:c.maxFeePerGas)??l+E,maxPriorityFeePerGas:E}}return{gasPrice:(c==null?void 0:c.gasPrice)??p(await(0,o.getAction)(s,i.getGasPrice,"getGasPrice")({}))}}return Cn}var Ei={},vm;function md(){if(vm)return Ei;vm=1,Object.defineProperty(Ei,"__esModule",{value:!0}),Ei.getTransactionCount=r;const e=Ie(),o=te();async function r(n,{address:i,blockTag:a="latest",blockNumber:t}){const s=await n.request({method:"eth_getTransactionCount",params:[i,t?(0,o.numberToHex)(t):a]},{dedupe:!!t});return(0,e.hexToNumber)(s)}return Ei}var ji={},Em;function Du(){if(Em)return ji;Em=1,Object.defineProperty(ji,"__esModule",{value:!0}),ji.blobsToCommitments=r;const e=he(),o=te();function r(n){const{kzg:i}=n,a=n.to??(typeof n.blobs[0]=="string"?"hex":"bytes"),t=typeof n.blobs[0]=="string"?n.blobs.map(u=>(0,e.hexToBytes)(u)):n.blobs,s=[];for(const u of t)s.push(Uint8Array.from(i.blobToKzgCommitment(u)));return a==="bytes"?s:s.map(u=>(0,o.bytesToHex)(u))}return ji}var Pi={},jm;function Gu(){if(jm)return Pi;jm=1,Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.blobsToProofs=r;const e=he(),o=te();function r(n){const{kzg:i}=n,a=n.to??(typeof n.blobs[0]=="string"?"hex":"bytes"),t=typeof n.blobs[0]=="string"?n.blobs.map(d=>(0,e.hexToBytes)(d)):n.blobs,s=typeof n.commitments[0]=="string"?n.commitments.map(d=>(0,e.hexToBytes)(d)):n.commitments,u=[];for(let d=0;d(0,o.bytesToHex)(d))}return Pi}var wi={},Ai={},Ti={},Pm;function bd(){if(Pm)return Ti;Pm=1,Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.sha256=i;const e=ad(),o=ke(),r=he(),n=te();function i(a,t){const s=t||"hex",u=(0,e.sha256)((0,o.isHex)(a,{strict:!1})?(0,r.toBytes)(a):a);return s==="bytes"?u:(0,n.toHex)(u)}return Ti}var wm;function hd(){if(wm)return Ai;wm=1,Object.defineProperty(Ai,"__esModule",{value:!0}),Ai.commitmentToVersionedHash=r;const e=te(),o=bd();function r(n){const{commitment:i,version:a=1}=n,t=n.to??(typeof i=="string"?"hex":"bytes"),s=(0,o.sha256)(i,"bytes");return s.set([a],0),t==="bytes"?s:(0,e.bytesToHex)(s)}return Ai}var Am;function yd(){if(Am)return wi;Am=1,Object.defineProperty(wi,"__esModule",{value:!0}),wi.commitmentsToVersionedHashes=o;const e=hd();function o(r){const{commitments:n,version:i}=r,a=r.to??(typeof n[0]=="string"?"hex":"bytes"),t=[];for(const s of n)t.push((0,e.commitmentToVersionedHash)({commitment:s,to:a,version:i}));return t}return wi}var Ii={},Si={},Hc={},Tm;function Y1(){return Tm||(Tm=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.maxBytesPerTransaction=e.bytesPerBlob=e.fieldElementsPerBlob=e.bytesPerFieldElement=void 0;const o=6;e.bytesPerFieldElement=32,e.fieldElementsPerBlob=4096,e.bytesPerBlob=e.bytesPerFieldElement*e.fieldElementsPerBlob,e.maxBytesPerTransaction=e.bytesPerBlob*o-1-1*e.fieldElementsPerBlob*o}(Hc)),Hc}var Qe={},Mn={},Im;function I0(){return Im||(Im=1,Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.versionedHashVersionKzg=void 0,Mn.versionedHashVersionKzg=1),Mn}var Sm;function S0(){if(Sm)return Qe;Sm=1,Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.InvalidVersionedHashVersionError=Qe.InvalidVersionedHashSizeError=Qe.EmptyBlobError=Qe.BlobSizeTooLargeError=void 0;const e=I0(),o=se();class r extends o.BaseError{constructor({maxSize:s,size:u}){super("Blob size is too large.",{metaMessages:[`Max: ${s} bytes`,`Given: ${u} bytes`],name:"BlobSizeTooLargeError"})}}Qe.BlobSizeTooLargeError=r;class n extends o.BaseError{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}Qe.EmptyBlobError=n;class i extends o.BaseError{constructor({hash:s,size:u}){super(`Versioned hash "${s}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${u}`],name:"InvalidVersionedHashSizeError"})}}Qe.InvalidVersionedHashSizeError=i;class a extends o.BaseError{constructor({hash:s,version:u}){super(`Versioned hash "${s}" version is invalid.`,{metaMessages:[`Expected: ${e.versionedHashVersionKzg}`,`Received: ${u}`],name:"InvalidVersionedHashVersionError"})}}return Qe.InvalidVersionedHashVersionError=a,Qe}var Rm;function R0(){if(Rm)return Si;Rm=1,Object.defineProperty(Si,"__esModule",{value:!0}),Si.toBlobs=t;const e=Y1(),o=S0(),r=oo(),n=Ve(),i=he(),a=te();function t(s){const u=s.to??(typeof s.data=="string"?"hex":"bytes"),d=typeof s.data=="string"?(0,i.hexToBytes)(s.data):s.data,f=(0,n.size)(d);if(!f)throw new o.EmptyBlobError;if(f>e.maxBytesPerTransaction)throw new o.BlobSizeTooLargeError({maxSize:e.maxBytesPerTransaction,size:f});const c=[];let m=!0,g=0;for(;m;){const h=(0,r.createCursor)(new Uint8Array(e.bytesPerBlob));let b=0;for(;bh.bytes):c.map(h=>(0,a.bytesToHex)(h.bytes))}return Si}var Bm;function Vu(){if(Bm)return Ii;Bm=1,Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.toBlobSidecars=n;const e=Du(),o=Gu(),r=R0();function n(i){const{data:a,kzg:t,to:s}=i,u=i.blobs??(0,r.toBlobs)({data:a,to:s}),d=i.commitments??(0,e.blobsToCommitments)({blobs:u,kzg:t,to:s}),f=i.proofs??(0,o.blobsToProofs)({blobs:u,commitments:d,kzg:t,to:s}),c=[];for(let m=0;m"u")try{T.type=(0,g.getTransactionType)(T)}catch{let k=e.eip1559NetworkCache.get(p.uid);if(typeof k>"u"){const $=await A();k=typeof($==null?void 0:$.baseFeePerGas)=="bigint",e.eip1559NetworkCache.set(p.uid,k)}T.type=k?"eip1559":"legacy"}if(w.includes("fees"))if(T.type!=="legacy"&&T.type!=="eip2930"){if(typeof T.maxFeePerGas>"u"||typeof T.maxPriorityFeePerGas>"u"){const k=await A(),{maxFeePerGas:$,maxPriorityFeePerGas:M}=await(0,r.internal_estimateFeesPerGas)(p,{block:k,chain:v,request:T});if(typeof _.maxPriorityFeePerGas>"u"&&_.maxFeePerGas&&_.maxFeePerGas"u"){const k=await A(),{gasPrice:$}=await(0,r.internal_estimateFeesPerGas)(p,{block:k,chain:v,request:T,type:"legacy"});T.gasPrice=$}}if(w.includes("gas")&&typeof E>"u"&&(T.gas=await(0,c.getAction)(p,n.estimateGas,"estimateGas")({...T,account:q&&{address:q.address,type:"json-rpc"}})),w.includes("nonce")&&typeof y>"u"&&q)if(I){const k=await F();T.nonce=await I.consume({address:q.address,chainId:k,client:p})}else T.nonce=await(0,c.getAction)(p,a.getTransactionCount,"getTransactionCount")({address:q.address,blockTag:"pending"});return(0,m.assertRequest)(T),delete T.parameters,T}}(Fc)),Fc}var Oi={},qm;function B0(){if(qm)return Oi;qm=1,Object.defineProperty(Oi,"__esModule",{value:!0}),Oi.getBalance=o;const e=te();async function o(r,{address:n,blockNumber:i,blockTag:a="latest"}){const t=i?(0,e.numberToHex)(i):void 0,s=await r.request({method:"eth_getBalance",params:[n,t||a]});return BigInt(s)}return Oi}var Mm;function gd(){if(Mm)return ci;Mm=1,Object.defineProperty(ci,"__esModule",{value:!0}),ci.estimateGas=c;const e=Be(),o=se(),r=j0(),n=te(),i=w0(),a=Yr(),t=Ot(),s=cd(),u=Ct(),d=Ku(),f=B0();async function c(m,g){var p,_,j;const{account:h=m.account}=g,b=h?(0,e.parseAccount)(h):void 0;try{let G=function(W){const{block:J,request:re,rpcStateOverride:K}=W;return m.request({method:"eth_estimateGas",params:K?[re,J??"latest",K]:J?[re,J]:[re]})};const{accessList:P,authorizationList:v,blobs:E,blobVersionedHashes:l,blockNumber:y,blockTag:I,data:w,gas:B,gasPrice:q,maxFeePerBlobGas:T,maxFeePerGas:O,maxPriorityFeePerGas:A,nonce:x,value:F,stateOverride:k,...$}=await(0,d.prepareTransactionRequest)(m,{...g,parameters:(b==null?void 0:b.type)==="local"?void 0:["blobVersionedHashes"]}),S=(y?(0,n.numberToHex)(y):void 0)||I,R=(0,s.serializeStateOverride)(k),C=await(async()=>{if($.to)return $.to;if(v&&v.length>0)return await(0,r.recoverAuthorizationAddress)({authorization:v[0]}).catch(()=>{throw new o.BaseError("`to` is required. Could not infer from `authorizationList`")})})();(0,u.assertRequest)(g);const H=(j=(_=(p=m.chain)==null?void 0:p.formatters)==null?void 0:_.transactionRequest)==null?void 0:j.format,D=(H||t.formatTransactionRequest)({...(0,a.extract)($,{format:H}),from:b==null?void 0:b.address,accessList:P,authorizationList:v,blobs:E,blobVersionedHashes:l,data:w,gas:B,gasPrice:q,maxFeePerBlobGas:T,maxFeePerGas:O,maxPriorityFeePerGas:A,nonce:x,to:C,value:F});let V=BigInt(await G({block:S,request:D,rpcStateOverride:R}));if(v){const W=await(0,f.getBalance)(m,{address:D.from}),J=await Promise.all(v.map(async re=>{const{contractAddress:K}=re,ee=await G({block:S,request:{authorizationList:void 0,data:w,from:b==null?void 0:b.address,to:K,value:(0,n.numberToHex)(W)},rpcStateOverride:R}).catch(()=>100000n);return 2n*BigInt(ee)}));V+=J.reduce((re,K)=>re+K,0n)}return V}catch(P){throw(0,i.getEstimateGasError)(P,{...g,account:b,chain:m.chain})}}return ci}var km;function O0(){if(km)return Yo;km=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.estimateContractGas=a;const e=Be(),o=Ye(),r=Qt(),n=me(),i=gd();async function a(t,s){const{abi:u,address:d,args:f,functionName:c,dataSuffix:m,...g}=s,h=(0,o.encodeFunctionData)({abi:u,args:f,functionName:c});try{return await(0,n.getAction)(t,i.estimateGas,"estimateGas")({data:`${h}${m?m.replace("0x",""):""}`,to:d,...g})}catch(b){const p=g.account?(0,e.parseAccount)(g.account):void 0;throw(0,r.getContractError)(b,{abi:u,address:d,args:f,docsPath:"/docs/contract/estimateContractGas",functionName:c,sender:p==null?void 0:p.address})}}return Yo}var Ci={},xi={},qi={},Mi={},Fm;function xt(){if(Fm)return Mi;Fm=1,Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.isAddressEqual=r;const e=ot(),o=We();function r(n,i){if(!(0,o.isAddress)(n,{strict:!1}))throw new e.InvalidAddressError({address:n});if(!(0,o.isAddress)(i,{strict:!1}))throw new e.InvalidAddressError({address:i});return n.toLowerCase()===i.toLowerCase()}return Mi}var ki={},$m;function bo(){if($m)return ki;$m=1,Object.defineProperty(ki,"__esModule",{value:!0}),ki.decodeEventLog=s;const e=_e(),o=Ve(),r=Jr(),n=g0(),i=Yt(),a=St(),t="/docs/contract/decodeEventLog";function s(d){const{abi:f,data:c,strict:m,topics:g}=d,h=m??!0,[b,...p]=g;if(!b)throw new e.AbiEventSignatureEmptyTopicsError({docsPath:t});const _=f.length===1?f[0]:f.find(I=>I.type==="event"&&b===(0,r.toEventSelector)((0,a.formatAbiItem)(I)));if(!(_&&"name"in _)||_.type!=="event")throw new e.AbiEventSignatureNotFoundError(b,{docsPath:t});const{name:j,inputs:P}=_,v=P==null?void 0:P.some(I=>!("name"in I&&I.name));let E=v?[]:{};const l=P.filter(I=>"indexed"in I&&I.indexed);for(let I=0;I!("indexed"in I&&I.indexed));if(y.length>0){if(c&&c!=="0x")try{const I=(0,i.decodeAbiParameters)(y,c);if(I)if(v)E=[...E,...I];else for(let w=0;w0?E:void 0}}function u({param:d,value:f}){return d.type==="string"||d.type==="bytes"||d.type==="tuple"||d.type.match(/^(.*)\[(\d+)?\]$/)?f:((0,i.decodeAbiParameters)([d],f)||[])[0]}return ki}var Hm;function ho(){if(Hm)return qi;Hm=1,Object.defineProperty(qi,"__esModule",{value:!0}),qi.parseEventLogs=t;const e=_e(),o=xt(),r=he(),n=Ne(),i=Jr(),a=bo();function t(u){const{abi:d,args:f,logs:c,strict:m=!0}=u,g=(()=>{if(u.eventName)return Array.isArray(u.eventName)?u.eventName:[u.eventName]})();return c.map(h=>{var b;try{const p=d.find(j=>j.type==="event"&&h.topics[0]===(0,i.toEventSelector)(j));if(!p)return null;const _=(0,a.decodeEventLog)({...h,abi:[p],strict:m});return g&&!g.includes(_.eventName)||!s({args:_.args,inputs:p.inputs,matchArgs:f})?null:{..._,...h}}catch(p){let _,j;if(p instanceof e.AbiEventSignatureNotFoundError)return null;if(p instanceof e.DecodeLogDataMismatch||p instanceof e.DecodeLogTopicsMismatch){if(m)return null;_=p.abiItem.name,j=(b=p.abiItem.inputs)==null?void 0:b.some(P=>!("name"in P&&P.name))}return{...h,args:j?[]:{},eventName:_}}}).filter(Boolean)}function s(u){const{args:d,inputs:f,matchArgs:c}=u;if(!c)return!0;if(!d)return!1;function m(g,h,b){try{return g.type==="address"?(0,o.isAddressEqual)(h,b):g.type==="string"||g.type==="bytes"?(0,n.keccak256)((0,r.toBytes)(h))===b:h===b}catch{return!1}}return Array.isArray(d)&&Array.isArray(c)?c.every((g,h)=>{if(g==null)return!0;const b=f[h];return b?(Array.isArray(g)?g:[g]).some(_=>m(b,_,d[h])):!1}):typeof d=="object"&&!Array.isArray(d)&&typeof c=="object"&&!Array.isArray(c)?Object.entries(c).every(([g,h])=>{if(h==null)return!0;const b=f.find(_=>_.name===g);return b?(Array.isArray(h)?h:[h]).some(_=>m(b,_,d[g])):!1}):!1}return qi}var Fi={},Nm;function qt(){if(Nm)return Fi;Nm=1,Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.formatLog=e;function e(o,{args:r,eventName:n}={}){return{...o,blockHash:o.blockHash?o.blockHash:null,blockNumber:o.blockNumber?BigInt(o.blockNumber):null,logIndex:o.logIndex?Number(o.logIndex):null,transactionHash:o.transactionHash?o.transactionHash:null,transactionIndex:o.transactionIndex?Number(o.transactionIndex):null,...n?{args:r,eventName:n}:{}}}return Fi}var zm;function pd(){if(zm)return xi;zm=1,Object.defineProperty(xi,"__esModule",{value:!0}),xi.getLogs=i;const e=Pr(),o=ho(),r=te(),n=qt();async function i(a,{address:t,blockHash:s,fromBlock:u,toBlock:d,event:f,events:c,args:m,strict:g}={}){const h=g??!1,b=c??(f?[f]:void 0);let p=[];b&&(p=[b.flatMap(v=>(0,e.encodeEventTopics)({abi:[v],eventName:v.name,args:c?void 0:m}))],f&&(p=p[0]));let _;s?_=await a.request({method:"eth_getLogs",params:[{address:t,topics:p,blockHash:s}]}):_=await a.request({method:"eth_getLogs",params:[{address:t,topics:p,fromBlock:typeof u=="bigint"?(0,r.numberToHex)(u):u,toBlock:typeof d=="bigint"?(0,r.numberToHex)(d):d}]});const j=_.map(P=>(0,n.formatLog)(P));return b?(0,o.parseEventLogs)({abi:b,args:m,logs:j,strict:h}):j}return xi}var Um;function _d(){if(Um)return Ci;Um=1,Object.defineProperty(Ci,"__esModule",{value:!0}),Ci.getContractEvents=n;const e=Rt(),o=me(),r=pd();async function n(i,a){const{abi:t,address:s,args:u,blockHash:d,eventName:f,fromBlock:c,toBlock:m,strict:g}=a,h=f?(0,e.getAbiItem)({abi:t,name:f}):void 0,b=h?void 0:t.filter(p=>p.type==="event");return(0,o.getAction)(i,r.getLogs,"getLogs")({address:s,args:u,blockHash:d,event:h,events:b,fromBlock:c,toBlock:m,strict:g})}return Ci}var $i={},Hi={},Lm;function Mt(){if(Lm)return Hi;Lm=1,Object.defineProperty(Hi,"__esModule",{value:!0}),Hi.decodeFunctionResult=i;const e=_e(),o=Yt(),r=Rt(),n="/docs/contract/decodeFunctionResult";function i(a){const{abi:t,args:s,functionName:u,data:d}=a;let f=t[0];if(u){const m=(0,r.getAbiItem)({abi:t,args:s,name:u});if(!m)throw new e.AbiFunctionNotFoundError(u,{docsPath:n});f=m}if(f.type!=="function")throw new e.AbiFunctionNotFoundError(void 0,{docsPath:n});if(!f.outputs)throw new e.AbiFunctionOutputsNotFoundError(f.name,{docsPath:n});const c=(0,o.decodeAbiParameters)(f.outputs,d);if(c&&c.length>1)return c;if(c&&c.length===1)return c[0]}return Hi}var kn={},ge={},Dm;function Tr(){if(Dm)return ge;Dm=1,Object.defineProperty(ge,"__esModule",{value:!0}),ge.erc4626Abi=ge.erc721Abi=ge.erc20Abi_bytes32=ge.erc20Abi=ge.universalSignatureValidatorAbi=ge.smartAccountAbi=ge.addressResolverAbi=ge.textResolverAbi=ge.universalResolverReverseAbi=ge.universalResolverResolveAbi=ge.multicall3Abi=void 0,ge.multicall3Abi=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}];const e=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"},{inputs:[],name:"ResolverNotContract",type:"error"},{inputs:[{name:"returnData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{components:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"errors",type:"tuple[]"}],name:"HttpError",type:"error"}];return ge.universalResolverResolveAbi=[...e,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]},{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],ge.universalResolverReverseAbi=[...e,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]},{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],ge.textResolverAbi=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],ge.addressResolverAbi=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],ge.smartAccountAbi=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],ge.universalSignatureValidatorAbi=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}],ge.erc20Abi=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}],ge.erc20Abi_bytes32=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"bytes32"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"bytes32"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}],ge.erc721Abi=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!0,name:"tokenId",type:"uint256"}]},{type:"event",name:"ApprovalForAll",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"operator",type:"address"},{indexed:!1,name:"approved",type:"bool"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!0,name:"tokenId",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"payable",inputs:[{name:"spender",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"getApproved",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{type:"address"}]},{type:"function",name:"isApprovedForAll",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"operator",type:"address"}],outputs:[{type:"bool"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"ownerOf",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"owner",type:"address"}]},{type:"function",name:"safeTransferFrom",stateMutability:"payable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]},{type:"function",name:"safeTransferFrom",stateMutability:"nonpayable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"id",type:"uint256"},{name:"data",type:"bytes"}],outputs:[]},{type:"function",name:"setApprovalForAll",stateMutability:"nonpayable",inputs:[{name:"operator",type:"address"},{name:"approved",type:"bool"}],outputs:[]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"tokenByIndex",stateMutability:"view",inputs:[{name:"index",type:"uint256"}],outputs:[{type:"uint256"}]},{type:"function",name:"tokenByIndex",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"index",type:"uint256"}],outputs:[{name:"tokenId",type:"uint256"}]},{type:"function",name:"tokenURI",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transferFrom",stateMutability:"payable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"tokeId",type:"uint256"}],outputs:[]}],ge.erc4626Abi=[{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"sender",type:"address"},{indexed:!0,name:"receiver",type:"address"},{indexed:!1,name:"assets",type:"uint256"},{indexed:!1,name:"shares",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"sender",type:"address"},{indexed:!0,name:"receiver",type:"address"},{indexed:!0,name:"owner",type:"address"},{indexed:!1,name:"assets",type:"uint256"},{indexed:!1,name:"shares",type:"uint256"}],name:"Withdraw",type:"event"},{inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],name:"allowance",outputs:[{type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],name:"approve",outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"asset",outputs:[{name:"assetTokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{name:"account",type:"address"}],name:"balanceOf",outputs:[{type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"}],name:"convertToAssets",outputs:[{name:"assets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"assets",type:"uint256"}],name:"convertToShares",outputs:[{name:"shares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"assets",type:"uint256"},{name:"receiver",type:"address"}],name:"deposit",outputs:[{name:"shares",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"caller",type:"address"}],name:"maxDeposit",outputs:[{name:"maxAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"caller",type:"address"}],name:"maxMint",outputs:[{name:"maxShares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"owner",type:"address"}],name:"maxRedeem",outputs:[{name:"maxShares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"owner",type:"address"}],name:"maxWithdraw",outputs:[{name:"maxAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"},{name:"receiver",type:"address"}],name:"mint",outputs:[{name:"assets",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"assets",type:"uint256"}],name:"previewDeposit",outputs:[{name:"shares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"}],name:"previewMint",outputs:[{name:"assets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"}],name:"previewRedeem",outputs:[{name:"assets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"assets",type:"uint256"}],name:"previewWithdraw",outputs:[{name:"shares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"},{name:"receiver",type:"address"},{name:"owner",type:"address"}],name:"redeem",outputs:[{name:"assets",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"totalAssets",outputs:[{name:"totalManagedAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"to",type:"address"},{name:"amount",type:"uint256"}],name:"transfer",outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"assets",type:"uint256"},{name:"receiver",type:"address"},{name:"owner",type:"address"}],name:"withdraw",outputs:[{name:"shares",type:"uint256"}],stateMutability:"nonpayable",type:"function"}],ge}var Fn={},Gm;function X1(){return Gm||(Gm=1,Object.defineProperty(Fn,"__esModule",{value:!0}),Fn.aggregate3Signature=void 0,Fn.aggregate3Signature="0x82ad56cb"),Fn}var At={},Vm;function Zu(){return Vm||(Vm=1,Object.defineProperty(At,"__esModule",{value:!0}),At.universalSignatureValidatorByteCode=At.deploylessCallViaFactoryBytecode=At.deploylessCallViaBytecodeBytecode=void 0,At.deploylessCallViaBytecodeBytecode="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",At.deploylessCallViaFactoryBytecode="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",At.universalSignatureValidatorByteCode="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572"),At}var Ge={},Wm;function yo(){if(Wm)return Ge;Wm=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.InvalidChainIdError=Ge.ClientChainNotConfiguredError=Ge.ChainNotFoundError=Ge.ChainMismatchError=Ge.ChainDoesNotSupportContract=void 0;const e=se();class o extends e.BaseError{constructor({blockNumber:s,chain:u,contract:d}){super(`Chain "${u.name}" does not support contract "${d.name}".`,{metaMessages:["This could be due to any of the following:",...s&&d.blockCreated&&d.blockCreated>s?[`- The contract "${d.name}" was not deployed until block ${d.blockCreated} (current block ${s}).`]:[`- The chain does not have the contract "${d.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}Ge.ChainDoesNotSupportContract=o;class r extends e.BaseError{constructor({chain:s,currentChainId:u}){super(`The current chain of the wallet (id: ${u}) does not match the target chain for the transaction (id: ${s.id} – ${s.name}).`,{metaMessages:[`Current Chain ID: ${u}`,`Expected Chain ID: ${s.id} – ${s.name}`],name:"ChainMismatchError"})}}Ge.ChainMismatchError=r;class n extends e.BaseError{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(` +`),{name:"ChainNotFoundError"})}}Ge.ChainNotFoundError=n;class i extends e.BaseError{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}Ge.ClientChainNotConfiguredError=i;class a extends e.BaseError{constructor({chainId:s}){super(typeof s=="number"?`Chain ID "${s}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}return Ge.InvalidChainIdError=a,Ge}var Ni={},Km;function go(){if(Km)return Ni;Km=1,Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.encodeDeployData=i;const e=_e(),o=Fe(),r=st(),n="/docs/contract/encodeDeployData";function i(a){const{abi:t,args:s,bytecode:u}=a;if(!s||s.length===0)return u;const d=t.find(c=>"type"in c&&c.type==="constructor");if(!d)throw new e.AbiConstructorNotFoundError({docsPath:n});if(!("inputs"in d))throw new e.AbiConstructorParamsNotFoundError({docsPath:n});if(!d.inputs||d.inputs.length===0)throw new e.AbiConstructorParamsNotFoundError({docsPath:n});const f=(0,r.encodeAbiParameters)(d.inputs,s);return(0,o.concatHex)([u,f])}return Ni}var zi={},Zm;function tr(){if(Zm)return zi;Zm=1,Object.defineProperty(zi,"__esModule",{value:!0}),zi.getChainContractAddress=o;const e=yo();function o({blockNumber:r,chain:n,contract:i}){var t;const a=(t=n==null?void 0:n.contracts)==null?void 0:t[i];if(!a)throw new e.ChainDoesNotSupportContract({chain:n,contract:{name:i}});if(r&&a.blockCreated&&a.blockCreated>r)throw new e.ChainDoesNotSupportContract({blockNumber:r,chain:n,contract:{name:i,blockCreated:a.blockCreated}});return a.address}return zi}var Ui={},Jm;function vd(){if(Jm)return Ui;Jm=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.getCallError=n;const e=Xt(),o=Bt(),r=co();function n(i,{docsPath:a,...t}){const s=(()=>{const u=(0,r.getNodeError)(i,t);return u instanceof o.UnknownNodeError?i:u})();return new e.CallExecutionError(s,{docsPath:a,...t})}return Ui}var Li={},Di={},Ym;function C0(){if(Ym)return Di;Ym=1,Object.defineProperty(Di,"__esModule",{value:!0}),Di.withResolvers=e;function e(){let o=()=>{},r=()=>{};return{promise:new Promise((i,a)=>{o=i,r=a}),resolve:o,reject:r}}return Di}var Xm;function Ed(){if(Xm)return Li;Xm=1,Object.defineProperty(Li,"__esModule",{value:!0}),Li.createBatchScheduler=r;const e=C0(),o=new Map;function r({fn:n,id:i,shouldSplitBatch:a,wait:t=0,sort:s}){const u=async()=>{const g=c();d();const h=g.map(({args:b})=>b);h.length!==0&&n(h).then(b=>{s&&Array.isArray(b)&&b.sort(s);for(let p=0;p{for(let p=0;po.delete(i),f=()=>c().map(({args:g})=>g),c=()=>o.get(i)||[],m=g=>o.set(i,[...c(),g]);return{flush:d,async schedule(g){const{promise:h,resolve:b,reject:p}=(0,e.withResolvers)();return(a==null?void 0:a([...f(),g]))&&u(),c().length>0?(m({args:g,resolve:b,reject:p}),h):(m({args:g,resolve:b,reject:p}),setTimeout(u,t),h)}}}return Li}var Nc={},Tt={},Qm;function Q1(){if(Qm)return Tt;Qm=1,Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.OffchainLookupSenderMismatchError=Tt.OffchainLookupResponseMalformedError=Tt.OffchainLookupError=void 0;const e=Ce(),o=se(),r=sd();class n extends o.BaseError{constructor({callbackSelector:s,cause:u,data:d,extraData:f,sender:c,urls:m}){var g;super(u.shortMessage||"An error occurred while fetching for an offchain result.",{cause:u,metaMessages:[...u.metaMessages||[],(g=u.metaMessages)!=null&&g.length?"":[],"Offchain Gateway Call:",m&&[" Gateway URL(s):",...m.map(h=>` ${(0,r.getUrl)(h)}`)],` Sender: ${c}`,` Data: ${d}`,` Callback selector: ${s}`,` Extra data: ${f}`].flat(),name:"OffchainLookupError"})}}Tt.OffchainLookupError=n;class i extends o.BaseError{constructor({result:s,url:u}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${(0,r.getUrl)(u)}`,`Response: ${(0,e.stringify)(s)}`],name:"OffchainLookupResponseMalformedError"})}}Tt.OffchainLookupResponseMalformedError=i;class a extends o.BaseError{constructor({sender:s,to:u}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${u}`,`OffchainLookup sender address: ${s}`],name:"OffchainLookupSenderMismatchError"})}}return Tt.OffchainLookupSenderMismatchError=a,Tt}var eb;function jd(){return eb||(eb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.offchainLookupAbiItem=e.offchainLookupSignature=void 0,e.offchainLookup=f,e.ccipRequest=c;const o=po(),r=Q1(),n=at(),i=Hu(),a=st(),t=xt(),s=Fe(),u=ke(),d=Ce();e.offchainLookupSignature="0x556f1830",e.offchainLookupAbiItem={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function f(m,{blockNumber:g,blockTag:h,data:b,to:p}){const{args:_}=(0,i.decodeErrorResult)({data:b,abi:[e.offchainLookupAbiItem]}),[j,P,v,E,l]=_,{ccipRead:y}=m,I=y&&typeof(y==null?void 0:y.request)=="function"?y.request:c;try{if(!(0,t.isAddressEqual)(p,j))throw new r.OffchainLookupSenderMismatchError({sender:j,to:p});const w=await I({data:v,sender:j,urls:P}),{data:B}=await(0,o.call)(m,{blockNumber:g,blockTag:h,data:(0,s.concat)([E,(0,a.encodeAbiParameters)([{type:"bytes"},{type:"bytes"}],[w,l])]),to:p});return B}catch(w){throw new r.OffchainLookupError({callbackSelector:E,cause:w,data:b,extraData:l,sender:j,urls:P})}}async function c({data:m,sender:g,urls:h}){var p;let b=new Error("An unknown error occurred.");for(let _=0;_jd());if(w.ccipRead!==!1&&(de==null?void 0:de.slice(0,10))===we&&V)return{data:await Ae(w,{data:de,to:V})};throw Y&&(de==null?void 0:de.slice(0,10))==="0x101bb98d"?new s.CounterfactualDeploymentFailedError({factory:M}):(0,g.getCallError)(be,{...B,account:K,chain:w.chain})}}function v({request:w}){const{data:B,to:q,...T}=w;return!(!B||B.startsWith(n.aggregate3Signature)||!q||Object.values(T).filter(O=>typeof O<"u").length>0)}async function E(w,B){var N;const{batchSize:q=1024,wait:T=0}=typeof((N=w.batch)==null?void 0:N.multicall)=="object"?w.batch.multicall:{},{blockNumber:O,blockTag:A="latest",data:x,multicallAddress:F,to:k}=B;let $=F;if(!$){if(!w.chain)throw new t.ClientChainNotConfiguredError;$=(0,c.getChainContractAddress)({blockNumber:O,chain:w.chain,contract:"multicall3"})}const S=(O?(0,m.numberToHex)(O):void 0)||A,{schedule:R}=(0,p.createBatchScheduler)({id:`${w.uid}.${S}`,wait:T,shouldSplitBatch(D){return D.reduce((V,{data:W})=>V+(W.length-2),0)>q*2},fn:async D=>{const G=D.map(J=>({allowFailure:!0,callData:J.data,target:J.to})),V=(0,f.encodeFunctionData)({abi:r.multicall3Abi,args:[G],functionName:"aggregate3"}),W=await w.request({method:"eth_call",params:[{data:V,to:$},S]});return(0,u.decodeFunctionResult)({abi:r.multicall3Abi,args:[G],functionName:"aggregate3",data:W||"0x"})}}),[{returnData:C,success:H}]=await R({data:x,to:k});if(!H)throw new s.RawContractError({data:C});return C==="0x"?{data:void 0}:{data:C}}function l(w){const{code:B,data:q}=w;return(0,d.encodeDeployData)({abi:(0,e.parseAbi)(["constructor(bytes, bytes)"]),bytecode:i.deploylessCallViaBytecodeBytecode,args:[B,q]})}function y(w){const{data:B,factory:q,factoryData:T,to:O}=w;return(0,d.encodeDeployData)({abi:(0,e.parseAbi)(["constructor(address, bytes, address, bytes)"]),bytecode:i.deploylessCallViaFactoryBytecode,args:[O,B,q,T]})}function I(w){var q;if(!(w instanceof a.BaseError))return;const B=w.walk();return typeof(B==null?void 0:B.data)=="object"?(q=B.data)==null?void 0:q.data:B.data}return kn}var rb;function kt(){if(rb)return $i;rb=1,Object.defineProperty($i,"__esModule",{value:!0}),$i.readContract=a;const e=Mt(),o=Ye(),r=Qt(),n=me(),i=po();async function a(t,s){const{abi:u,address:d,args:f,functionName:c,...m}=s,g=(0,o.encodeFunctionData)({abi:u,args:f,functionName:c});try{const{data:h}=await(0,n.getAction)(t,i.call,"call")({...m,data:g,to:d});return(0,e.decodeFunctionResult)({abi:u,args:f,functionName:c,data:h||"0x"})}catch(h){throw(0,r.getContractError)(h,{abi:u,address:d,args:f,docsPath:"/docs/contract/readContract",functionName:c})}}return $i}var Gi={},nb;function x0(){if(nb)return Gi;nb=1,Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.simulateContract=t;const e=Be(),o=Mt(),r=Ye(),n=Qt(),i=me(),a=po();async function t(s,u){const{abi:d,address:f,args:c,dataSuffix:m,functionName:g,...h}=u,b=h.account?(0,e.parseAccount)(h.account):s.account,p=(0,r.encodeFunctionData)({abi:d,args:c,functionName:g});try{const{data:_}=await(0,i.getAction)(s,a.call,"call")({batch:!1,data:`${p}${m?m.replace("0x",""):""}`,to:f,...h,account:b}),j=(0,o.decodeFunctionResult)({abi:d,args:c,functionName:g,data:_||"0x"}),P=d.filter(v=>"name"in v&&v.name===u.functionName);return{result:j,request:{abi:P,address:f,args:c,dataSuffix:m,functionName:g,...h,account:b}}}catch(_){throw(0,n.getContractError)(_,{abi:d,address:f,args:c,docsPath:"/docs/contract/simulateContract",functionName:g,sender:b==null?void 0:b.address})}}return Gi}var Vi={},zc={},ob;function Qr(){return ob||(ob=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.cleanupCache=e.listenersCache=void 0,e.observe=r,e.listenersCache=new Map,e.cleanupCache=new Map;let o=0;function r(n,i,a){const t=++o,s=()=>e.listenersCache.get(n)||[],u=()=>{const g=s();e.listenersCache.set(n,g.filter(h=>h.id!==t))},d=()=>{const g=s();if(!g.some(b=>b.id===t))return;const h=e.cleanupCache.get(n);g.length===1&&h&&h(),u()},f=s();if(e.listenersCache.set(n,[...f,{id:t,fns:i}]),f.length>0)return d;const c={};for(const g in i)c[g]=(...h)=>{var p,_;const b=s();if(b.length!==0)for(const j of b)(_=(p=j.fns)[g])==null||_.call(p,...h)};const m=a(c);return typeof m=="function"&&e.cleanupCache.set(n,m),d}}(zc)),zc}var Wi={},Ki={},ib;function Pd(){if(ib)return Ki;ib=1,Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.wait=e;async function e(o){return new Promise(r=>setTimeout(r,o))}return Ki}var sb;function _o(){if(sb)return Wi;sb=1,Object.defineProperty(Wi,"__esModule",{value:!0}),Wi.poll=o;const e=Pd();function o(r,{emitOnBegin:n,initialWaitTime:i,interval:a}){let t=!0;const s=()=>t=!1;return(async()=>{let d;n&&(d=await r({unpoll:s}));const f=await(i==null?void 0:i(d))??a;await(0,e.wait)(f);const c=async()=>{t&&(await r({unpoll:s}),await(0,e.wait)(a),c())};c()})(),s}return Wi}var $n={},Uc={},ab;function e_(){return ab||(ab=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.responseCache=e.promiseCache=void 0,e.getCache=o,e.withCache=r,e.promiseCache=new Map,e.responseCache=new Map;function o(n){const i=(s,u)=>({clear:()=>u.delete(s),get:()=>u.get(s),set:d=>u.set(s,d)}),a=i(n,e.promiseCache),t=i(n,e.responseCache);return{clear:()=>{a.clear(),t.clear()},promise:a,response:t}}async function r(n,{cacheKey:i,cacheTime:a=Number.POSITIVE_INFINITY}){const t=o(i),s=t.response.get();if(s&&a>0&&new Date().getTime()-s.created.getTime()`blockNumber.${i}`;function r(i){return(0,e.getCache)(o(i))}async function n(i,{cacheTime:a=i.cacheTime}={}){const t=await(0,e.withCache)(()=>i.request({method:"eth_blockNumber"}),{cacheKey:o(i.uid),cacheTime:a});return BigInt(t)}return $n}var Zi={},cb;function Ju(){if(cb)return Zi;cb=1,Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.getFilterChanges=r;const e=ho(),o=qt();async function r(n,{filter:i}){const a="strict"in i&&i.strict,t=await i.request({method:"eth_getFilterChanges",params:[i.id]});if(typeof t[0]=="string")return t;const s=t.map(u=>(0,o.formatLog)(u));return!("abi"in i)||!i.abi?s:(0,e.parseEventLogs)({abi:i.abi,logs:s,strict:a})}return Zi}var Ji={},db;function Yu(){if(db)return Ji;db=1,Object.defineProperty(Ji,"__esModule",{value:!0}),Ji.uninstallFilter=e;async function e(o,{filter:r}){return r.request({method:"eth_uninstallFilter",params:[r.id]})}return Ji}var fb;function q0(){if(fb)return Vi;fb=1,Object.defineProperty(Vi,"__esModule",{value:!0}),Vi.watchContractEvent=h;const e=_e(),o=Ar(),r=bo(),n=Pr(),i=qt(),a=me(),t=Qr(),s=_o(),u=Ce(),d=rd(),f=vo(),c=_d(),m=Ju(),g=Yu();function h(b,p){const{abi:_,address:j,args:P,batch:v=!0,eventName:E,fromBlock:l,onError:y,onLogs:I,poll:w,pollingInterval:B=b.pollingInterval,strict:q}=p;return(typeof w<"u"?w:typeof l=="bigint"?!0:!(b.transport.type==="webSocket"||b.transport.type==="fallback"&&b.transport.transports[0].config.type==="webSocket"))?(()=>{const x=q??!1,F=(0,u.stringify)(["watchContractEvent",j,P,v,b.uid,E,B,x,l]);return(0,t.observe)(F,{onLogs:I,onError:y},k=>{let $;l!==void 0&&($=l-1n);let M,S=!1;const R=(0,s.poll)(async()=>{var C;if(!S){try{M=await(0,a.getAction)(b,d.createContractEventFilter,"createContractEventFilter")({abi:_,address:j,args:P,eventName:E,strict:x,fromBlock:l})}catch{}S=!0;return}try{let H;if(M)H=await(0,a.getAction)(b,m.getFilterChanges,"getFilterChanges")({filter:M});else{const N=await(0,a.getAction)(b,f.getBlockNumber,"getBlockNumber")({});$&&${M&&await(0,a.getAction)(b,g.uninstallFilter,"uninstallFilter")({filter:M}),R()}})})():(()=>{const x=q??!1,F=(0,u.stringify)(["watchContractEvent",j,P,v,b.uid,E,B,x]);let k=!0,$=()=>k=!1;return(0,t.observe)(F,{onLogs:I,onError:y},M=>((async()=>{try{const S=(()=>{if(b.transport.type==="fallback"){const H=b.transport.transports.find(N=>N.config.type==="webSocket");return H?H.value:b.transport}return b.transport})(),R=E?(0,n.encodeEventTopics)({abi:_,eventName:E,args:P}):[],{unsubscribe:C}=await S.subscribe({params:["logs",{address:j,topics:R}],onData(H){var D;if(!k)return;const N=H.result;try{const{eventName:G,args:V}=(0,r.decodeEventLog)({abi:_,data:N.data,topics:N.topics,strict:q}),W=(0,i.formatLog)(N,{args:V,eventName:G});M.onLogs([W])}catch(G){let V,W;if(G instanceof e.DecodeLogDataMismatch||G instanceof e.DecodeLogTopicsMismatch){if(q)return;V=G.abiItem.name,W=(D=G.abiItem.inputs)==null?void 0:D.some(re=>!("name"in re&&re.name))}const J=(0,i.formatLog)(N,{args:W?[]:{},eventName:V});M.onLogs([J])}},onError(H){var N;(N=M.onError)==null||N.call(M,H)}});$=C,k||$()}catch(S){y==null||y(S)}})(),()=>$()))})()}return Vi}var Yi={},fr={},lb;function Eo(){if(lb)return fr;lb=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.AccountTypeNotSupportedError=fr.AccountNotFoundError=void 0;const e=se();class o extends e.BaseError{constructor({docsPath:i}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(` +`),{docsPath:i,docsSlug:"account",name:"AccountNotFoundError"})}}fr.AccountNotFoundError=o;class r extends e.BaseError{constructor({docsPath:i,metaMessages:a,type:t}){super(`Account type "${t}" is not supported.`,{docsPath:i,metaMessages:a,name:"AccountTypeNotSupportedError"})}}return fr.AccountTypeNotSupportedError=r,fr}var Xi={},Qi={},mb;function Xu(){if(mb)return Qi;mb=1,Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.assertCurrentChain=o;const e=yo();function o({chain:r,currentChainId:n}){if(!r)throw new e.ChainNotFoundError;if(n!==r.id)throw new e.ChainMismatchError({chain:r,currentChainId:n})}return Qi}var es={},bb;function M0(){if(bb)return es;bb=1,Object.defineProperty(es,"__esModule",{value:!0}),es.getTransactionError=n;const e=Bt(),o=Ke(),r=co();function n(i,{docsPath:a,...t}){const s=(()=>{const u=(0,r.getNodeError)(i,t);return u instanceof e.UnknownNodeError?i:u})();return new o.TransactionExecutionError(s,{docsPath:a,...t})}return es}var ts={},hb;function wd(){if(hb)return ts;hb=1,Object.defineProperty(ts,"__esModule",{value:!0}),ts.sendRawTransaction=e;async function e(o,{serializedTransaction:r}){return o.request({method:"eth_sendRawTransaction",params:[r]},{retryCount:0})}return ts}var yb;function Ad(){if(yb)return Xi;yb=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.sendTransaction=b;const e=Be(),o=Eo(),r=se(),n=j0(),i=Xu(),a=M0(),t=Yr(),s=Ot(),u=me(),d=no(),f=Ct(),c=mo(),m=Ku(),g=wd(),h=new d.LruMap(128);async function b(p,_){var k,$,M,S;const{account:j=p.account,chain:P=p.chain,accessList:v,authorizationList:E,blobs:l,data:y,gas:I,gasPrice:w,maxFeePerBlobGas:B,maxFeePerGas:q,maxPriorityFeePerGas:T,nonce:O,value:A,...x}=_;if(typeof j>"u")throw new o.AccountNotFoundError({docsPath:"/docs/actions/wallet/sendTransaction"});const F=j?(0,e.parseAccount)(j):null;try{(0,f.assertRequest)(_);const R=await(async()=>{if(_.to)return _.to;if(E&&E.length>0)return await(0,n.recoverAuthorizationAddress)({authorization:E[0]}).catch(()=>{throw new r.BaseError("`to` is required. Could not infer from `authorizationList`.")})})();if((F==null?void 0:F.type)==="json-rpc"||F===null){let C;P!==null&&(C=await(0,u.getAction)(p,c.getChainId,"getChainId")({}),(0,i.assertCurrentChain)({currentChainId:C,chain:P}));const H=(M=($=(k=p.chain)==null?void 0:k.formatters)==null?void 0:$.transactionRequest)==null?void 0:M.format,D=(H||s.formatTransactionRequest)({...(0,t.extract)(x,{format:H}),accessList:v,authorizationList:E,blobs:l,chainId:C,data:y,from:F==null?void 0:F.address,gas:I,gasPrice:w,maxFeePerBlobGas:B,maxFeePerGas:q,maxPriorityFeePerGas:T,nonce:O,to:R,value:A}),G=h.get(p.uid),V=G?"wallet_sendTransaction":"eth_sendTransaction";try{return await p.request({method:V,params:[D]},{retryCount:0})}catch(W){if(G===!1)throw W;const J=W;if(J.name==="InvalidInputRpcError"||J.name==="InvalidParamsRpcError"||J.name==="MethodNotFoundRpcError"||J.name==="MethodNotSupportedRpcError")return await p.request({method:"wallet_sendTransaction",params:[D]},{retryCount:0}).then(re=>(h.set(p.uid,!0),re)).catch(re=>{const K=re;throw K.name==="MethodNotFoundRpcError"||K.name==="MethodNotSupportedRpcError"?(h.set(p.uid,!1),J):K});throw J}}if((F==null?void 0:F.type)==="local"){const C=await(0,u.getAction)(p,m.prepareTransactionRequest,"prepareTransactionRequest")({account:F,accessList:v,authorizationList:E,blobs:l,chain:P,data:y,gas:I,gasPrice:w,maxFeePerBlobGas:B,maxFeePerGas:q,maxPriorityFeePerGas:T,nonce:O,nonceManager:F.nonceManager,parameters:[...m.defaultParameters,"sidecars"],value:A,...x,to:R}),H=(S=P==null?void 0:P.serializers)==null?void 0:S.transaction,N=await F.signTransaction(C,{serializer:H});return await(0,u.getAction)(p,g.sendRawTransaction,"sendRawTransaction")({serializedTransaction:N})}throw(F==null?void 0:F.type)==="smart"?new o.AccountTypeNotSupportedError({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new o.AccountTypeNotSupportedError({docsPath:"/docs/actions/wallet/sendTransaction",type:F==null?void 0:F.type})}catch(R){throw R instanceof o.AccountTypeNotSupportedError?R:(0,a.getTransactionError)(R,{..._,account:F,chain:_.chain||void 0})}}return Xi}var gb;function k0(){if(gb)return Yi;gb=1,Object.defineProperty(Yi,"__esModule",{value:!0}),Yi.writeContract=t;const e=Be(),o=Eo(),r=Ye(),n=Qt(),i=me(),a=Ad();async function t(s,u){const{abi:d,account:f=s.account,address:c,args:m,dataSuffix:g,functionName:h,...b}=u;if(typeof f>"u")throw new o.AccountNotFoundError({docsPath:"/docs/contract/writeContract"});const p=f?(0,e.parseAccount)(f):null,_=(0,r.encodeFunctionData)({abi:d,args:m,functionName:h});try{return await(0,i.getAction)(s,a.sendTransaction,"sendTransaction")({data:`${_}${g?g.replace("0x",""):""}`,to:c,account:p,...b})}catch(j){throw(0,n.getContractError)(j,{abi:d,address:c,args:m,docsPath:"/docs/contract/writeContract",functionName:h,sender:p==null?void 0:p.address})}}return Yi}var pb;function t_(){if(pb)return Br;pb=1,Object.defineProperty(Br,"__esModule",{value:!0}),Br.getContract=u,Br.getFunctionParameters=d,Br.getEventParameters=f;const e=me(),o=rd(),r=O0(),n=_d(),i=kt(),a=x0(),t=q0(),s=k0();function u({abi:c,address:m,client:g}){const h=g,[b,p]=h?"public"in h&&"wallet"in h?[h.public,h.wallet]:"public"in h?[h.public,void 0]:"wallet"in h?[void 0,h.wallet]:[h,h]:[void 0,void 0],_=b!=null,j=p!=null,P={};let v=!1,E=!1,l=!1;for(const y of c)if(y.type==="function"?y.stateMutability==="view"||y.stateMutability==="pure"?v=!0:E=!0:y.type==="event"&&(l=!0),v&&E&&l)break;return _&&(v&&(P.read=new Proxy({},{get(y,I){return(...w)=>{const{args:B,options:q}=d(w);return(0,e.getAction)(b,i.readContract,"readContract")({abi:c,address:m,functionName:I,args:B,...q})}}})),E&&(P.simulate=new Proxy({},{get(y,I){return(...w)=>{const{args:B,options:q}=d(w);return(0,e.getAction)(b,a.simulateContract,"simulateContract")({abi:c,address:m,functionName:I,args:B,...q})}}})),l&&(P.createEventFilter=new Proxy({},{get(y,I){return(...w)=>{const B=c.find(O=>O.type==="event"&&O.name===I),{args:q,options:T}=f(w,B);return(0,e.getAction)(b,o.createContractEventFilter,"createContractEventFilter")({abi:c,address:m,eventName:I,args:q,...T})}}}),P.getEvents=new Proxy({},{get(y,I){return(...w)=>{const B=c.find(O=>O.type==="event"&&O.name===I),{args:q,options:T}=f(w,B);return(0,e.getAction)(b,n.getContractEvents,"getContractEvents")({abi:c,address:m,eventName:I,args:q,...T})}}}),P.watchEvent=new Proxy({},{get(y,I){return(...w)=>{const B=c.find(O=>O.type==="event"&&O.name===I),{args:q,options:T}=f(w,B);return(0,e.getAction)(b,t.watchContractEvent,"watchContractEvent")({abi:c,address:m,eventName:I,args:q,...T})}}}))),j&&E&&(P.write=new Proxy({},{get(y,I){return(...w)=>{const{args:B,options:q}=d(w);return(0,e.getAction)(p,s.writeContract,"writeContract")({abi:c,address:m,functionName:I,args:B,...q})}}})),(_||j)&&E&&(P.estimateGas=new Proxy({},{get(y,I){return(...w)=>{const{args:B,options:q}=d(w),T=b??p;return(0,e.getAction)(T,r.estimateContractGas,"estimateContractGas")({abi:c,address:m,functionName:I,args:B,...q,account:q.account??p.account})}}})),P.address=m,P.abi=c,P}function d(c){const m=c.length&&Array.isArray(c[0]),g=m?c[0]:[],h=(m?c[1]:c[0])??{};return{args:g,options:h}}function f(c,m){let g=!1;Array.isArray(c[0])?g=!0:c.length===1?g=m.inputs.some(p=>p.indexed):c.length===2&&(g=!0);const h=g?c[0]:void 0,b=(g?c[1]:c[0])??{};return{args:h,options:b}}return Br}var Hn={},rs={},_b;function F0(){if(_b)return rs;_b=1,Object.defineProperty(rs,"__esModule",{value:!0}),rs.uid=n;const e=256;let o=e,r;function n(i=11){if(!r||o+i>e*2){r="",o=0;for(let a=0;a{const l=E(v);for(const I in j)delete l[I];const y={...v,...l};return Object.assign(y,{extend:P(y)})}}return Object.assign(j,{extend:P(j)})}function n(){return null}return Hn}var ns={},os={},Nn={},Lc={},Eb;function r_(){return Eb||(Eb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.promiseCache=void 0,e.withDedupe=r;const o=no();e.promiseCache=new o.LruMap(8192);function r(n,{enabled:i=!0,id:a}){if(!i||!a)return n();if(e.promiseCache.get(a))return e.promiseCache.get(a);const t=n().finally(()=>e.promiseCache.delete(a));return e.promiseCache.set(a,t),t}}(Lc)),Lc}var is={},jb;function Td(){if(jb)return is;jb=1,Object.defineProperty(is,"__esModule",{value:!0}),is.withRetry=o;const e=Pd();function o(r,{delay:n=100,retryCount:i=2,shouldRetry:a=()=>!0}={}){return new Promise((t,s)=>{const u=async({count:d=0}={})=>{const f=async({error:c})=>{const m=typeof n=="function"?n({count:d,error:c}):n;m&&await(0,e.wait)(m),u({count:d+1})};try{const c=await r();t(c)}catch(c){if(d{var v;const{dedupe:g=!1,methods:h,retryDelay:b=150,retryCount:p=3,uid:_}={...f,...m},{method:j}=c;if((v=h==null?void 0:h.exclude)!=null&&v.includes(j))throw new r.MethodNotSupportedRpcError(new Error("method not supported"),{method:j});if(h!=null&&h.include&&!h.include.includes(j))throw new r.MethodNotSupportedRpcError(new Error("method not supported"),{method:j});const P=g?(0,n.stringToHex)(`${_}.${(0,t.stringify)(c)}`):void 0;return(0,i.withDedupe)(()=>(0,a.withRetry)(async()=>{try{return await d(c)}catch(E){const l=E;switch(l.code){case r.ParseRpcError.code:throw new r.ParseRpcError(l);case r.InvalidRequestRpcError.code:throw new r.InvalidRequestRpcError(l);case r.MethodNotFoundRpcError.code:throw new r.MethodNotFoundRpcError(l,{method:c.method});case r.InvalidParamsRpcError.code:throw new r.InvalidParamsRpcError(l);case r.InternalRpcError.code:throw new r.InternalRpcError(l);case r.InvalidInputRpcError.code:throw new r.InvalidInputRpcError(l);case r.ResourceNotFoundRpcError.code:throw new r.ResourceNotFoundRpcError(l);case r.ResourceUnavailableRpcError.code:throw new r.ResourceUnavailableRpcError(l);case r.TransactionRejectedRpcError.code:throw new r.TransactionRejectedRpcError(l);case r.MethodNotSupportedRpcError.code:throw new r.MethodNotSupportedRpcError(l,{method:c.method});case r.LimitExceededRpcError.code:throw new r.LimitExceededRpcError(l);case r.JsonRpcVersionUnsupportedError.code:throw new r.JsonRpcVersionUnsupportedError(l);case r.UserRejectedRequestError.code:throw new r.UserRejectedRequestError(l);case r.UnauthorizedProviderError.code:throw new r.UnauthorizedProviderError(l);case r.UnsupportedProviderMethodError.code:throw new r.UnsupportedProviderMethodError(l);case r.ProviderDisconnectedError.code:throw new r.ProviderDisconnectedError(l);case r.ChainDisconnectedError.code:throw new r.ChainDisconnectedError(l);case r.SwitchChainError.code:throw new r.SwitchChainError(l);case 5e3:throw new r.UserRejectedRequestError(l);default:throw E instanceof e.BaseError?E:new r.UnknownRpcError(l)}}},{delay:({count:E,error:l})=>{var y;if(l&&l instanceof o.HttpRequestError){const I=(y=l==null?void 0:l.headers)==null?void 0:y.get("Retry-After");if(I!=null&&I.match(/\d/))return Number.parseInt(I)*1e3}return~~(1<u(E)}),{enabled:g,id:P})}}function u(d){return"code"in d&&typeof d.code=="number"?d.code===-1||d.code===r.LimitExceededRpcError.code||d.code===r.InternalRpcError.code:d instanceof o.HttpRequestError&&d.status?d.status===403||d.status===408||d.status===413||d.status===429||d.status===500||d.status===502||d.status===503||d.status===504:!0}return Nn}var wb;function jo(){if(wb)return os;wb=1,Object.defineProperty(os,"__esModule",{value:!0}),os.createTransport=r;const e=$0(),o=F0();function r({key:n,methods:i,name:a,request:t,retryCount:s=3,retryDelay:u=150,timeout:d,type:f},c){const m=(0,o.uid)();return{config:{key:n,name:a,request:t,retryCount:s,retryDelay:u,timeout:d,type:f},request:(0,e.buildRequest)(t,{methods:i,retryCount:s,retryDelay:u,uid:m}),value:c}}return os}var Ab;function n_(){if(Ab)return ns;Ab=1,Object.defineProperty(ns,"__esModule",{value:!0}),ns.custom=o;const e=jo();function o(r,n={}){const{key:i="custom",methods:a,name:t="Custom Provider",retryDelay:s}=n;return({retryCount:u})=>(0,e.createTransport)({key:i,methods:a,name:t,request:r.request.bind(r),retryCount:n.retryCount??u,retryDelay:s,type:"custom"})}return ns}var zn={},Tb;function o_(){if(Tb)return zn;Tb=1,Object.defineProperty(zn,"__esModule",{value:!0}),zn.fallback=i,zn.rankTransports=t;const e=Bt(),o=Ar(),r=Pd(),n=jo();function i(s,u={}){const{key:d="fallback",name:f="Fallback",rank:c=!1,retryCount:m,retryDelay:g}=u;return({chain:h,pollingInterval:b=4e3,timeout:p,..._})=>{let j=s,P=()=>{};const v=(0,n.createTransport)({key:d,name:f,async request({method:E,params:l}){const y=async(I=0)=>{const w=j[I]({..._,chain:h,retryCount:0,timeout:p});try{const B=await w.request({method:E,params:l});return P({method:E,params:l,response:B,transport:w,status:"success"}),B}catch(B){if(P({error:B,method:E,params:l,transport:w,status:"error"}),a(B)||I===j.length-1)throw B;return y(I+1)}};return y()},retryCount:m,retryDelay:g,type:"fallback"},{onResponse:E=>P=E,transports:j.map(E=>E({chain:h,retryCount:0}))});if(c){const E=typeof c=="object"?c:{};t({chain:h,interval:E.interval??b,onTransports:l=>j=l,ping:E.ping,sampleCount:E.sampleCount,timeout:E.timeout,transports:j,weights:E.weights})}return v}}function a(s){return!!("code"in s&&typeof s.code=="number"&&(s.code===o.TransactionRejectedRpcError.code||s.code===o.UserRejectedRequestError.code||e.ExecutionRevertedError.nodeMessage.test(s.message)||s.code===5e3))}function t({chain:s,interval:u=4e3,onTransports:d,ping:f,sampleCount:c=10,timeout:m=1e3,transports:g,weights:h={}}){const{stability:b=.7,latency:p=.3}=h,_=[],j=async()=>{const P=await Promise.all(g.map(async l=>{const y=l({chain:s,retryCount:0,timeout:m}),I=Date.now();let w,B;try{await(f?f({transport:y}):y.request({method:"net_listening"})),B=1}catch{B=0}finally{w=Date.now()}return{latency:w-I,success:B}}));_.push(P),_.length>c&&_.shift();const v=Math.max(..._.map(l=>Math.max(...l.map(({latency:y})=>y)))),E=g.map((l,y)=>{const I=_.map(O=>O[y].latency),B=1-I.reduce((O,A)=>O+A,0)/I.length/v,q=_.map(O=>O[y].success),T=q.reduce((O,A)=>O+A,0)/q.length;return T===0?[0,y]:[p*B+b*T,y]}).sort((l,y)=>y[0]-l[0]);d(E.map(([,l])=>g[l])),await(0,r.wait)(u),j()};j()}return zn}var ss={},Un={},Ib;function Id(){if(Ib)return Un;Ib=1,Object.defineProperty(Un,"__esModule",{value:!0}),Un.UrlRequiredError=void 0;const e=se();class o extends e.BaseError{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}return Un.UrlRequiredError=o,Un}var as={},us={},Sb;function Sd(){if(Sb)return us;Sb=1,Object.defineProperty(us,"__esModule",{value:!0}),us.withTimeout=e;function e(o,{errorInstance:r=new Error("timed out"),timeout:n,signal:i}){return new Promise((a,t)=>{(async()=>{let s;try{const u=new AbortController;n>0&&(s=setTimeout(()=>{i?u.abort():t(r)},n)),a(await o({signal:(u==null?void 0:u.signal)||null}))}catch(u){(u==null?void 0:u.name)==="AbortError"&&t(r),t(u)}finally{clearTimeout(s)}})()})}return us}var Ln={},Rb;function H0(){if(Rb)return Ln;Rb=1,Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.idCache=void 0;function e(){return{current:0,take(){return this.current++},reset(){this.current=0}}}return Ln.idCache=e(),Ln}var Bb;function Rd(){if(Bb)return as;Bb=1,Object.defineProperty(as,"__esModule",{value:!0}),as.getHttpRpcClient=i;const e=at(),o=Sd(),r=Ce(),n=H0();function i(a,t={}){return{async request(s){var p;const{body:u,onRequest:d=t.onRequest,onResponse:f=t.onResponse,timeout:c=t.timeout??1e4}=s,m={...t.fetchOptions??{},...s.fetchOptions??{}},{headers:g,method:h,signal:b}=m;try{const _=await(0,o.withTimeout)(async({signal:P})=>{const v={...m,body:Array.isArray(u)?(0,r.stringify)(u.map(I=>({jsonrpc:"2.0",id:I.id??n.idCache.take(),...I}))):(0,r.stringify)({jsonrpc:"2.0",id:u.id??n.idCache.take(),...u}),headers:{"Content-Type":"application/json",...g},method:h||"POST",signal:b||(c>0?P:null)},E=new Request(a,v),l=await(d==null?void 0:d(E,v))??{...v,url:a};return await fetch(l.url??a,l)},{errorInstance:new e.TimeoutError({body:u,url:a}),timeout:c,signal:!0});f&&await f(_);let j;if((p=_.headers.get("Content-Type"))!=null&&p.startsWith("application/json"))j=await _.json();else{j=await _.text();try{j=JSON.parse(j||"{}")}catch(P){if(_.ok)throw P;j={error:j}}}if(!_.ok)throw new e.HttpRequestError({body:u,details:(0,r.stringify)(j.error)||_.statusText,headers:_.headers,status:_.status,url:a});return j}catch(_){throw _ instanceof e.HttpRequestError||_ instanceof e.TimeoutError?_:new e.HttpRequestError({body:u,cause:_,url:a})}}}}return as}var Ob;function i_(){if(Ob)return ss;Ob=1,Object.defineProperty(ss,"__esModule",{value:!0}),ss.http=a;const e=at(),o=Id(),r=Ed(),n=Rd(),i=jo();function a(t,s={}){const{batch:u,fetchOptions:d,key:f="http",methods:c,name:m="HTTP JSON-RPC",onFetchRequest:g,onFetchResponse:h,retryDelay:b}=s;return({chain:p,retryCount:_,timeout:j})=>{const{batchSize:P=1e3,wait:v=0}=typeof u=="object"?u:{},E=s.retryCount??_,l=j??s.timeout??1e4,y=t||(p==null?void 0:p.rpcUrls.default.http[0]);if(!y)throw new o.UrlRequiredError;const I=(0,n.getHttpRpcClient)(y,{fetchOptions:d,onRequest:g,onResponse:h,timeout:l});return(0,i.createTransport)({key:f,methods:c,name:m,async request({method:w,params:B}){const q={method:w,params:B},{schedule:T}=(0,r.createBatchScheduler)({id:y,wait:v,shouldSplitBatch(F){return F.length>P},fn:F=>I.request({body:F}),sort:(F,k)=>F.id-k.id}),O=async F=>u?T(F):[await I.request({body:F})],[{error:A,result:x}]=await O(q);if(A)throw new e.RpcRequestError({body:q,error:A,url:y});return x},retryCount:E,retryDelay:b,timeout:l,type:"http"},{fetchOptions:d,url:y})}}return ss}var cs={},ds={},fs={},ls={},Cb;function Bd(){if(Cb)return ls;Cb=1,Object.defineProperty(ls,"__esModule",{value:!0}),ls.isNullUniversalResolverError=n;const e=nd(),o=se(),r=Xt();function n(i,a){var s,u,d,f,c,m;if(!(i instanceof o.BaseError))return!1;const t=i.walk(g=>g instanceof r.ContractFunctionRevertedError);return t instanceof r.ContractFunctionRevertedError?!!(((s=t.data)==null?void 0:s.errorName)==="ResolverNotFound"||((u=t.data)==null?void 0:u.errorName)==="ResolverWildcardNotSupported"||((d=t.data)==null?void 0:d.errorName)==="ResolverNotContract"||((f=t.data)==null?void 0:f.errorName)==="ResolverError"||((c=t.data)==null?void 0:c.errorName)==="HttpError"||(m=t.reason)!=null&&m.includes("Wildcard on non-extended resolvers is not supported")||a==="reverse"&&t.reason===e.panicReasons[50]):!1}return ls}var ms={},bs={},xb;function N0(){if(xb)return bs;xb=1,Object.defineProperty(bs,"__esModule",{value:!0}),bs.encodedLabelToLabelhash=o;const e=ke();function o(r){if(r.length!==66||r.indexOf("[")!==0||r.indexOf("]")!==65)return null;const n=`0x${r.slice(1,65)}`;return(0,e.isHex)(n)?n:null}return bs}var qb;function Od(){if(qb)return ms;qb=1,Object.defineProperty(ms,"__esModule",{value:!0}),ms.namehash=a;const e=Fe(),o=he(),r=te(),n=Ne(),i=N0();function a(t){let s=new Uint8Array(32).fill(0);if(!t)return(0,r.bytesToHex)(s);const u=t.split(".");for(let d=u.length-1;d>=0;d-=1){const f=(0,i.encodedLabelToLabelhash)(u[d]),c=f?(0,o.toBytes)(f):(0,n.keccak256)((0,o.stringToBytes)(u[d]),"bytes");s=(0,n.keccak256)((0,e.concat)([s,c]),"bytes")}return(0,r.bytesToHex)(s)}return ms}var hs={},ys={},Mb;function s_(){if(Mb)return ys;Mb=1,Object.defineProperty(ys,"__esModule",{value:!0}),ys.encodeLabelhash=e;function e(o){return`[${o.slice(2)}]`}return ys}var gs={},kb;function z0(){if(kb)return gs;kb=1,Object.defineProperty(gs,"__esModule",{value:!0}),gs.labelhash=i;const e=he(),o=te(),r=Ne(),n=N0();function i(a){const t=new Uint8Array(32).fill(0);return a?(0,n.encodedLabelToLabelhash)(a)||(0,r.keccak256)((0,e.stringToBytes)(a)):(0,o.bytesToHex)(t)}return gs}var Fb;function ec(){if(Fb)return hs;Fb=1,Object.defineProperty(hs,"__esModule",{value:!0}),hs.packetToBytes=n;const e=he(),o=s_(),r=z0();function n(i){const a=i.replace(/^\.|\.$/gm,"");if(a.length===0)return new Uint8Array(1);const t=new Uint8Array((0,e.stringToBytes)(a).byteLength+2);let s=0;const u=a.split(".");for(let d=0;d255&&(f=(0,e.stringToBytes)((0,o.encodeLabelhash)((0,r.labelhash)(u[d])))),t[s]=f.length,t.set(f,s+1),s+=f.length+1}return t.byteLength!==s+1?t.slice(0,s+1):t}return hs}var $b;function a_(){if($b)return fs;$b=1,Object.defineProperty(fs,"__esModule",{value:!0}),fs.getEnsAddress=c;const e=Tr(),o=Mt(),r=Ye(),n=tr(),i=Jt(),a=te(),t=Bd(),s=Od(),u=ec(),d=me(),f=kt();async function c(m,{blockNumber:g,blockTag:h,coinType:b,name:p,gatewayUrls:_,strict:j,universalResolverAddress:P}){let v=P;if(!v){if(!m.chain)throw new Error("client chain not configured. universalResolverAddress is required.");v=(0,n.getChainContractAddress)({blockNumber:g,chain:m.chain,contract:"ensUniversalResolver"})}try{const E=(0,r.encodeFunctionData)({abi:e.addressResolverAbi,functionName:"addr",...b!=null?{args:[(0,s.namehash)(p),BigInt(b)]}:{args:[(0,s.namehash)(p)]}}),l={address:v,abi:e.universalResolverResolveAbi,functionName:"resolve",args:[(0,a.toHex)((0,u.packetToBytes)(p)),E],blockNumber:g,blockTag:h},y=(0,d.getAction)(m,f.readContract,"readContract"),I=_?await y({...l,args:[...l.args,_]}):await y(l);if(I[0]==="0x")return null;const w=(0,o.decodeFunctionResult)({abi:e.addressResolverAbi,args:b!=null?[(0,s.namehash)(p),BigInt(b)]:void 0,functionName:"addr",data:I[0]});return w==="0x"||(0,i.trim)(w)==="0x00"?null:w}catch(E){if(j)throw E;if((0,t.isNullUniversalResolverError)(E,"resolve"))return null;throw E}}return fs}var ps={},_s={},et={},tt={},Hb;function U0(){if(Hb)return tt;Hb=1,Object.defineProperty(tt,"__esModule",{value:!0}),tt.EnsAvatarUnsupportedNamespaceError=tt.EnsAvatarUriResolutionError=tt.EnsAvatarInvalidNftUriError=tt.EnsAvatarInvalidMetadataError=void 0;const e=se();class o extends e.BaseError{constructor({data:t}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(t)}`],name:"EnsAvatarInvalidMetadataError"})}}tt.EnsAvatarInvalidMetadataError=o;class r extends e.BaseError{constructor({reason:t}){super(`ENS NFT avatar URI is invalid. ${t}`,{name:"EnsAvatarInvalidNftUriError"})}}tt.EnsAvatarInvalidNftUriError=r;class n extends e.BaseError{constructor({uri:t}){super(`Unable to resolve ENS avatar URI "${t}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"})}}tt.EnsAvatarUriResolutionError=n;class i extends e.BaseError{constructor({namespace:t}){super(`ENS NFT avatar namespace "${t}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}return tt.EnsAvatarUnsupportedNamespaceError=i,tt}var Nb;function u_(){if(Nb)return et;Nb=1,Object.defineProperty(et,"__esModule",{value:!0}),et.isImageUri=t,et.getGateway=s,et.resolveAvatarUri=u,et.getJsonImage=d,et.getMetadataAvatarUri=f,et.parseAvatarUri=c,et.parseNftUri=m,et.getNftTokenUri=g;const e=kt(),o=U0(),r=/(?https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?\/)?(?ipfs\/|ipns\/)?(?[\w\-.]+)(?\/.*)?/,n=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?[\w\-.]+))?(?\/.*)?$/,i=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,a=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function t(h){try{const b=await fetch(h,{method:"HEAD"});if(b.status===200){const p=b.headers.get("content-type");return p==null?void 0:p.startsWith("image/")}return!1}catch(b){return typeof b=="object"&&typeof b.response<"u"||!globalThis.hasOwnProperty("Image")?!1:new Promise(p=>{const _=new Image;_.onload=()=>{p(!0)},_.onerror=()=>{p(!1)},_.src=h})}}function s(h,b){return h?h.endsWith("/")?h.slice(0,-1):h:b}function u({uri:h,gatewayUrls:b}){const p=i.test(h);if(p)return{uri:h,isOnChain:!0,isEncoded:p};const _=s(b==null?void 0:b.ipfs,"https://ipfs.io"),j=s(b==null?void 0:b.arweave,"https://arweave.net"),P=h.match(r),{protocol:v,subpath:E,target:l,subtarget:y=""}=(P==null?void 0:P.groups)||{},I=v==="ipns:/"||E==="ipns/",w=v==="ipfs:/"||E==="ipfs/"||n.test(h);if(h.startsWith("http")&&!I&&!w){let q=h;return b!=null&&b.arweave&&(q=h.replace(/https:\/\/arweave.net/g,b==null?void 0:b.arweave)),{uri:q,isOnChain:!1,isEncoded:!1}}if((I||w)&&l)return{uri:`${_}/${I?"ipns":"ipfs"}/${l}${y}`,isOnChain:!1,isEncoded:!1};if(v==="ar:/"&&l)return{uri:`${j}/${l}${y||""}`,isOnChain:!1,isEncoded:!1};let B=h.replace(a,"");if(B.startsWith("j.json());return await c({gatewayUrls:h,uri:d(p)})}catch{throw new o.EnsAvatarUriResolutionError({uri:b})}}async function c({gatewayUrls:h,uri:b}){const{uri:p,isOnChain:_}=u({uri:b,gatewayUrls:h});if(_||await t(p))return p;throw new o.EnsAvatarUriResolutionError({uri:b})}function m(h){let b=h;b.startsWith("did:nft:")&&(b=b.replace("did:nft:","").replace(/_/g,"/"));const[p,_,j]=b.split("/"),[P,v]=p.split(":"),[E,l]=_.split(":");if(!P||P.toLowerCase()!=="eip155")throw new o.EnsAvatarInvalidNftUriError({reason:"Only EIP-155 supported"});if(!v)throw new o.EnsAvatarInvalidNftUriError({reason:"Chain ID not found"});if(!l)throw new o.EnsAvatarInvalidNftUriError({reason:"Contract address not found"});if(!j)throw new o.EnsAvatarInvalidNftUriError({reason:"Token ID not found"});if(!E)throw new o.EnsAvatarInvalidNftUriError({reason:"ERC namespace not found"});return{chainID:Number.parseInt(v),namespace:E.toLowerCase(),contractAddress:l,tokenID:j}}async function g(h,{nft:b}){if(b.namespace==="erc721")return(0,e.readContract)(h,{address:b.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(b.tokenID)]});if(b.namespace==="erc1155")return(0,e.readContract)(h,{address:b.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(b.tokenID)]});throw new o.EnsAvatarUnsupportedNamespaceError({namespace:b.namespace})}return et}var zb;function c_(){if(zb)return _s;zb=1,Object.defineProperty(_s,"__esModule",{value:!0}),_s.parseAvatarRecord=o;const e=u_();async function o(n,{gatewayUrls:i,record:a}){return/eip155:/i.test(a)?r(n,{gatewayUrls:i,record:a}):(0,e.parseAvatarUri)({uri:a,gatewayUrls:i})}async function r(n,{gatewayUrls:i,record:a}){const t=(0,e.parseNftUri)(a),s=await(0,e.getNftTokenUri)(n,{nft:t}),{uri:u,isOnChain:d,isEncoded:f}=(0,e.resolveAvatarUri)({uri:s,gatewayUrls:i});if(d&&(u.includes("data:application/json;base64,")||u.startsWith("{"))){const m=f?atob(u.replace("data:application/json;base64,","")):u,g=JSON.parse(m);return(0,e.parseAvatarUri)({uri:(0,e.getJsonImage)(g),gatewayUrls:i})}let c=t.tokenID;return t.namespace==="erc1155"&&(c=c.replace("0x","").padStart(64,"0")),(0,e.getMetadataAvatarUri)({gatewayUrls:i,uri:u.replace(/(?:0x)?{id}/,c)})}return _s}var vs={},Ub;function L0(){if(Ub)return vs;Ub=1,Object.defineProperty(vs,"__esModule",{value:!0}),vs.getEnsText=f;const e=Tr(),o=Mt(),r=Ye(),n=tr(),i=te(),a=Bd(),t=Od(),s=ec(),u=me(),d=kt();async function f(c,{blockNumber:m,blockTag:g,name:h,key:b,gatewayUrls:p,strict:_,universalResolverAddress:j}){let P=j;if(!P){if(!c.chain)throw new Error("client chain not configured. universalResolverAddress is required.");P=(0,n.getChainContractAddress)({blockNumber:m,chain:c.chain,contract:"ensUniversalResolver"})}try{const v={address:P,abi:e.universalResolverResolveAbi,functionName:"resolve",args:[(0,i.toHex)((0,s.packetToBytes)(h)),(0,r.encodeFunctionData)({abi:e.textResolverAbi,functionName:"text",args:[(0,t.namehash)(h),b]})],blockNumber:m,blockTag:g},E=(0,u.getAction)(c,d.readContract,"readContract"),l=p?await E({...v,args:[...v.args,p]}):await E(v);if(l[0]==="0x")return null;const y=(0,o.decodeFunctionResult)({abi:e.textResolverAbi,functionName:"text",data:l[0]});return y===""?null:y}catch(v){if(_)throw v;if((0,a.isNullUniversalResolverError)(v,"resolve"))return null;throw v}}return vs}var Lb;function d_(){if(Lb)return ps;Lb=1,Object.defineProperty(ps,"__esModule",{value:!0}),ps.getEnsAvatar=n;const e=c_(),o=me(),r=L0();async function n(i,{blockNumber:a,blockTag:t,assetGatewayUrls:s,name:u,gatewayUrls:d,strict:f,universalResolverAddress:c}){const m=await(0,o.getAction)(i,r.getEnsText,"getEnsText")({blockNumber:a,blockTag:t,key:"avatar",name:u,universalResolverAddress:c,gatewayUrls:d,strict:f});if(!m)return null;try{return await(0,e.parseAvatarRecord)(i,{record:m,gatewayUrls:s})}catch{return null}}return ps}var Es={},Db;function f_(){if(Db)return Es;Db=1,Object.defineProperty(Es,"__esModule",{value:!0}),Es.getEnsName=s;const e=Tr(),o=tr(),r=te(),n=Bd(),i=ec(),a=me(),t=kt();async function s(u,{address:d,blockNumber:f,blockTag:c,gatewayUrls:m,strict:g,universalResolverAddress:h}){let b=h;if(!b){if(!u.chain)throw new Error("client chain not configured. universalResolverAddress is required.");b=(0,o.getChainContractAddress)({blockNumber:f,chain:u.chain,contract:"ensUniversalResolver"})}const p=`${d.toLowerCase().substring(2)}.addr.reverse`;try{const _={address:b,abi:e.universalResolverReverseAbi,functionName:"reverse",args:[(0,r.toHex)((0,i.packetToBytes)(p))],blockNumber:f,blockTag:c},j=(0,a.getAction)(u,t.readContract,"readContract"),[P,v]=m?await j({..._,args:[..._.args,m]}):await j(_);return d.toLowerCase()!==v.toLowerCase()?null:P}catch(_){if(g)throw _;if((0,n.isNullUniversalResolverError)(_,"reverse"))return null;throw _}}return Es}var js={},Gb;function l_(){if(Gb)return js;Gb=1,Object.defineProperty(js,"__esModule",{value:!0}),js.getEnsResolver=a;const e=tr(),o=te(),r=ec(),n=me(),i=kt();async function a(t,{blockNumber:s,blockTag:u,name:d,universalResolverAddress:f}){let c=f;if(!c){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");c=(0,e.getChainContractAddress)({blockNumber:s,chain:t.chain,contract:"ensUniversalResolver"})}const[m]=await(0,n.getAction)(t,i.readContract,"readContract")({address:c,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[(0,o.toHex)((0,r.packetToBytes)(d))],blockNumber:s,blockTag:u});return m}return js}var Ps={},Vb;function D0(){if(Vb)return Ps;Vb=1,Object.defineProperty(Ps,"__esModule",{value:!0}),Ps.createAccessList=t;const e=Be(),o=te(),r=vd(),n=Yr(),i=Ot(),a=Ct();async function t(s,u){var y,I,w;const{account:d=s.account,blockNumber:f,blockTag:c="latest",blobs:m,data:g,gas:h,gasPrice:b,maxFeePerBlobGas:p,maxFeePerGas:_,maxPriorityFeePerGas:j,to:P,value:v,...E}=u,l=d?(0,e.parseAccount)(d):void 0;try{(0,a.assertRequest)(u);const q=(f?(0,o.numberToHex)(f):void 0)||c,T=(w=(I=(y=s.chain)==null?void 0:y.formatters)==null?void 0:I.transactionRequest)==null?void 0:w.format,A=(T||i.formatTransactionRequest)({...(0,n.extract)(E,{format:T}),from:l==null?void 0:l.address,blobs:m,data:g,gas:h,gasPrice:b,maxFeePerBlobGas:p,maxFeePerGas:_,maxPriorityFeePerGas:j,to:P,value:v}),x=await s.request({method:"eth_createAccessList",params:[A,q]});return{accessList:x.accessList,gasUsed:BigInt(x.gasUsed)}}catch(B){throw(0,r.getCallError)(B,{...u,account:l,chain:s.chain})}}return Ps}var ws={},Wb;function m_(){if(Wb)return ws;Wb=1,Object.defineProperty(ws,"__esModule",{value:!0}),ws.createBlockFilter=o;const e=$u();async function o(r){const n=(0,e.createFilterRequestScope)(r,{method:"eth_newBlockFilter"}),i=await r.request({method:"eth_newBlockFilter"});return{id:i,request:n(i),type:"block"}}return ws}var As={},Kb;function G0(){if(Kb)return As;Kb=1,Object.defineProperty(As,"__esModule",{value:!0}),As.createEventFilter=n;const e=Pr(),o=te(),r=$u();async function n(i,{address:a,args:t,event:s,events:u,fromBlock:d,strict:f,toBlock:c}={}){const m=u??(s?[s]:void 0),g=(0,r.createFilterRequestScope)(i,{method:"eth_newFilter"});let h=[];m&&(h=[m.flatMap(_=>(0,e.encodeEventTopics)({abi:[_],eventName:_.name,args:t}))],s&&(h=h[0]));const b=await i.request({method:"eth_newFilter",params:[{address:a,fromBlock:typeof d=="bigint"?(0,o.numberToHex)(d):d,toBlock:typeof c=="bigint"?(0,o.numberToHex)(c):c,...h.length?{topics:h}:{}}]});return{abi:m,args:t,eventName:s?s.name:void 0,fromBlock:d,id:b,request:g(b),strict:!!f,toBlock:c,type:"event"}}return As}var Ts={},Zb;function V0(){if(Zb)return Ts;Zb=1,Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.createPendingTransactionFilter=o;const e=$u();async function o(r){const n=(0,e.createFilterRequestScope)(r,{method:"eth_newPendingTransactionFilter"}),i=await r.request({method:"eth_newPendingTransactionFilter"});return{id:i,request:n(i),type:"transaction"}}return Ts}var Is={},Jb;function b_(){if(Jb)return Is;Jb=1,Object.defineProperty(Is,"__esModule",{value:!0}),Is.getBlobBaseFee=e;async function e(o){const r=await o.request({method:"eth_blobBaseFee"});return BigInt(r)}return Is}var Ss={},Yb;function h_(){if(Yb)return Ss;Yb=1,Object.defineProperty(Ss,"__esModule",{value:!0}),Ss.getBlockTransactionCount=r;const e=Ie(),o=te();async function r(n,{blockHash:i,blockNumber:a,blockTag:t="latest"}={}){const s=a!==void 0?(0,o.numberToHex)(a):void 0;let u;return i?u=await n.request({method:"eth_getBlockTransactionCountByHash",params:[i]},{dedupe:!0}):u=await n.request({method:"eth_getBlockTransactionCountByNumber",params:[s||t]},{dedupe:!!s}),(0,e.hexToNumber)(u)}return Ss}var Rs={},Xb;function y_(){if(Xb)return Rs;Xb=1,Object.defineProperty(Rs,"__esModule",{value:!0}),Rs.getCode=o;const e=te();async function o(r,{address:n,blockNumber:i,blockTag:a="latest"}){const t=i!==void 0?(0,e.numberToHex)(i):void 0,s=await r.request({method:"eth_getCode",params:[n,t||a]},{dedupe:!!t});if(s!=="0x")return s}return Rs}var Bs={},Dn={},Qb;function g_(){if(Qb)return Dn;Qb=1,Object.defineProperty(Dn,"__esModule",{value:!0}),Dn.Eip712DomainNotFoundError=void 0;const e=se();class o extends e.BaseError{constructor({address:n}){super(`No EIP-712 domain found on contract "${n}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${n}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"})}}return Dn.Eip712DomainNotFoundError=o,Dn}var eh;function p_(){if(eh)return Bs;eh=1,Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.getEip712Domain=n;const e=g_(),o=me(),r=kt();async function n(a,t){const{address:s,factory:u,factoryData:d}=t;try{const[f,c,m,g,h,b,p]=await(0,o.getAction)(a,r.readContract,"readContract")({abi:i,address:s,functionName:"eip712Domain",factory:u,factoryData:d});return{domain:{name:c,version:m,chainId:Number(g),verifyingContract:h,salt:b},extensions:p,fields:f}}catch(f){const c=f;throw c.name==="ContractFunctionExecutionError"&&c.cause.name==="ContractFunctionZeroDataError"?new e.Eip712DomainNotFoundError({address:s}):c}}const i=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];return Bs}var Os={},Cs={},th;function __(){if(th)return Cs;th=1,Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.formatFeeHistory=e;function e(o){var r;return{baseFeePerGas:o.baseFeePerGas.map(n=>BigInt(n)),gasUsedRatio:o.gasUsedRatio,oldestBlock:BigInt(o.oldestBlock),reward:(r=o.reward)==null?void 0:r.map(n=>n.map(i=>BigInt(i)))}}return Cs}var rh;function v_(){if(rh)return Os;rh=1,Object.defineProperty(Os,"__esModule",{value:!0}),Os.getFeeHistory=r;const e=te(),o=__();async function r(n,{blockCount:i,blockNumber:a,blockTag:t="latest",rewardPercentiles:s}){const u=a?(0,e.numberToHex)(a):void 0,d=await n.request({method:"eth_feeHistory",params:[(0,e.numberToHex)(i),u||t,s]},{dedupe:!!u});return(0,o.formatFeeHistory)(d)}return Os}var xs={},nh;function E_(){if(nh)return xs;nh=1,Object.defineProperty(xs,"__esModule",{value:!0}),xs.getFilterLogs=r;const e=ho(),o=qt();async function r(n,{filter:i}){const a=i.strict??!1,s=(await i.request({method:"eth_getFilterLogs",params:[i.id]})).map(u=>(0,o.formatLog)(u));return i.abi?(0,e.parseEventLogs)({abi:i.abi,logs:s,strict:a}):s}return xs}var qs={},Ms={},Dc={},ks={},oh;function W0(){if(oh)return ks;oh=1,Object.defineProperty(ks,"__esModule",{value:!0}),ks.defineChain=e;function e(o){return{formatters:void 0,fees:void 0,serializers:void 0,...o}}return ks}var Fs={},ih;function K0(){if(ih)return Fs;ih=1,Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.extractChain=e;function e({chains:o,id:r}){return o.find(n=>n.id===r)}return Fs}var Hr={},$s={},Gc={},sh;function Z0(){return sh||(sh=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.socketClientCache=void 0,e.getSocketRpcClient=a;const o=at(),r=Ed(),n=Sd(),i=H0();e.socketClientCache=new Map;async function a(t){const{getSocket:s,keepAlive:u=!0,key:d="socket",reconnect:f=!0,url:c}=t,{interval:m=3e4}=typeof u=="object"?u:{},{attempts:g=5,delay:h=2e3}=typeof f=="object"?f:{};let b=e.socketClientCache.get(`${d}:${c}`);if(b)return b;let p=0;const{schedule:_}=(0,r.createBatchScheduler)({id:`${d}:${c}`,fn:async()=>{const v=new Map,E=new Map;let l,y,I;async function w(){const B=await s({onClose(){var q,T;for(const O of v.values())(q=O.onError)==null||q.call(O,new o.SocketClosedError({url:c}));for(const O of E.values())(T=O.onError)==null||T.call(O,new o.SocketClosedError({url:c}));v.clear(),E.clear(),f&&p{p++,await w().catch(console.error)},h)},onError(q){var T,O;l=q;for(const A of v.values())(T=A.onError)==null||T.call(A,l);for(const A of E.values())(O=A.onError)==null||O.call(A,l);v.clear(),E.clear(),b==null||b.close(),f&&p{p++,await w().catch(console.error)},h)},onOpen(){l=void 0,p=0},onResponse(q){const T=q.method==="eth_subscription",O=T?q.params.subscription:q.id,A=T?E:v,x=A.get(O);x&&x.onResponse(q),T||A.delete(O)}});return y=B,u&&(I&&clearInterval(I),I=setInterval(()=>{var q;return(q=y.ping)==null?void 0:q.call(y)},m)),B}return await w(),l=void 0,b={close(){I&&clearInterval(I),y.close(),e.socketClientCache.delete(`${d}:${c}`)},get socket(){return y},request({body:B,onError:q,onResponse:T}){l&&q&&q(l);const O=B.id??i.idCache.take(),A=x=>{var F;typeof x.id=="number"&&O!==x.id||(B.method==="eth_subscribe"&&typeof x.result=="string"&&E.set(x.result,{onResponse:A,onError:q}),B.method==="eth_unsubscribe"&&E.delete((F=B.params)==null?void 0:F[0]),T(x))};v.set(O,{onResponse:A,onError:q});try{y.request({body:{jsonrpc:"2.0",id:O,...B}})}catch(x){q==null||q(x)}},requestAsync({body:B,timeout:q=1e4}){return(0,n.withTimeout)(()=>new Promise((T,O)=>this.request({body:B,onError:O,onResponse:T})),{errorInstance:new o.TimeoutError({body:B,url:c}),timeout:q})},requests:v,subscriptions:E,url:c},e.socketClientCache.set(`${d}:${c}`,b),[b]}}),[j,[P]]=await _();return P}}(Gc)),Gc}const j_=_1(T1);var ah;function Cd(){if(ah)return $s;ah=1,Object.defineProperty($s,"__esModule",{value:!0}),$s.getWebSocketRpcClient=r;const e=at(),o=Z0();async function r(n,i={}){const{keepAlive:a,reconnect:t}=i;return(0,o.getSocketRpcClient)({async getSocket({onClose:s,onError:u,onOpen:d,onResponse:f}){const c=await Promise.resolve().then(()=>j_).then(p=>p.WebSocket),m=new c(n);function g(){m.removeEventListener("close",g),m.removeEventListener("message",h),m.removeEventListener("error",u),m.removeEventListener("open",d),s()}function h({data:p}){f(JSON.parse(p))}m.addEventListener("close",g),m.addEventListener("message",h),m.addEventListener("error",u),m.addEventListener("open",d),m.readyState===c.CONNECTING&&await new Promise((p,_)=>{m&&(m.onopen=p,m.onerror=_)});const{close:b}=m;return Object.assign(m,{close(){b.bind(m)(),g()},ping(){try{if(m.readyState===m.CLOSED||m.readyState===m.CLOSING)throw new e.WebSocketRequestError({url:m.url,cause:new e.SocketClosedError({url:m.url})});const p={jsonrpc:"2.0",method:"net_version",params:[]};m.send(JSON.stringify(p))}catch(p){u(p)}},request({body:p}){if(m.readyState===m.CLOSED||m.readyState===m.CLOSING)throw new e.WebSocketRequestError({body:p,url:m.url,cause:new e.SocketClosedError({url:m.url})});return m.send(JSON.stringify(p))}})},keepAlive:a,reconnect:t,url:n})}return $s}var uh;function J0(){if(uh)return Hr;uh=1,Object.defineProperty(Hr,"__esModule",{value:!0}),Hr.rpc=void 0,Hr.getSocket=i;const e=Rd(),o=Cd();function r(a,{body:t,onError:s,onResponse:u}){return a.request({body:t,onError:s,onResponse:u}),a}async function n(a,{body:t,timeout:s=1e4}){return a.requestAsync({body:t,timeout:s})}async function i(a){const t=await(0,o.getWebSocketRpcClient)(a);return Object.assign(t.socket,{requests:t.requests,subscriptions:t.subscriptions})}return Hr.rpc={http(a,t){return(0,e.getHttpRpcClient)(a).request(t)},webSocket:r,webSocketAsync:n},Hr}var lr={},It={},ch;function Y0(){if(ch)return It;ch=1,Object.defineProperty(It,"__esModule",{value:!0}),It.InvalidStructTypeError=It.InvalidPrimaryTypeError=It.InvalidDomainError=void 0;const e=Ce(),o=se();class r extends o.BaseError{constructor({domain:t}){super(`Invalid domain "${(0,e.stringify)(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}It.InvalidDomainError=r;class n extends o.BaseError{constructor({primaryType:t,types:s}){super(`Invalid primary type \`${t}\` must be one of \`${JSON.stringify(Object.keys(s))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}It.InvalidPrimaryTypeError=n;class i extends o.BaseError{constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}return It.InvalidStructTypeError=i,It}var mr={},dh;function Po(){if(dh)return mr;dh=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.hashTypedData=a,mr.hashDomain=t,mr.hashStruct=s,mr.encodeType=f;const e=st(),o=Fe(),r=te(),n=Ne(),i=tc();function a(g){const{domain:h={},message:b,primaryType:p}=g,_={EIP712Domain:(0,i.getTypesForEIP712Domain)({domain:h}),...g.types};(0,i.validateTypedData)({domain:h,message:b,primaryType:p,types:_});const j=["0x1901"];return h&&j.push(t({domain:h,types:_})),p!=="EIP712Domain"&&j.push(s({data:b,primaryType:p,types:_})),(0,n.keccak256)((0,o.concat)(j))}function t({domain:g,types:h}){return s({data:g,primaryType:"EIP712Domain",types:h})}function s({data:g,primaryType:h,types:b}){const p=u({data:g,primaryType:h,types:b});return(0,n.keccak256)(p)}function u({data:g,primaryType:h,types:b}){const p=[{type:"bytes32"}],_=[d({primaryType:h,types:b})];for(const j of b[h]){const[P,v]=m({types:b,name:j.name,type:j.type,value:g[j.name]});p.push(P),_.push(v)}return(0,e.encodeAbiParameters)(p,_)}function d({primaryType:g,types:h}){const b=(0,r.toHex)(f({primaryType:g,types:h}));return(0,n.keccak256)(b)}function f({primaryType:g,types:h}){let b="";const p=c({primaryType:g,types:h});p.delete(g);const _=[g,...Array.from(p).sort()];for(const j of _)b+=`${j}(${h[j].map(({name:P,type:v})=>`${v} ${P}`).join(",")})`;return b}function c({primaryType:g,types:h},b=new Set){const p=g.match(/^\w*/u),_=p==null?void 0:p[0];if(b.has(_)||h[_]===void 0)return b;b.add(_);for(const j of h[_])c({primaryType:j.type,types:h},b);return b}function m({types:g,name:h,type:b,value:p}){if(g[b]!==void 0)return[{type:"bytes32"},(0,n.keccak256)(u({data:p,primaryType:b,types:g}))];if(b==="bytes")return p=`0x${(p.length%2?"0":"")+p.slice(2)}`,[{type:"bytes32"},(0,n.keccak256)(p)];if(b==="string")return[{type:"bytes32"},(0,n.keccak256)((0,r.toHex)(p))];if(b.lastIndexOf("]")===b.length-1){const _=b.slice(0,b.lastIndexOf("[")),j=p.map(P=>m({name:h,type:_,types:g,value:P}));return[{type:"bytes32"},(0,n.keccak256)((0,e.encodeAbiParameters)(j.map(([P])=>P),j.map(([,P])=>P)))]}return[{type:b},p]}return mr}var fh;function tc(){if(fh)return lr;fh=1,Object.defineProperty(lr,"__esModule",{value:!0}),lr.serializeTypedData=d,lr.validateTypedData=f,lr.getTypesForEIP712Domain=c,lr.domainSeparator=m;const e=_e(),o=ot(),r=Y0(),n=We(),i=Ve(),a=te(),t=Fu(),s=Po(),u=Ce();function d(h){const{domain:b,message:p,primaryType:_,types:j}=h,P=(l,y)=>{const I={...y};for(const w of l){const{name:B,type:q}=w;q==="address"&&(I[B]=I[B].toLowerCase())}return I},v=j.EIP712Domain?b?P(j.EIP712Domain,b):{}:{},E=(()=>{if(_!=="EIP712Domain")return P(j[_],p)})();return(0,u.stringify)({domain:v,message:E,primaryType:_,types:j})}function f(h){const{domain:b,message:p,primaryType:_,types:j}=h,P=(v,E)=>{for(const l of v){const{name:y,type:I}=l,w=E[y],B=I.match(t.integerRegex);if(B&&(typeof w=="number"||typeof w=="bigint")){const[O,A,x]=B;(0,a.numberToHex)(w,{signed:A==="int",size:Number.parseInt(x)/8})}if(I==="address"&&typeof w=="string"&&!(0,n.isAddress)(w))throw new o.InvalidAddressError({address:w});const q=I.match(t.bytesRegex);if(q){const[O,A]=q;if(A&&(0,i.size)(w)!==Number.parseInt(A))throw new e.BytesSizeMismatchError({expectedSize:Number.parseInt(A),givenSize:(0,i.size)(w)})}const T=j[I];T&&(g(I),P(T,w))}};if(j.EIP712Domain&&b){if(typeof b!="object")throw new r.InvalidDomainError({domain:b});P(j.EIP712Domain,b)}if(_!=="EIP712Domain")if(j[_])P(j[_],p);else throw new r.InvalidPrimaryTypeError({primaryType:_,types:j})}function c({domain:h}){return[typeof(h==null?void 0:h.name)=="string"&&{name:"name",type:"string"},(h==null?void 0:h.version)&&{name:"version",type:"string"},(typeof(h==null?void 0:h.chainId)=="number"||typeof(h==null?void 0:h.chainId)=="bigint")&&{name:"chainId",type:"uint256"},(h==null?void 0:h.verifyingContract)&&{name:"verifyingContract",type:"address"},(h==null?void 0:h.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}function m({domain:h}){return(0,s.hashDomain)({domain:h,types:{EIP712Domain:c({domain:h})}})}function g(h){if(h==="address"||h==="bool"||h==="string"||h.startsWith("bytes")||h.startsWith("uint")||h.startsWith("int"))throw new r.InvalidStructTypeError({type:h})}return lr}var Hs={},lh;function X0(){if(lh)return Hs;lh=1,Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.decodeFunctionData=a;const e=_e(),o=it(),r=jr(),n=Yt(),i=St();function a(t){const{abi:s,data:u}=t,d=(0,o.slice)(u,0,4),f=s.find(c=>c.type==="function"&&d===(0,r.toFunctionSelector)((0,i.formatAbiItem)(c)));if(!f)throw new e.AbiFunctionSignatureNotFoundError(d,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:f.name,args:"inputs"in f&&f.inputs&&f.inputs.length>0?(0,n.decodeAbiParameters)(f.inputs,(0,o.slice)(u,4)):void 0}}return Hs}var Ns={},mh;function Q0(){if(mh)return Ns;mh=1,Object.defineProperty(Ns,"__esModule",{value:!0}),Ns.encodeErrorResult=s;const e=_e(),o=Fe(),r=jr(),n=st(),i=St(),a=Rt(),t="/docs/contract/encodeErrorResult";function s(u){const{abi:d,errorName:f,args:c}=u;let m=d[0];if(f){const p=(0,a.getAbiItem)({abi:d,args:c,name:f});if(!p)throw new e.AbiErrorNotFoundError(f,{docsPath:t});m=p}if(m.type!=="error")throw new e.AbiErrorNotFoundError(void 0,{docsPath:t});const g=(0,i.formatAbiItem)(m),h=(0,r.toFunctionSelector)(g);let b="0x";if(c&&c.length>0){if(!m.inputs)throw new e.AbiErrorInputsNotFoundError(m.name,{docsPath:t});b=(0,n.encodeAbiParameters)(m.inputs,c)}return(0,o.concatHex)([h,b])}return Ns}var zs={},bh;function ep(){if(bh)return zs;bh=1,Object.defineProperty(zs,"__esModule",{value:!0}),zs.encodeFunctionResult=i;const e=_e(),o=st(),r=Rt(),n="/docs/contract/encodeFunctionResult";function i(a){const{abi:t,functionName:s,result:u}=a;let d=t[0];if(s){const c=(0,r.getAbiItem)({abi:t,name:s});if(!c)throw new e.AbiFunctionNotFoundError(s,{docsPath:n});d=c}if(d.type!=="function")throw new e.AbiFunctionNotFoundError(void 0,{docsPath:n});if(!d.outputs)throw new e.AbiFunctionOutputsNotFoundError(d.name,{docsPath:n});let f=Array.isArray(u)?u:[u];return d.outputs.length===0&&!f[0]&&(f=[]),(0,o.encodeAbiParameters)(d.outputs,f)}return zs}var Us={},hh;function tp(){if(hh)return Us;hh=1,Object.defineProperty(Us,"__esModule",{value:!0}),Us.encodePacked=s;const e=_e(),o=ot(),r=We(),n=Fe(),i=Zt(),a=te(),t=Fu();function s(d,f){if(d.length!==f.length)throw new e.AbiEncodingLengthMismatchError({expectedLength:d.length,givenLength:f.length});const c=[];for(let m=0;m(0,n.formatLog)(u)):null,to:t.to?t.to:null,transactionIndex:t.transactionIndex?(0,o.hexToNumber)(t.transactionIndex):null,status:t.status?e.receiptStatuses[t.status]:null,type:t.type?i.transactionType[t.type]||t.type:null};return t.blobGasPrice&&(s.blobGasPrice=BigInt(t.blobGasPrice)),t.blobGasUsed&&(s.blobGasUsed=BigInt(t.blobGasUsed)),s}e.defineTransactionReceipt=(0,r.defineFormatter)("transactionReceipt",a)}(Vc)),Vc}var Ds={},_h;function Md(){if(_h)return Ds;_h=1,Object.defineProperty(Ds,"__esModule",{value:!0}),Ds.fromRlp=a;const e=se(),o=Zr(),r=oo(),n=he(),i=te();function a(d,f="hex"){const c=(()=>{if(typeof d=="string"){if(d.length>3&&d.length%2!==0)throw new o.InvalidHexValueError(d);return(0,n.hexToBytes)(d)}return d})(),m=(0,r.createCursor)(c,{recursiveReadLimit:Number.POSITIVE_INFINITY});return t(m,f)}function t(d,f="hex"){if(d.bytes.length===0)return f==="hex"?(0,i.bytesToHex)(d.bytes):d.bytes;const c=d.readByte();if(c<128&&d.decrementPosition(1),c<192){const g=s(d,c,128),h=d.readBytes(g);return f==="hex"?(0,i.bytesToHex)(h):h}const m=s(d,c,192);return u(d,m,f)}function s(d,f,c){if(c===128&&f<128)return 1;if(f<=c+55)return f-c;if(f===c+55+1)return d.readUint8();if(f===c+55+2)return d.readUint16();if(f===c+55+3)return d.readUint24();if(f===c+55+4)return d.readUint32();throw new e.BaseError("Invalid RLP prefix")}function u(d,f,c){const m=d.position,g=[];for(;d.position-mp)),i=n.map(b=>(9*b+5)%16);let a=[n],t=[i];for(let b=0;b<4;b++)for(let p of[a,t])p.push(p[b].map(_=>r[_]));const s=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(b=>new Uint8Array(b)),u=a.map((b,p)=>b.map(_=>s[p][_])),d=t.map((b,p)=>b.map(_=>s[p][_])),f=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),c=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]);function m(b,p,_,j){return b===0?p^_^j:b===1?p&_|~p&j:b===2?(p|~_)^j:b===3?p&j|_&~j:p^(_|~j)}const g=new Uint32Array(16);class h extends e.HashMD{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:p,h1:_,h2:j,h3:P,h4:v}=this;return[p,_,j,P,v]}set(p,_,j,P,v){this.h0=p|0,this.h1=_|0,this.h2=j|0,this.h3=P|0,this.h4=v|0}process(p,_){for(let T=0;T<16;T++,_+=4)g[T]=p.getUint32(_,!0);let j=this.h0|0,P=j,v=this.h1|0,E=v,l=this.h2|0,y=l,I=this.h3|0,w=I,B=this.h4|0,q=B;for(let T=0;T<5;T++){const O=4-T,A=f[T],x=c[T],F=a[T],k=t[T],$=u[T],M=d[T];for(let S=0;S<16;S++){const R=(0,o.rotl)(j+m(T,v,l,I)+g[F[S]]+A,$[S])+B|0;j=B,B=I,I=(0,o.rotl)(l,10)|0,l=v,v=R}for(let S=0;S<16;S++){const R=(0,o.rotl)(P+m(O,E,y,w)+g[k[S]]+x,M[S])+q|0;P=q,q=w,w=(0,o.rotl)(y,10)|0,y=E,E=R}}this.set(this.h1+l+w|0,this.h2+I+q|0,this.h3+B+P|0,this.h4+j+E|0,this.h0+v+y|0)}roundClean(){g.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}return br.RIPEMD160=h,br.ripemd160=(0,o.wrapConstructor)(()=>new h),br}var Th;function up(){if(Th)return Vs;Th=1,Object.defineProperty(Vs,"__esModule",{value:!0}),Vs.ripemd160=i;const e=ap(),o=ke(),r=he(),n=te();function i(a,t){const s=t||"hex",u=(0,e.ripemd160)((0,o.isHex)(a,{strict:!1})?(0,r.toBytes)(a):a);return s==="bytes"?u:(0,n.toHex)(u)}return Vs}var Ws={},Ks={},Zs={},Gn={},Ih;function cp(){return Ih||(Ih=1,Object.defineProperty(Gn,"__esModule",{value:!0}),Gn.presignMessagePrefix=void 0,Gn.presignMessagePrefix=`Ethereum Signed Message: +`),Gn}var Sh;function dp(){if(Sh)return Zs;Sh=1,Object.defineProperty(Zs,"__esModule",{value:!0}),Zs.toPrefixedMessage=i;const e=cp(),o=Fe(),r=Ve(),n=te();function i(a){const t=typeof a=="string"?(0,n.stringToHex)(a):typeof a.raw=="string"?a.raw:(0,n.bytesToHex)(a.raw),s=(0,n.stringToHex)(`${e.presignMessagePrefix}${(0,r.size)(t)}`);return(0,o.concat)([s,t])}return Zs}var Rh;function wo(){if(Rh)return Ks;Rh=1,Object.defineProperty(Ks,"__esModule",{value:!0}),Ks.hashMessage=r;const e=Ne(),o=dp();function r(n,i){return(0,e.keccak256)((0,o.toPrefixedMessage)(n),i)}return Ks}var Bh;function Fd(){if(Bh)return Ws;Bh=1,Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.recoverMessageAddress=r;const e=wo(),o=er();async function r({message:n,signature:i}){return(0,o.recoverAddress)({hash:(0,e.hashMessage)(n),signature:i})}return Ws}var Js={},Oh;function $d(){if(Oh)return Js;Oh=1,Object.defineProperty(Js,"__esModule",{value:!0}),Js.recoverTypedDataAddress=r;const e=Po(),o=er();async function r(n){const{domain:i,message:a,primaryType:t,signature:s,types:u}=n;return(0,o.recoverAddress)({hash:(0,e.hashTypedData)({domain:i,message:a,primaryType:t,types:u}),signature:s})}return Js}var Ys={},Ch;function fp(){if(Ch)return Ys;Ch=1,Object.defineProperty(Ys,"__esModule",{value:!0}),Ys.verifyHash=n;const e=Je(),o=xt(),r=er();async function n({address:i,hash:a,signature:t}){return(0,o.isAddressEqual)((0,e.getAddress)(i),await(0,r.recoverAddress)({hash:a,signature:t}))}return Ys}var Xs={},xh;function lp(){if(xh)return Xs;xh=1,Object.defineProperty(Xs,"__esModule",{value:!0}),Xs.verifyMessage=n;const e=Je(),o=xt(),r=Fd();async function n({address:i,message:a,signature:t}){return(0,o.isAddressEqual)((0,e.getAddress)(i),await(0,r.recoverMessageAddress)({message:a,signature:t}))}return Xs}var Qs={},qh;function mp(){if(qh)return Qs;qh=1,Object.defineProperty(Qs,"__esModule",{value:!0}),Qs.verifyTypedData=n;const e=Je(),o=xt(),r=$d();async function n(i){const{address:a,domain:t,message:s,primaryType:u,signature:d,types:f}=i;return(0,o.isAddressEqual)((0,e.getAddress)(a),await(0,r.recoverTypedDataAddress)({domain:t,message:s,primaryType:u,signature:d,types:f}))}return Qs}var ea={},ta={},hr={},Mh;function Hd(){return Mh||(Mh=1,Object.defineProperty(hr,"__esModule",{value:!0}),hr.zeroHash=hr.erc6492MagicBytes=void 0,hr.erc6492MagicBytes="0x6492649264926492649264926492649264926492649264926492649264926492",hr.zeroHash="0x0000000000000000000000000000000000000000000000000000000000000000"),hr}var kh;function rc(){if(kh)return ta;kh=1,Object.defineProperty(ta,"__esModule",{value:!0}),ta.isErc6492Signature=r;const e=Hd(),o=it();function r(n){return(0,o.sliceHex)(n,-32)===e.erc6492MagicBytes}return ta}var Fh;function bp(){if(Fh)return ea;Fh=1,Object.defineProperty(ea,"__esModule",{value:!0}),ea.parseErc6492Signature=r;const e=Yt(),o=rc();function r(n){if(!(0,o.isErc6492Signature)(n))return{signature:n};const[i,a,t]=(0,e.decodeAbiParameters)([{type:"address"},{type:"bytes"},{type:"bytes"}],n);return{address:i,data:a,signature:t}}return ea}var ra={},$h;function Nd(){if($h)return ra;$h=1,Object.defineProperty(ra,"__esModule",{value:!0}),ra.serializeErc6492Signature=i;const e=Hd(),o=st(),r=Fe(),n=he();function i(a){const{address:t,data:s,signature:u,to:d="hex"}=a,f=(0,r.concatHex)([(0,o.encodeAbiParameters)([{type:"address"},{type:"bytes"},{type:"bytes"}],[t,s,u]),e.erc6492MagicBytes]);return d==="hex"?f:(0,n.hexToBytes)(f)}return ra}var na={},Hh;function zd(){if(Hh)return na;Hh=1,Object.defineProperty(na,"__esModule",{value:!0}),na.getSerializedTransactionType=n;const e=Ke(),o=it(),r=Ie();function n(i){const a=(0,o.sliceHex)(i,0,1);if(a==="0x04")return"eip7702";if(a==="0x03")return"eip4844";if(a==="0x02")return"eip1559";if(a==="0x01")return"eip2930";if(a!=="0x"&&(0,r.hexToNumber)(a)>=192)return"legacy";throw new e.InvalidSerializedTransactionTypeError({serializedType:a})}return na}var Dt={},Nh;function nc(){if(Nh)return Dt;Nh=1,Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.assertTransactionEIP7702=c,Dt.assertTransactionEIP4844=m,Dt.assertTransactionEIP1559=g,Dt.assertTransactionEIP2930=h,Dt.assertTransactionLegacy=b;const e=I0(),o=dd(),r=ot(),n=se(),i=S0(),a=yo(),t=Bt(),s=We(),u=Ve(),d=it(),f=Ie();function c(p){const{authorizationList:_}=p;if(_)for(const j of _){const{contractAddress:P,chainId:v}=j;if(!(0,s.isAddress)(P))throw new r.InvalidAddressError({address:P});if(v<0)throw new a.InvalidChainIdError({chainId:v})}g(p)}function m(p){const{blobVersionedHashes:_}=p;if(_){if(_.length===0)throw new i.EmptyBlobError;for(const j of _){const P=(0,u.size)(j),v=(0,f.hexToNumber)((0,d.slice)(j,0,1));if(P!==32)throw new i.InvalidVersionedHashSizeError({hash:j,size:P});if(v!==e.versionedHashVersionKzg)throw new i.InvalidVersionedHashVersionError({hash:j,version:v})}}g(p)}function g(p){const{chainId:_,maxPriorityFeePerGas:j,maxFeePerGas:P,to:v}=p;if(_<=0)throw new a.InvalidChainIdError({chainId:_});if(v&&!(0,s.isAddress)(v))throw new r.InvalidAddressError({address:v});if(P&&P>o.maxUint256)throw new t.FeeCapTooHighError({maxFeePerGas:P});if(j&&P&&j>P)throw new t.TipAboveFeeCapError({maxFeePerGas:P,maxPriorityFeePerGas:j})}function h(p){const{chainId:_,maxPriorityFeePerGas:j,gasPrice:P,maxFeePerGas:v,to:E}=p;if(_<=0)throw new a.InvalidChainIdError({chainId:_});if(E&&!(0,s.isAddress)(E))throw new r.InvalidAddressError({address:E});if(j||v)throw new n.BaseError("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(P&&P>o.maxUint256)throw new t.FeeCapTooHighError({maxFeePerGas:P})}function b(p){const{chainId:_,maxPriorityFeePerGas:j,gasPrice:P,maxFeePerGas:v,to:E}=p;if(E&&!(0,s.isAddress)(E))throw new r.InvalidAddressError({address:E});if(typeof _<"u"&&_<=0)throw new a.InvalidChainIdError({chainId:_});if(j||v)throw new n.BaseError("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(P&&P>o.maxUint256)throw new t.FeeCapTooHighError({maxFeePerGas:P})}return Dt}var zr={},zh;function Ud(){if(zh)return zr;zh=1,Object.defineProperty(zr,"__esModule",{value:!0}),zr.parseTransaction=m,zr.toTransactionArray=j,zr.parseAccessList=P;const e=ot(),o=Ke(),r=We(),n=Vu(),i=ke(),a=Zt(),t=Jt(),s=Ie(),u=Md(),d=kd(),f=nc(),c=zd();function m(l){const y=(0,c.getSerializedTransactionType)(l);return y==="eip1559"?b(l):y==="eip2930"?p(l):y==="eip4844"?h(l):y==="eip7702"?g(l):_(l)}function g(l){const y=j(l),[I,w,B,q,T,O,A,x,F,k,$,M,S]=y;if(y.length!==10&&y.length!==13)throw new o.InvalidSerializedTransactionError({attributes:{chainId:I,nonce:w,maxPriorityFeePerGas:B,maxFeePerGas:q,gas:T,to:O,value:A,data:x,accessList:F,authorizationList:k,...y.length>9?{v:$,r:M,s:S}:{}},serializedTransaction:l,type:"eip7702"});const R={chainId:(0,s.hexToNumber)(I),type:"eip7702"};return(0,i.isHex)(O)&&O!=="0x"&&(R.to=O),(0,i.isHex)(T)&&T!=="0x"&&(R.gas=(0,s.hexToBigInt)(T)),(0,i.isHex)(x)&&x!=="0x"&&(R.data=x),(0,i.isHex)(w)&&w!=="0x"&&(R.nonce=(0,s.hexToNumber)(w)),(0,i.isHex)(A)&&A!=="0x"&&(R.value=(0,s.hexToBigInt)(A)),(0,i.isHex)(q)&&q!=="0x"&&(R.maxFeePerGas=(0,s.hexToBigInt)(q)),(0,i.isHex)(B)&&B!=="0x"&&(R.maxPriorityFeePerGas=(0,s.hexToBigInt)(B)),F.length!==0&&F!=="0x"&&(R.accessList=P(F)),k.length!==0&&k!=="0x"&&(R.authorizationList=v(k)),(0,f.assertTransactionEIP7702)(R),{...y.length===13?E(y):void 0,...R}}function h(l){const y=j(l),I=y.length===4,w=I?y[0]:y,B=I?y.slice(1):[],[q,T,O,A,x,F,k,$,M,S,R,C,H,N]=w,[D,G,V]=B;if(!(w.length===11||w.length===14))throw new o.InvalidSerializedTransactionError({attributes:{chainId:q,nonce:T,maxPriorityFeePerGas:O,maxFeePerGas:A,gas:x,to:F,value:k,data:$,accessList:M,...w.length>9?{v:C,r:H,s:N}:{}},serializedTransaction:l,type:"eip4844"});const W={blobVersionedHashes:R,chainId:(0,s.hexToNumber)(q),type:"eip4844"};return(0,i.isHex)(F)&&F!=="0x"&&(W.to=F),(0,i.isHex)(x)&&x!=="0x"&&(W.gas=(0,s.hexToBigInt)(x)),(0,i.isHex)($)&&$!=="0x"&&(W.data=$),(0,i.isHex)(T)&&T!=="0x"&&(W.nonce=(0,s.hexToNumber)(T)),(0,i.isHex)(k)&&k!=="0x"&&(W.value=(0,s.hexToBigInt)(k)),(0,i.isHex)(S)&&S!=="0x"&&(W.maxFeePerBlobGas=(0,s.hexToBigInt)(S)),(0,i.isHex)(A)&&A!=="0x"&&(W.maxFeePerGas=(0,s.hexToBigInt)(A)),(0,i.isHex)(O)&&O!=="0x"&&(W.maxPriorityFeePerGas=(0,s.hexToBigInt)(O)),M.length!==0&&M!=="0x"&&(W.accessList=P(M)),D&&G&&V&&(W.sidecars=(0,n.toBlobSidecars)({blobs:D,commitments:G,proofs:V})),(0,f.assertTransactionEIP4844)(W),{...w.length===14?E(w):void 0,...W}}function b(l){const y=j(l),[I,w,B,q,T,O,A,x,F,k,$,M]=y;if(!(y.length===9||y.length===12))throw new o.InvalidSerializedTransactionError({attributes:{chainId:I,nonce:w,maxPriorityFeePerGas:B,maxFeePerGas:q,gas:T,to:O,value:A,data:x,accessList:F,...y.length>9?{v:k,r:$,s:M}:{}},serializedTransaction:l,type:"eip1559"});const S={chainId:(0,s.hexToNumber)(I),type:"eip1559"};return(0,i.isHex)(O)&&O!=="0x"&&(S.to=O),(0,i.isHex)(T)&&T!=="0x"&&(S.gas=(0,s.hexToBigInt)(T)),(0,i.isHex)(x)&&x!=="0x"&&(S.data=x),(0,i.isHex)(w)&&w!=="0x"&&(S.nonce=(0,s.hexToNumber)(w)),(0,i.isHex)(A)&&A!=="0x"&&(S.value=(0,s.hexToBigInt)(A)),(0,i.isHex)(q)&&q!=="0x"&&(S.maxFeePerGas=(0,s.hexToBigInt)(q)),(0,i.isHex)(B)&&B!=="0x"&&(S.maxPriorityFeePerGas=(0,s.hexToBigInt)(B)),F.length!==0&&F!=="0x"&&(S.accessList=P(F)),(0,f.assertTransactionEIP1559)(S),{...y.length===12?E(y):void 0,...S}}function p(l){const y=j(l),[I,w,B,q,T,O,A,x,F,k,$]=y;if(!(y.length===8||y.length===11))throw new o.InvalidSerializedTransactionError({attributes:{chainId:I,nonce:w,gasPrice:B,gas:q,to:T,value:O,data:A,accessList:x,...y.length>8?{v:F,r:k,s:$}:{}},serializedTransaction:l,type:"eip2930"});const M={chainId:(0,s.hexToNumber)(I),type:"eip2930"};return(0,i.isHex)(T)&&T!=="0x"&&(M.to=T),(0,i.isHex)(q)&&q!=="0x"&&(M.gas=(0,s.hexToBigInt)(q)),(0,i.isHex)(A)&&A!=="0x"&&(M.data=A),(0,i.isHex)(w)&&w!=="0x"&&(M.nonce=(0,s.hexToNumber)(w)),(0,i.isHex)(O)&&O!=="0x"&&(M.value=(0,s.hexToBigInt)(O)),(0,i.isHex)(B)&&B!=="0x"&&(M.gasPrice=(0,s.hexToBigInt)(B)),x.length!==0&&x!=="0x"&&(M.accessList=P(x)),(0,f.assertTransactionEIP2930)(M),{...y.length===11?E(y):void 0,...M}}function _(l){const y=(0,u.fromRlp)(l,"hex"),[I,w,B,q,T,O,A,x,F]=y;if(!(y.length===6||y.length===9))throw new o.InvalidSerializedTransactionError({attributes:{nonce:I,gasPrice:w,gas:B,to:q,value:T,data:O,...y.length>6?{v:A,r:x,s:F}:{}},serializedTransaction:l,type:"legacy"});const k={type:"legacy"};if((0,i.isHex)(q)&&q!=="0x"&&(k.to=q),(0,i.isHex)(B)&&B!=="0x"&&(k.gas=(0,s.hexToBigInt)(B)),(0,i.isHex)(O)&&O!=="0x"&&(k.data=O),(0,i.isHex)(I)&&I!=="0x"&&(k.nonce=(0,s.hexToNumber)(I)),(0,i.isHex)(T)&&T!=="0x"&&(k.value=(0,s.hexToBigInt)(T)),(0,i.isHex)(w)&&w!=="0x"&&(k.gasPrice=(0,s.hexToBigInt)(w)),(0,f.assertTransactionLegacy)(k),y.length===6)return k;const $=(0,i.isHex)(A)&&A!=="0x"?(0,s.hexToBigInt)(A):0n;if(F==="0x"&&x==="0x")return $>0&&(k.chainId=Number($)),k;const M=$,S=Number((M-35n)/2n);if(S>0)k.chainId=S;else if(M!==27n&&M!==28n)throw new o.InvalidLegacyVError({v:M});return k.v=M,k.s=F,k.r=x,k.yParity=M%2n===0n?1:0,k}function j(l){return(0,u.fromRlp)(`0x${l.slice(4)}`,"hex")}function P(l){const y=[];for(let I=0;I(0,d.isHash)(q)?q:(0,t.trim)(q))})}return y}function v(l){const y=[];for(let I=0;I"u"||typeof k>"u")){const H=typeof v.blobs[0]=="string"?v.blobs:v.blobs.map(G=>(0,s.bytesToHex)(G)),N=v.kzg,D=(0,o.blobsToCommitments)({blobs:H,kzg:N});if(typeof F>"u"&&(F=(0,n.commitmentsToVersionedHashes)({commitments:D})),typeof k>"u"){const G=(0,r.blobsToProofs)({blobs:H,commitments:D,kzg:N});k=(0,i.toBlobSidecars)({blobs:H,commitments:D,proofs:G})}}const $=(0,m.serializeAccessList)(A),M=[(0,s.toHex)(l),I?(0,s.toHex)(I):"0x",O?(0,s.toHex)(O):"0x",T?(0,s.toHex)(T):"0x",y?(0,s.toHex)(y):"0x",w??"0x",B?(0,s.toHex)(B):"0x",x??"0x",$,q?(0,s.toHex)(q):"0x",F??[],...P(v,E)],S=[],R=[],C=[];if(k)for(let H=0;H{if(E.v>=35n)return(E.v-35n)/2n>0?E.v:27n+(E.v===35n?0n:1n);if(l>0)return BigInt(l*2)+BigInt(35n+E.v-27n);const k=27n+(E.v===27n?0n:1n);if(E.v!==k)throw new e.InvalidLegacyVError({v:E.v});return k})(),x=(0,t.trim)(E.r),F=(0,t.trim)(E.s);O=[...O,(0,s.toHex)(A),x==="0x00"?"0x":x,F==="0x00"?"0x":F]}else l>0&&(O=[...O,(0,s.toHex)(l),"0x","0x"]);return(0,u.toRlp)(O)}function P(v,E){const l=E??v,{v:y,yParity:I}=l;if(typeof l.r>"u")return[];if(typeof l.s>"u")return[];if(typeof y>"u"&&typeof I>"u")return[];const w=(0,t.trim)(l.r),B=(0,t.trim)(l.s);return[typeof I=="number"?I?(0,s.toHex)(1):"0x":y===0n?"0x":y===1n?(0,s.toHex)(1):y===27n?"0x":(0,s.toHex)(1),w==="0x00"?"0x":w,B==="0x00"?"0x":B]}return Vn}var sa={},Wn={},Gh;function hp(){if(Gh)return Wn;Gh=1,Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.InvalidDecimalNumberError=void 0;const e=se();class o extends e.BaseError{constructor({value:n}){super(`Number \`${n}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}return Wn.InvalidDecimalNumberError=o,Wn}var Vh;function ic(){if(Vh)return sa;Vh=1,Object.defineProperty(sa,"__esModule",{value:!0}),sa.parseUnits=o;const e=hp();function o(r,n){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(r))throw new e.InvalidDecimalNumberError({value:r});let[i,a="0"]=r.split(".");const t=i.startsWith("-");if(t&&(i=i.slice(1)),a=a.replace(/(0+)$/,""),n===0)Math.round(+`.${a}`)===1&&(i=`${BigInt(i)+1n}`),a="";else if(a.length>n){const[s,u,d]=[a.slice(0,n-1),a.slice(n-1,n),a.slice(n)],f=Math.round(+`${u}.${d}`);f>9?a=`${BigInt(s)+BigInt(1)}0`.padStart(s.length+1,"0"):a=`${s}${f}`,a.length>n&&(a=a.slice(1),i=`${BigInt(i)+1n}`),a=a.slice(0,n)}else a=a.padEnd(n,"0");return BigInt(`${t?"-":""}${i}${a}`)}return sa}var aa={},Wh;function yp(){if(Wh)return aa;Wh=1,Object.defineProperty(aa,"__esModule",{value:!0}),aa.parseEther=r;const e=io(),o=ic();function r(n,i="wei"){return(0,o.parseUnits)(n,e.etherUnits[i])}return aa}var ua={},Kh;function gp(){if(Kh)return ua;Kh=1,Object.defineProperty(ua,"__esModule",{value:!0}),ua.parseGwei=r;const e=io(),o=ic();function r(n,i="wei"){return(0,o.parseUnits)(n,e.gweiUnits[i])}return ua}var yr={},Zh;function pp(){if(Zh)return yr;Zh=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.nonceManager=void 0,yr.createNonceManager=r,yr.jsonRpc=n;const e=md(),o=no();function r(i){const{source:a}=i,t=new Map,s=new o.LruMap(8192),u=new Map,d=({address:f,chainId:c})=>`${f}.${c}`;return{async consume({address:f,chainId:c,client:m}){const g=d({address:f,chainId:c}),h=this.get({address:f,chainId:c,client:m});this.increment({address:f,chainId:c});const b=await h;return await a.set({address:f,chainId:c},b),s.set(g,b),b},async increment({address:f,chainId:c}){const m=d({address:f,chainId:c}),g=t.get(m)??0;t.set(m,g+1)},async get({address:f,chainId:c,client:m}){const g=d({address:f,chainId:c});let h=u.get(g);return h||(h=(async()=>{try{const p=await a.get({address:f,chainId:c,client:m}),_=s.get(g)??0;return _>0&&p<=_?_+1:(s.delete(g),p)}finally{this.reset({address:f,chainId:c})}})(),u.set(g,h)),(t.get(g)??0)+await h},reset({address:f,chainId:c}){const m=d({address:f,chainId:c});t.delete(m),u.delete(m)}}}function n(){return{async get(i){const{address:a,client:t}=i;return(0,e.getTransactionCount)(t,{address:a,blockTag:"pending"})},set(){}}}return yr.nonceManager=r({source:n()}),yr}var Jh;function Dd(){return Jh||(Jh=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isAddress=e.getAddress=e.getCreate2Address=e.getCreateAddress=e.getContractAddress=e.publicKeyToAddress=e.parseAccount=e.formatAbiParams=e.formatAbiItem=e.formatAbiItemWithArgs=e.encodePacked=e.parseAbiParameters=e.parseAbiParameter=e.parseAbiItem=e.parseAbi=e.getAbiItem=e.parseEventLogs=e.encodeFunctionResult=e.encodeFunctionData=e.encodeEventTopics=e.encodeErrorResult=e.encodeDeployData=e.encodeAbiParameters=e.decodeFunctionResult=e.decodeFunctionData=e.decodeEventLog=e.decodeErrorResult=e.decodeAbiParameters=e.validateTypedData=e.serializeTypedData=e.stringify=e.getWebSocketRpcClient=e.socketClientCache=e.getSocketRpcClient=e.getHttpRpcClient=e.rpc=e.getSocket=e.integerRegex=e.bytesRegex=e.arrayRegex=e.getChainContractAddress=e.extractChain=e.defineChain=e.assertCurrentChain=e.offchainLookupSignature=e.offchainLookupAbiItem=e.offchainLookup=e.ccipFetch=e.ccipRequest=e.buildRequest=void 0,e.getCallError=e.getNodeError=e.containsNodeError=e.fromRlp=e.hexToString=e.hexToNumber=e.hexToBigInt=e.hexToBool=e.fromHex=e.fromBytes=e.bytesToString=e.bytesToNumber=e.bytesToBool=e.bytesToBigint=e.bytesToBigInt=e.stringToHex=e.numberToHex=e.toHex=e.bytesToHex=e.boolToHex=e.stringToBytes=e.numberToBytes=e.hexToBytes=e.toBytes=e.boolToBytes=e.toRlp=e.extract=e.formatTransactionRequest=e.defineTransactionRequest=e.defineTransactionReceipt=e.formatLog=e.transactionType=e.formatTransaction=e.defineTransaction=e.formatBlock=e.defineBlock=e.trim=e.sliceHex=e.sliceBytes=e.slice=e.size=e.padHex=e.padBytes=e.pad=e.isHex=e.isBytes=e.concatHex=e.concatBytes=e.concat=e.isAddressEqual=void 0,e.nonceManager=e.createNonceManager=e.parseGwei=e.parseEther=e.parseUnits=e.formatUnits=e.formatGwei=e.formatEther=e.serializeAccessList=e.serializeTransaction=e.parseTransaction=e.assertTransactionLegacy=e.assertTransactionEIP2930=e.assertTransactionEIP1559=e.assertRequest=e.getTransactionType=e.getSerializedTransactionType=e.serializeErc6492Signature=e.isErc6492Signature=e.parseErc6492Signature=e.hashMessage=e.verifyTypedData=e.verifyMessage=e.verifyHash=e.recoverTypedDataAddress=e.recoverPublicKey=e.recoverMessageAddress=e.recoverAddress=e.hashTypedData=e.hashStruct=e.ripemd160=e.sha256=e.keccak256=e.isHash=e.toFunctionHash=e.toEventHash=e.getFunctionSignature=e.toFunctionSignature=e.getEventSignature=e.toEventSignature=e.getFunctionSelector=e.toFunctionSelector=e.getEventSelector=e.toEventSelector=e.defineFormatter=e.getAction=e.getTransactionError=e.getEstimateGasError=e.getContractError=void 0;var o=$0();Object.defineProperty(e,"buildRequest",{enumerable:!0,get:function(){return o.buildRequest}});var r=jd();Object.defineProperty(e,"ccipRequest",{enumerable:!0,get:function(){return r.ccipRequest}}),Object.defineProperty(e,"ccipFetch",{enumerable:!0,get:function(){return r.ccipRequest}}),Object.defineProperty(e,"offchainLookup",{enumerable:!0,get:function(){return r.offchainLookup}}),Object.defineProperty(e,"offchainLookupAbiItem",{enumerable:!0,get:function(){return r.offchainLookupAbiItem}}),Object.defineProperty(e,"offchainLookupSignature",{enumerable:!0,get:function(){return r.offchainLookupSignature}});var n=Xu();Object.defineProperty(e,"assertCurrentChain",{enumerable:!0,get:function(){return n.assertCurrentChain}});var i=W0();Object.defineProperty(e,"defineChain",{enumerable:!0,get:function(){return i.defineChain}});var a=K0();Object.defineProperty(e,"extractChain",{enumerable:!0,get:function(){return a.extractChain}});var t=tr();Object.defineProperty(e,"getChainContractAddress",{enumerable:!0,get:function(){return t.getChainContractAddress}});var s=Fu();Object.defineProperty(e,"arrayRegex",{enumerable:!0,get:function(){return s.arrayRegex}}),Object.defineProperty(e,"bytesRegex",{enumerable:!0,get:function(){return s.bytesRegex}}),Object.defineProperty(e,"integerRegex",{enumerable:!0,get:function(){return s.integerRegex}});var u=J0();Object.defineProperty(e,"getSocket",{enumerable:!0,get:function(){return u.getSocket}}),Object.defineProperty(e,"rpc",{enumerable:!0,get:function(){return u.rpc}});var d=Rd();Object.defineProperty(e,"getHttpRpcClient",{enumerable:!0,get:function(){return d.getHttpRpcClient}});var f=Z0();Object.defineProperty(e,"getSocketRpcClient",{enumerable:!0,get:function(){return f.getSocketRpcClient}}),Object.defineProperty(e,"socketClientCache",{enumerable:!0,get:function(){return f.socketClientCache}});var c=Cd();Object.defineProperty(e,"getWebSocketRpcClient",{enumerable:!0,get:function(){return c.getWebSocketRpcClient}});var m=Ce();Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return m.stringify}});var g=tc();Object.defineProperty(e,"serializeTypedData",{enumerable:!0,get:function(){return g.serializeTypedData}}),Object.defineProperty(e,"validateTypedData",{enumerable:!0,get:function(){return g.validateTypedData}});var h=Yt();Object.defineProperty(e,"decodeAbiParameters",{enumerable:!0,get:function(){return h.decodeAbiParameters}});var b=Hu();Object.defineProperty(e,"decodeErrorResult",{enumerable:!0,get:function(){return b.decodeErrorResult}});var p=bo();Object.defineProperty(e,"decodeEventLog",{enumerable:!0,get:function(){return p.decodeEventLog}});var _=X0();Object.defineProperty(e,"decodeFunctionData",{enumerable:!0,get:function(){return _.decodeFunctionData}});var j=Mt();Object.defineProperty(e,"decodeFunctionResult",{enumerable:!0,get:function(){return j.decodeFunctionResult}});var P=st();Object.defineProperty(e,"encodeAbiParameters",{enumerable:!0,get:function(){return P.encodeAbiParameters}});var v=go();Object.defineProperty(e,"encodeDeployData",{enumerable:!0,get:function(){return v.encodeDeployData}});var E=Q0();Object.defineProperty(e,"encodeErrorResult",{enumerable:!0,get:function(){return E.encodeErrorResult}});var l=Pr();Object.defineProperty(e,"encodeEventTopics",{enumerable:!0,get:function(){return l.encodeEventTopics}});var y=Ye();Object.defineProperty(e,"encodeFunctionData",{enumerable:!0,get:function(){return y.encodeFunctionData}});var I=ep();Object.defineProperty(e,"encodeFunctionResult",{enumerable:!0,get:function(){return I.encodeFunctionResult}});var w=ho();Object.defineProperty(e,"parseEventLogs",{enumerable:!0,get:function(){return w.parseEventLogs}});var B=Rt();Object.defineProperty(e,"getAbiItem",{enumerable:!0,get:function(){return B.getAbiItem}});var q=Kt();Object.defineProperty(e,"parseAbi",{enumerable:!0,get:function(){return q.parseAbi}}),Object.defineProperty(e,"parseAbiItem",{enumerable:!0,get:function(){return q.parseAbiItem}}),Object.defineProperty(e,"parseAbiParameter",{enumerable:!0,get:function(){return q.parseAbiParameter}}),Object.defineProperty(e,"parseAbiParameters",{enumerable:!0,get:function(){return q.parseAbiParameters}});var T=tp();Object.defineProperty(e,"encodePacked",{enumerable:!0,get:function(){return T.encodePacked}});var O=p0();Object.defineProperty(e,"formatAbiItemWithArgs",{enumerable:!0,get:function(){return O.formatAbiItemWithArgs}});var A=St();Object.defineProperty(e,"formatAbiItem",{enumerable:!0,get:function(){return A.formatAbiItem}}),Object.defineProperty(e,"formatAbiParams",{enumerable:!0,get:function(){return A.formatAbiParams}});var x=Be();Object.defineProperty(e,"parseAccount",{enumerable:!0,get:function(){return x.parseAccount}});var F=_0();Object.defineProperty(e,"publicKeyToAddress",{enumerable:!0,get:function(){return F.publicKeyToAddress}});var k=rp();Object.defineProperty(e,"getContractAddress",{enumerable:!0,get:function(){return k.getContractAddress}}),Object.defineProperty(e,"getCreateAddress",{enumerable:!0,get:function(){return k.getCreateAddress}}),Object.defineProperty(e,"getCreate2Address",{enumerable:!0,get:function(){return k.getCreate2Address}});var $=Je();Object.defineProperty(e,"getAddress",{enumerable:!0,get:function(){return $.getAddress}});var M=We();Object.defineProperty(e,"isAddress",{enumerable:!0,get:function(){return M.isAddress}});var S=xt();Object.defineProperty(e,"isAddressEqual",{enumerable:!0,get:function(){return S.isAddressEqual}});var R=Fe();Object.defineProperty(e,"concat",{enumerable:!0,get:function(){return R.concat}}),Object.defineProperty(e,"concatBytes",{enumerable:!0,get:function(){return R.concatBytes}}),Object.defineProperty(e,"concatHex",{enumerable:!0,get:function(){return R.concatHex}});var C=xd();Object.defineProperty(e,"isBytes",{enumerable:!0,get:function(){return C.isBytes}});var H=ke();Object.defineProperty(e,"isHex",{enumerable:!0,get:function(){return H.isHex}});var N=Zt();Object.defineProperty(e,"pad",{enumerable:!0,get:function(){return N.pad}}),Object.defineProperty(e,"padBytes",{enumerable:!0,get:function(){return N.padBytes}}),Object.defineProperty(e,"padHex",{enumerable:!0,get:function(){return N.padHex}});var D=Ve();Object.defineProperty(e,"size",{enumerable:!0,get:function(){return D.size}});var G=it();Object.defineProperty(e,"slice",{enumerable:!0,get:function(){return G.slice}}),Object.defineProperty(e,"sliceBytes",{enumerable:!0,get:function(){return G.sliceBytes}}),Object.defineProperty(e,"sliceHex",{enumerable:!0,get:function(){return G.sliceHex}});var V=Jt();Object.defineProperty(e,"trim",{enumerable:!0,get:function(){return V.trim}});var W=Lu();Object.defineProperty(e,"defineBlock",{enumerable:!0,get:function(){return W.defineBlock}}),Object.defineProperty(e,"formatBlock",{enumerable:!0,get:function(){return W.formatBlock}});var J=lo();Object.defineProperty(e,"defineTransaction",{enumerable:!0,get:function(){return J.defineTransaction}}),Object.defineProperty(e,"formatTransaction",{enumerable:!0,get:function(){return J.formatTransaction}}),Object.defineProperty(e,"transactionType",{enumerable:!0,get:function(){return J.transactionType}});var re=qt();Object.defineProperty(e,"formatLog",{enumerable:!0,get:function(){return re.formatLog}});var K=qd();Object.defineProperty(e,"defineTransactionReceipt",{enumerable:!0,get:function(){return K.defineTransactionReceipt}});var ee=Ot();Object.defineProperty(e,"defineTransactionRequest",{enumerable:!0,get:function(){return ee.defineTransactionRequest}}),Object.defineProperty(e,"formatTransactionRequest",{enumerable:!0,get:function(){return ee.formatTransactionRequest}});var ae=Yr();Object.defineProperty(e,"extract",{enumerable:!0,get:function(){return ae.extract}});var Y=uo();Object.defineProperty(e,"toRlp",{enumerable:!0,get:function(){return Y.toRlp}});var X=he();Object.defineProperty(e,"boolToBytes",{enumerable:!0,get:function(){return X.boolToBytes}}),Object.defineProperty(e,"toBytes",{enumerable:!0,get:function(){return X.toBytes}}),Object.defineProperty(e,"hexToBytes",{enumerable:!0,get:function(){return X.hexToBytes}}),Object.defineProperty(e,"numberToBytes",{enumerable:!0,get:function(){return X.numberToBytes}}),Object.defineProperty(e,"stringToBytes",{enumerable:!0,get:function(){return X.stringToBytes}});var Q=te();Object.defineProperty(e,"boolToHex",{enumerable:!0,get:function(){return Q.boolToHex}}),Object.defineProperty(e,"bytesToHex",{enumerable:!0,get:function(){return Q.bytesToHex}}),Object.defineProperty(e,"toHex",{enumerable:!0,get:function(){return Q.toHex}}),Object.defineProperty(e,"numberToHex",{enumerable:!0,get:function(){return Q.numberToHex}}),Object.defineProperty(e,"stringToHex",{enumerable:!0,get:function(){return Q.stringToHex}});var Z=od();Object.defineProperty(e,"bytesToBigInt",{enumerable:!0,get:function(){return Z.bytesToBigInt}}),Object.defineProperty(e,"bytesToBigint",{enumerable:!0,get:function(){return Z.bytesToBigInt}}),Object.defineProperty(e,"bytesToBool",{enumerable:!0,get:function(){return Z.bytesToBool}}),Object.defineProperty(e,"bytesToNumber",{enumerable:!0,get:function(){return Z.bytesToNumber}}),Object.defineProperty(e,"bytesToString",{enumerable:!0,get:function(){return Z.bytesToString}}),Object.defineProperty(e,"fromBytes",{enumerable:!0,get:function(){return Z.fromBytes}});var L=Ie();Object.defineProperty(e,"fromHex",{enumerable:!0,get:function(){return L.fromHex}}),Object.defineProperty(e,"hexToBool",{enumerable:!0,get:function(){return L.hexToBool}}),Object.defineProperty(e,"hexToBigInt",{enumerable:!0,get:function(){return L.hexToBigInt}}),Object.defineProperty(e,"hexToNumber",{enumerable:!0,get:function(){return L.hexToNumber}}),Object.defineProperty(e,"hexToString",{enumerable:!0,get:function(){return L.hexToString}});var fe=Md();Object.defineProperty(e,"fromRlp",{enumerable:!0,get:function(){return fe.fromRlp}});var be=co();Object.defineProperty(e,"containsNodeError",{enumerable:!0,get:function(){return be.containsNodeError}}),Object.defineProperty(e,"getNodeError",{enumerable:!0,get:function(){return be.getNodeError}});var de=vd();Object.defineProperty(e,"getCallError",{enumerable:!0,get:function(){return de.getCallError}});var Ae=Qt();Object.defineProperty(e,"getContractError",{enumerable:!0,get:function(){return Ae.getContractError}});var we=w0();Object.defineProperty(e,"getEstimateGasError",{enumerable:!0,get:function(){return we.getEstimateGasError}});var Te=M0();Object.defineProperty(e,"getTransactionError",{enumerable:!0,get:function(){return Te.getTransactionError}});var Se=me();Object.defineProperty(e,"getAction",{enumerable:!0,get:function(){return Se.getAction}});var Oe=fo();Object.defineProperty(e,"defineFormatter",{enumerable:!0,get:function(){return Oe.defineFormatter}});var $e=Jr();Object.defineProperty(e,"toEventSelector",{enumerable:!0,get:function(){return $e.toEventSelector}}),Object.defineProperty(e,"getEventSelector",{enumerable:!0,get:function(){return $e.toEventSelector}});var Ze=jr();Object.defineProperty(e,"toFunctionSelector",{enumerable:!0,get:function(){return Ze.toFunctionSelector}}),Object.defineProperty(e,"getFunctionSelector",{enumerable:!0,get:function(){return Ze.toFunctionSelector}});var ze=np();Object.defineProperty(e,"toEventSignature",{enumerable:!0,get:function(){return ze.toEventSignature}}),Object.defineProperty(e,"getEventSignature",{enumerable:!0,get:function(){return ze.toEventSignature}});var $t=op();Object.defineProperty(e,"toFunctionSignature",{enumerable:!0,get:function(){return $t.toFunctionSignature}}),Object.defineProperty(e,"getFunctionSignature",{enumerable:!0,get:function(){return $t.toFunctionSignature}});var lt=ip();Object.defineProperty(e,"toEventHash",{enumerable:!0,get:function(){return lt.toEventHash}});var Ue=sp();Object.defineProperty(e,"toFunctionHash",{enumerable:!0,get:function(){return Ue.toFunctionHash}});var mt=kd();Object.defineProperty(e,"isHash",{enumerable:!0,get:function(){return mt.isHash}});var ct=Ne();Object.defineProperty(e,"keccak256",{enumerable:!0,get:function(){return ct.keccak256}});var Xe=bd();Object.defineProperty(e,"sha256",{enumerable:!0,get:function(){return Xe.sha256}});var sc=up();Object.defineProperty(e,"ripemd160",{enumerable:!0,get:function(){return sc.ripemd160}});var Ao=Po();Object.defineProperty(e,"hashStruct",{enumerable:!0,get:function(){return Ao.hashStruct}}),Object.defineProperty(e,"hashTypedData",{enumerable:!0,get:function(){return Ao.hashTypedData}});var ac=er();Object.defineProperty(e,"recoverAddress",{enumerable:!0,get:function(){return ac.recoverAddress}});var uc=Fd();Object.defineProperty(e,"recoverMessageAddress",{enumerable:!0,get:function(){return uc.recoverMessageAddress}});var cc=ud();Object.defineProperty(e,"recoverPublicKey",{enumerable:!0,get:function(){return cc.recoverPublicKey}});var dc=$d();Object.defineProperty(e,"recoverTypedDataAddress",{enumerable:!0,get:function(){return dc.recoverTypedDataAddress}});var To=fp();Object.defineProperty(e,"verifyHash",{enumerable:!0,get:function(){return To.verifyHash}});var Io=lp();Object.defineProperty(e,"verifyMessage",{enumerable:!0,get:function(){return Io.verifyMessage}});var en=mp();Object.defineProperty(e,"verifyTypedData",{enumerable:!0,get:function(){return en.verifyTypedData}});var fc=wo();Object.defineProperty(e,"hashMessage",{enumerable:!0,get:function(){return fc.hashMessage}});var lc=bp();Object.defineProperty(e,"parseErc6492Signature",{enumerable:!0,get:function(){return lc.parseErc6492Signature}});var mc=rc();Object.defineProperty(e,"isErc6492Signature",{enumerable:!0,get:function(){return mc.isErc6492Signature}});var bc=Nd();Object.defineProperty(e,"serializeErc6492Signature",{enumerable:!0,get:function(){return bc.serializeErc6492Signature}});var hc=zd();Object.defineProperty(e,"getSerializedTransactionType",{enumerable:!0,get:function(){return hc.getSerializedTransactionType}});var yc=Wu();Object.defineProperty(e,"getTransactionType",{enumerable:!0,get:function(){return yc.getTransactionType}});var gc=Ct();Object.defineProperty(e,"assertRequest",{enumerable:!0,get:function(){return gc.assertRequest}});var rr=nc();Object.defineProperty(e,"assertTransactionEIP1559",{enumerable:!0,get:function(){return rr.assertTransactionEIP1559}}),Object.defineProperty(e,"assertTransactionEIP2930",{enumerable:!0,get:function(){return rr.assertTransactionEIP2930}}),Object.defineProperty(e,"assertTransactionLegacy",{enumerable:!0,get:function(){return rr.assertTransactionLegacy}});var nr=Ud();Object.defineProperty(e,"parseTransaction",{enumerable:!0,get:function(){return nr.parseTransaction}});var or=oc();Object.defineProperty(e,"serializeTransaction",{enumerable:!0,get:function(){return or.serializeTransaction}});var ir=Ld();Object.defineProperty(e,"serializeAccessList",{enumerable:!0,get:function(){return ir.serializeAccessList}});var sr=so();Object.defineProperty(e,"formatEther",{enumerable:!0,get:function(){return sr.formatEther}});var pc=wr();Object.defineProperty(e,"formatGwei",{enumerable:!0,get:function(){return pc.formatGwei}});var _c=Nu();Object.defineProperty(e,"formatUnits",{enumerable:!0,get:function(){return _c.formatUnits}});var vc=ic();Object.defineProperty(e,"parseUnits",{enumerable:!0,get:function(){return vc.parseUnits}});var Ec=yp();Object.defineProperty(e,"parseEther",{enumerable:!0,get:function(){return Ec.parseEther}});var jc=gp();Object.defineProperty(e,"parseGwei",{enumerable:!0,get:function(){return jc.parseGwei}});var So=pp();Object.defineProperty(e,"createNonceManager",{enumerable:!0,get:function(){return So.createNonceManager}}),Object.defineProperty(e,"nonceManager",{enumerable:!0,get:function(){return So.nonceManager}})}(Dc)),Dc}var Yh;function w_(){if(Yh)return Ms;Yh=1,Object.defineProperty(Ms,"__esModule",{value:!0}),Ms.formatProof=r;const e=Dd();function o(n){return n.map(i=>({...i,value:BigInt(i.value)}))}function r(n){return{...n,balance:n.balance?BigInt(n.balance):void 0,nonce:n.nonce?(0,e.hexToNumber)(n.nonce):void 0,storageProof:n.storageProof?o(n.storageProof):void 0}}return Ms}var Xh;function A_(){if(Xh)return qs;Xh=1,Object.defineProperty(qs,"__esModule",{value:!0}),qs.getProof=r;const e=te(),o=w_();async function r(n,{address:i,blockNumber:a,blockTag:t,storageKeys:s}){const u=t??"latest",d=a!==void 0?(0,e.numberToHex)(a):void 0,f=await n.request({method:"eth_getProof",params:[i,s,d||u]});return(0,o.formatProof)(f)}return qs}var ca={},Qh;function T_(){if(Qh)return ca;Qh=1,Object.defineProperty(ca,"__esModule",{value:!0}),ca.getStorageAt=o;const e=te();async function o(r,{address:n,blockNumber:i,blockTag:a="latest",slot:t}){const s=i!==void 0?(0,e.numberToHex)(i):void 0;return await r.request({method:"eth_getStorageAt",params:[n,t,s||a]})}return ca}var da={},ey;function Gd(){if(ey)return da;ey=1,Object.defineProperty(da,"__esModule",{value:!0}),da.getTransaction=n;const e=Ke(),o=te(),r=lo();async function n(i,{blockHash:a,blockNumber:t,blockTag:s,hash:u,index:d}){var h,b,p;const f=s||"latest",c=t!==void 0?(0,o.numberToHex)(t):void 0;let m=null;if(u?m=await i.request({method:"eth_getTransactionByHash",params:[u]},{dedupe:!0}):a?m=await i.request({method:"eth_getTransactionByBlockHashAndIndex",params:[a,(0,o.numberToHex)(d)]},{dedupe:!0}):m=await i.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[c||f,(0,o.numberToHex)(d)]},{dedupe:!!c}),!m)throw new e.TransactionNotFoundError({blockHash:a,blockNumber:t,blockTag:f,hash:u,index:d});return(((p=(b=(h=i.chain)==null?void 0:h.formatters)==null?void 0:b.transaction)==null?void 0:p.format)||r.formatTransaction)(m)}return da}var fa={},ty;function I_(){if(ty)return fa;ty=1,Object.defineProperty(fa,"__esModule",{value:!0}),fa.getTransactionConfirmations=n;const e=me(),o=vo(),r=Gd();async function n(i,{hash:a,transactionReceipt:t}){const[s,u]=await Promise.all([(0,e.getAction)(i,o.getBlockNumber,"getBlockNumber")({}),a?(0,e.getAction)(i,r.getTransaction,"getTransaction")({hash:a}):void 0]),d=(t==null?void 0:t.blockNumber)||(u==null?void 0:u.blockNumber);return d?s-d+1n:0n}return fa}var la={},ry;function _p(){if(ry)return la;ry=1,Object.defineProperty(la,"__esModule",{value:!0}),la.getTransactionReceipt=r;const e=Ke(),o=qd();async function r(n,{hash:i}){var s,u,d;const a=await n.request({method:"eth_getTransactionReceipt",params:[i]},{dedupe:!0});if(!a)throw new e.TransactionReceiptNotFoundError({hash:i});return(((d=(u=(s=n.chain)==null?void 0:s.formatters)==null?void 0:u.transactionReceipt)==null?void 0:d.format)||o.formatTransactionReceipt)(a)}return la}var ma={},ny;function S_(){if(ny)return ma;ny=1,Object.defineProperty(ma,"__esModule",{value:!0}),ma.multicall=f;const e=Tr(),o=_e(),r=se(),n=Xt(),i=Mt(),a=Ye(),t=tr(),s=Qt(),u=me(),d=kt();async function f(c,m){var q;const{allowFailure:g=!0,batchSize:h,blockNumber:b,blockTag:p,multicallAddress:_,stateOverride:j}=m,P=m.contracts,v=h??(typeof((q=c.batch)==null?void 0:q.multicall)=="object"&&c.batch.multicall.batchSize||1024);let E=_;if(!E){if(!c.chain)throw new Error("client chain not configured. multicallAddress is required.");E=(0,t.getChainContractAddress)({blockNumber:b,chain:c.chain,contract:"multicall3"})}const l=[[]];let y=0,I=0;for(let T=0;T0&&I>v&&l[y].length>0&&(y++,I=(k.length-2)/2,l[y]=[]),l[y]=[...l[y],{allowFailure:!0,callData:k,target:A}]}catch(k){const $=(0,s.getContractError)(k,{abi:O,address:A,args:x,docsPath:"/docs/contract/multicall",functionName:F});if(!g)throw $;l[y]=[...l[y],{allowFailure:!0,callData:"0x",target:A}]}}const w=await Promise.allSettled(l.map(T=>(0,u.getAction)(c,d.readContract,"readContract")({abi:e.multicall3Abi,address:E,args:[T],blockNumber:b,blockTag:p,functionName:"aggregate3",stateOverride:j}))),B=[];for(let T=0;Tu===void 0||u===!1?null:[s,u]).filter(Boolean),t=a.reduce((s,[u])=>Math.max(s,u.length),0);return a.map(([s,u])=>` ${`${s}:`.padEnd(t+1)} ${u}`).join(` +`)}return Ur}var sy;function Ft(){if(sy)return Zn;sy=1,Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.BaseError=void 0;const e=B_();class o extends Error{constructor(i,a={}){const t=(()=>{var c;if(a.cause instanceof o){if(a.cause.details)return a.cause.details;if(a.cause.shortMessage)return a.cause.shortMessage}return(c=a.cause)!=null&&c.message?a.cause.message:a.details})(),s=a.cause instanceof o&&a.cause.docsPath||a.docsPath,d=`https://oxlib.sh${s??""}`,f=[i||"An error occurred.",...a.metaMessages?["",...a.metaMessages]:[],...t||s?["",t?`Details: ${t}`:void 0,s?`See: ${d}`:void 0]:[]].filter(c=>typeof c=="string").join(` +`);super(f,a.cause?{cause:a.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{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,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:`ox@${(0,e.getVersion)()}`}),this.cause=a.cause,this.details=t,this.docs=d,this.docsPath=s,this.shortMessage=i}walk(i){return r(this,i)}}Zn.BaseError=o;function r(n,i){return i!=null&&i(n)?n:n&&typeof n=="object"&&"cause"in n&&n.cause?r(n.cause,i):i?null:n}return Zn}var Yn={},ay;function Vd(){if(ay)return Yn;ay=1,Object.defineProperty(Yn,"__esModule",{value:!0}),Yn.parse=o,Yn.stringify=r;const e="#__bigint";function o(n,i){return JSON.parse(n,(a,t)=>{const s=t;return typeof s=="string"&&s.endsWith(e)?BigInt(s.slice(0,-e.length)):typeof i=="function"?i(a,s):s})}function r(n,i,a){return JSON.stringify(n,(t,s)=>typeof i=="function"?i(t,s):typeof s=="bigint"?s.toString()+e:s,a)}return Yn}var Yc={},uy;function vp(){return uy||(uy=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.charCodeMap=void 0,e.assertSize=r,e.assertStartOffset=n,e.assertEndOffset=i,e.charCodeToBase16=a,e.pad=t,e.trim=s;const o=Ir();function r(u,d){if(o.size(u)>d)throw new o.SizeOverflowError({givenSize:o.size(u),maxSize:d})}function n(u,d){if(typeof d=="number"&&d>0&&d>o.size(u)-1)throw new o.SliceOffsetOutOfBoundsError({offset:d,position:"start",size:o.size(u)})}function i(u,d,f){if(typeof d=="number"&&typeof f=="number"&&o.size(u)!==f-d)throw new o.SliceOffsetOutOfBoundsError({offset:f,position:"end",size:o.size(u)})}e.charCodeMap={zero:48,nine:57,A:65,F:70,a:97,f:102};function a(u){if(u>=e.charCodeMap.zero&&u<=e.charCodeMap.nine)return u-e.charCodeMap.zero;if(u>=e.charCodeMap.A&&u<=e.charCodeMap.F)return u-(e.charCodeMap.A-10);if(u>=e.charCodeMap.a&&u<=e.charCodeMap.f)return u-(e.charCodeMap.a-10)}function t(u,d={}){const{dir:f,size:c=32}=d;if(c===0)return u;if(u.length>c)throw new o.SizeExceedsPaddingSizeError({size:u.length,targetSize:c,type:"Bytes"});const m=new Uint8Array(c);for(let g=0;gs)throw new e.SizeOverflowError({givenSize:e.size(t),maxSize:s})}function r(t,s){if(typeof s=="number"&&s>0&&s>e.size(t)-1)throw new e.SliceOffsetOutOfBoundsError({offset:s,position:"start",size:e.size(t)})}function n(t,s,u){if(typeof s=="number"&&typeof u=="number"&&e.size(t)!==u-s)throw new e.SliceOffsetOutOfBoundsError({offset:u,position:"end",size:e.size(t)})}function i(t,s={}){const{dir:u,size:d=32}=s;if(d===0)return t;const f=t.replace("0x","");if(f.length>d*2)throw new e.SizeExceedsPaddingSizeError({size:Math.ceil(f.length/2),targetSize:d,type:"Hex"});return`0x${f[u==="right"?"padEnd":"padStart"](d*2,"0")}`}function a(t,s={}){const{dir:u="left"}=s;let d=t.replace("0x",""),f=0;for(let c=0;c1||C[0]>1)throw new A(C);return!!C[0]}function I(M,S={}){return r.fromBytes(M,S)}function w(M,S={}){const{size:R}=S;typeof R<"u"&&i.assertSize(M,R);const C=r.fromBytes(M,S);return r.toNumber(C,S)}function B(M,S={}){const{size:R}=S;let C=M;return typeof R<"u"&&(i.assertSize(C,R),C=T(C)),t.decode(C)}function q(M){return i.trim(M,{dir:"left"})}function T(M){return i.trim(M,{dir:"right"})}function O(M){try{return u(M),!0}catch{return!1}}class A extends o.BaseError{constructor(S){super(`Bytes value \`${S}\` is not a valid boolean.`,{metaMessages:["The bytes array must contain a single byte of either a `0` or `1` value."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesBooleanError"})}}ue.InvalidBytesBooleanError=A;class x extends o.BaseError{constructor(S){super(`Value \`${typeof S=="object"?n.stringify(S):S}\` of type \`${typeof S}\` is an invalid Bytes value.`,{metaMessages:["Bytes values must be of type `Bytes`."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesTypeError"})}}ue.InvalidBytesTypeError=x;class F extends o.BaseError{constructor({givenSize:S,maxSize:R}){super(`Size cannot exceed \`${R}\` bytes. Given size: \`${S}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}}ue.SizeOverflowError=F;class k extends o.BaseError{constructor({offset:S,position:R,size:C}){super(`Slice ${R==="start"?"starting":"ending"} at offset \`${S}\` is out-of-bounds (size: \`${C}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SliceOffsetOutOfBoundsError"})}}ue.SliceOffsetOutOfBoundsError=k;class $ extends o.BaseError{constructor({size:S,targetSize:R,type:C}){super(`${C.charAt(0).toUpperCase()}${C.slice(1).toLowerCase()} size (\`${S}\`) exceeds padding size (\`${R}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}}return ue.SizeExceedsPaddingSizeError=$,ue}var fy;function ut(){if(fy)return ie;fy=1,Object.defineProperty(ie,"__esModule",{value:!0}),ie.SizeExceedsPaddingSizeError=ie.SliceOffsetOutOfBoundsError=ie.SizeOverflowError=ie.InvalidLengthError=ie.InvalidHexValueError=ie.InvalidHexTypeError=ie.InvalidHexBooleanError=ie.IntegerOutOfRangeError=void 0,ie.assert=u,ie.concat=d,ie.from=f,ie.fromBoolean=c,ie.fromBytes=m,ie.fromNumber=g,ie.fromString=h,ie.isEqual=b,ie.padLeft=p,ie.padRight=_,ie.random=j,ie.slice=P,ie.size=v,ie.trimLeft=E,ie.trimRight=l,ie.toBigInt=y,ie.toBoolean=I,ie.toBytes=w,ie.toNumber=B,ie.toString=q,ie.validate=T;const e=Wt(),o=Ir(),r=Ft(),n=Vd(),i=vp(),a=Ep(),t=new TextEncoder,s=Array.from({length:256},(R,C)=>C.toString(16).padStart(2,"0"));function u(R,C={}){const{strict:H=!1}=C;if(!R)throw new x(R);if(typeof R!="string")throw new x(R);if(H&&!/^0x[0-9a-fA-F]*$/.test(R))throw new F(R);if(!R.startsWith("0x"))throw new F(R)}function d(...R){return`0x${R.reduce((C,H)=>C+H.replace("0x",""),"")}`}function f(R){return R instanceof Uint8Array?m(R):Array.isArray(R)?m(new Uint8Array(R)):R}function c(R,C={}){const H=`0x${Number(R)}`;return typeof C.size=="number"?(a.assertSize(H,C.size),p(H,C.size)):H}function m(R,C={}){let H="";for(let D=0;DG||D>1n;return N<=V?N:N-G-1n}function I(R,C={}){C.size&&a.assertSize(R,C.size);const H=E(R);if(H==="0x")return!1;if(H==="0x1")return!0;throw new A(R)}function w(R,C={}){return o.fromHex(R,C)}function B(R,C={}){const{signed:H,size:N}=C;return Number(!H&&!N?R:y(R,C))}function q(R,C={}){const{size:H}=C;let N=o.fromHex(R);return H&&(i.assertSize(N,H),N=o.trimRight(N)),new TextDecoder().decode(N)}function T(R,C={}){const{strict:H=!1}=C;try{return u(R,{strict:H}),!0}catch{return!1}}class O extends r.BaseError{constructor({max:C,min:H,signed:N,size:D,value:G}){super(`Number \`${G}\` is not in safe${D?` ${D*8}-bit`:""}${N?" signed":" unsigned"} integer range ${C?`(\`${H}\` to \`${C}\`)`:`(above \`${H}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}ie.IntegerOutOfRangeError=O;class A extends r.BaseError{constructor(C){super(`Hex value \`"${C}"\` is not a valid boolean.`,{metaMessages:['The hex value must be `"0x0"` (false) or `"0x1"` (true).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexBooleanError"})}}ie.InvalidHexBooleanError=A;class x extends r.BaseError{constructor(C){super(`Value \`${typeof C=="object"?n.stringify(C):C}\` of type \`${typeof C}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}ie.InvalidHexTypeError=x;class F extends r.BaseError{constructor(C){super(`Value \`${C}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}}ie.InvalidHexValueError=F;class k extends r.BaseError{constructor(C){super(`Hex value \`"${C}"\` is an odd length (${C.length-2} nibbles).`,{metaMessages:["It must be an even length."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidLengthError"})}}ie.InvalidLengthError=k;class $ extends r.BaseError{constructor({givenSize:C,maxSize:H}){super(`Size cannot exceed \`${H}\` bytes. Given size: \`${C}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}}ie.SizeOverflowError=$;class M extends r.BaseError{constructor({offset:C,position:H,size:N}){super(`Slice ${H==="start"?"starting":"ending"} at offset \`${C}\` is out-of-bounds (size: \`${N}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}}ie.SliceOffsetOutOfBoundsError=M;class S extends r.BaseError{constructor({size:C,targetSize:H,type:N}){super(`${N.charAt(0).toUpperCase()}${N.slice(1).toLowerCase()} size (\`${C}\`) exceeds padding size (\`${H}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}return ie.SizeExceedsPaddingSizeError=S,ie}var Xn={},ly;function O_(){if(ly)return Xn;ly=1,Object.defineProperty(Xn,"__esModule",{value:!0}),Xn.fromRpc=o,Xn.toRpc=r;const e=ut();function o(n){return{...n,amount:BigInt(n.amount),index:Number(n.index),validatorIndex:Number(n.validatorIndex)}}function r(n){return{address:n.address,amount:e.fromNumber(n.amount),index:e.fromNumber(n.index),validatorIndex:e.fromNumber(n.validatorIndex)}}return Xn}var my;function C_(){if(my)return Kn;my=1,Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.fromRpc=r,Kn.toRpc=n;const e=ut(),o=O_();function r(i){return{...i.baseFeePerGas&&{baseFeePerGas:BigInt(i.baseFeePerGas)},...i.blobBaseFee&&{blobBaseFee:BigInt(i.blobBaseFee)},...i.feeRecipient&&{feeRecipient:i.feeRecipient},...i.gasLimit&&{gasLimit:BigInt(i.gasLimit)},...i.number&&{number:BigInt(i.number)},...i.prevRandao&&{prevRandao:BigInt(i.prevRandao)},...i.time&&{time:BigInt(i.time)},...i.withdrawals&&{withdrawals:i.withdrawals.map(o.fromRpc)}}}function n(i){return{...typeof i.baseFeePerGas=="bigint"&&{baseFeePerGas:e.fromNumber(i.baseFeePerGas)},...typeof i.blobBaseFee=="bigint"&&{blobBaseFee:e.fromNumber(i.blobBaseFee)},...typeof i.feeRecipient=="string"&&{feeRecipient:i.feeRecipient},...typeof i.gasLimit=="bigint"&&{gasLimit:e.fromNumber(i.gasLimit)},...typeof i.number=="bigint"&&{number:e.fromNumber(i.number)},...typeof i.prevRandao=="bigint"&&{prevRandao:e.fromNumber(i.prevRandao)},...typeof i.time=="bigint"&&{time:e.fromNumber(i.time)},...i.withdrawals&&{withdrawals:i.withdrawals.map(o.toRpc)}}}return Kn}var by;function jp(){if(by)return ba;by=1,Object.defineProperty(ba,"__esModule",{value:!0}),ba.simulateBlocks=b;const e=C_(),o=Be(),r=_e(),n=Xt(),i=Bt(),a=Mt(),t=Ye(),s=te(),u=Qt(),d=co(),f=Lu(),c=qt(),m=Ot(),g=cd(),h=Ct();async function b(p,_){const{blockNumber:j,blockTag:P="latest",blocks:v,returnFullTransactions:E,traceTransfers:l,validation:y}=_;try{const I=[];for(const T of v){const O=T.blockOverrides?e.toRpc(T.blockOverrides):void 0,A=T.calls.map(F=>{const k=F,$=k.account?(0,o.parseAccount)(k.account):void 0,M={...k,data:k.abi?(0,t.encodeFunctionData)(k):k.data,from:k.from??($==null?void 0:$.address)};return(0,h.assertRequest)(M),(0,m.formatTransactionRequest)(M)}),x=T.stateOverrides?(0,g.serializeStateOverride)(T.stateOverrides):void 0;I.push({blockOverrides:O,calls:A,stateOverrides:x})}const B=(j?(0,s.numberToHex)(j):void 0)||P;return(await p.request({method:"eth_simulateV1",params:[{blockStateCalls:I,returnFullTransactions:E,traceTransfers:l,validation:y},B]})).map((T,O)=>({...(0,f.formatBlock)(T),calls:T.calls.map((A,x)=>{var G,V;const{abi:F,args:k,functionName:$,to:M}=v[O].calls[x],S=((G=A.error)==null?void 0:G.data)??A.returnData,R=BigInt(A.gasUsed),C=(V=A.logs)==null?void 0:V.map(W=>(0,c.formatLog)(W)),H=A.status==="0x1"?"success":"failure",N=F&&H==="success"?(0,a.decodeFunctionResult)({abi:F,data:S,functionName:$}):null,D=(()=>{var J;if(H==="success")return;let W;if(((J=A.error)==null?void 0:J.data)==="0x"?W=new r.AbiDecodingZeroDataError:A.error&&(W=new n.RawContractError(A.error)),!!W)return(0,u.getContractError)(W,{abi:F??[],address:M,args:k,functionName:$??""})})();return{data:S,gasUsed:R,logs:C,status:H,...H==="success"?{result:N}:{error:D}}})}))}catch(I){const w=I,B=(0,d.getNodeError)(w,{});throw B instanceof i.UnknownNodeError?w:B}}return ba}var ha={},Vt={},qe={},gr={},hy;function Pp(){if(hy)return gr;hy=1,Object.defineProperty(gr,"__esModule",{value:!0}),gr.keccak256=a,gr.ripemd160=t,gr.sha256=s,gr.validate=u;const e=ap(),o=s0(),r=ad(),n=Ir(),i=ut();function a(d,f={}){const{as:c=typeof d=="string"?"Hex":"Bytes"}=f,m=(0,o.keccak_256)(n.from(d));return c==="Bytes"?m:i.fromBytes(m)}function t(d,f={}){const{as:c=typeof d=="string"?"Hex":"Bytes"}=f,m=(0,e.ripemd160)(n.from(d));return c==="Bytes"?m:i.fromBytes(m)}function s(d,f={}){const{as:c=typeof d=="string"?"Hex":"Bytes"}=f,m=(0,r.sha256)(n.from(d));return c==="Bytes"?m:i.fromBytes(m)}function u(d){return i.validate(d)&&i.size(d)===32}return gr}var Lr={},Me={},Dr={},Qn={},yy;function x_(){if(yy)return Qn;yy=1,Object.defineProperty(Qn,"__esModule",{value:!0}),Qn.LruMap=void 0;class e extends Map{constructor(r){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=r}get(r){const n=super.get(r);return super.has(r)&&n!==void 0&&(this.delete(r),super.set(r,n)),n}set(r,n){if(super.set(r,n),this.maxSize&&this.size>this.maxSize){const i=this.keys().next().value;i&&this.delete(i)}return this}}return Qn.LruMap=e,Qn}var gy;function q_(){if(gy)return Dr;gy=1,Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.checksum=void 0,Dr.clear=r;const e=x_(),o={checksum:new e.LruMap(8192)};Dr.checksum=o.checksum;function r(){for(const n of Object.values(o))n.clear()}return Dr}var Pe={},py;function M_(){if(py)return Pe;py=1,Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.InvalidSerializedSizeError=Pe.InvalidUncompressedPrefixError=Pe.InvalidCompressedPrefixError=Pe.InvalidPrefixError=Pe.InvalidError=void 0,Pe.assert=i,Pe.compress=a,Pe.from=t,Pe.fromBytes=s,Pe.fromHex=u,Pe.toBytes=d,Pe.toHex=f,Pe.validate=c;const e=Ir(),o=Ft(),r=ut(),n=Vd();function i(_,j={}){const{compressed:P}=j,{prefix:v,x:E,y:l}=_;if(P===!1||typeof E=="bigint"&&typeof l=="bigint"){if(v!==4)throw new g({prefix:v,cause:new b});return}if(P===!0||typeof E=="bigint"&&typeof l>"u"){if(v!==3&&v!==2)throw new g({prefix:v,cause:new h});return}throw new m({publicKey:_})}function a(_){const{x:j,y:P}=_;return{prefix:P%2n===0n?2:3,x:j}}function t(_){const j=(()=>{if(r.validate(_))return u(_);if(e.validate(_))return s(_);const{prefix:P,x:v,y:E}=_;return typeof v=="bigint"&&typeof E=="bigint"?{prefix:P??4,x:v,y:E}:{prefix:P,x:v}})();return i(j),j}function s(_){return u(r.fromBytes(_))}function u(_){if(_.length!==132&&_.length!==130&&_.length!==68)throw new p({publicKey:_});if(_.length===130){const v=BigInt(r.slice(_,0,32)),E=BigInt(r.slice(_,32,64));return{prefix:4,x:v,y:E}}if(_.length===132){const v=Number(r.slice(_,0,1)),E=BigInt(r.slice(_,1,33)),l=BigInt(r.slice(_,33,65));return{prefix:v,x:E,y:l}}const j=Number(r.slice(_,0,1)),P=BigInt(r.slice(_,1,33));return{prefix:j,x:P}}function d(_,j={}){return e.fromHex(f(_,j))}function f(_,j={}){i(_);const{prefix:P,x:v,y:E}=_,{includePrefix:l=!0}=j;return r.concat(l?r.fromNumber(P,{size:1}):"0x",r.fromNumber(v,{size:32}),typeof E=="bigint"?r.fromNumber(E,{size:32}):"0x")}function c(_,j={}){try{return i(_,j),!0}catch{return!1}}class m extends o.BaseError{constructor({publicKey:j}){super(`Value \`${n.stringify(j)}\` is not a valid public key.`,{metaMessages:["Public key must contain:","- an `x` and `prefix` value (compressed)","- an `x`, `y`, and `prefix` value (uncompressed)"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidError"})}}Pe.InvalidError=m;class g extends o.BaseError{constructor({prefix:j,cause:P}){super(`Prefix "${j}" is invalid.`,{cause:P}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidPrefixError"})}}Pe.InvalidPrefixError=g;class h extends o.BaseError{constructor(){super("Prefix must be 2 or 3 for compressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidCompressedPrefixError"})}}Pe.InvalidCompressedPrefixError=h;class b extends o.BaseError{constructor(){super("Prefix must be 4 for uncompressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidUncompressedPrefixError"})}}Pe.InvalidUncompressedPrefixError=b;class p extends o.BaseError{constructor({publicKey:j}){super(`Value \`${j}\` is an invalid public key size.`,{metaMessages:["Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).",`Received ${r.size(r.from(j))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidSerializedSizeError"})}}return Pe.InvalidSerializedSizeError=p,Pe}var _y;function Wd(){if(_y)return Me;_y=1,Object.defineProperty(Me,"__esModule",{value:!0}),Me.InvalidChecksumError=Me.InvalidInputError=Me.InvalidAddressError=void 0,Me.assert=t,Me.checksum=s,Me.from=u,Me.fromPublicKey=d,Me.isEqual=f,Me.validate=c;const e=Ir(),o=q_(),r=Ft(),n=Pp(),i=M_(),a=/^0x[a-fA-F0-9]{40}$/;function t(b,p={}){const{strict:_=!0}=p;if(!a.test(b))throw new m({address:b,cause:new g});if(_){if(b.toLowerCase()===b)return;if(s(b)!==b)throw new m({address:b,cause:new h})}}function s(b){if(o.checksum.has(b))return o.checksum.get(b);t(b,{strict:!1});const p=b.substring(2).toLowerCase(),_=n.keccak256(e.fromString(p),{as:"Bytes"}),j=p.split("");for(let v=0;v<40;v+=2)_[v>>1]>>4>=8&&j[v]&&(j[v]=j[v].toUpperCase()),(_[v>>1]&15)>=8&&j[v+1]&&(j[v+1]=j[v+1].toUpperCase());const P=`0x${j.join("")}`;return o.checksum.set(b,P),P}function u(b,p={}){const{checksum:_=!1}=p;return t(b),_?s(b):b}function d(b,p={}){const _=n.keccak256(`0x${i.toHex(b).slice(4)}`).substring(26);return u(`0x${_}`,p)}function f(b,p){return t(b,{strict:!1}),t(p,{strict:!1}),b.toLowerCase()===p.toLowerCase()}function c(b,p={}){const{strict:_=!0}=p??{};try{return t(b,{strict:_}),!0}catch{return!1}}class m extends r.BaseError{constructor({address:p,cause:_}){super(`Address "${p}" is invalid.`,{cause:_}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}Me.InvalidAddressError=m;class g extends r.BaseError{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}Me.InvalidInputError=g;class h extends r.BaseError{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}return Me.InvalidChecksumError=h,Me}var vy;function k_(){if(vy)return Lr;vy=1,Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.normalizeSignature=r,Lr.isArgOfType=n,Lr.getAmbiguousTypes=i;const e=Wd(),o=Ft();function r(a){let t=!0,s="",u=0,d="",f=!1;for(let c=0;cn(Object.values(a)[f],d)):/^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(u)?s==="number"||s==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(u)?s==="string"||a instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(u)?Array.isArray(a)&&a.every(d=>n(d,{...t,type:u.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function i(a,t,s){for(const u in a){const d=a[u],f=t[u];if(d.type==="tuple"&&f.type==="tuple"&&"components"in d&&"components"in f)return i(d.components,f.components,s[u]);const c=[d.type,f.type];if(c.includes("address")&&c.includes("bytes20")?!0:c.includes("address")&&c.includes("string")?e.validate(s[u],{strict:!1}):c.includes("address")&&c.includes("bytes")?e.validate(s[u],{strict:!1}):!1)return c}}return Lr}var Ey;function wp(){if(Ey)return qe;Ey=1,Object.defineProperty(qe,"__esModule",{value:!0}),qe.InvalidSelectorSizeError=qe.NotFoundError=qe.AmbiguityError=void 0,qe.format=a,qe.from=t,qe.fromAbi=s,qe.getSelector=u,qe.getSignature=d,qe.getSignatureHash=f;const e=Kt(),o=Ft(),r=Pp(),n=ut(),i=k_();function a(h){return e.formatAbiItem(h)}function t(h,b={}){const{prepare:p=!0}=b,_=Array.isArray(h)||typeof h=="string"?e.parseAbiItem(h):h;return{..._,...p?{hash:f(_)}:{}}}function s(h,b,p){const{args:_=[],prepare:j=!0}=p??{},P=n.validate(b,{strict:!1}),v=h.filter(y=>P?y.type==="function"||y.type==="error"?u(y)===n.slice(b,0,4):y.type==="event"?f(y)===b:!1:"name"in y&&y.name===b);if(v.length===0)throw new m({name:b});if(v.length===1)return{...v[0],...j?{hash:f(v[0])}:{}};let E;for(const y of v){if(!("inputs"in y))continue;if(!_||_.length===0){if(!y.inputs||y.inputs.length===0)return{...y,...j?{hash:f(y)}:{}};continue}if(!y.inputs||y.inputs.length===0||y.inputs.length!==_.length)continue;if(_.every((w,B)=>{const q="inputs"in y&&y.inputs[B];return q?i.isArgOfType(w,q):!1})){if(E&&"inputs"in E&&E.inputs){const w=i.getAmbiguousTypes(y.inputs,E.inputs,_);if(w)throw new c({abiItem:y,type:w[0]},{abiItem:E,type:w[1]})}E=y}}const l=(()=>{if(E)return E;const[y,...I]=v;return{...y,overloads:I}})();if(!l)throw new m({name:b});return{...l,...j?{hash:f(l)}:{}}}function u(h){return n.slice(f(h),0,4)}function d(h){const b=typeof h=="string"?h:e.formatAbiItem(h);return i.normalizeSignature(b)}function f(h){return typeof h!="string"&&"hash"in h&&h.hash?h.hash:r.keccak256(n.fromString(d(h)))}class c extends o.BaseError{constructor(b,p){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${b.type}\` in \`${i.normalizeSignature(e.formatAbiItem(b.abiItem))}\`, and`,`\`${p.type}\` in \`${i.normalizeSignature(e.formatAbiItem(p.abiItem))}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.AmbiguityError"})}}qe.AmbiguityError=c;class m extends o.BaseError{constructor({name:b,data:p,type:_="item"}){const j=b?` with name "${b}"`:p?` with data "${p}"`:"";super(`ABI ${_}${j} not found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}}qe.NotFoundError=m;class g extends o.BaseError{constructor({data:b}){super(`Selector size is invalid. Expected 4 bytes. Received ${n.size(b)} bytes ("${b}").`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.InvalidSelectorSizeError"})}}return qe.InvalidSelectorSizeError=g,qe}var je={},z={},jy;function Ap(){return jy||(jy=1,Object.defineProperty(z,"__esModule",{value:!0}),z.minInt120=z.minInt112=z.minInt104=z.minInt96=z.minInt88=z.minInt80=z.minInt72=z.minInt64=z.minInt56=z.minInt48=z.minInt40=z.minInt32=z.minInt24=z.minInt16=z.minInt8=z.maxInt256=z.maxInt248=z.maxInt240=z.maxInt232=z.maxInt224=z.maxInt216=z.maxInt208=z.maxInt200=z.maxInt192=z.maxInt184=z.maxInt176=z.maxInt168=z.maxInt160=z.maxInt152=z.maxInt144=z.maxInt136=z.maxInt128=z.maxInt120=z.maxInt112=z.maxInt104=z.maxInt96=z.maxInt88=z.maxInt80=z.maxInt72=z.maxInt64=z.maxInt56=z.maxInt48=z.maxInt40=z.maxInt32=z.maxInt24=z.maxInt16=z.maxInt8=z.integerRegex=z.bytesRegex=z.arrayRegex=void 0,z.maxUint256=z.maxUint248=z.maxUint240=z.maxUint232=z.maxUint224=z.maxUint216=z.maxUint208=z.maxUint200=z.maxUint192=z.maxUint184=z.maxUint176=z.maxUint168=z.maxUint160=z.maxUint152=z.maxUint144=z.maxUint136=z.maxUint128=z.maxUint120=z.maxUint112=z.maxUint104=z.maxUint96=z.maxUint88=z.maxUint80=z.maxUint72=z.maxUint64=z.maxUint56=z.maxUint48=z.maxUint40=z.maxUint32=z.maxUint24=z.maxUint16=z.maxUint8=z.minInt256=z.minInt248=z.minInt240=z.minInt232=z.minInt224=z.minInt216=z.minInt208=z.minInt200=z.minInt192=z.minInt184=z.minInt176=z.minInt168=z.minInt160=z.minInt152=z.minInt144=z.minInt136=z.minInt128=void 0,z.arrayRegex=/^(.*)\[([0-9]*)\]$/,z.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,z.integerRegex=/^(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)?$/,z.maxInt8=2n**(8n-1n)-1n,z.maxInt16=2n**(16n-1n)-1n,z.maxInt24=2n**(24n-1n)-1n,z.maxInt32=2n**(32n-1n)-1n,z.maxInt40=2n**(40n-1n)-1n,z.maxInt48=2n**(48n-1n)-1n,z.maxInt56=2n**(56n-1n)-1n,z.maxInt64=2n**(64n-1n)-1n,z.maxInt72=2n**(72n-1n)-1n,z.maxInt80=2n**(80n-1n)-1n,z.maxInt88=2n**(88n-1n)-1n,z.maxInt96=2n**(96n-1n)-1n,z.maxInt104=2n**(104n-1n)-1n,z.maxInt112=2n**(112n-1n)-1n,z.maxInt120=2n**(120n-1n)-1n,z.maxInt128=2n**(128n-1n)-1n,z.maxInt136=2n**(136n-1n)-1n,z.maxInt144=2n**(144n-1n)-1n,z.maxInt152=2n**(152n-1n)-1n,z.maxInt160=2n**(160n-1n)-1n,z.maxInt168=2n**(168n-1n)-1n,z.maxInt176=2n**(176n-1n)-1n,z.maxInt184=2n**(184n-1n)-1n,z.maxInt192=2n**(192n-1n)-1n,z.maxInt200=2n**(200n-1n)-1n,z.maxInt208=2n**(208n-1n)-1n,z.maxInt216=2n**(216n-1n)-1n,z.maxInt224=2n**(224n-1n)-1n,z.maxInt232=2n**(232n-1n)-1n,z.maxInt240=2n**(240n-1n)-1n,z.maxInt248=2n**(248n-1n)-1n,z.maxInt256=2n**(256n-1n)-1n,z.minInt8=-(2n**(8n-1n)),z.minInt16=-(2n**(16n-1n)),z.minInt24=-(2n**(24n-1n)),z.minInt32=-(2n**(32n-1n)),z.minInt40=-(2n**(40n-1n)),z.minInt48=-(2n**(48n-1n)),z.minInt56=-(2n**(56n-1n)),z.minInt64=-(2n**(64n-1n)),z.minInt72=-(2n**(72n-1n)),z.minInt80=-(2n**(80n-1n)),z.minInt88=-(2n**(88n-1n)),z.minInt96=-(2n**(96n-1n)),z.minInt104=-(2n**(104n-1n)),z.minInt112=-(2n**(112n-1n)),z.minInt120=-(2n**(120n-1n)),z.minInt128=-(2n**(128n-1n)),z.minInt136=-(2n**(136n-1n)),z.minInt144=-(2n**(144n-1n)),z.minInt152=-(2n**(152n-1n)),z.minInt160=-(2n**(160n-1n)),z.minInt168=-(2n**(168n-1n)),z.minInt176=-(2n**(176n-1n)),z.minInt184=-(2n**(184n-1n)),z.minInt192=-(2n**(192n-1n)),z.minInt200=-(2n**(200n-1n)),z.minInt208=-(2n**(208n-1n)),z.minInt216=-(2n**(216n-1n)),z.minInt224=-(2n**(224n-1n)),z.minInt232=-(2n**(232n-1n)),z.minInt240=-(2n**(240n-1n)),z.minInt248=-(2n**(248n-1n)),z.minInt256=-(2n**(256n-1n)),z.maxUint8=2n**8n-1n,z.maxUint16=2n**16n-1n,z.maxUint24=2n**24n-1n,z.maxUint32=2n**32n-1n,z.maxUint40=2n**40n-1n,z.maxUint48=2n**48n-1n,z.maxUint56=2n**56n-1n,z.maxUint64=2n**64n-1n,z.maxUint72=2n**72n-1n,z.maxUint80=2n**80n-1n,z.maxUint88=2n**88n-1n,z.maxUint96=2n**96n-1n,z.maxUint104=2n**104n-1n,z.maxUint112=2n**112n-1n,z.maxUint120=2n**120n-1n,z.maxUint128=2n**128n-1n,z.maxUint136=2n**136n-1n,z.maxUint144=2n**144n-1n,z.maxUint152=2n**152n-1n,z.maxUint160=2n**160n-1n,z.maxUint168=2n**168n-1n,z.maxUint176=2n**176n-1n,z.maxUint184=2n**184n-1n,z.maxUint192=2n**192n-1n,z.maxUint200=2n**200n-1n,z.maxUint208=2n**208n-1n,z.maxUint216=2n**216n-1n,z.maxUint224=2n**224n-1n,z.maxUint232=2n**232n-1n,z.maxUint240=2n**240n-1n,z.maxUint248=2n**248n-1n,z.maxUint256=2n**256n-1n),z}var ve={},Py;function F_(){if(Py)return ve;Py=1,Object.defineProperty(ve,"__esModule",{value:!0}),ve.decodeParameter=t,ve.decodeAddress=d,ve.decodeArray=f,ve.decodeBool=c,ve.decodeBytes=m,ve.decodeNumber=g,ve.decodeTuple=h,ve.decodeString=b,ve.prepareParameters=p,ve.prepareParameter=_,ve.encode=j,ve.encodeAddress=P,ve.encodeArray=v,ve.encodeBytes=E,ve.encodeBoolean=l,ve.encodeNumber=y,ve.encodeString=I,ve.encodeTuple=w,ve.getArrayComponents=B,ve.hasDynamicChild=q;const e=Kd(),o=Wd(),r=Ir(),n=Ft(),i=ut(),a=Ap();function t(T,O,A){const{checksumAddress:x,staticPosition:F}=A,k=B(O.type);if(k){const[$,M]=k;return f(T,{...O,type:M},{checksumAddress:x,length:$,staticPosition:F})}if(O.type==="tuple")return h(T,O,{checksumAddress:x,staticPosition:F});if(O.type==="address")return d(T,{checksum:x});if(O.type==="bool")return c(T);if(O.type.startsWith("bytes"))return m(T,O,{staticPosition:F});if(O.type.startsWith("uint")||O.type.startsWith("int"))return g(T,O);if(O.type==="string")return b(T,{staticPosition:F});throw new e.InvalidTypeError(O.type)}const s=32,u=32;function d(T,O={}){const{checksum:A=!1}=O,x=T.readBytes(32);return[(k=>A?o.checksum(k):k)(i.fromBytes(r.slice(x,-20))),32]}function f(T,O,A){const{checksumAddress:x,length:F,staticPosition:k}=A;if(!F){const S=r.toNumber(T.readBytes(u)),R=k+S,C=R+s;T.setPosition(R);const H=r.toNumber(T.readBytes(s)),N=q(O);let D=0;const G=[];for(let V=0;V48?r.toBigInt(F,{signed:A}):r.toNumber(F,{signed:A}),32]}function h(T,O,A){const{checksumAddress:x,staticPosition:F}=A,k=O.components.length===0||O.components.some(({name:S})=>!S),$=k?[]:{};let M=0;if(q(O)){const S=r.toNumber(T.readBytes(u)),R=F+S;for(let C=0;C0?i.concat(R,S):R}}if($)return{dynamic:!0,encoded:S}}return{dynamic:!1,encoded:i.concat(...M.map(({encoded:S})=>S))}}function E(T,{type:O}){const[,A]=O.split("bytes"),x=i.size(T);if(!A){let F=T;return x%32!==0&&(F=i.padRight(F,Math.ceil((T.length-2)/2/32)*32)),{dynamic:!0,encoded:i.concat(i.padLeft(i.fromNumber(x,{size:32})),F)}}if(x!==Number.parseInt(A))throw new e.BytesSizeMismatchError({expectedSize:Number.parseInt(A),value:T});return{dynamic:!1,encoded:i.padRight(T)}}function l(T){if(typeof T!="boolean")throw new n.BaseError(`Invalid boolean value: "${T}" (type: ${typeof T}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:i.padLeft(i.fromBoolean(T))}}function y(T,{signed:O,size:A}){if(typeof A=="number"){const x=2n**(BigInt(A)-(O?1n:0n))-1n,F=O?-x-1n:0n;if(T>x||T$))}}function B(T){const O=T.match(/^(.*)\[(\d+)?\]$/);return O?[O[2]?Number(O[2]):null,O[1]]:void 0}function q(T){var x;const{type:O}=T;if(O==="string"||O==="bytes"||O.endsWith("[]"))return!0;if(O==="tuple")return(x=T.components)==null?void 0:x.some(q);const A=B(T.type);return!!(A&&q({...T,type:A[1]}))}return ve}var ft={},wy;function $_(){if(wy)return ft;wy=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.RecursiveReadLimitExceededError=ft.PositionOutOfBoundsError=ft.NegativeOffsetError=void 0,ft.create=r;const e=Ft(),o={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 a({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(t){if(t<0||t>this.bytes.length-1)throw new i({length:this.bytes.length,position:t})},decrementPosition(t){if(t<0)throw new n({offset:t});const s=this.position-t;this.assertPosition(s),this.position=s},getReadCount(t){return this.positionReadCount.get(t||this.position)||0},incrementPosition(t){if(t<0)throw new n({offset:t});const s=this.position+t;this.assertPosition(s),this.position=s},inspectByte(t){const s=t??this.position;return this.assertPosition(s),this.bytes[s]},inspectBytes(t,s){const u=s??this.position;return this.assertPosition(u+t-1),this.bytes.subarray(u,u+t)},inspectUint8(t){const s=t??this.position;return this.assertPosition(s),this.bytes[s]},inspectUint16(t){const s=t??this.position;return this.assertPosition(s+1),this.dataView.getUint16(s)},inspectUint24(t){const s=t??this.position;return this.assertPosition(s+2),(this.dataView.getUint16(s)<<8)+this.dataView.getUint8(s+2)},inspectUint32(t){const s=t??this.position;return this.assertPosition(s+3),this.dataView.getUint32(s)},pushByte(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushBytes(t){this.assertPosition(this.position+t.length-1),this.bytes.set(t,this.position),this.position+=t.length},pushUint8(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushUint16(t){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,t),this.position+=2},pushUint24(t){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,t>>8),this.dataView.setUint8(this.position+2,t&255),this.position+=3},pushUint32(t){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,t),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const t=this.inspectByte();return this.position++,t},readBytes(t,s){this.assertReadLimit(),this._touch();const u=this.inspectBytes(t);return this.position+=s??t,u},readUint8(){this.assertReadLimit(),this._touch();const t=this.inspectUint8();return this.position+=1,t},readUint16(){this.assertReadLimit(),this._touch();const t=this.inspectUint16();return this.position+=2,t},readUint24(){this.assertReadLimit(),this._touch();const t=this.inspectUint24();return this.position+=3,t},readUint32(){this.assertReadLimit(),this._touch();const t=this.inspectUint32();return this.position+=4,t},get remaining(){return this.bytes.length-this.position},setPosition(t){const s=this.position;return this.assertPosition(t),this.position=t,()=>this.position=s},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const t=this.getReadCount();this.positionReadCount.set(this.position,t+1),t>0&&this.recursiveReadCount++}};function r(t,{recursiveReadLimit:s=8192}={}){const u=Object.create(o);return u.bytes=t,u.dataView=new DataView(t.buffer,t.byteOffset,t.byteLength),u.positionReadCount=new Map,u.recursiveReadLimit=s,u}class n extends e.BaseError{constructor({offset:s}){super(`Offset \`${s}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.NegativeOffsetError"})}}ft.NegativeOffsetError=n;class i extends e.BaseError{constructor({length:s,position:u}){super(`Position \`${u}\` is out of bounds (\`0 < position < ${s}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.PositionOutOfBoundsError"})}}ft.PositionOutOfBoundsError=i;class a extends e.BaseError{constructor({count:s,limit:u}){super(`Recursive read limit of \`${u}\` exceeded (recursive read count: \`${s}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.RecursiveReadLimitExceededError"})}}return ft.RecursiveReadLimitExceededError=a,ft}var Ay;function Kd(){if(Ay)return je;Ay=1,Object.defineProperty(je,"__esModule",{value:!0}),je.InvalidTypeError=je.InvalidArrayError=je.LengthMismatchError=je.BytesSizeMismatchError=je.ArrayLengthMismatchError=je.ZeroDataError=je.DataSizeTooSmallError=void 0,je.decode=u,je.encode=d,je.encodePacked=f,je.format=c,je.from=m;const e=Kt(),o=Wd(),r=Ir(),n=Ft(),i=ut(),a=Ap(),t=F_(),s=$_();function u(v,E,l={}){const{as:y="Array",checksumAddress:I=!1}=l,w=typeof E=="string"?r.fromHex(E):E,B=s.create(w);if(r.size(w)===0&&v.length>0)throw new h;if(r.size(w)&&r.size(w)<32)throw new g({data:typeof E=="string"?E:i.fromBytes(E),parameters:v,size:r.size(w)});let q=0;const T=y==="Array"?[]:{};for(let O=0;Oc.type==="constructor");if(!f)throw new o.NotFoundError({name:"constructor"});return f}return Vt}var rt={},Iy;function N_(){if(Iy)return rt;Iy=1,Object.defineProperty(rt,"__esModule",{value:!0}),rt.decodeData=i,rt.decodeResult=a,rt.encodeData=t,rt.encodeResult=s,rt.format=u,rt.from=d,rt.fromAbi=f,rt.getSelector=c;const e=Kt(),o=wp(),r=Kd(),n=ut();function i(m,g){const{overloads:h}=m;if(n.size(g)<4)throw new o.InvalidSelectorSizeError({data:g});if(m.inputs.length===0)return;const b=h?f([m,...h],g):m;if(!(n.size(g)<=4))return r.decode(b.inputs,n.slice(g,4))}function a(m,g,h={}){const b=r.decode(m.outputs,g,h);if(!(b&&Object.keys(b).length===0))return b&&Object.keys(b).length===1?Array.isArray(b)?b[0]:Object.values(b)[0]:b}function t(m,...g){const{overloads:h}=m,b=h?f([m,...h],m.name,{args:g[0]}):m,p=c(b),_=g.length>0?r.encode(b.inputs,g[0]):void 0;return _?n.concat(p,_):p}function s(m,g,h={}){const{as:b="Array"}=h,p=m.outputs.length===1?[g]:Array.isArray(g)?g:b==="Object"?Object.values(g):[g];return r.encode(m.outputs,p)}function u(m){return e.formatAbiItem(m)}function d(m,g={}){return o.from(m,g)}function f(m,g,h){const b=o.fromAbi(m,g,h);if(b.type!=="function")throw new o.NotFoundError({name:g,type:"function"});return b}function c(m){return o.getSelector(m)}return rt}var nt={},Sy;function Tp(){return Sy||(Sy=1,Object.defineProperty(nt,"__esModule",{value:!0}),nt.zeroAddress=nt.ethAddress=nt.entryPoint07Address=nt.entryPoint06Address=void 0,nt.entryPoint06Address="0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",nt.entryPoint07Address="0x0000000071727De22E5E9d8BAf0edAc6f37da032",nt.ethAddress="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",nt.zeroAddress="0x0000000000000000000000000000000000000000"),nt}var Ry;function z_(){if(Ry)return ha;Ry=1,Object.defineProperty(ha,"__esModule",{value:!0}),ha.simulateCalls=c;const e=H_(),o=N_(),r=Be(),n=Tp(),i=Zu(),a=se(),t=Ye(),s=Dd(),u=D0(),d=jp(),f="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033";async function c(m,g){const{blockNumber:h,blockTag:b,calls:p,stateOverrides:_,traceAssetChanges:j,traceTransfers:P,validation:v}=g,E=g.account?(0,r.parseAccount)(g.account):void 0;if(j&&!E)throw new a.BaseError("`account` is required when `traceAssetChanges` is true");const l=E?e.encode(e.from("constructor(bytes, bytes)"),{bytecode:i.deploylessCallViaBytecodeBytecode,args:[f,o.encodeData(o.from("function getBalance(address)"),[E.address])]}):void 0,y=j?await Promise.all(g.calls.map(async K=>{if(!K.data&&!K.abi)return;const{accessList:ee}=await(0,u.createAccessList)(m,{account:E.address,...K,data:K.abi?(0,t.encodeFunctionData)(K):K.data});return ee.map(({address:ae,storageKeys:Y})=>Y.length>0?ae:null)})).then(K=>K.flat().filter(Boolean)):[],I=_==null?void 0:_.map(K=>K.address===(E==null?void 0:E.address)?{...K,nonce:0}:K),w=await(0,d.simulateBlocks)(m,{blockNumber:h,blockTag:b,blocks:[...j?[{calls:[{data:l}],stateOverrides:_},{calls:y.map((K,ee)=>({abi:[o.from("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[E.address],to:K,from:n.zeroAddress,nonce:ee})),stateOverrides:[{address:n.zeroAddress,nonce:0}]}]:[],{calls:[...p,{}].map((K,ee)=>({...K,from:E==null?void 0:E.address,nonce:ee})),stateOverrides:I},...j?[{calls:[{data:l}]},{calls:y.map((K,ee)=>({abi:[o.from("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[E.address],to:K,from:n.zeroAddress,nonce:ee})),stateOverrides:[{address:n.zeroAddress,nonce:0}]},{calls:y.map((K,ee)=>({to:K,abi:[o.from("function decimals() returns (uint256)")],functionName:"decimals",from:n.zeroAddress,nonce:ee})),stateOverrides:[{address:n.zeroAddress,nonce:0}]},{calls:y.map((K,ee)=>({to:K,abi:[o.from("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:n.zeroAddress,nonce:ee})),stateOverrides:[{address:n.zeroAddress,nonce:0}]},{calls:y.map((K,ee)=>({to:K,abi:[o.from("function symbol() returns (string)")],functionName:"symbol",from:n.zeroAddress,nonce:ee})),stateOverrides:[{address:n.zeroAddress,nonce:0}]}]:[]],traceTransfers:P,validation:v}),B=j?w[2]:w[0],[q,T,,O,A,x,F,k]=j?w:[],{calls:$,...M}=B,S=$.slice(0,-1)??[],R=(q==null?void 0:q.calls)??[],C=(T==null?void 0:T.calls)??[],H=[...R,...C].map(K=>K.status==="success"?(0,s.hexToBigInt)(K.data):null),N=(O==null?void 0:O.calls)??[],D=(A==null?void 0:A.calls)??[],G=[...N,...D].map(K=>K.status==="success"?(0,s.hexToBigInt)(K.data):null),V=((x==null?void 0:x.calls)??[]).map(K=>K.status==="success"?K.result:null),W=((k==null?void 0:k.calls)??[]).map(K=>K.status==="success"?K.result:null),J=((F==null?void 0:F.calls)??[]).map(K=>K.status==="success"?K.result:null),re=[];for(const[K,ee]of G.entries()){const ae=H[K];if(typeof ee!="bigint"||typeof ae!="bigint")continue;const Y=V[K-1],X=W[K-1],Q=J[K-1],Z=K===0?{address:n.ethAddress,decimals:18,symbol:"ETH"}:{address:y[K-1],decimals:Q||Y?Number(Y??1):void 0,symbol:X??void 0};re.some(L=>L.token.address===Z.address)||re.push({token:Z,value:{pre:ae,post:ee,diff:ee-ae}})}return{assetChanges:re,block:M,results:S}}return ha}var ya={},ga={},pa={},By;function Ip(){if(By)return pa;By=1,Object.defineProperty(pa,"__esModule",{value:!0}),pa.serializeSignature=n;const e=ao(),o=Ie(),r=he();function n({r:i,s:a,to:t="hex",v:s,yParity:u}){const d=(()=>{if(u===0||u===1)return u;if(s&&(s===27n||s===28n||s>=35n))return s%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),f=`0x${new e.secp256k1.Signature((0,o.hexToBigInt)(i),(0,o.hexToBigInt)(a)).toCompactHex()}${d===0?"1b":"1c"}`;return t==="hex"?f:(0,r.hexToBytes)(f)}return pa}var Oy;function Zd(){if(Oy)return ga;Oy=1,Object.defineProperty(ga,"__esModule",{value:!0}),ga.verifyHash=b;const e=Tr(),o=Zu(),r=Xt(),n=go(),i=Je(),a=xt(),t=ke(),s=te(),u=me(),d=Dd(),f=rc(),c=er(),m=Nd(),g=Ip(),h=po();async function b(p,_){var q,T,O;const{address:j,factory:P,factoryData:v,hash:E,signature:l,universalSignatureVerifierAddress:y=(O=(T=(q=p.chain)==null?void 0:q.contracts)==null?void 0:T.universalSignatureVerifier)==null?void 0:O.address,...I}=_,w=(0,t.isHex)(l)?l:typeof l=="object"&&"r"in l&&"s"in l?(0,g.serializeSignature)(l):(0,s.bytesToHex)(l),B=await(async()=>!P&&!v||(0,f.isErc6492Signature)(w)?w:(0,m.serializeErc6492Signature)({address:P,data:v,signature:w}))();try{const A=y?{to:y,data:(0,d.encodeFunctionData)({abi:e.universalSignatureValidatorAbi,functionName:"isValidSig",args:[j,E,B]}),...I}:{data:(0,n.encodeDeployData)({abi:e.universalSignatureValidatorAbi,args:[j,E,B],bytecode:o.universalSignatureValidatorByteCode}),...I},{data:x}=await(0,u.getAction)(p,h.call,"call")(A);return(0,d.hexToBool)(x??"0x0")}catch(A){try{if((0,a.isAddressEqual)((0,i.getAddress)(j),await(0,c.recoverAddress)({hash:E,signature:l})))return!0}catch{}if(A instanceof r.CallExecutionError)return!1;throw A}}return ga}var Cy;function U_(){if(Cy)return ya;Cy=1,Object.defineProperty(ya,"__esModule",{value:!0}),ya.verifyMessage=r;const e=wo(),o=Zd();async function r(n,{address:i,message:a,factory:t,factoryData:s,signature:u,...d}){const f=(0,e.hashMessage)(a);return(0,o.verifyHash)(n,{address:i,factory:t,factoryData:s,hash:f,signature:u,...d})}return ya}var _a={},xy;function L_(){if(xy)return _a;xy=1,Object.defineProperty(_a,"__esModule",{value:!0}),_a.verifyTypedData=r;const e=Po(),o=Zd();async function r(n,i){const{address:a,factory:t,factoryData:s,signature:u,message:d,primaryType:f,types:c,domain:m,...g}=i,h=(0,e.hashTypedData)({message:d,primaryType:f,types:c,domain:m});return(0,o.verifyHash)(n,{address:a,factory:t,factoryData:s,hash:h,signature:u,...g})}return _a}var va={},Ea={},qy;function Sp(){if(qy)return Ea;qy=1,Object.defineProperty(Ea,"__esModule",{value:!0}),Ea.watchBlockNumber=t;const e=Ie(),o=me(),r=Qr(),n=_o(),i=Ce(),a=vo();function t(s,{emitOnBegin:u=!1,emitMissed:d=!1,onBlockNumber:f,onError:c,poll:m,pollingInterval:g=s.pollingInterval}){const h=typeof m<"u"?m:!(s.transport.type==="webSocket"||s.transport.type==="fallback"&&s.transport.transports[0].config.type==="webSocket");let b;return h?(()=>{const j=(0,i.stringify)(["watchBlockNumber",s.uid,u,d,g]);return(0,r.observe)(j,{onBlockNumber:f,onError:c},P=>(0,n.poll)(async()=>{var v;try{const E=await(0,o.getAction)(s,a.getBlockNumber,"getBlockNumber")({cacheTime:0});if(b){if(E===b)return;if(E-b>1&&d)for(let l=b+1n;lb)&&(P.onBlockNumber(E,b),b=E)}catch(E){(v=P.onError)==null||v.call(P,E)}},{emitOnBegin:u,interval:g}))})():(()=>{const j=(0,i.stringify)(["watchBlockNumber",s.uid,u,d]);return(0,r.observe)(j,{onBlockNumber:f,onError:c},P=>{let v=!0,E=()=>v=!1;return(async()=>{try{const l=(()=>{if(s.transport.type==="fallback"){const I=s.transport.transports.find(w=>w.config.type==="webSocket");return I?I.value:s.transport}return s.transport})(),{unsubscribe:y}=await l.subscribe({params:["newHeads"],onData(I){var B;if(!v)return;const w=(0,e.hexToBigInt)((B=I.result)==null?void 0:B.number);P.onBlockNumber(w,b),b=w},onError(I){var w;(w=P.onError)==null||w.call(P,I)}});E=y,v||E()}catch(l){c==null||c(l)}})(),()=>E()})})()}return Ea}var My;function D_(){if(My)return va;My=1,Object.defineProperty(va,"__esModule",{value:!0}),va.waitForTransactionReceipt=c;const e=fd(),o=Ke(),r=me(),n=Qr(),i=C0(),a=Td(),t=Ce(),s=Xr(),u=Gd(),d=_p(),f=Sp();async function c(m,{confirmations:g=1,hash:h,onReplaced:b,pollingInterval:p=m.pollingInterval,retryCount:_=6,retryDelay:j=({count:v})=>~~(1<q(new o.WaitForTransactionReceiptTimeoutError({hash:h})),P):void 0,O=(0,n.observe)(v,{onReplaced:b,resolve:B,reject:q},A=>{const x=(0,r.getAction)(m,f.watchBlockNumber,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:p,async onBlockNumber(F){const k=M=>{clearTimeout(T),x(),M(),O()};let $=F;if(!I)try{if(y){if(g>1&&(!y.blockNumber||$-y.blockNumber+1nA.resolve(y));return}if(E||(I=!0,await(0,a.withRetry)(async()=>{E=await(0,r.getAction)(m,u.getTransaction,"getTransaction")({hash:h}),E.blockNumber&&($=E.blockNumber)},{delay:j,retryCount:_}),I=!1),y=await(0,r.getAction)(m,d.getTransactionReceipt,"getTransactionReceipt")({hash:h}),g>1&&(!y.blockNumber||$-y.blockNumber+1nA.resolve(y))}catch(M){if(M instanceof o.TransactionNotFoundError||M instanceof o.TransactionReceiptNotFoundError){if(!E){I=!1;return}try{l=E,I=!0;const S=await(0,a.withRetry)(()=>(0,r.getAction)(m,s.getBlock,"getBlock")({blockNumber:$,includeTransactions:!0}),{delay:j,retryCount:_,shouldRetry:({error:H})=>H instanceof e.BlockNotFoundError});I=!1;const R=S.transactions.find(({from:H,nonce:N})=>H===l.from&&N===l.nonce);if(!R||(y=await(0,r.getAction)(m,d.getTransactionReceipt,"getTransactionReceipt")({hash:R.hash}),g>1&&(!y.blockNumber||$-y.blockNumber+1n{var H;(H=A.onReplaced)==null||H.call(A,{reason:C,replacedTransaction:l,transaction:R,transactionReceipt:y}),A.resolve(y)})}catch(S){k(()=>A.reject(S))}}else k(()=>A.reject(M))}}})});return w}return va}var ja={},ky;function G_(){if(ky)return ja;ky=1,Object.defineProperty(ja,"__esModule",{value:!0}),ja.watchBlocks=a;const e=me(),o=Qr(),r=_o(),n=Ce(),i=Xr();function a(t,{blockTag:s="latest",emitMissed:u=!1,emitOnBegin:d=!1,onBlock:f,onError:c,includeTransactions:m,poll:g,pollingInterval:h=t.pollingInterval}){const b=typeof g<"u"?g:!(t.transport.type==="webSocket"||t.transport.type==="fallback"&&t.transport.transports[0].config.type==="webSocket"),p=m??!1;let _;return b?(()=>{const v=(0,n.stringify)(["watchBlocks",t.uid,s,u,d,p,h]);return(0,o.observe)(v,{onBlock:f,onError:c},E=>(0,r.poll)(async()=>{var l;try{const y=await(0,e.getAction)(t,i.getBlock,"getBlock")({blockTag:s,includeTransactions:p});if(y.number&&(_!=null&&_.number)){if(y.number===_.number)return;if(y.number-_.number>1&&u)for(let I=(_==null?void 0:_.number)+1n;I_.number)&&(E.onBlock(y,_),_=y)}catch(y){(l=E.onError)==null||l.call(E,y)}},{emitOnBegin:d,interval:h}))})():(()=>{let v=!0,E=!0,l=()=>v=!1;return(async()=>{try{d&&(0,e.getAction)(t,i.getBlock,"getBlock")({blockTag:s,includeTransactions:p}).then(w=>{v&&E&&(f(w,void 0),E=!1)});const y=(()=>{if(t.transport.type==="fallback"){const w=t.transport.transports.find(B=>B.config.type==="webSocket");return w?w.value:t.transport}return t.transport})(),{unsubscribe:I}=await y.subscribe({params:["newHeads"],async onData(w){if(!v)return;const B=await(0,e.getAction)(t,i.getBlock,"getBlock")({blockNumber:w.blockNumber,includeTransactions:p}).catch(()=>{});v&&(f(B,_),E=!1,_=B)},onError(w){c==null||c(w)}});l=I,v||l()}catch(y){c==null||c(y)}})(),()=>l()})()}return ja}var Pa={},Fy;function V_(){if(Fy)return Pa;Fy=1,Object.defineProperty(Pa,"__esModule",{value:!0}),Pa.watchEvent=h;const e=Pr(),o=Qr(),r=_o(),n=Ce(),i=_e(),a=Ar(),t=bo(),s=qt(),u=me(),d=G0(),f=vo(),c=Ju(),m=pd(),g=Yu();function h(b,{address:p,args:_,batch:j=!0,event:P,events:v,fromBlock:E,onError:l,onLogs:y,poll:I,pollingInterval:w=b.pollingInterval,strict:B}){const q=typeof I<"u"?I:typeof E=="bigint"?!0:!(b.transport.type==="webSocket"||b.transport.type==="fallback"&&b.transport.transports[0].config.type==="webSocket"),T=B??!1;return q?(()=>{const x=(0,n.stringify)(["watchEvent",p,_,j,b.uid,P,w,E]);return(0,o.observe)(x,{onLogs:y,onError:l},F=>{let k;E!==void 0&&(k=E-1n);let $,M=!1;const S=(0,r.poll)(async()=>{var R;if(!M){try{$=await(0,u.getAction)(b,d.createEventFilter,"createEventFilter")({address:p,args:_,event:P,events:v,strict:T,fromBlock:E})}catch{}M=!0;return}try{let C;if($)C=await(0,u.getAction)(b,c.getFilterChanges,"getFilterChanges")({filter:$});else{const H=await(0,u.getAction)(b,f.getBlockNumber,"getBlockNumber")({});k&&k!==H?C=await(0,u.getAction)(b,m.getLogs,"getLogs")({address:p,args:_,event:P,events:v,fromBlock:k+1n,toBlock:H}):C=[],k=H}if(C.length===0)return;if(j)F.onLogs(C);else for(const H of C)F.onLogs([H])}catch(C){$&&C instanceof a.InvalidInputRpcError&&(M=!1),(R=F.onError)==null||R.call(F,C)}},{emitOnBegin:!0,interval:w});return async()=>{$&&await(0,u.getAction)(b,g.uninstallFilter,"uninstallFilter")({filter:$}),S()}})})():(()=>{let x=!0,F=()=>x=!1;return(async()=>{try{const k=(()=>{if(b.transport.type==="fallback"){const R=b.transport.transports.find(C=>C.config.type==="webSocket");return R?R.value:b.transport}return b.transport})(),$=v??(P?[P]:void 0);let M=[];$&&(M=[$.flatMap(C=>(0,e.encodeEventTopics)({abi:[C],eventName:C.name,args:_}))],P&&(M=M[0]));const{unsubscribe:S}=await k.subscribe({params:["logs",{address:p,topics:M}],onData(R){var H;if(!x)return;const C=R.result;try{const{eventName:N,args:D}=(0,t.decodeEventLog)({abi:$??[],data:C.data,topics:C.topics,strict:T}),G=(0,s.formatLog)(C,{args:D,eventName:N});y([G])}catch(N){let D,G;if(N instanceof i.DecodeLogDataMismatch||N instanceof i.DecodeLogTopicsMismatch){if(B)return;D=N.abiItem.name,G=(H=N.abiItem.inputs)==null?void 0:H.some(W=>!("name"in W&&W.name))}const V=(0,s.formatLog)(C,{args:G?[]:{},eventName:D});y([V])}},onError(R){l==null||l(R)}});F=S,x||F()}catch(k){l==null||l(k)}})(),()=>F()})()}return Pa}var wa={},$y;function W_(){if($y)return wa;$y=1,Object.defineProperty(wa,"__esModule",{value:!0}),wa.watchPendingTransactions=s;const e=me(),o=Qr(),r=_o(),n=Ce(),i=V0(),a=Ju(),t=Yu();function s(u,{batch:d=!0,onError:f,onTransactions:c,poll:m,pollingInterval:g=u.pollingInterval}){return(typeof m<"u"?m:u.transport.type!=="webSocket")?(()=>{const _=(0,n.stringify)(["watchPendingTransactions",u.uid,d,g]);return(0,o.observe)(_,{onTransactions:c,onError:f},j=>{let P;const v=(0,r.poll)(async()=>{var E;try{if(!P)try{P=await(0,e.getAction)(u,i.createPendingTransactionFilter,"createPendingTransactionFilter")({});return}catch(y){throw v(),y}const l=await(0,e.getAction)(u,a.getFilterChanges,"getFilterChanges")({filter:P});if(l.length===0)return;if(d)j.onTransactions(l);else for(const y of l)j.onTransactions([y])}catch(l){(E=j.onError)==null||E.call(j,l)}},{emitOnBegin:!0,interval:g});return async()=>{P&&await(0,e.getAction)(u,t.uninstallFilter,"uninstallFilter")({filter:P}),v()}})})():(()=>{let _=!0,j=()=>_=!1;return(async()=>{try{const{unsubscribe:P}=await u.transport.subscribe({params:["newPendingTransactions"],onData(v){if(!_)return;const E=v.result;c([E])},onError(v){f==null||f(v)}});j=P,_||j()}catch(P){f==null||f(P)}})(),()=>j()})()}return wa}var Aa={},Ta={},Hy;function K_(){if(Hy)return Ta;Hy=1,Object.defineProperty(Ta,"__esModule",{value:!0}),Ta.parseSiweMessage=e;function e(n){var h,b,p;const{scheme:i,statement:a,...t}=((h=n.match(o))==null?void 0:h.groups)??{},{chainId:s,expirationTime:u,issuedAt:d,notBefore:f,requestId:c,...m}=((b=n.match(r))==null?void 0:b.groups)??{},g=(p=n.split("Resources:")[1])==null?void 0:p.split(` +- `).slice(1);return{...t,...m,...s?{chainId:Number(s)}:{},...u?{expirationTime:new Date(u)}:{},...d?{issuedAt:new Date(d)}:{},...f?{notBefore:new Date(f)}:{},...c?{requestId:c}:{},...g?{resources:g}:{},...i?{scheme:i}:{},...a?{statement:a}:{}}}const o=/^(?:(?[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?
0x[a-fA-F0-9]{40})\n\n(?:(?.*)\n\n)?/,r=/(?:URI: (?.+))\n(?:Version: (?.+))\n(?:Chain ID: (?\d+))\n(?:Nonce: (?[a-zA-Z0-9]+))\n(?:Issued At: (?.+))(?:\nExpiration Time: (?.+))?(?:\nNot Before: (?.+))?(?:\nRequest ID: (?.+))?/;return Ta}var Ia={},Ny;function Z_(){if(Ny)return Ia;Ny=1,Object.defineProperty(Ia,"__esModule",{value:!0}),Ia.validateSiweMessage=o;const e=xt();function o(r){const{address:n,domain:i,message:a,nonce:t,scheme:s,time:u=new Date}=r;if(i&&a.domain!==i||t&&a.nonce!==t||s&&a.scheme!==s||a.expirationTime&&u>=a.expirationTime||a.notBefore&&u(0,a.call)(Z,L),createAccessList:L=>(0,t.createAccessList)(Z,L),createBlockFilter:()=>(0,s.createBlockFilter)(Z),createContractEventFilter:L=>(0,u.createContractEventFilter)(Z,L),createEventFilter:L=>(0,d.createEventFilter)(Z,L),createPendingTransactionFilter:()=>(0,f.createPendingTransactionFilter)(Z),estimateContractGas:L=>(0,c.estimateContractGas)(Z,L),estimateGas:L=>(0,g.estimateGas)(Z,L),getBalance:L=>(0,b.getBalance)(Z,L),getBlobBaseFee:()=>(0,p.getBlobBaseFee)(Z),getBlock:L=>(0,_.getBlock)(Z,L),getBlockNumber:L=>(0,j.getBlockNumber)(Z,L),getBlockTransactionCount:L=>(0,P.getBlockTransactionCount)(Z,L),getBytecode:L=>(0,E.getCode)(Z,L),getChainId:()=>(0,v.getChainId)(Z),getCode:L=>(0,E.getCode)(Z,L),getContractEvents:L=>(0,l.getContractEvents)(Z,L),getEip712Domain:L=>(0,y.getEip712Domain)(Z,L),getEnsAddress:L=>(0,e.getEnsAddress)(Z,L),getEnsAvatar:L=>(0,o.getEnsAvatar)(Z,L),getEnsName:L=>(0,r.getEnsName)(Z,L),getEnsResolver:L=>(0,n.getEnsResolver)(Z,L),getEnsText:L=>(0,i.getEnsText)(Z,L),getFeeHistory:L=>(0,I.getFeeHistory)(Z,L),estimateFeesPerGas:L=>(0,m.estimateFeesPerGas)(Z,L),getFilterChanges:L=>(0,w.getFilterChanges)(Z,L),getFilterLogs:L=>(0,B.getFilterLogs)(Z,L),getGasPrice:()=>(0,q.getGasPrice)(Z),getLogs:L=>(0,T.getLogs)(Z,L),getProof:L=>(0,O.getProof)(Z,L),estimateMaxPriorityFeePerGas:L=>(0,h.estimateMaxPriorityFeePerGas)(Z,L),getStorageAt:L=>(0,A.getStorageAt)(Z,L),getTransaction:L=>(0,x.getTransaction)(Z,L),getTransactionConfirmations:L=>(0,F.getTransactionConfirmations)(Z,L),getTransactionCount:L=>(0,k.getTransactionCount)(Z,L),getTransactionReceipt:L=>(0,$.getTransactionReceipt)(Z,L),multicall:L=>(0,M.multicall)(Z,L),prepareTransactionRequest:L=>(0,Y.prepareTransactionRequest)(Z,L),readContract:L=>(0,S.readContract)(Z,L),sendRawTransaction:L=>(0,X.sendRawTransaction)(Z,L),simulate:L=>(0,R.simulateBlocks)(Z,L),simulateBlocks:L=>(0,R.simulateBlocks)(Z,L),simulateCalls:L=>(0,C.simulateCalls)(Z,L),simulateContract:L=>(0,H.simulateContract)(Z,L),verifyMessage:L=>(0,D.verifyMessage)(Z,L),verifySiweMessage:L=>(0,ae.verifySiweMessage)(Z,L),verifyTypedData:L=>(0,G.verifyTypedData)(Z,L),uninstallFilter:L=>(0,N.uninstallFilter)(Z,L),waitForTransactionReceipt:L=>(0,V.waitForTransactionReceipt)(Z,L),watchBlocks:L=>(0,J.watchBlocks)(Z,L),watchBlockNumber:L=>(0,W.watchBlockNumber)(Z,L),watchContractEvent:L=>(0,re.watchContractEvent)(Z,L),watchEvent:L=>(0,K.watchEvent)(Z,L),watchPendingTransactions:L=>(0,ee.watchPendingTransactions)(Z,L)}}return ds}var Ly;function Y_(){if(Ly)return cs;Ly=1,Object.defineProperty(cs,"__esModule",{value:!0}),cs.createPublicClient=r;const e=Qu(),o=Rp();function r(n){const{key:i="public",name:a="Public Client"}=n;return(0,e.createClient)({...n,key:i,name:a,type:"publicClient"}).extend(o.publicActions)}return cs}var Sa={},Ra={},Ba={},Dy;function X_(){if(Dy)return Ba;Dy=1,Object.defineProperty(Ba,"__esModule",{value:!0}),Ba.dropTransaction=e;async function e(o,{hash:r}){await o.request({method:`${o.mode}_dropTransaction`,params:[r]})}return Ba}var Oa={},Gy;function Q_(){if(Gy)return Oa;Gy=1,Object.defineProperty(Oa,"__esModule",{value:!0}),Oa.dumpState=e;async function e(o){return o.request({method:`${o.mode}_dumpState`})}return Oa}var Ca={},Vy;function ev(){if(Vy)return Ca;Vy=1,Object.defineProperty(Ca,"__esModule",{value:!0}),Ca.getAutomine=e;async function e(o){return o.mode==="ganache"?await o.request({method:"eth_mining"}):await o.request({method:`${o.mode}_getAutomine`})}return Ca}var xa={},Wy;function tv(){if(Wy)return xa;Wy=1,Object.defineProperty(xa,"__esModule",{value:!0}),xa.getTxpoolContent=e;async function e(o){return await o.request({method:"txpool_content"})}return xa}var qa={},Ky;function rv(){if(Ky)return qa;Ky=1,Object.defineProperty(qa,"__esModule",{value:!0}),qa.getTxpoolStatus=o;const e=Ie();async function o(r){const{pending:n,queued:i}=await r.request({method:"txpool_status"});return{pending:(0,e.hexToNumber)(n),queued:(0,e.hexToNumber)(i)}}return qa}var Ma={},Zy;function nv(){if(Zy)return Ma;Zy=1,Object.defineProperty(Ma,"__esModule",{value:!0}),Ma.impersonateAccount=e;async function e(o,{address:r}){await o.request({method:`${o.mode}_impersonateAccount`,params:[r]})}return Ma}var ka={},Jy;function ov(){if(Jy)return ka;Jy=1,Object.defineProperty(ka,"__esModule",{value:!0}),ka.increaseTime=o;const e=te();async function o(r,{seconds:n}){return await r.request({method:"evm_increaseTime",params:[(0,e.numberToHex)(n)]})}return ka}var Fa={},Yy;function iv(){if(Yy)return Fa;Yy=1,Object.defineProperty(Fa,"__esModule",{value:!0}),Fa.inspectTxpool=e;async function e(o){return await o.request({method:"txpool_inspect"})}return Fa}var $a={},Xy;function sv(){if(Xy)return $a;Xy=1,Object.defineProperty($a,"__esModule",{value:!0}),$a.loadState=e;async function e(o,{state:r}){await o.request({method:`${o.mode}_loadState`,params:[r]})}return $a}var Ha={},Qy;function av(){if(Qy)return Ha;Qy=1,Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.mine=o;const e=te();async function o(r,{blocks:n,interval:i}){r.mode==="ganache"?await r.request({method:"evm_mine",params:[{blocks:(0,e.numberToHex)(n)}]}):await r.request({method:`${r.mode}_mine`,params:[(0,e.numberToHex)(n),(0,e.numberToHex)(i||0)]})}return Ha}var Na={},eg;function uv(){if(eg)return Na;eg=1,Object.defineProperty(Na,"__esModule",{value:!0}),Na.removeBlockTimestampInterval=e;async function e(o){await o.request({method:`${o.mode}_removeBlockTimestampInterval`})}return Na}var za={},tg;function cv(){if(tg)return za;tg=1,Object.defineProperty(za,"__esModule",{value:!0}),za.reset=e;async function e(o,{blockNumber:r,jsonRpcUrl:n}={}){await o.request({method:`${o.mode}_reset`,params:[{forking:{blockNumber:Number(r),jsonRpcUrl:n}}]})}return za}var Ua={},rg;function dv(){if(rg)return Ua;rg=1,Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.revert=e;async function e(o,{id:r}){await o.request({method:"evm_revert",params:[r]})}return Ua}var La={},ng;function fv(){if(ng)return La;ng=1,Object.defineProperty(La,"__esModule",{value:!0}),La.sendUnsignedTransaction=r;const e=Yr(),o=Ot();async function r(n,i){var v,E,l;const{accessList:a,data:t,from:s,gas:u,gasPrice:d,maxFeePerGas:f,maxPriorityFeePerGas:c,nonce:m,to:g,value:h,...b}=i,p=(l=(E=(v=n.chain)==null?void 0:v.formatters)==null?void 0:E.transactionRequest)==null?void 0:l.format,j=(p||o.formatTransactionRequest)({...(0,e.extract)(b,{format:p}),accessList:a,data:t,from:s,gas:u,gasPrice:d,maxFeePerGas:f,maxPriorityFeePerGas:c,nonce:m,to:g,value:h});return await n.request({method:"eth_sendUnsignedTransaction",params:[j]})}return La}var Da={},og;function lv(){if(og)return Da;og=1,Object.defineProperty(Da,"__esModule",{value:!0}),Da.setAutomine=e;async function e(o,r){o.mode==="ganache"?r?await o.request({method:"miner_start"}):await o.request({method:"miner_stop"}):await o.request({method:"evm_setAutomine",params:[r]})}return Da}var Ga={},ig;function mv(){if(ig)return Ga;ig=1,Object.defineProperty(Ga,"__esModule",{value:!0}),Ga.setBalance=o;const e=te();async function o(r,{address:n,value:i}){r.mode==="ganache"?await r.request({method:"evm_setAccountBalance",params:[n,(0,e.numberToHex)(i)]}):await r.request({method:`${r.mode}_setBalance`,params:[n,(0,e.numberToHex)(i)]})}return Ga}var Va={},sg;function bv(){if(sg)return Va;sg=1,Object.defineProperty(Va,"__esModule",{value:!0}),Va.setBlockGasLimit=o;const e=te();async function o(r,{gasLimit:n}){await r.request({method:"evm_setBlockGasLimit",params:[(0,e.numberToHex)(n)]})}return Va}var Wa={},ag;function hv(){if(ag)return Wa;ag=1,Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.setBlockTimestampInterval=e;async function e(o,{interval:r}){const n=o.mode==="hardhat"?r*1e3:r;await o.request({method:`${o.mode}_setBlockTimestampInterval`,params:[n]})}return Wa}var Ka={},ug;function yv(){if(ug)return Ka;ug=1,Object.defineProperty(Ka,"__esModule",{value:!0}),Ka.setCode=e;async function e(o,{address:r,bytecode:n}){o.mode==="ganache"?await o.request({method:"evm_setAccountCode",params:[r,n]}):await o.request({method:`${o.mode}_setCode`,params:[r,n]})}return Ka}var Za={},cg;function gv(){if(cg)return Za;cg=1,Object.defineProperty(Za,"__esModule",{value:!0}),Za.setCoinbase=e;async function e(o,{address:r}){await o.request({method:`${o.mode}_setCoinbase`,params:[r]})}return Za}var Ja={},dg;function pv(){if(dg)return Ja;dg=1,Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.setIntervalMining=e;async function e(o,{interval:r}){const n=o.mode==="hardhat"?r*1e3:r;await o.request({method:"evm_setIntervalMining",params:[n]})}return Ja}var Ya={},fg;function _v(){if(fg)return Ya;fg=1,Object.defineProperty(Ya,"__esModule",{value:!0}),Ya.setLoggingEnabled=e;async function e(o,r){await o.request({method:`${o.mode}_setLoggingEnabled`,params:[r]})}return Ya}var Xa={},lg;function vv(){if(lg)return Xa;lg=1,Object.defineProperty(Xa,"__esModule",{value:!0}),Xa.setMinGasPrice=o;const e=te();async function o(r,{gasPrice:n}){await r.request({method:`${r.mode}_setMinGasPrice`,params:[(0,e.numberToHex)(n)]})}return Xa}var Qa={},mg;function Ev(){if(mg)return Qa;mg=1,Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.setNextBlockBaseFeePerGas=o;const e=te();async function o(r,{baseFeePerGas:n}){await r.request({method:`${r.mode}_setNextBlockBaseFeePerGas`,params:[(0,e.numberToHex)(n)]})}return Qa}var eu={},bg;function jv(){if(bg)return eu;bg=1,Object.defineProperty(eu,"__esModule",{value:!0}),eu.setNextBlockTimestamp=o;const e=te();async function o(r,{timestamp:n}){await r.request({method:"evm_setNextBlockTimestamp",params:[(0,e.numberToHex)(n)]})}return eu}var tu={},hg;function Pv(){if(hg)return tu;hg=1,Object.defineProperty(tu,"__esModule",{value:!0}),tu.setNonce=o;const e=te();async function o(r,{address:n,nonce:i}){await r.request({method:`${r.mode}_setNonce`,params:[n,(0,e.numberToHex)(i)]})}return tu}var ru={},yg;function wv(){if(yg)return ru;yg=1,Object.defineProperty(ru,"__esModule",{value:!0}),ru.setRpcUrl=e;async function e(o,r){await o.request({method:`${o.mode}_setRpcUrl`,params:[r]})}return ru}var nu={},gg;function Av(){if(gg)return nu;gg=1,Object.defineProperty(nu,"__esModule",{value:!0}),nu.setStorageAt=o;const e=te();async function o(r,{address:n,index:i,value:a}){await r.request({method:`${r.mode}_setStorageAt`,params:[n,typeof i=="number"?(0,e.numberToHex)(i):i,a]})}return nu}var ou={},pg;function Tv(){if(pg)return ou;pg=1,Object.defineProperty(ou,"__esModule",{value:!0}),ou.snapshot=e;async function e(o){return await o.request({method:"evm_snapshot"})}return ou}var iu={},_g;function Iv(){if(_g)return iu;_g=1,Object.defineProperty(iu,"__esModule",{value:!0}),iu.stopImpersonatingAccount=e;async function e(o,{address:r}){await o.request({method:`${o.mode}_stopImpersonatingAccount`,params:[r]})}return iu}var vg;function Bp(){if(vg)return Ra;vg=1,Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.testActions=A;const e=X_(),o=Q_(),r=ev(),n=tv(),i=rv(),a=nv(),t=ov(),s=iv(),u=sv(),d=av(),f=uv(),c=cv(),m=dv(),g=fv(),h=lv(),b=mv(),p=bv(),_=hv(),j=yv(),P=gv(),v=pv(),E=_v(),l=vv(),y=Ev(),I=jv(),w=Pv(),B=wv(),q=Av(),T=Tv(),O=Iv();function A({mode:x}){return F=>{const k=F.extend(()=>({mode:x}));return{dropTransaction:$=>(0,e.dropTransaction)(k,$),dumpState:()=>(0,o.dumpState)(k),getAutomine:()=>(0,r.getAutomine)(k),getTxpoolContent:()=>(0,n.getTxpoolContent)(k),getTxpoolStatus:()=>(0,i.getTxpoolStatus)(k),impersonateAccount:$=>(0,a.impersonateAccount)(k,$),increaseTime:$=>(0,t.increaseTime)(k,$),inspectTxpool:()=>(0,s.inspectTxpool)(k),loadState:$=>(0,u.loadState)(k,$),mine:$=>(0,d.mine)(k,$),removeBlockTimestampInterval:()=>(0,f.removeBlockTimestampInterval)(k),reset:$=>(0,c.reset)(k,$),revert:$=>(0,m.revert)(k,$),sendUnsignedTransaction:$=>(0,g.sendUnsignedTransaction)(k,$),setAutomine:$=>(0,h.setAutomine)(k,$),setBalance:$=>(0,b.setBalance)(k,$),setBlockGasLimit:$=>(0,p.setBlockGasLimit)(k,$),setBlockTimestampInterval:$=>(0,_.setBlockTimestampInterval)(k,$),setCode:$=>(0,j.setCode)(k,$),setCoinbase:$=>(0,P.setCoinbase)(k,$),setIntervalMining:$=>(0,v.setIntervalMining)(k,$),setLoggingEnabled:$=>(0,E.setLoggingEnabled)(k,$),setMinGasPrice:$=>(0,l.setMinGasPrice)(k,$),setNextBlockBaseFeePerGas:$=>(0,y.setNextBlockBaseFeePerGas)(k,$),setNextBlockTimestamp:$=>(0,I.setNextBlockTimestamp)(k,$),setNonce:$=>(0,w.setNonce)(k,$),setRpcUrl:$=>(0,B.setRpcUrl)(k,$),setStorageAt:$=>(0,q.setStorageAt)(k,$),snapshot:()=>(0,T.snapshot)(k),stopImpersonatingAccount:$=>(0,O.stopImpersonatingAccount)(k,$)}}}return Ra}var Eg;function Sv(){if(Eg)return Sa;Eg=1,Object.defineProperty(Sa,"__esModule",{value:!0}),Sa.createTestClient=r;const e=Qu(),o=Bp();function r(n){const{key:i="test",name:a="Test Client",mode:t}=n;return(0,e.createClient)({...n,key:i,name:a,type:"testClient"}).extend(u=>({mode:t,...(0,o.testActions)({mode:t})(u)}))}return Sa}var su={},au={},jg;function Rv(){if(jg)return au;jg=1,Object.defineProperty(au,"__esModule",{value:!0}),au.addChain=o;const e=te();async function o(r,{chain:n}){const{id:i,name:a,nativeCurrency:t,rpcUrls:s,blockExplorers:u}=n;await r.request({method:"wallet_addEthereumChain",params:[{chainId:(0,e.numberToHex)(i),chainName:a,nativeCurrency:t,rpcUrls:s.default.http,blockExplorerUrls:u?Object.values(u).map(({url:d})=>d):void 0}]},{dedupe:!0,retryCount:0})}return au}var uu={},Pg;function Bv(){if(Pg)return uu;Pg=1,Object.defineProperty(uu,"__esModule",{value:!0}),uu.deployContract=r;const e=go(),o=Ad();function r(n,i){const{abi:a,args:t,bytecode:s,...u}=i,d=(0,e.encodeDeployData)({abi:a,args:t,bytecode:s});return(0,o.sendTransaction)(n,{...u,data:d})}return uu}var cu={},wg;function Ov(){if(wg)return cu;wg=1,Object.defineProperty(cu,"__esModule",{value:!0}),cu.getAddresses=o;const e=Je();async function o(r){var i;return((i=r.account)==null?void 0:i.type)==="local"?[r.account.address]:(await r.request({method:"eth_accounts"},{dedupe:!0})).map(a=>(0,e.checksumAddress)(a))}return cu}var du={},Ag;function Cv(){if(Ag)return du;Ag=1,Object.defineProperty(du,"__esModule",{value:!0}),du.getPermissions=e;async function e(o){return await o.request({method:"wallet_getPermissions"},{dedupe:!0})}return du}var fu={},Tg;function xv(){if(Tg)return fu;Tg=1,Object.defineProperty(fu,"__esModule",{value:!0}),fu.requestAddresses=o;const e=Je();async function o(r){return(await r.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(i=>(0,e.getAddress)(i))}return fu}var lu={},Ig;function qv(){if(Ig)return lu;Ig=1,Object.defineProperty(lu,"__esModule",{value:!0}),lu.requestPermissions=e;async function e(o,r){return o.request({method:"wallet_requestPermissions",params:[r]},{retryCount:0})}return lu}var mu={},Sg;function Mv(){if(Sg)return mu;Sg=1,Object.defineProperty(mu,"__esModule",{value:!0}),mu.signMessage=n;const e=Be(),o=Eo(),r=te();async function n(i,{account:a=i.account,message:t}){if(!a)throw new o.AccountNotFoundError({docsPath:"/docs/actions/wallet/signMessage"});const s=(0,e.parseAccount)(a);if(s.signMessage)return s.signMessage({message:t});const u=typeof t=="string"?(0,r.stringToHex)(t):t.raw instanceof Uint8Array?(0,r.toHex)(t.raw):t.raw;return i.request({method:"personal_sign",params:[u,s.address]},{retryCount:0})}return mu}var bu={},Rg;function kv(){if(Rg)return bu;Rg=1,Object.defineProperty(bu,"__esModule",{value:!0}),bu.signTransaction=u;const e=Be(),o=Eo(),r=Xu(),n=te(),i=Ot(),a=me(),t=Ct(),s=mo();async function u(d,f){var j,P,v,E;const{account:c=d.account,chain:m=d.chain,...g}=f;if(!c)throw new o.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTransaction"});const h=(0,e.parseAccount)(c);(0,t.assertRequest)({account:h,...f});const b=await(0,a.getAction)(d,s.getChainId,"getChainId")({});m!==null&&(0,r.assertCurrentChain)({currentChainId:b,chain:m});const p=(m==null?void 0:m.formatters)||((j=d.chain)==null?void 0:j.formatters),_=((P=p==null?void 0:p.transactionRequest)==null?void 0:P.format)||i.formatTransactionRequest;return h.signTransaction?h.signTransaction({...g,chainId:b},{serializer:(E=(v=d.chain)==null?void 0:v.serializers)==null?void 0:E.transaction}):await d.request({method:"eth_signTransaction",params:[{..._(g),chainId:(0,n.numberToHex)(b),from:h.address}]},{retryCount:0})}return bu}var hu={},Bg;function Fv(){if(Bg)return hu;Bg=1,Object.defineProperty(hu,"__esModule",{value:!0}),hu.signTypedData=n;const e=Be(),o=Eo(),r=tc();async function n(i,a){const{account:t=i.account,domain:s,message:u,primaryType:d}=a;if(!t)throw new o.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTypedData"});const f=(0,e.parseAccount)(t),c={EIP712Domain:(0,r.getTypesForEIP712Domain)({domain:s}),...a.types};if((0,r.validateTypedData)({domain:s,message:u,primaryType:d,types:c}),f.signTypedData)return f.signTypedData({domain:s,message:u,primaryType:d,types:c});const m=(0,r.serializeTypedData)({domain:s,message:u,primaryType:d,types:c});return i.request({method:"eth_signTypedData_v4",params:[f.address,m]},{retryCount:0})}return hu}var yu={},Og;function $v(){if(Og)return yu;Og=1,Object.defineProperty(yu,"__esModule",{value:!0}),yu.switchChain=o;const e=te();async function o(r,{id:n}){await r.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,e.numberToHex)(n)}]},{retryCount:0})}return yu}var gu={},Cg;function Hv(){if(Cg)return gu;Cg=1,Object.defineProperty(gu,"__esModule",{value:!0}),gu.watchAsset=e;async function e(o,r){return await o.request({method:"wallet_watchAsset",params:r},{retryCount:0})}return gu}var xg;function Op(){if(xg)return su;xg=1,Object.defineProperty(su,"__esModule",{value:!0}),su.walletActions=p;const e=mo(),o=Rv(),r=Bv(),n=Ov(),i=Cv(),a=Ku(),t=xv(),s=qv(),u=wd(),d=Ad(),f=Mv(),c=kv(),m=Fv(),g=$v(),h=Hv(),b=k0();function p(_){return{addChain:j=>(0,o.addChain)(_,j),deployContract:j=>(0,r.deployContract)(_,j),getAddresses:()=>(0,n.getAddresses)(_),getChainId:()=>(0,e.getChainId)(_),getPermissions:()=>(0,i.getPermissions)(_),prepareTransactionRequest:j=>(0,a.prepareTransactionRequest)(_,j),requestAddresses:()=>(0,t.requestAddresses)(_),requestPermissions:j=>(0,s.requestPermissions)(_,j),sendRawTransaction:j=>(0,u.sendRawTransaction)(_,j),sendTransaction:j=>(0,d.sendTransaction)(_,j),signMessage:j=>(0,f.signMessage)(_,j),signTransaction:j=>(0,c.signTransaction)(_,j),signTypedData:j=>(0,m.signTypedData)(_,j),switchChain:j=>(0,g.switchChain)(_,j),watchAsset:j=>(0,h.watchAsset)(_,j),writeContract:j=>(0,b.writeContract)(_,j)}}return su}var pu={},qg;function Nv(){if(qg)return pu;qg=1,Object.defineProperty(pu,"__esModule",{value:!0}),pu.createWalletClient=r;const e=Qu(),o=Op();function r(n){const{key:i="wallet",name:a="Wallet Client",transport:t}=n;return(0,e.createClient)({...n,key:i,name:a,transport:t,type:"walletClient"}).extend(o.walletActions)}return pu}var _u={},Mg;function zv(){if(Mg)return _u;Mg=1,Object.defineProperty(_u,"__esModule",{value:!0}),_u.webSocket=a;const e=at(),o=Id(),r=J0(),n=Cd(),i=jo();function a(t,s={}){const{keepAlive:u,key:d="webSocket",methods:f,name:c="WebSocket JSON-RPC",reconnect:m,retryDelay:g}=s;return({chain:h,retryCount:b,timeout:p})=>{var v;const _=s.retryCount??b,j=p??s.timeout??1e4,P=t||((v=h==null?void 0:h.rpcUrls.default.webSocket)==null?void 0:v[0]);if(!P)throw new o.UrlRequiredError;return(0,i.createTransport)({key:d,methods:f,name:c,async request({method:E,params:l}){const y={method:E,params:l},I=await(0,n.getWebSocketRpcClient)(P,{keepAlive:u,reconnect:m}),{error:w,result:B}=await I.requestAsync({body:y,timeout:j});if(w)throw new e.RpcRequestError({body:y,error:w,url:P});return B},retryCount:_,retryDelay:g,timeout:j,type:"webSocket"},{getSocket(){return(0,r.getSocket)(P)},getRpcClient(){return(0,n.getWebSocketRpcClient)(P)},async subscribe({params:E,onData:l,onError:y}){const I=await(0,n.getWebSocketRpcClient)(P),{result:w}=await new Promise((B,q)=>I.request({body:{method:"eth_subscribe",params:E},onError(T){q(T),y==null||y(T)},onResponse(T){if(T.error){q(T.error),y==null||y(T.error);return}if(typeof T.id=="number"){B(T);return}T.method==="eth_subscription"&&l(T.params)}}));return{subscriptionId:w,async unsubscribe(){return new Promise(B=>I.request({body:{method:"eth_unsubscribe",params:[w]},onResponse:B}))}}}})}}return _u}var eo={},kg;function Uv(){if(kg)return eo;kg=1,Object.defineProperty(eo,"__esModule",{value:!0}),eo.ProviderRpcError=void 0;class e extends Error{constructor(r,n){super(n),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=r,this.details=n}}return eo.ProviderRpcError=e,eo}var vu={},Fg;function Lv(){if(Fg)return vu;Fg=1,Object.defineProperty(vu,"__esModule",{value:!0}),vu.decodeDeployData=n;const e=_e(),o=Yt(),r="/docs/contract/decodeDeployData";function n(i){const{abi:a,bytecode:t,data:s}=i;if(s===t)return{bytecode:t};const u=a.find(f=>"type"in f&&f.type==="constructor");if(!u)throw new e.AbiConstructorNotFoundError({docsPath:r});if(!("inputs"in u))throw new e.AbiConstructorParamsNotFoundError({docsPath:r});if(!u.inputs||u.inputs.length===0)throw new e.AbiConstructorParamsNotFoundError({docsPath:r});return{args:(0,o.decodeAbiParameters)(u.inputs,`0x${s.replace(t,"")}`),bytecode:t}}return vu}var Eu={},$g;function Dv(){if($g)return Eu;$g=1,Object.defineProperty(Eu,"__esModule",{value:!0}),Eu.compactSignatureToSignature=r;const e=he(),o=te();function r({r:n,yParityAndS:i}){const a=(0,e.hexToBytes)(i),t=a[0]&128?1:0,s=a;return t===1&&(s[0]&=127),{r:n,s:(0,o.bytesToHex)(s),yParity:t}}return Eu}var ju={},Hg;function Gv(){if(Hg)return ju;Hg=1,Object.defineProperty(ju,"__esModule",{value:!0}),ju.parseCompactSignature=r;const e=ao(),o=te();function r(n){const{r:i,s:a}=e.secp256k1.Signature.fromCompact(n.slice(2,130));return{r:(0,o.numberToHex)(i,{size:32}),yParityAndS:(0,o.numberToHex)(a,{size:32})}}return ju}var Pu={},Ng;function Vv(){if(Ng)return Pu;Ng=1,Object.defineProperty(Pu,"__esModule",{value:!0}),Pu.parseSignature=r;const e=ao(),o=te();function r(n){const{r:i,s:a}=e.secp256k1.Signature.fromCompact(n.slice(2,130)),t=+`0x${n.slice(130)}`,[s,u]=(()=>{if(t===0||t===1)return[void 0,t];if(t===27)return[BigInt(t),0];if(t===28)return[BigInt(t),1];throw new Error("Invalid yParityOrV value")})();return typeof s<"u"?{r:(0,o.numberToHex)(i,{size:32}),s:(0,o.numberToHex)(a,{size:32}),v:s,yParity:u}:{r:(0,o.numberToHex)(i,{size:32}),s:(0,o.numberToHex)(a,{size:32}),yParity:u}}return Pu}var wu={},zg;function Wv(){if(zg)return wu;zg=1,Object.defineProperty(wu,"__esModule",{value:!0}),wu.recoverTransactionAddress=i;const e=Ne(),o=Ud(),r=oc(),n=er();async function i(a){const{serializedTransaction:t,signature:s}=a,u=(0,o.parseTransaction)(t),d=s??{r:u.r,s:u.s,v:u.v,yParity:u.yParity},f=(0,r.serializeTransaction)({...u,r:void 0,s:void 0,v:void 0,yParity:void 0,sidecars:void 0});return await(0,n.recoverAddress)({hash:(0,e.keccak256)(f),signature:d})}return wu}var Au={},Ug;function Kv(){if(Ug)return Au;Ug=1,Object.defineProperty(Au,"__esModule",{value:!0}),Au.signatureToCompactSignature=r;const e=he(),o=te();function r(n){const{r:i,s:a,v:t,yParity:s}=n,u=Number(s??t-27n);let d=a;if(u===1){const f=(0,e.hexToBytes)(a);f[0]|=128,d=(0,o.bytesToHex)(f)}return{r:i,yParityAndS:d}}return Au}var Tu={},Lg;function Zv(){if(Lg)return Tu;Lg=1,Object.defineProperty(Tu,"__esModule",{value:!0}),Tu.serializeCompactSignature=r;const e=ao(),o=Ie();function r({r:n,yParityAndS:i}){return`0x${new e.secp256k1.Signature((0,o.hexToBigInt)(n),(0,o.hexToBigInt)(i)).toCompactHex()}`}return Tu}var Iu={},Dg;function Jv(){if(Dg)return Iu;Dg=1,Object.defineProperty(Iu,"__esModule",{value:!0}),Iu.sidecarsToVersionedHashes=o;const e=hd();function o(r){const{sidecars:n,version:i}=r,a=r.to??(typeof n[0].blob=="string"?"hex":"bytes"),t=[];for(const{commitment:s}of n)t.push((0,e.commitmentToVersionedHash)({commitment:s,to:a,version:i}));return t}return Iu}var Su={},Gg;function Yv(){if(Gg)return Su;Gg=1,Object.defineProperty(Su,"__esModule",{value:!0}),Su.fromBlobs=n;const e=oo(),o=he(),r=te();function n(i){const a=i.to??(typeof i.blobs[0]=="string"?"hex":"bytes"),t=typeof i.blobs[0]=="string"?i.blobs.map(c=>(0,o.hexToBytes)(c)):i.blobs,s=t.reduce((c,m)=>c+m.length,0),u=(0,e.createCursor)(new Uint8Array(s));let d=!0;for(const c of t){const m=(0,e.createCursor)(c);for(;d&&m.positiontypeof a=="object"?Object.keys(a).every(t=>!!Object.values(e.RestrictedMethods).includes(t)):!1)}}return to.Wallet=r,to}var Xg;function tE(){if(Xg)return Ou;Xg=1,Object.defineProperty(Ou,"__esModule",{value:!0});const e=qp(),o=xp(),r=(i,a)=>a.some(t=>t.parentCapability===i),n=()=>(i,a,t)=>{const s=t.value;return t.value=async function(){const u=new e.Wallet(this.communicator);let d=await u.getPermissions();if(r(a,d)||(d=await u.requestPermissions([{[a]:{}}])),!r(a,d))throw new o.PermissionsError("Permissions rejected",o.PERMISSIONS_REQUEST_REJECTED);return s.apply(this)},t};return Ou.default=n,Ou}var Qg;function rE(){if(Qg)return ur;Qg=1;var e=ur.__decorate||function(d,f,c,m){var g=arguments.length,h=g<3?f:m===null?m=Object.getOwnPropertyDescriptor(f,c):m,b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(d,f,c,m);else for(var p=d.length-1;p>=0;p--)(b=d[p])&&(h=(g<3?b(h):g>3?b(f,c,h):b(f,c))||h);return g>3&&h&&Object.defineProperty(f,c,h),h},o=ur.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(ur,"__esModule",{value:!0}),ur.Safe=void 0;const r=Qv(),n=eE(),i=Er(),a=Qc(),t=Xc(),s=o(tE());class u{constructor(f){this.communicator=f}async getChainInfo(){return(await this.communicator.send(i.Methods.getChainInfo,void 0)).data}async getInfo(){return(await this.communicator.send(i.Methods.getSafeInfo,void 0)).data}async experimental_getBalances({currency:f="usd"}={}){return(await this.communicator.send(i.Methods.getSafeBalances,{currency:f})).data}async check1271Signature(f,c="0x"){const m=await this.getInfo(),g=(0,r.encodeFunctionData)({abi:[{constant:!1,inputs:[{name:"_dataHash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[f,c]}),h={call:a.RPC_CALLS.eth_call,params:[{to:m.safeAddress,data:g},"latest"]};try{return(await this.communicator.send(i.Methods.rpcCall,h)).data.slice(0,10).toLowerCase()===n.MAGIC_VALUE}catch{return!1}}async check1271SignatureBytes(f,c="0x"){const m=await this.getInfo(),g=(0,r.encodeFunctionData)({abi:[{constant:!1,inputs:[{name:"_data",type:"bytes"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[f,c]}),h={call:a.RPC_CALLS.eth_call,params:[{to:m.safeAddress,data:g},"latest"]};try{return(await this.communicator.send(i.Methods.rpcCall,h)).data.slice(0,10).toLowerCase()===n.MAGIC_VALUE_BYTES}catch{return!1}}calculateMessageHash(f){return(0,r.hashMessage)(f)}calculateTypedMessageHash(f){const c=typeof f.domain.chainId=="object"?f.domain.chainId.toNumber():Number(f.domain.chainId);let m=f.primaryType;if(!m){const g=Object.values(f.types),h=Object.keys(f.types).filter(b=>g.every(p=>p.every(({type:_})=>_.replace("[","").replace("]","")!==b)));if(h.length===0||h.length>1)throw new Error("Please specify primaryType");m=h[0]}return(0,r.hashTypedData)({message:f.message,domain:{...f.domain,chainId:c,verifyingContract:f.domain.verifyingContract,salt:f.domain.salt},types:f.types,primaryType:m})}async getOffChainSignature(f){return(await this.communicator.send(i.Methods.getOffChainSignature,f)).data}async isMessageSigned(f,c="0x"){let m;if(typeof f=="string"&&(m=async()=>{const g=this.calculateMessageHash(f);return await this.isMessageHashSigned(g,c)}),(0,t.isObjectEIP712TypedData)(f)&&(m=async()=>{const g=this.calculateTypedMessageHash(f);return await this.isMessageHashSigned(g,c)}),m)return await m();throw new Error("Invalid message type")}async isMessageHashSigned(f,c="0x"){const m=[this.check1271Signature.bind(this),this.check1271SignatureBytes.bind(this)];for(const g of m)if(await g(f,c))return!0;return!1}async getEnvironmentInfo(){return(await this.communicator.send(i.Methods.getEnvironmentInfo,void 0)).data}async requestAddressBook(){return(await this.communicator.send(i.Methods.requestAddressBook,void 0)).data}}return ur.Safe=u,e([(0,s.default)()],u.prototype,"requestAddressBook",null),ur}var e0;function t0(){if(e0)return nn;e0=1;var e=nn.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(nn,"__esModule",{value:!0});const o=e(S1()),r=x1(),n=q1(),i=rE(),a=qp();class t{constructor(u={}){const{allowedDomains:d=null,debug:f=!1}=u;this.communicator=new o.default(d,f),this.eth=new n.Eth(this.communicator),this.txs=new r.TXs(this.communicator),this.safe=new i.Safe(this.communicator),this.wallet=new a.Wallet(this.communicator)}}return nn.default=t,nn}var r0;function nE(){return r0||(r0=1,function(e){var o=Sr.__createBinding||(Object.create?function(t,s,u,d){d===void 0&&(d=u);var f=Object.getOwnPropertyDescriptor(s,u);(!f||("get"in f?!s.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:function(){return s[u]}}),Object.defineProperty(t,d,f)}:function(t,s,u,d){d===void 0&&(d=u),t[d]=s[u]}),r=Sr.__exportStar||function(t,s){for(var u in t)u!=="default"&&!Object.prototype.hasOwnProperty.call(s,u)&&o(s,t,u)},n=Sr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.getSDKVersion=void 0;const i=n(t0());e.default=i.default,r(t0(),e),r(Xc(),e),r(Er(),e),r(c0(),e);var a=u0();Object.defineProperty(e,"getSDKVersion",{enumerable:!0,get:function(){return a.getSDKVersion}}),r(Qc(),e)}(Sr)),Sr}var vr={},n0;function oE(){if(n0)return vr;n0=1,Object.defineProperty(vr,"__esModule",{value:!0}),vr.numberToHex=vr.getLowerCase=void 0;function e(r){return r&&r.toLowerCase()}vr.getLowerCase=e;function o(r){return`0x${r.toString(16)}`}return vr.numberToHex=o,vr}var o0;function iE(){if(o0)return rn;o0=1,Object.defineProperty(rn,"__esModule",{value:!0}),rn.SafeAppProvider=void 0;const e=nE(),o=j1(),r=oE();class n extends o.EventEmitter{constructor(a,t){super(),this.submittedTxs=new Map,this.safe=a,this.sdk=t}async connect(){this.emit("connect",{chainId:this.chainId})}async disconnect(){}get chainId(){return this.safe.chainId}async request(a){var u,d,f,c;const{method:t,params:s=[]}=a;switch(t){case"eth_accounts":return[this.safe.safeAddress];case"net_version":case"eth_chainId":return(0,r.numberToHex)(this.chainId);case"personal_sign":{const[p,_]=s;if(this.safe.safeAddress.toLowerCase()!==_.toLowerCase())throw new Error("The address or message hash is invalid");const j=await this.sdk.txs.signMessage(p);return("signature"in j?j.signature:void 0)||"0x"}case"eth_sign":{const[p,_]=s;if(this.safe.safeAddress.toLowerCase()!==p.toLowerCase()||!_.startsWith("0x"))throw new Error("The address or message hash is invalid");const j=await this.sdk.txs.signMessage(_);return("signature"in j?j.signature:void 0)||"0x"}case"eth_signTypedData":case"eth_signTypedData_v4":{const[p,_]=s,j=typeof _=="string"?JSON.parse(_):_;if(this.safe.safeAddress.toLowerCase()!==p.toLowerCase())throw new Error("The address is invalid");const P=await this.sdk.txs.signTypedMessage(j);return("signature"in P?P.signature:void 0)||"0x"}case"eth_sendTransaction":const m={...s[0],value:s[0].value||"0",data:s[0].data||"0x"};typeof m.gas=="string"&&m.gas.startsWith("0x")&&(m.gas=parseInt(m.gas,16));const g=await this.sdk.txs.send({txs:[m],params:{safeTxGas:m.gas}});return this.submittedTxs.set(g.safeTxHash,{from:this.safe.safeAddress,hash:g.safeTxHash,gas:0,gasPrice:"0x00",nonce:0,input:m.data,value:m.value,to:m.to,blockHash:null,blockNumber:null,transactionIndex:null}),g.safeTxHash;case"eth_blockNumber":return(await this.sdk.eth.getBlockByNumber(["latest"])).number;case"eth_getBalance":return this.sdk.eth.getBalance([(0,r.getLowerCase)(s[0]),s[1]]);case"eth_getCode":return this.sdk.eth.getCode([(0,r.getLowerCase)(s[0]),s[1]]);case"eth_getTransactionCount":return this.sdk.eth.getTransactionCount([(0,r.getLowerCase)(s[0]),s[1]]);case"eth_getStorageAt":return this.sdk.eth.getStorageAt([(0,r.getLowerCase)(s[0]),s[1],s[2]]);case"eth_getBlockByNumber":return this.sdk.eth.getBlockByNumber([s[0],s[1]]);case"eth_getBlockByHash":return this.sdk.eth.getBlockByHash([s[0],s[1]]);case"eth_getTransactionByHash":let b=s[0];try{b=(await this.sdk.txs.getBySafeTxHash(b)).txHash||b}catch{}return this.submittedTxs.has(b)?this.submittedTxs.get(b):this.sdk.eth.getTransactionByHash([b]).then(p=>(p&&(p.hash=s[0]),p));case"eth_getTransactionReceipt":{let p=s[0];try{p=(await this.sdk.txs.getBySafeTxHash(p)).txHash||p}catch{}return this.sdk.eth.getTransactionReceipt([p]).then(_=>(_&&(_.transactionHash=s[0]),_))}case"eth_estimateGas":return this.sdk.eth.getEstimateGas(s[0]);case"eth_call":return this.sdk.eth.call([s[0],s[1]]);case"eth_getLogs":return this.sdk.eth.getPastLogs([s[0]]);case"eth_gasPrice":return this.sdk.eth.getGasPrice();case"wallet_getPermissions":return this.sdk.wallet.getPermissions();case"wallet_requestPermissions":return this.sdk.wallet.requestPermissions(s[0]);case"safe_setSettings":return this.sdk.eth.setSafeSettings([s[0]]);case"wallet_sendCalls":{if(s[0].from!==this.safe.safeAddress)throw Error("Invalid from address");const p=s[0].calls.map((j,P)=>{if(j.chainId!==(0,r.numberToHex)(this.chainId))throw new Error(`Invalid call #${P}: Safe is not on chain ${j.chainId}`);if(!j.to)throw new Error(`Invalid call #${P}: missing "to" field`);return{to:j.to,data:j.data??"0x",value:j.value??(0,r.numberToHex)(0)}}),{safeTxHash:_}=await this.sdk.txs.send({txs:p});return _}case"wallet_getCallsStatus":{const p={[e.TransactionStatus.AWAITING_CONFIRMATIONS]:"PENDING",[e.TransactionStatus.AWAITING_EXECUTION]:"PENDING",[e.TransactionStatus.CANCELLED]:"CONFIRMED",[e.TransactionStatus.FAILED]:"CONFIRMED",[e.TransactionStatus.SUCCESS]:"CONFIRMED"},_=await this.sdk.txs.getBySafeTxHash(s[0]),j=p[_.txStatus];if(!_.txHash)return{status:j};const P=await this.sdk.eth.getTransactionReceipt([_.txHash]);if(!P)return{status:j};const v=((d=(u=_.txData)==null?void 0:u.dataDecoded)==null?void 0:d.method)!=="multiSend"?1:((c=(f=_.txData.dataDecoded.parameters)==null?void 0:f[0].valueDecoded)==null?void 0:c.length)??1,E=Number(P.blockNumber),l=Number(P.gasUsed),y=Array(v).fill({logs:P.logs,status:(0,r.numberToHex)(_.txStatus===e.TransactionStatus.SUCCESS?1:0),chainId:(0,r.numberToHex)(this.chainId),blockHash:P.blockHash,blockNumber:(0,r.numberToHex)(E),gasUsed:(0,r.numberToHex)(l),transactionHash:_.txHash});return{status:j,receipts:y}}case"wallet_showCallsStatus":throw new Error(`"${a.method}" not supported`);case"wallet_getCapabilities":return{[(0,r.numberToHex)(this.chainId)]:{atomicBatch:{supported:!0}}};default:throw Error(`"${a.method}" not implemented`)}}send(a,t){a||t("Undefined request"),this.request(a).then(s=>t(null,{jsonrpc:"2.0",id:a.id,result:s})).catch(s=>t(s,null))}}return rn.SafeAppProvider=n,rn}var i0;function sE(){return i0||(i0=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SafeAppProvider=void 0;var o=iE();Object.defineProperty(e,"SafeAppProvider",{enumerable:!0,get:function(){return o.SafeAppProvider}})}(Tc)),Tc}var Mp=sE();const aE=v1(Mp),lE=P1({__proto__:null,default:aE},[Mp]);export{lE as i}; diff --git a/app/dist/assets/index-Db_7AJd0.js b/app/dist/assets/index-Db_7AJd0.js new file mode 100644 index 0000000..8051fe5 --- /dev/null +++ b/app/dist/assets/index-Db_7AJd0.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-BKHg97jM.js","./index-vLeYm_sl.js","./index-BnsVTdaL.css"])))=>i.map(i=>d[i]); +import{_ as fe}from"./index-vLeYm_sl.js";const pe=Symbol(),Z=Object.getPrototypeOf,J=new WeakMap,me=e=>e&&(J.has(e)?J.get(e):Z(e)===Object.prototype||Z(e)===Array.prototype),ge=e=>me(e)&&e[pe]||null,ee=(e,t=!0)=>{J.set(e,t)},q=e=>typeof e=="object"&&e!==null,L=new WeakMap,x=new WeakSet,he=(e=Object.is,t=(r,h)=>new Proxy(r,h),s=r=>q(r)&&!x.has(r)&&(Array.isArray(r)||!(Symbol.iterator in r))&&!(r instanceof WeakMap)&&!(r instanceof WeakSet)&&!(r instanceof Error)&&!(r instanceof Number)&&!(r instanceof Date)&&!(r instanceof String)&&!(r instanceof RegExp)&&!(r instanceof ArrayBuffer),n=r=>{switch(r.status){case"fulfilled":return r.value;case"rejected":throw r.reason;default:throw r}},l=new WeakMap,c=(r,h,O=n)=>{const y=l.get(r);if((y==null?void 0:y[0])===h)return y[1];const b=Array.isArray(r)?[]:Object.create(Object.getPrototypeOf(r));return ee(b,!0),l.set(r,[h,b]),Reflect.ownKeys(r).forEach(D=>{if(Object.getOwnPropertyDescriptor(b,D))return;const E=Reflect.get(r,D),A={value:E,enumerable:!0,configurable:!0};if(x.has(E))ee(E,!1);else if(E instanceof Promise)delete A.value,A.get=()=>O(E);else if(L.has(E)){const[w,z]=L.get(E);A.value=c(w,z(),O)}Object.defineProperty(b,D,A)}),Object.preventExtensions(b)},d=new WeakMap,f=[1,1],v=r=>{if(!q(r))throw new Error("object required");const h=d.get(r);if(h)return h;let O=f[0];const y=new Set,b=(i,a=++f[0])=>{O!==a&&(O=a,y.forEach(o=>o(i,a)))};let D=f[1];const E=(i=++f[1])=>(D!==i&&!y.size&&(D=i,w.forEach(([a])=>{const o=a[1](i);o>O&&(O=o)})),O),A=i=>(a,o)=>{const g=[...a];g[1]=[i,...g[1]],b(g,o)},w=new Map,z=(i,a)=>{if(y.size){const o=a[3](A(i));w.set(i,[a,o])}else w.set(i,[a])},X=i=>{var a;const o=w.get(i);o&&(w.delete(i),(a=o[1])==null||a.call(o))},de=i=>(y.add(i),y.size===1&&w.forEach(([o,g],U)=>{const k=o[3](A(U));w.set(U,[o,k])}),()=>{y.delete(i),y.size===0&&w.forEach(([o,g],U)=>{g&&(g(),w.set(U,[o]))})}),H=Array.isArray(r)?[]:Object.create(Object.getPrototypeOf(r)),R=t(H,{deleteProperty(i,a){const o=Reflect.get(i,a);X(a);const g=Reflect.deleteProperty(i,a);return g&&b(["delete",[a],o]),g},set(i,a,o,g){const U=Reflect.has(i,a),k=Reflect.get(i,a,g);if(U&&(e(k,o)||d.has(o)&&e(k,d.get(o))))return!0;X(a),q(o)&&(o=ge(o)||o);let V=o;if(o instanceof Promise)o.then(C=>{o.status="fulfilled",o.value=C,b(["resolve",[a],C])}).catch(C=>{o.status="rejected",o.reason=C,b(["reject",[a],C])});else{!L.has(o)&&s(o)&&(V=v(o));const C=!x.has(V)&&L.get(V);C&&z(a,C)}return Reflect.set(i,a,V,g),b(["set",[a],o,k]),!0}});d.set(r,R);const ue=[H,E,c,de];return L.set(R,ue),Reflect.ownKeys(r).forEach(i=>{const a=Object.getOwnPropertyDescriptor(r,i);"value"in a&&(R[i]=r[i],delete a.value,delete a.writable),Object.defineProperty(H,i,a)}),R})=>[v,L,x,e,t,s,n,l,c,d,f],[ye]=he();function P(e={}){return ye(e)}function j(e,t,s){const n=L.get(e);let l;const c=[],d=n[3];let f=!1;const r=d(h=>{c.push(h),l||(l=Promise.resolve().then(()=>{l=void 0,f&&t(c.splice(0))}))});return f=!0,()=>{f=!1,r()}}function be(e,t){const s=L.get(e),[n,l,c]=s;return c(n,l(),t)}const u=P({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),ce={state:u,subscribe(e){return j(u,()=>e(u))},push(e,t){e!==u.view&&(u.view=e,t&&(u.data=t),u.history.push(e))},reset(e){u.view=e,u.history=[e]},replace(e){u.history.length>1&&(u.history[u.history.length-1]=e,u.view=e)},goBack(){if(u.history.length>1){u.history.pop();const[e]=u.history.slice(-1);u.view=e}},setData(e){u.data=e}},m={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return m.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const e=navigator.userAgent.toLowerCase();return m.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl(e){return e.startsWith("http://")||e.startsWith("https://")},isArray(e){return Array.isArray(e)&&e.length>0},isTelegram(){return typeof window<"u"&&(!!window.TelegramWebviewProxy||!!window.Telegram||!!window.TelegramWebviewProxyProto)},formatNativeUrl(e,t,s){if(m.isHttpUrl(e))return this.formatUniversalUrl(e,t,s);let n=e;n.includes("://")||(n=e.replaceAll("/","").replaceAll(":",""),n=`${n}://`),n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,s);const l=encodeURIComponent(t);return`${n}wc?uri=${l}`},formatUniversalUrl(e,t,s){if(!m.isHttpUrl(e))return this.formatNativeUrl(e,t,s);let n=e;if(n.startsWith("https://t.me")){const c=Buffer.from(t).toString("base64").replace(/[=]/g,"");n.endsWith("/")&&(n=n.slice(0,-1)),this.setWalletConnectDeepLink(n,s);const d=new URL(n);return d.searchParams.set("startapp",c),d.toString()}n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,s);const l=encodeURIComponent(t);return`${n}wc?uri=${l}`},async wait(e){return new Promise(t=>{setTimeout(t,e)})},openHref(e,t){const s=this.isTelegram()?"_blank":t;window.open(e,s,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(m.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(m.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(m.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(m.WCM_VERSION,"2.7.0")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=(e=ce.state.data)==null?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},we=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),p=P({enabled:we,userSessionId:"",events:[],connectedWalletId:void 0}),Ie={state:p,subscribe(e){return j(p.events,()=>e(be(p.events[p.events.length-1])))},initialize(){p.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(p.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){p.connectedWalletId=e},click(e){if(p.enabled){const t={type:"CLICK",name:e.name,userSessionId:p.userSessionId,timestamp:Date.now(),data:e};p.events.push(t)}},track(e){if(p.enabled){const t={type:"TRACK",name:e.name,userSessionId:p.userSessionId,timestamp:Date.now(),data:e};p.events.push(t)}},view(e){if(p.enabled){const t={type:"VIEW",name:e.name,userSessionId:p.userSessionId,timestamp:Date.now(),data:e};p.events.push(t)}}},_=P({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),I={state:_,subscribe(e){return j(_,()=>e(_))},setChains(e){_.chains=e},setWalletConnectUri(e){_.walletConnectUri=e},setIsCustomDesktop(e){_.isCustomDesktop=e},setIsCustomMobile(e){_.isCustomMobile=e},setIsDataLoaded(e){_.isDataLoaded=e},setIsUiLoaded(e){_.isUiLoaded=e},setIsAuth(e){_.isAuth=e}},B=P({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),$={state:B,subscribe(e){return j(B,()=>e(B))},setConfig(e){var t,s;Ie.initialize(),I.setChains(e.chains),I.setIsAuth(!!e.enableAuthMode),I.setIsCustomMobile(!!((t=e.mobileWallets)!=null&&t.length)),I.setIsCustomDesktop(!!((s=e.desktopWallets)!=null&&s.length)),m.setModalVersionInStorage(),Object.assign(B,e)}};var Oe=Object.defineProperty,te=Object.getOwnPropertySymbols,_e=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,se=(e,t,s)=>t in e?Oe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Ee=(e,t)=>{for(var s in t||(t={}))_e.call(t,s)&&se(e,s,t[s]);if(te)for(var s of te(t))We.call(t,s)&&se(e,s,t[s]);return e};const Y="https://explorer-api.walletconnect.com",G="wcm",Q="js-2.7.0";async function K(e,t){const s=Ee({sdkType:G,sdkVersion:Q},t),n=new URL(e,Y);return n.searchParams.append("projectId",$.state.projectId),Object.entries(s).forEach(([c,d])=>{d&&n.searchParams.append(c,String(d))}),(await fetch(n)).json()}const M={async getDesktopListings(e){return K("/w3m/v1/getDesktopListings",e)},async getMobileListings(e){return K("/w3m/v1/getMobileListings",e)},async getInjectedListings(e){return K("/w3m/v1/getInjectedListings",e)},async getAllListings(e){return K("/w3m/v1/getAllListings",e)},getWalletImageUrl(e){return`${Y}/w3m/v1/getWalletImage/${e}?projectId=${$.state.projectId}&sdkType=${G}&sdkVersion=${Q}`},getAssetImageUrl(e){return`${Y}/w3m/v1/getAssetImage/${e}?projectId=${$.state.projectId}&sdkType=${G}&sdkVersion=${Q}`}};var ve=Object.defineProperty,ne=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable,re=(e,t,s)=>t in e?ve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Pe=(e,t)=>{for(var s in t||(t={}))Ce.call(t,s)&&re(e,s,t[s]);if(ne)for(var s of ne(t))Le.call(t,s)&&re(e,s,t[s]);return e};const oe=m.isMobile(),W=P({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),ke={state:W,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=$.state;if(e==="NONE"||t==="ALL"&&!e)return W.recomendedWallets;if(m.isArray(e)){const n={recommendedIds:e.join(",")},{listings:l}=await M.getAllListings(n),c=Object.values(l);c.sort((d,f)=>{const v=e.indexOf(d.id),r=e.indexOf(f.id);return v-r}),W.recomendedWallets=c}else{const{chains:s,isAuth:n}=I.state,l=s==null?void 0:s.join(","),c=m.isArray(t),d={page:1,sdks:n?"auth_v1":void 0,entries:m.RECOMMENDED_WALLET_AMOUNT,chains:l,version:2,excludedIds:c?t.join(","):void 0},{listings:f}=oe?await M.getMobileListings(d):await M.getDesktopListings(d);W.recomendedWallets=Object.values(f)}return W.recomendedWallets},async getWallets(e){const t=Pe({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:n}=$.state,{recomendedWallets:l}=W;if(n==="ALL")return W.wallets;l.length?t.excludedIds=l.map(O=>O.id).join(","):m.isArray(s)&&(t.excludedIds=s.join(",")),m.isArray(n)&&(t.excludedIds=[t.excludedIds,n].filter(Boolean).join(",")),I.state.isAuth&&(t.sdks="auth_v1");const{page:c,search:d}=e,{listings:f,total:v}=oe?await M.getMobileListings(t):await M.getDesktopListings(t),r=Object.values(f),h=d?"search":"wallets";return W[h]={listings:[...W[h].listings,...r],total:v,page:c??1},{listings:r,total:v}},getWalletImageUrl(e){return M.getWalletImageUrl(e)},getAssetImageUrl(e){return M.getAssetImageUrl(e)},resetSearch(){W.search={listings:[],total:0,page:1}}},T=P({open:!1}),F={state:T,subscribe(e){return j(T,()=>e(T))},async open(e){return new Promise(t=>{const{isUiLoaded:s,isDataLoaded:n}=I.state;if(m.removeWalletConnectDeepLink(),I.setWalletConnectUri(e==null?void 0:e.uri),I.setChains(e==null?void 0:e.chains),ce.reset("ConnectWallet"),s&&n)T.open=!0,t();else{const l=setInterval(()=>{const c=I.state;c.isUiLoaded&&c.isDataLoaded&&(clearInterval(l),T.open=!0,t())},200)}})},close(){T.open=!1}};var Ae=Object.defineProperty,ae=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,Se=Object.prototype.propertyIsEnumerable,ie=(e,t,s)=>t in e?Ae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,je=(e,t)=>{for(var s in t||(t={}))Me.call(t,s)&&ie(e,s,t[s]);if(ae)for(var s of ae(t))Se.call(t,s)&&ie(e,s,t[s]);return e};function De(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const N=P({themeMode:De()?"dark":"light"}),le={state:N,subscribe(e){return j(N,()=>e(N))},setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(N.themeMode=t),s&&(N.themeVariables=je({},s))}},S=P({open:!1,message:"",variant:"success"}),Ne={state:S,subscribe(e){return j(S,()=>e(S))},openToast(e,t){S.open=!0,S.message=e,S.variant=t},closeToast(){S.open=!1}};class Ue{constructor(t){this.openModal=F.open,this.closeModal=F.close,this.subscribeModal=F.subscribe,this.setTheme=le.setThemeConfig,le.setThemeConfig(t),$.setConfig(t),this.initUi()}async initUi(){if(typeof window<"u"){await fe(()=>import("./index-BKHg97jM.js"),__vite__mapDeps([0,1,2]),import.meta.url);const t=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",t),I.setIsUiLoaded(!0)}}}const Re=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:Ue},Symbol.toStringTag,{value:"Module"}));export{m as C,ke as E,F as M,I as O,ce as R,le as T,Ne as a,Ie as b,$ as c,Re as i}; diff --git a/app/dist/assets/index-Xo5-yze0.js b/app/dist/assets/index-Xo5-yze0.js new file mode 100644 index 0000000..10d3cbd --- /dev/null +++ b/app/dist/assets/index-Xo5-yze0.js @@ -0,0 +1,3 @@ +import{l as Ve,m as Qe,n as Ze,E as Xe}from"./index-vLeYm_sl.js";import{r as et}from"./sha3-DMa6LAII.js";import{D as Z,g as w,c as j,h as ce,y as tt}from"./hooks.module-hYI_ep3v.js";class _{constructor(e,t){this.scope=e,this.module=t}storeObject(e,t){this.setItem(e,JSON.stringify(t))}loadObject(e){const t=this.getItem(e);return t?JSON.parse(t):void 0}setItem(e,t){localStorage.setItem(this.scopedKey(e),t)}getItem(e){return localStorage.getItem(this.scopedKey(e))}removeItem(e){localStorage.removeItem(this.scopedKey(e))}clear(){const e=this.scopedKey(""),t=[];for(let s=0;slocalStorage.removeItem(s))}scopedKey(e){return`-${this.scope}${this.module?`:${this.module}`:""}:${e}`}static clearAll(){new _("CBWSDK").clear(),new _("walletlink").clear()}}const y={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901,unsupportedChain:4902}},X={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."},4902:{standard:"EIP-3085",message:"Unrecognized chain ID."}},Ae="Unspecified error message.",nt="Unspecified server error.";function se(n,e=Ae){if(n&&Number.isInteger(n)){const t=n.toString();if(ee(X,t))return X[t].message;if(xe(n))return nt}return e}function st(n){if(!Number.isInteger(n))return!1;const e=n.toString();return!!(X[e]||xe(n))}function it(n,{shouldIncludeStack:e=!1}={}){const t={};if(n&&typeof n=="object"&&!Array.isArray(n)&&ee(n,"code")&&st(n.code)){const s=n;t.code=s.code,s.message&&typeof s.message=="string"?(t.message=s.message,ee(s,"data")&&(t.data=s.data)):(t.message=se(t.code),t.data={originalError:de(n)})}else t.code=y.rpc.internal,t.message=le(n,"message")?n.message:Ae,t.data={originalError:de(n)};return e&&(t.stack=le(n,"stack")?n.stack:void 0),t}function xe(n){return n>=-32099&&n<=-32e3}function de(n){return n&&typeof n=="object"&&!Array.isArray(n)?Object.assign({},n):n}function ee(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function le(n,e){return typeof n=="object"&&n!==null&&e in n&&typeof n[e]=="string"}const m={rpc:{parse:n=>S(y.rpc.parse,n),invalidRequest:n=>S(y.rpc.invalidRequest,n),invalidParams:n=>S(y.rpc.invalidParams,n),methodNotFound:n=>S(y.rpc.methodNotFound,n),internal:n=>S(y.rpc.internal,n),server:n=>{if(!n||typeof n!="object"||Array.isArray(n))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=n;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return S(e,n)},invalidInput:n=>S(y.rpc.invalidInput,n),resourceNotFound:n=>S(y.rpc.resourceNotFound,n),resourceUnavailable:n=>S(y.rpc.resourceUnavailable,n),transactionRejected:n=>S(y.rpc.transactionRejected,n),methodNotSupported:n=>S(y.rpc.methodNotSupported,n),limitExceeded:n=>S(y.rpc.limitExceeded,n)},provider:{userRejectedRequest:n=>N(y.provider.userRejectedRequest,n),unauthorized:n=>N(y.provider.unauthorized,n),unsupportedMethod:n=>N(y.provider.unsupportedMethod,n),disconnected:n=>N(y.provider.disconnected,n),chainDisconnected:n=>N(y.provider.chainDisconnected,n),unsupportedChain:n=>N(y.provider.unsupportedChain,n),custom:n=>{if(!n||typeof n!="object"||Array.isArray(n))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:t,data:s}=n;if(!t||typeof t!="string")throw new Error('"message" must be a nonempty string');return new Le(e,t,s)}}};function S(n,e){const[t,s]=Re(e);return new Pe(n,t||se(n),s)}function N(n,e){const[t,s]=Re(e);return new Le(n,t||se(n),s)}function Re(n){if(n){if(typeof n=="string")return[n];if(typeof n=="object"&&!Array.isArray(n)){const{message:e,data:t}=n;if(e&&typeof e!="string")throw new Error("Must specify string message.");return[e||void 0,t]}}return[]}class Pe extends Error{constructor(e,t,s){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||typeof t!="string")throw new Error('"message" must be a nonempty string.');super(t),this.code=e,s!==void 0&&(this.data=s)}}class Le extends Pe{constructor(e,t,s){if(!rt(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,s)}}function rt(n){return Number.isInteger(n)&&n>=1e3&&n<=4999}function ie(){return n=>n}const q=ie(),at=ie(),ot=ie();function A(n){return Math.floor(n)}const Te=/^[0-9]*$/,Ne=/^[a-f0-9]*$/;function T(n){return re(crypto.getRandomValues(new Uint8Array(n)))}function re(n){return[...n].map(e=>e.toString(16).padStart(2,"0")).join("")}function z(n){return new Uint8Array(n.match(/.{1,2}/g).map(e=>Number.parseInt(e,16)))}function U(n,e=!1){const t=n.toString("hex");return q(e?`0x${t}`:t)}function H(n){return U(te(n),!0)}function M(n){return ot(n.toString(10))}function L(n){return q(`0x${BigInt(n).toString(16)}`)}function De(n){return n.startsWith("0x")||n.startsWith("0X")}function ae(n){return De(n)?n.slice(2):n}function Oe(n){return De(n)?`0x${n.slice(2)}`:`0x${n}`}function F(n){if(typeof n!="string")return!1;const e=ae(n).toLowerCase();return Ne.test(e)}function ct(n,e=!1){if(typeof n=="string"){const t=ae(n).toLowerCase();if(Ne.test(t))return q(e?`0x${t}`:t)}throw m.rpc.invalidParams(`"${String(n)}" is not a hexadecimal string`)}function oe(n,e=!1){let t=ct(n,!1);return t.length%2===1&&(t=q(`0${t}`)),e?q(`0x${t}`):t}function P(n){if(typeof n=="string"){const e=ae(n).toLowerCase();if(F(e)&&e.length===40)return at(Oe(e))}throw m.rpc.invalidParams(`Invalid Ethereum address: ${String(n)}`)}function te(n){if(Buffer.isBuffer(n))return n;if(typeof n=="string"){if(F(n)){const e=oe(n,!1);return Buffer.from(e,"hex")}return Buffer.from(n,"utf8")}throw m.rpc.invalidParams(`Not binary data: ${String(n)}`)}function W(n){if(typeof n=="number"&&Number.isInteger(n))return A(n);if(typeof n=="string"){if(Te.test(n))return A(Number(n));if(F(n))return A(Number(BigInt(oe(n,!0))))}throw m.rpc.invalidParams(`Not an integer: ${String(n)}`)}function O(n){if(n!==null&&(typeof n=="bigint"||lt(n)))return BigInt(n.toString(10));if(typeof n=="number")return BigInt(W(n));if(typeof n=="string"){if(Te.test(n))return BigInt(n);if(F(n))return BigInt(oe(n,!0))}throw m.rpc.invalidParams(`Not an integer: ${String(n)}`)}function dt(n){if(typeof n=="string")return JSON.parse(n);if(typeof n=="object")return n;throw m.rpc.invalidParams(`Not a JSON string or an object: ${String(n)}`)}function lt(n){if(n==null||typeof n.constructor!="function")return!1;const{constructor:e}=n;return typeof e.config=="function"&&typeof e.EUCLID=="number"}async function ut(){return crypto.subtle.generateKey({name:"ECDH",namedCurve:"P-256"},!0,["deriveKey"])}async function ht(n,e){return crypto.subtle.deriveKey({name:"ECDH",public:e},n,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}async function ft(n,e){const t=crypto.getRandomValues(new Uint8Array(12)),s=await crypto.subtle.encrypt({name:"AES-GCM",iv:t},n,new TextEncoder().encode(e));return{iv:t,cipherText:s}}async function pt(n,{iv:e,cipherText:t}){const s=await crypto.subtle.decrypt({name:"AES-GCM",iv:e},n,t);return new TextDecoder().decode(s)}function je(n){switch(n){case"public":return"spki";case"private":return"pkcs8"}}async function Ue(n,e){const t=je(n),s=await crypto.subtle.exportKey(t,e);return re(new Uint8Array(s))}async function We(n,e){const t=je(n),s=z(e).buffer;return await crypto.subtle.importKey(t,new Uint8Array(s),{name:"ECDH",namedCurve:"P-256"},!0,n==="private"?["deriveKey"]:[])}async function gt(n,e){const t=JSON.stringify(n,(s,r)=>{if(!(r instanceof Error))return r;const i=r;return Object.assign(Object.assign({},i.code?{code:i.code}:{}),{message:i.message})});return ft(e,t)}async function mt(n,e){return JSON.parse(await pt(e,n))}const G={storageKey:"ownPrivateKey",keyType:"private"},Y={storageKey:"ownPublicKey",keyType:"public"},$={storageKey:"peerPublicKey",keyType:"public"};class bt{constructor(){this.storage=new _("CBWSDK","SCWKeyManager"),this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null}async getOwnPublicKey(){return await this.loadKeysIfNeeded(),this.ownPublicKey}async getSharedSecret(){return await this.loadKeysIfNeeded(),this.sharedSecret}async setPeerPublicKey(e){this.sharedSecret=null,this.peerPublicKey=e,await this.storeKey($,e),await this.loadKeysIfNeeded()}async clear(){this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null,this.storage.removeItem(Y.storageKey),this.storage.removeItem(G.storageKey),this.storage.removeItem($.storageKey)}async generateKeyPair(){const e=await ut();this.ownPrivateKey=e.privateKey,this.ownPublicKey=e.publicKey,await this.storeKey(G,e.privateKey),await this.storeKey(Y,e.publicKey)}async loadKeysIfNeeded(){if(this.ownPrivateKey===null&&(this.ownPrivateKey=await this.loadKey(G)),this.ownPublicKey===null&&(this.ownPublicKey=await this.loadKey(Y)),(this.ownPrivateKey===null||this.ownPublicKey===null)&&await this.generateKeyPair(),this.peerPublicKey===null&&(this.peerPublicKey=await this.loadKey($)),this.sharedSecret===null){if(this.ownPrivateKey===null||this.peerPublicKey===null)return;this.sharedSecret=await ht(this.ownPrivateKey,this.peerPublicKey)}}async loadKey(e){const t=this.storage.getItem(e.storageKey);return t?We(e.keyType,t):null}async storeKey(e,t){const s=await Ue(e.keyType,t);this.storage.setItem(e.storageKey,s)}}const K="4.2.3",qe="@coinbase/wallet-sdk";async function Ke(n,e){const t=Object.assign(Object.assign({},n),{jsonrpc:"2.0",id:crypto.randomUUID()}),s=await window.fetch(e,{method:"POST",body:JSON.stringify(t),mode:"cors",headers:{"Content-Type":"application/json","X-Cbw-Sdk-Version":K,"X-Cbw-Sdk-Platform":qe}}),{result:r,error:i}=await s.json();if(i)throw i;return r}function wt(){return globalThis.coinbaseWalletExtension}function yt(){var n,e;try{const t=globalThis;return(n=t.ethereum)!==null&&n!==void 0?n:(e=t.top)===null||e===void 0?void 0:e.ethereum}catch{return}}function kt({metadata:n,preference:e}){var t,s;const{appName:r,appLogoUrl:i,appChainIds:a}=n;if(e.options!=="smartWalletOnly"){const l=wt();if(l)return(t=l.setAppInfo)===null||t===void 0||t.call(l,r,i,a,e),l}const c=yt();if(c!=null&&c.isCoinbaseBrowser)return(s=c.setAppInfo)===null||s===void 0||s.call(c,r,i,a,e),c}function Et(n){if(!n||typeof n!="object"||Array.isArray(n))throw m.rpc.invalidParams({message:"Expected a single, non-array, object argument.",data:n});const{method:e,params:t}=n;if(typeof e!="string"||e.length===0)throw m.rpc.invalidParams({message:"'args.method' must be a non-empty string.",data:n});if(t!==void 0&&!Array.isArray(t)&&(typeof t!="object"||t===null))throw m.rpc.invalidParams({message:"'args.params' must be an object or array if provided.",data:n});switch(e){case"eth_sign":case"eth_signTypedData_v2":case"eth_subscribe":case"eth_unsubscribe":throw m.provider.unsupportedMethod()}}const ue="accounts",he="activeChain",fe="availableChains",pe="walletCapabilities";class It{constructor(e){var t,s,r;this.metadata=e.metadata,this.communicator=e.communicator,this.callback=e.callback,this.keyManager=new bt,this.storage=new _("CBWSDK","SCWStateManager"),this.accounts=(t=this.storage.loadObject(ue))!==null&&t!==void 0?t:[],this.chain=this.storage.loadObject(he)||{id:(r=(s=e.metadata.appChainIds)===null||s===void 0?void 0:s[0])!==null&&r!==void 0?r:1},this.handshake=this.handshake.bind(this),this.request=this.request.bind(this),this.createRequestMessage=this.createRequestMessage.bind(this),this.decryptResponseMessage=this.decryptResponseMessage.bind(this)}async handshake(e){var t,s;const r=await this.createRequestMessage({handshake:{method:e.method,params:Object.assign({},this.metadata,(t=e.params)!==null&&t!==void 0?t:{})}}),i=await this.communicator.postRequestAndWaitForResponse(r);if("failure"in i.content)throw i.content.failure;const a=await We("public",i.sender);await this.keyManager.setPeerPublicKey(a);const l=(await this.decryptResponseMessage(i)).result;if("error"in l)throw l.error;const h=l.value;this.accounts=h,this.storage.storeObject(ue,h),(s=this.callback)===null||s===void 0||s.call(this,"accountsChanged",h)}async request(e){var t;if(this.accounts.length===0)throw m.provider.unauthorized();switch(e.method){case"eth_requestAccounts":return(t=this.callback)===null||t===void 0||t.call(this,"connect",{chainId:L(this.chain.id)}),this.accounts;case"eth_accounts":return this.accounts;case"eth_coinbase":return this.accounts[0];case"net_version":return this.chain.id;case"eth_chainId":return L(this.chain.id);case"wallet_getCapabilities":return this.storage.loadObject(pe);case"wallet_switchEthereumChain":return this.handleSwitchChainRequest(e);case"eth_ecRecover":case"personal_sign":case"personal_ecRecover":case"eth_signTransaction":case"eth_sendTransaction":case"eth_signTypedData_v1":case"eth_signTypedData_v3":case"eth_signTypedData_v4":case"eth_signTypedData":case"wallet_addEthereumChain":case"wallet_watchAsset":case"wallet_sendCalls":case"wallet_showCallsStatus":case"wallet_grantPermissions":return this.sendRequestToPopup(e);default:if(!this.chain.rpcUrl)throw m.rpc.internal("No RPC URL set for chain");return Ke(e,this.chain.rpcUrl)}}async sendRequestToPopup(e){var t,s;await((s=(t=this.communicator).waitForPopupLoaded)===null||s===void 0?void 0:s.call(t));const r=await this.sendEncryptedRequest(e),a=(await this.decryptResponseMessage(r)).result;if("error"in a)throw a.error;return a.value}async cleanup(){var e,t;this.storage.clear(),await this.keyManager.clear(),this.accounts=[],this.chain={id:(t=(e=this.metadata.appChainIds)===null||e===void 0?void 0:e[0])!==null&&t!==void 0?t:1}}async handleSwitchChainRequest(e){var t;const s=e.params;if(!s||!(!((t=s[0])===null||t===void 0)&&t.chainId))throw m.rpc.invalidParams();const r=W(s[0].chainId);if(this.updateChain(r))return null;const a=await this.sendRequestToPopup(e);return a===null&&this.updateChain(r),a}async sendEncryptedRequest(e){const t=await this.keyManager.getSharedSecret();if(!t)throw m.provider.unauthorized("No valid session found, try requestAccounts before other methods");const s=await gt({action:e,chainId:this.chain.id},t),r=await this.createRequestMessage({encrypted:s});return this.communicator.postRequestAndWaitForResponse(r)}async createRequestMessage(e){const t=await Ue("public",await this.keyManager.getOwnPublicKey());return{id:crypto.randomUUID(),sender:t,content:e,timestamp:new Date}}async decryptResponseMessage(e){var t,s;const r=e.content;if("failure"in r)throw r.failure;const i=await this.keyManager.getSharedSecret();if(!i)throw m.provider.unauthorized("Invalid session");const a=await mt(r.encrypted,i),c=(t=a.data)===null||t===void 0?void 0:t.chains;if(c){const h=Object.entries(c).map(([f,g])=>({id:Number(f),rpcUrl:g}));this.storage.storeObject(fe,h),this.updateChain(this.chain.id,h)}const l=(s=a.data)===null||s===void 0?void 0:s.capabilities;return l&&this.storage.storeObject(pe,l),a}updateChain(e,t){var s;const r=t??this.storage.loadObject(fe),i=r==null?void 0:r.find(a=>a.id===e);return i?(i!==this.chain&&(this.chain=i,this.storage.storeObject(he,i),(s=this.callback)===null||s===void 0||s.call(this,"chainChanged",L(i.id))),!0):!1}}var J,ge;function Be(){if(ge)return J;ge=1;const{keccak_256:n}=et();function e(o){return Buffer.allocUnsafe(o).fill(0)}function t(o){return o.toString(2).length}function s(o,u){let b=o.toString(16);b.length%2!==0&&(b="0"+b);const p=b.match(/.{1,2}/g).map(k=>parseInt(k,16));for(;p.length"u")throw new Error("Not an array?");if(u=r(d),u!=="dynamic"&&u!==0&&o.length>u)throw new Error("Elements exceed array size: "+u);p=[],d=d.slice(0,d.lastIndexOf("[")),typeof o=="string"&&(o=JSON.parse(o));for(k in o)p.push(a(d,o[k]));if(u==="dynamic"){var I=a("uint256",o.length);p.unshift(I)}return Buffer.concat(p)}else{if(d==="bytes")return o=new Buffer(o),p=Buffer.concat([a("uint256",o.length),o]),o.length%32!==0&&(p=Buffer.concat([p,n.zeros(32-o.length%32)])),p;if(d.startsWith("bytes")){if(u=t(d),u<1||u>32)throw new Error("Invalid bytes width: "+u);return n.setLengthRight(o,32)}else if(d.startsWith("uint")){if(u=t(d),u%8||u<8||u>256)throw new Error("Invalid uint width: "+u);b=i(o);const v=n.bitLengthFromBigInt(b);if(v>u)throw new Error("Supplied uint exceeds width: "+u+" vs "+v);if(b<0)throw new Error("Supplied uint is negative");return n.bufferBEFromBigInt(b,32)}else if(d.startsWith("int")){if(u=t(d),u%8||u<8||u>256)throw new Error("Invalid int width: "+u);b=i(o);const v=n.bitLengthFromBigInt(b);if(v>u)throw new Error("Supplied int exceeds width: "+u+" vs "+v);const C=n.twosFromBigInt(b,256);return n.bufferBEFromBigInt(C,32)}else if(d.startsWith("ufixed")){if(u=s(d),b=i(o),b<0)throw new Error("Supplied ufixed is negative");return a("uint256",b*BigInt(2)**BigInt(u[1]))}else if(d.startsWith("fixed"))return u=s(d),a("int256",i(o)*BigInt(2)**BigInt(u[1]))}throw new Error("Unsupported or invalid type: "+d)}function c(d){return d==="string"||d==="bytes"||r(d)==="dynamic"}function l(d){return d.lastIndexOf("]")===d.length-1}function h(d,o){var u=[],b=[],p=32*d.length;for(var k in d){var I=e(d[k]),v=o[k],C=a(I,v);c(I)?(u.push(a("uint256",p)),b.push(C),p+=C.length):u.push(C)}return Buffer.concat(u.concat(b))}function f(d,o){if(d.length!==o.length)throw new Error("Number of types are not matching the values");for(var u,b,p=[],k=0;k32)throw new Error("Invalid bytes width: "+u);p.push(n.setLengthRight(v,u))}else if(I.startsWith("uint")){if(u=t(I),u%8||u<8||u>256)throw new Error("Invalid uint width: "+u);b=i(v);const C=n.bitLengthFromBigInt(b);if(C>u)throw new Error("Supplied uint exceeds width: "+u+" vs "+C);p.push(n.bufferBEFromBigInt(b,u/8))}else if(I.startsWith("int")){if(u=t(I),u%8||u<8||u>256)throw new Error("Invalid int width: "+u);b=i(v);const C=n.bitLengthFromBigInt(b);if(C>u)throw new Error("Supplied int exceeds width: "+u+" vs "+C);const Je=n.twosFromBigInt(b,u);p.push(n.bufferBEFromBigInt(Je,u/8))}else throw new Error("Unsupported or invalid type: "+I)}return Buffer.concat(p)}function g(d,o){return n.keccak(f(d,o))}return V={rawEncode:h,solidityPack:f,soliditySHA3:g},V}var Q,be;function St(){if(be)return Q;be=1;const n=Be(),e=vt(),t={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},s={encodeData(i,a,c,l=!0){const h=["bytes32"],f=[this.hashType(i,c)];if(l){const g=(d,o,u)=>{if(c[o]!==void 0)return["bytes32",u==null?"0x0000000000000000000000000000000000000000000000000000000000000000":n.keccak(this.encodeData(o,u,c,l))];if(u===void 0)throw new Error(`missing value for field ${d} of type ${o}`);if(o==="bytes")return["bytes32",n.keccak(u)];if(o==="string")return typeof u=="string"&&(u=Buffer.from(u,"utf8")),["bytes32",n.keccak(u)];if(o.lastIndexOf("]")===o.length-1){const b=o.slice(0,o.lastIndexOf("[")),p=u.map(k=>g(d,b,k));return["bytes32",n.keccak(e.rawEncode(p.map(([k])=>k),p.map(([,k])=>k)))]}return[o,u]};for(const d of c[i]){const[o,u]=g(d.name,d.type,a[d.name]);h.push(o),f.push(u)}}else for(const g of c[i]){let d=a[g.name];if(d!==void 0)if(g.type==="bytes")h.push("bytes32"),d=n.keccak(d),f.push(d);else if(g.type==="string")h.push("bytes32"),typeof d=="string"&&(d=Buffer.from(d,"utf8")),d=n.keccak(d),f.push(d);else if(c[g.type]!==void 0)h.push("bytes32"),d=n.keccak(this.encodeData(g.type,d,c,l)),f.push(d);else{if(g.type.lastIndexOf("]")===g.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");h.push(g.type),f.push(d)}}return e.rawEncode(h,f)},encodeType(i,a){let c="",l=this.findTypeDependencies(i,a).filter(h=>h!==i);l=[i].concat(l.sort());for(const h of l){if(!a[h])throw new Error("No type definition specified: "+h);c+=h+"("+a[h].map(({name:g,type:d})=>d+" "+g).join(",")+")"}return c},findTypeDependencies(i,a,c=[]){if(i=i.match(/^\w*/)[0],c.includes(i)||a[i]===void 0)return c;c.push(i);for(const l of a[i])for(const h of this.findTypeDependencies(l.type,a,c))!c.includes(h)&&c.push(h);return c},hashStruct(i,a,c,l=!0){return n.keccak(this.encodeData(i,a,c,l))},hashType(i,a){return n.keccak(this.encodeType(i,a))},sanitizeData(i){const a={};for(const c in t.properties)i[c]&&(a[c]=i[c]);return a.types&&(a.types=Object.assign({EIP712Domain:[]},a.types)),a},hash(i,a=!0){const c=this.sanitizeData(i),l=[Buffer.from("1901","hex")];return l.push(this.hashStruct("EIP712Domain",c.domain,c.types,a)),c.primaryType!=="EIP712Domain"&&l.push(this.hashStruct(c.primaryType,c.message,c.types,a)),n.keccak(Buffer.concat(l))}};Q={TYPED_MESSAGE_SCHEMA:t,TypedDataUtils:s,hashForSignTypedDataLegacy:function(i){return r(i.data)},hashForSignTypedData_v3:function(i){return s.hash(i.data,!1)},hashForSignTypedData_v4:function(i){return s.hash(i.data)}};function r(i){const a=new Error("Expect argument to be non-empty array");if(typeof i!="object"||!i.length)throw a;const c=i.map(function(f){return f.type==="bytes"?n.toBuffer(f.value):f.value}),l=i.map(function(f){return f.type}),h=i.map(function(f){if(!f.name)throw a;return f.type+" "+f.name});return e.soliditySHA3(["bytes32","bytes32"],[e.soliditySHA3(new Array(i.length).fill("string"),h),e.soliditySHA3(l,c)])}return Q}var Ct=St();const B=Ve(Ct),Mt="walletUsername",ne="Addresses",_t="AppVersion";function E(n){return n.errorMessage!==void 0}class At{constructor(e){this.secret=e}async encrypt(e){const t=this.secret;if(t.length!==64)throw Error("secret must be 256 bits");const s=crypto.getRandomValues(new Uint8Array(12)),r=await crypto.subtle.importKey("raw",z(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]),i=new TextEncoder,a=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:s},r,i.encode(e)),c=16,l=a.slice(a.byteLength-c),h=a.slice(0,a.byteLength-c),f=new Uint8Array(l),g=new Uint8Array(h),d=new Uint8Array([...s,...f,...g]);return re(d)}async decrypt(e){const t=this.secret;if(t.length!==64)throw Error("secret must be 256 bits");return new Promise((s,r)=>{(async function(){const i=await crypto.subtle.importKey("raw",z(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]),a=z(e),c=a.slice(0,12),l=a.slice(12,28),h=a.slice(28),f=new Uint8Array([...h,...l]),g={name:"AES-GCM",iv:new Uint8Array(c)};try{const d=await window.crypto.subtle.decrypt(g,i,f),o=new TextDecoder;s(o.decode(d))}catch(d){r(d)}})()})}}class xt{constructor(e,t,s){this.linkAPIUrl=e,this.sessionId=t;const r=`${t}:${s}`;this.auth=`Basic ${btoa(r)}`}async markUnseenEventsAsSeen(e){return Promise.all(e.map(t=>fetch(`${this.linkAPIUrl}/events/${t.eventId}/seen`,{method:"POST",headers:{Authorization:this.auth}}))).catch(t=>console.error("Unabled to mark event as failed:",t))}async fetchUnseenEvents(){var e;const t=await fetch(`${this.linkAPIUrl}/events?unseen=true`,{headers:{Authorization:this.auth}});if(t.ok){const{events:s,error:r}=await t.json();if(r)throw new Error(`Check unseen events failed: ${r}`);const i=(e=s==null?void 0:s.filter(a=>a.event==="Web3Response").map(a=>({type:"Event",sessionId:this.sessionId,eventId:a.id,event:a.event,data:a.data})))!==null&&e!==void 0?e:[];return this.markUnseenEventsAsSeen(i),i}throw new Error(`Check unseen events failed: ${t.status}`)}}var R;(function(n){n[n.DISCONNECTED=0]="DISCONNECTED",n[n.CONNECTING=1]="CONNECTING",n[n.CONNECTED=2]="CONNECTED"})(R||(R={}));class Rt{setConnectionStateListener(e){this.connectionStateListener=e}setIncomingDataListener(e){this.incomingDataListener=e}constructor(e,t=WebSocket){this.WebSocketClass=t,this.webSocket=null,this.pendingData=[],this.url=e.replace(/^http/,"ws")}async connect(){if(this.webSocket)throw new Error("webSocket object is not null");return new Promise((e,t)=>{var s;let r;try{this.webSocket=r=new this.WebSocketClass(this.url)}catch(i){t(i);return}(s=this.connectionStateListener)===null||s===void 0||s.call(this,R.CONNECTING),r.onclose=i=>{var a;this.clearWebSocket(),t(new Error(`websocket error ${i.code}: ${i.reason}`)),(a=this.connectionStateListener)===null||a===void 0||a.call(this,R.DISCONNECTED)},r.onopen=i=>{var a;e(),(a=this.connectionStateListener)===null||a===void 0||a.call(this,R.CONNECTED),this.pendingData.length>0&&([...this.pendingData].forEach(l=>this.sendData(l)),this.pendingData=[])},r.onmessage=i=>{var a,c;if(i.data==="h")(a=this.incomingDataListener)===null||a===void 0||a.call(this,{type:"Heartbeat"});else try{const l=JSON.parse(i.data);(c=this.incomingDataListener)===null||c===void 0||c.call(this,l)}catch{}}})}disconnect(){var e;const{webSocket:t}=this;if(t){this.clearWebSocket(),(e=this.connectionStateListener)===null||e===void 0||e.call(this,R.DISCONNECTED),this.connectionStateListener=void 0,this.incomingDataListener=void 0;try{t.close()}catch{}}}sendData(e){const{webSocket:t}=this;if(!t){this.pendingData.push(e),this.connect();return}t.send(e)}clearWebSocket(){const{webSocket:e}=this;e&&(this.webSocket=null,e.onclose=null,e.onerror=null,e.onmessage=null,e.onopen=null)}}const we=1e4,Pt=6e4;class Lt{constructor({session:e,linkAPIUrl:t,listener:s}){this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=A(1),this._connected=!1,this._linked=!1,this.shouldFetchUnseenEventsOnConnect=!1,this.requestResolutions=new Map,this.handleSessionMetadataUpdated=i=>{if(!i)return;new Map([["__destroyed",this.handleDestroyed],["EthereumAddress",this.handleAccountUpdated],["WalletUsername",this.handleWalletUsernameUpdated],["AppVersion",this.handleAppVersionUpdated],["ChainId",c=>i.JsonRpcUrl&&this.handleChainUpdated(c,i.JsonRpcUrl)]]).forEach((c,l)=>{const h=i[l];h!==void 0&&c(h)})},this.handleDestroyed=i=>{var a;i==="1"&&((a=this.listener)===null||a===void 0||a.resetAndReload())},this.handleAccountUpdated=async i=>{var a;const c=await this.cipher.decrypt(i);(a=this.listener)===null||a===void 0||a.accountUpdated(c)},this.handleMetadataUpdated=async(i,a)=>{var c;const l=await this.cipher.decrypt(a);(c=this.listener)===null||c===void 0||c.metadataUpdated(i,l)},this.handleWalletUsernameUpdated=async i=>{this.handleMetadataUpdated(Mt,i)},this.handleAppVersionUpdated=async i=>{this.handleMetadataUpdated(_t,i)},this.handleChainUpdated=async(i,a)=>{var c;const l=await this.cipher.decrypt(i),h=await this.cipher.decrypt(a);(c=this.listener)===null||c===void 0||c.chainUpdated(l,h)},this.session=e,this.cipher=new At(e.secret),this.listener=s;const r=new Rt(`${t}/rpc`,WebSocket);r.setConnectionStateListener(async i=>{let a=!1;switch(i){case R.DISCONNECTED:if(!this.destroyed){const c=async()=>{await new Promise(l=>setTimeout(l,5e3)),this.destroyed||r.connect().catch(()=>{c()})};c()}break;case R.CONNECTED:a=await this.handleConnected(),this.updateLastHeartbeat(),setInterval(()=>{this.heartbeat()},we),this.shouldFetchUnseenEventsOnConnect&&this.fetchUnseenEventsAPI();break;case R.CONNECTING:break}this.connected!==a&&(this.connected=a)}),r.setIncomingDataListener(i=>{var a;switch(i.type){case"Heartbeat":this.updateLastHeartbeat();return;case"IsLinkedOK":case"Linked":{const c=i.type==="IsLinkedOK"?i.linked:void 0;this.linked=c||i.onlineGuests>0;break}case"GetSessionConfigOK":case"SessionConfigUpdated":{this.handleSessionMetadataUpdated(i.metadata);break}case"Event":{this.handleIncomingEvent(i);break}}i.id!==void 0&&((a=this.requestResolutions.get(i.id))===null||a===void 0||a(i))}),this.ws=r,this.http=new xt(t,e.id,e.key)}connect(){if(this.destroyed)throw new Error("instance is destroyed");this.ws.connect()}async destroy(){this.destroyed||(await this.makeRequest({type:"SetSessionConfig",id:A(this.nextReqId++),sessionId:this.session.id,metadata:{__destroyed:"1"}},{timeout:1e3}),this.destroyed=!0,this.ws.disconnect(),this.listener=void 0)}get connected(){return this._connected}set connected(e){this._connected=e}get linked(){return this._linked}set linked(e){var t,s;this._linked=e,e&&((t=this.onceLinked)===null||t===void 0||t.call(this)),(s=this.listener)===null||s===void 0||s.linkedUpdated(e)}setOnceLinked(e){return new Promise(t=>{this.linked?e().then(t):this.onceLinked=()=>{e().then(t),this.onceLinked=void 0}})}async handleIncomingEvent(e){var t;if(e.type!=="Event"||e.event!=="Web3Response")return;const s=await this.cipher.decrypt(e.data),r=JSON.parse(s);if(r.type!=="WEB3_RESPONSE")return;const{id:i,response:a}=r;(t=this.listener)===null||t===void 0||t.handleWeb3ResponseMessage(i,a)}async checkUnseenEvents(){if(!this.connected){this.shouldFetchUnseenEventsOnConnect=!0;return}await new Promise(e=>setTimeout(e,250));try{await this.fetchUnseenEventsAPI()}catch(e){console.error("Unable to check for unseen events",e)}}async fetchUnseenEventsAPI(){this.shouldFetchUnseenEventsOnConnect=!1,(await this.http.fetchUnseenEvents()).forEach(t=>this.handleIncomingEvent(t))}async publishEvent(e,t,s=!1){const r=await this.cipher.encrypt(JSON.stringify(Object.assign(Object.assign({},t),{origin:location.origin,relaySource:"coinbaseWalletExtension"in window&&window.coinbaseWalletExtension?"injected_sdk":"sdk"}))),i={type:"PublishEvent",id:A(this.nextReqId++),sessionId:this.session.id,event:e,data:r,callWebhook:s};return this.setOnceLinked(async()=>{const a=await this.makeRequest(i);if(a.type==="Fail")throw new Error(a.error||"failed to publish event");return a.eventId})}sendData(e){this.ws.sendData(JSON.stringify(e))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>we*2){this.ws.disconnect();return}try{this.ws.sendData("h")}catch{}}async makeRequest(e,t={timeout:Pt}){const s=e.id;this.sendData(e);let r;return Promise.race([new Promise((i,a)=>{r=window.setTimeout(()=>{a(new Error(`request ${s} timed out`))},t.timeout)}),new Promise(i=>{this.requestResolutions.set(s,a=>{clearTimeout(r),i(a),this.requestResolutions.delete(s)})})])}async handleConnected(){return(await this.makeRequest({type:"HostSession",id:A(this.nextReqId++),sessionId:this.session.id,sessionKey:this.session.key})).type==="Fail"?!1:(this.sendData({type:"IsLinked",id:A(this.nextReqId++),sessionId:this.session.id}),this.sendData({type:"GetSessionConfig",id:A(this.nextReqId++),sessionId:this.session.id}),!0)}}class Tt{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%2147483647;const e=this._nextRequestId,t=Oe(e.toString(16));return this.callbacks.get(t)&&this.callbacks.delete(t),e}}const ye="session:id",ke="session:secret",Ee="session:linked";class D{constructor(e,t,s,r=!1){this.storage=e,this.id=t,this.secret=s,this.key=Qe(Ze(`${t}, ${s} WalletLink`)),this._linked=!!r}static create(e){const t=T(16),s=T(32);return new D(e,t,s).save()}static load(e){const t=e.getItem(ye),s=e.getItem(Ee),r=e.getItem(ke);return t&&r?new D(e,t,r,s==="1"):null}get linked(){return this._linked}set linked(e){this._linked=e,this.persistLinked()}save(){return this.storage.setItem(ye,this.id),this.storage.setItem(ke,this.secret),this.persistLinked(),this}persistLinked(){this.storage.setItem(Ee,this._linked?"1":"0")}}function Nt(){try{return window.frameElement!==null}catch{return!1}}function Dt(){try{return Nt()&&window.top?window.top.location:window.location}catch{return window.location}}function Ot(){var n;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test((n=window==null?void 0:window.navigator)===null||n===void 0?void 0:n.userAgent)}function ze(){var n,e;return(e=(n=window==null?void 0:window.matchMedia)===null||n===void 0?void 0:n.call(window,"(prefers-color-scheme: dark)").matches)!==null&&e!==void 0?e:!1}const jt='@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;counter-increment:none;counter-reset:none;direction:ltr;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}';function Fe(){const n=document.createElement("style");n.type="text/css",n.appendChild(document.createTextNode(jt)),document.documentElement.appendChild(n)}const Ut=".-cbwsdk-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-expanded .-cbwsdk-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}",Wt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",qt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=";class Kt{constructor(){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=ze()}attach(e){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",e.appendChild(this.root),this.render()}presentItem(e){const t=this.nextItemKey++;return this.items.set(t,e),this.render(),()=>{this.items.delete(t),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&Z(w("div",null,w(He,{darkMode:this.darkMode},Array.from(this.items.entries()).map(([e,t])=>w(Bt,Object.assign({},t,{key:e}))))),this.root)}}const He=n=>w("div",{class:j("-cbwsdk-snackbar-container")},w("style",null,Ut),w("div",{class:"-cbwsdk-snackbar"},n.children)),Bt=({autoExpand:n,message:e,menuItems:t})=>{const[s,r]=ce(!0),[i,a]=ce(n??!1);tt(()=>{const l=[window.setTimeout(()=>{r(!1)},1),window.setTimeout(()=>{a(!0)},1e4)];return()=>{l.forEach(window.clearTimeout)}});const c=()=>{a(!i)};return w("div",{class:j("-cbwsdk-snackbar-instance",s&&"-cbwsdk-snackbar-instance-hidden",i&&"-cbwsdk-snackbar-instance-expanded")},w("div",{class:"-cbwsdk-snackbar-instance-header",onClick:c},w("img",{src:Wt,class:"-cbwsdk-snackbar-instance-header-cblogo"})," ",w("div",{class:"-cbwsdk-snackbar-instance-header-message"},e),w("div",{class:"-gear-container"},!i&&w("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),w("img",{src:qt,class:"-gear-icon",title:"Expand"}))),t&&t.length>0&&w("div",{class:"-cbwsdk-snackbar-instance-menu"},t.map((l,h)=>w("div",{class:j("-cbwsdk-snackbar-instance-menu-item",l.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:l.onClick,key:h},w("svg",{width:l.svgWidth,height:l.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w("path",{"fill-rule":l.defaultFillRule,"clip-rule":l.defaultClipRule,d:l.path,fill:"#AAAAAA"})),w("span",{class:j("-cbwsdk-snackbar-instance-menu-item-info",l.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},l.info)))))};class zt{constructor(){this.attached=!1,this.snackbar=new Kt}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");const e=document.documentElement,t=document.createElement("div");t.className="-cbwsdk-css-reset",e.appendChild(t),this.snackbar.attach(t),this.attached=!0,Fe()}showConnecting(e){let t;return e.isUnlinkedErrorState?t={autoExpand:!0,message:"Connection lost",menuItems:[{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]}:t={message:"Confirm on phone",menuItems:[{isRed:!0,info:"Cancel transaction",svgWidth:"11",svgHeight:"11",path:"M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z",defaultFillRule:"inherit",defaultClipRule:"inherit",onClick:e.onCancel},{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]},this.snackbar.presentItem(t)}}const Ft=".-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s;background-color:rgba(10,11,13,.5)}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box{display:block;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);padding:20px;border-radius:8px;background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box p{display:block;font-weight:400;font-size:14px;line-height:20px;padding-bottom:12px;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box button{appearance:none;border:none;background:none;color:#0052ff;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark{background-color:#0a0b0d;color:#fff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark button{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light{background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light button{color:#0052ff}";class Ht{constructor(){this.root=null,this.darkMode=ze()}attach(){const e=document.documentElement;this.root=document.createElement("div"),this.root.className="-cbwsdk-css-reset",e.appendChild(this.root),Fe()}present(e){this.render(e)}clear(){this.render(null)}render(e){this.root&&(Z(null,this.root),e&&Z(w(Gt,Object.assign({},e,{onDismiss:()=>{this.clear()},darkMode:this.darkMode})),this.root))}}const Gt=({title:n,buttonText:e,darkMode:t,onButtonClick:s,onDismiss:r})=>{const i=t?"dark":"light";return w(He,{darkMode:t},w("div",{class:"-cbwsdk-redirect-dialog"},w("style",null,Ft),w("div",{class:"-cbwsdk-redirect-dialog-backdrop",onClick:r}),w("div",{class:j("-cbwsdk-redirect-dialog-box",i)},w("p",null,n),w("button",{onClick:s},e))))},Yt="https://keys.coinbase.com/connect",Ie="https://www.walletlink.org",$t="https://go.cb-w.com/walletlink";class ve{constructor(){this.attached=!1,this.redirectDialog=new Ht}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");this.redirectDialog.attach(),this.attached=!0}redirectToCoinbaseWallet(e){const t=new URL($t);t.searchParams.append("redirect_url",Dt().href),e&&t.searchParams.append("wl_url",e);const s=document.createElement("a");s.target="cbw-opener",s.href=t.href,s.rel="noreferrer noopener",s.click()}openCoinbaseWalletDeeplink(e){this.redirectDialog.present({title:"Redirecting to Coinbase Wallet...",buttonText:"Open",onButtonClick:()=>{this.redirectToCoinbaseWallet(e)}}),setTimeout(()=>{this.redirectToCoinbaseWallet(e)},99)}showConnecting(e){return()=>{this.redirectDialog.clear()}}}class x{constructor(e){this.chainCallbackParams={chainId:"",jsonRpcUrl:""},this.isMobileWeb=Ot(),this.linkedUpdated=i=>{this.isLinked=i;const a=this.storage.getItem(ne);if(i&&(this._session.linked=i),this.isUnlinkedErrorState=!1,a){const c=a.split(" "),l=this.storage.getItem("IsStandaloneSigning")==="true";c[0]!==""&&!i&&this._session.linked&&!l&&(this.isUnlinkedErrorState=!0)}},this.metadataUpdated=(i,a)=>{this.storage.setItem(i,a)},this.chainUpdated=(i,a)=>{this.chainCallbackParams.chainId===i&&this.chainCallbackParams.jsonRpcUrl===a||(this.chainCallbackParams={chainId:i,jsonRpcUrl:a},this.chainCallback&&this.chainCallback(a,Number.parseInt(i,10)))},this.accountUpdated=i=>{this.accountsCallback&&this.accountsCallback([i]),x.accountRequestCallbackIds.size>0&&(Array.from(x.accountRequestCallbackIds.values()).forEach(a=>{this.invokeCallback(a,{method:"requestEthereumAccounts",result:[i]})}),x.accountRequestCallbackIds.clear())},this.resetAndReload=this.resetAndReload.bind(this),this.linkAPIUrl=e.linkAPIUrl,this.storage=e.storage,this.metadata=e.metadata,this.accountsCallback=e.accountsCallback,this.chainCallback=e.chainCallback;const{session:t,ui:s,connection:r}=this.subscribe();this._session=t,this.connection=r,this.relayEventManager=new Tt,this.ui=s,this.ui.attach()}subscribe(){const e=D.load(this.storage)||D.create(this.storage),{linkAPIUrl:t}=this,s=new Lt({session:e,linkAPIUrl:t,listener:this}),r=this.isMobileWeb?new ve:new zt;return s.connect(),{session:e,ui:r,connection:s}}resetAndReload(){this.connection.destroy().then(()=>{const e=D.load(this.storage);(e==null?void 0:e.id)===this._session.id&&_.clearAll(),document.location.reload()}).catch(e=>{})}signEthereumTransaction(e){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:M(e.weiValue),data:U(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?M(e.gasPriceInWei):null,maxFeePerGas:e.gasPriceInWei?M(e.gasPriceInWei):null,maxPriorityFeePerGas:e.gasPriceInWei?M(e.gasPriceInWei):null,gasLimit:e.gasLimit?M(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(e){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:M(e.weiValue),data:U(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?M(e.gasPriceInWei):null,maxFeePerGas:e.maxFeePerGas?M(e.maxFeePerGas):null,maxPriorityFeePerGas:e.maxPriorityFeePerGas?M(e.maxPriorityFeePerGas):null,gasLimit:e.gasLimit?M(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!0}})}submitEthereumTransaction(e,t){return this.sendRequest({method:"submitEthereumTransaction",params:{signedTransaction:U(e,!0),chainId:t}})}getWalletLinkSession(){return this._session}sendRequest(e){let t=null;const s=T(8),r=i=>{this.publishWeb3RequestCanceledEvent(s),this.handleErrorResponse(s,e.method,i),t==null||t()};return new Promise((i,a)=>{t=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:r,onResetConnection:this.resetAndReload}),this.relayEventManager.callbacks.set(s,c=>{if(t==null||t(),E(c))return a(new Error(c.errorMessage));i(c)}),this.publishWeb3RequestEvent(s,e)})}publishWeb3RequestEvent(e,t){const s={type:"WEB3_REQUEST",id:e,request:t};this.publishEvent("Web3Request",s,!0).then(r=>{}).catch(r=>{this.handleWeb3ResponseMessage(s.id,{method:t.method,errorMessage:r.message})}),this.isMobileWeb&&this.openCoinbaseWalletDeeplink(t.method)}openCoinbaseWalletDeeplink(e){if(this.ui instanceof ve)switch(e){case"requestEthereumAccounts":case"switchEthereumChain":return;default:window.addEventListener("blur",()=>{window.addEventListener("focus",()=>{this.connection.checkUnseenEvents()},{once:!0})},{once:!0}),this.ui.openCoinbaseWalletDeeplink();break}}publishWeb3RequestCanceledEvent(e){const t={type:"WEB3_REQUEST_CANCELED",id:e};this.publishEvent("Web3RequestCanceled",t,!1).then()}publishEvent(e,t,s){return this.connection.publishEvent(e,t,s)}handleWeb3ResponseMessage(e,t){if(t.method==="requestEthereumAccounts"){x.accountRequestCallbackIds.forEach(s=>this.invokeCallback(s,t)),x.accountRequestCallbackIds.clear();return}this.invokeCallback(e,t)}handleErrorResponse(e,t,s){var r;const i=(r=s==null?void 0:s.message)!==null&&r!==void 0?r:"Unspecified error message.";this.handleWeb3ResponseMessage(e,{method:t,errorMessage:i})}invokeCallback(e,t){const s=this.relayEventManager.callbacks.get(e);s&&(s(t),this.relayEventManager.callbacks.delete(e))}requestEthereumAccounts(){const{appName:e,appLogoUrl:t}=this.metadata,s={method:"requestEthereumAccounts",params:{appName:e,appLogoUrl:t}},r=T(8);return new Promise((i,a)=>{this.relayEventManager.callbacks.set(r,c=>{if(E(c))return a(new Error(c.errorMessage));i(c)}),x.accountRequestCallbackIds.add(r),this.publishWeb3RequestEvent(r,s)})}watchAsset(e,t,s,r,i,a){const c={method:"watchAsset",params:{type:e,options:{address:t,symbol:s,decimals:r,image:i},chainId:a}};let l=null;const h=T(8),f=g=>{this.publishWeb3RequestCanceledEvent(h),this.handleErrorResponse(h,c.method,g),l==null||l()};return l=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:f,onResetConnection:this.resetAndReload}),new Promise((g,d)=>{this.relayEventManager.callbacks.set(h,o=>{if(l==null||l(),E(o))return d(new Error(o.errorMessage));g(o)}),this.publishWeb3RequestEvent(h,c)})}addEthereumChain(e,t,s,r,i,a){const c={method:"addEthereumChain",params:{chainId:e,rpcUrls:t,blockExplorerUrls:r,chainName:i,iconUrls:s,nativeCurrency:a}};let l=null;const h=T(8),f=g=>{this.publishWeb3RequestCanceledEvent(h),this.handleErrorResponse(h,c.method,g),l==null||l()};return l=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:f,onResetConnection:this.resetAndReload}),new Promise((g,d)=>{this.relayEventManager.callbacks.set(h,o=>{if(l==null||l(),E(o))return d(new Error(o.errorMessage));g(o)}),this.publishWeb3RequestEvent(h,c)})}switchEthereumChain(e,t){const s={method:"switchEthereumChain",params:Object.assign({chainId:e},{address:t})};let r=null;const i=T(8),a=c=>{this.publishWeb3RequestCanceledEvent(i),this.handleErrorResponse(i,s.method,c),r==null||r()};return r=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:a,onResetConnection:this.resetAndReload}),new Promise((c,l)=>{this.relayEventManager.callbacks.set(i,h=>{if(r==null||r(),E(h)&&h.errorCode)return l(m.provider.custom({code:h.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."}));if(E(h))return l(new Error(h.errorMessage));c(h)}),this.publishWeb3RequestEvent(i,s)})}}x.accountRequestCallbackIds=new Set;const Se="DefaultChainId",Ce="DefaultJsonRpcUrl";class Ge{constructor(e){this._relay=null,this._addresses=[],this.metadata=e.metadata,this._storage=new _("walletlink",Ie),this.callback=e.callback||null;const t=this._storage.getItem(ne);if(t){const s=t.split(" ");s[0]!==""&&(this._addresses=s.map(r=>P(r)))}this.initializeRelay()}getSession(){const e=this.initializeRelay(),{id:t,secret:s}=e.getWalletLinkSession();return{id:t,secret:s}}async handshake(){await this._eth_requestAccounts()}get selectedAddress(){return this._addresses[0]||void 0}get jsonRpcUrl(){var e;return(e=this._storage.getItem(Ce))!==null&&e!==void 0?e:void 0}set jsonRpcUrl(e){this._storage.setItem(Ce,e)}updateProviderInfo(e,t){var s;this.jsonRpcUrl=e;const r=this.getChainId();this._storage.setItem(Se,t.toString(10)),W(t)!==r&&((s=this.callback)===null||s===void 0||s.call(this,"chainChanged",L(t)))}async watchAsset(e){const t=Array.isArray(e)?e[0]:e;if(!t.type)throw m.rpc.invalidParams("Type is required");if((t==null?void 0:t.type)!=="ERC20")throw m.rpc.invalidParams(`Asset of type '${t.type}' is not supported`);if(!(t!=null&&t.options))throw m.rpc.invalidParams("Options are required");if(!(t!=null&&t.options.address))throw m.rpc.invalidParams("Address is required");const s=this.getChainId(),{address:r,symbol:i,image:a,decimals:c}=t.options,h=await this.initializeRelay().watchAsset(t.type,r,i,c,a,s==null?void 0:s.toString());return E(h)?!1:!!h.result}async addEthereumChain(e){var t,s;const r=e[0];if(((t=r.rpcUrls)===null||t===void 0?void 0:t.length)===0)throw m.rpc.invalidParams("please pass in at least 1 rpcUrl");if(!r.chainName||r.chainName.trim()==="")throw m.rpc.invalidParams("chainName is a required field");if(!r.nativeCurrency)throw m.rpc.invalidParams("nativeCurrency is a required field");const i=Number.parseInt(r.chainId,16);if(i===this.getChainId())return!1;const a=this.initializeRelay(),{rpcUrls:c=[],blockExplorerUrls:l=[],chainName:h,iconUrls:f=[],nativeCurrency:g}=r,d=await a.addEthereumChain(i.toString(),c,f,l,h,g);if(E(d))return!1;if(((s=d.result)===null||s===void 0?void 0:s.isApproved)===!0)return this.updateProviderInfo(c[0],i),null;throw m.rpc.internal("unable to add ethereum chain")}async switchEthereumChain(e){const t=e[0],s=Number.parseInt(t.chainId,16),i=await this.initializeRelay().switchEthereumChain(s.toString(10),this.selectedAddress||void 0);if(E(i))throw i;const a=i.result;return a.isApproved&&a.rpcUrl.length>0&&this.updateProviderInfo(a.rpcUrl,s),null}async cleanup(){this.callback=null,this._relay&&this._relay.resetAndReload(),this._storage.clear()}_setAddresses(e,t){var s;if(!Array.isArray(e))throw new Error("addresses is not an array");const r=e.map(i=>P(i));JSON.stringify(r)!==JSON.stringify(this._addresses)&&(this._addresses=r,(s=this.callback)===null||s===void 0||s.call(this,"accountsChanged",r),this._storage.setItem(ne,r.join(" ")))}async request(e){const t=e.params||[];switch(e.method){case"eth_accounts":return[...this._addresses];case"eth_coinbase":return this.selectedAddress||null;case"net_version":return this.getChainId().toString(10);case"eth_chainId":return L(this.getChainId());case"eth_requestAccounts":return this._eth_requestAccounts();case"eth_ecRecover":case"personal_ecRecover":return this.ecRecover(e);case"personal_sign":return this.personalSign(e);case"eth_signTransaction":return this._eth_signTransaction(t);case"eth_sendRawTransaction":return this._eth_sendRawTransaction(t);case"eth_sendTransaction":return this._eth_sendTransaction(t);case"eth_signTypedData_v1":case"eth_signTypedData_v3":case"eth_signTypedData_v4":case"eth_signTypedData":return this.signTypedData(e);case"wallet_addEthereumChain":return this.addEthereumChain(t);case"wallet_switchEthereumChain":return this.switchEthereumChain(t);case"wallet_watchAsset":return this.watchAsset(t);default:if(!this.jsonRpcUrl)throw m.rpc.internal("No RPC URL set for chain");return Ke(e,this.jsonRpcUrl)}}_ensureKnownAddress(e){const t=P(e);if(!this._addresses.map(r=>P(r)).includes(t))throw new Error("Unknown Ethereum address")}_prepareTransactionParams(e){const t=e.from?P(e.from):this.selectedAddress;if(!t)throw new Error("Ethereum address is unavailable");this._ensureKnownAddress(t);const s=e.to?P(e.to):null,r=e.value!=null?O(e.value):BigInt(0),i=e.data?te(e.data):Buffer.alloc(0),a=e.nonce!=null?W(e.nonce):null,c=e.gasPrice!=null?O(e.gasPrice):null,l=e.maxFeePerGas!=null?O(e.maxFeePerGas):null,h=e.maxPriorityFeePerGas!=null?O(e.maxPriorityFeePerGas):null,f=e.gas!=null?O(e.gas):null,g=e.chainId?W(e.chainId):this.getChainId();return{fromAddress:t,toAddress:s,weiValue:r,data:i,nonce:a,gasPriceInWei:c,maxFeePerGas:l,maxPriorityFeePerGas:h,gasLimit:f,chainId:g}}async ecRecover(e){const{method:t,params:s}=e;if(!Array.isArray(s))throw m.rpc.invalidParams();const i=await this.initializeRelay().sendRequest({method:"ethereumAddressFromSignedMessage",params:{message:H(s[0]),signature:H(s[1]),addPrefix:t==="personal_ecRecover"}});if(E(i))throw i;return i.result}getChainId(){var e;return Number.parseInt((e=this._storage.getItem(Se))!==null&&e!==void 0?e:"1",10)}async _eth_requestAccounts(){var e,t;if(this._addresses.length>0)return(e=this.callback)===null||e===void 0||e.call(this,"connect",{chainId:L(this.getChainId())}),this._addresses;const r=await this.initializeRelay().requestEthereumAccounts();if(E(r))throw r;if(!r.result)throw new Error("accounts received is empty");return this._setAddresses(r.result),(t=this.callback)===null||t===void 0||t.call(this,"connect",{chainId:L(this.getChainId())}),this._addresses}async personalSign({params:e}){if(!Array.isArray(e))throw m.rpc.invalidParams();const t=e[1],s=e[0];this._ensureKnownAddress(t);const i=await this.initializeRelay().sendRequest({method:"signEthereumMessage",params:{address:P(t),message:H(s),addPrefix:!0,typedDataJson:null}});if(E(i))throw i;return i.result}async _eth_signTransaction(e){const t=this._prepareTransactionParams(e[0]||{}),r=await this.initializeRelay().signEthereumTransaction(t);if(E(r))throw r;return r.result}async _eth_sendRawTransaction(e){const t=te(e[0]),r=await this.initializeRelay().submitEthereumTransaction(t,this.getChainId());if(E(r))throw r;return r.result}async _eth_sendTransaction(e){const t=this._prepareTransactionParams(e[0]||{}),r=await this.initializeRelay().signAndSubmitEthereumTransaction(t);if(E(r))throw r;return r.result}async signTypedData(e){const{method:t,params:s}=e;if(!Array.isArray(s))throw m.rpc.invalidParams();const r=h=>{const f={eth_signTypedData_v1:B.hashForSignTypedDataLegacy,eth_signTypedData_v3:B.hashForSignTypedData_v3,eth_signTypedData_v4:B.hashForSignTypedData_v4,eth_signTypedData:B.hashForSignTypedData_v4};return U(f[t]({data:dt(h)}),!0)},i=s[t==="eth_signTypedData_v1"?1:0],a=s[t==="eth_signTypedData_v1"?0:1];this._ensureKnownAddress(i);const l=await this.initializeRelay().sendRequest({method:"signEthereumMessage",params:{address:P(i),message:r(a),typedDataJson:JSON.stringify(a,null,2),addPrefix:!1}});if(E(l))throw l;return l.result}initializeRelay(){return this._relay||(this._relay=new x({linkAPIUrl:Ie,storage:this._storage,metadata:this.metadata,accountsCallback:this._setAddresses.bind(this),chainCallback:this.updateProviderInfo.bind(this)})),this._relay}}const Ye="SignerType",$e=new _("CBWSDK","SignerConfigurator");function Jt(){return $e.getItem(Ye)}function Vt(n){$e.setItem(Ye,n)}async function Qt(n){const{communicator:e,metadata:t,handshakeRequest:s,callback:r}=n;Xt(e,t,r).catch(()=>{});const i={id:crypto.randomUUID(),event:"selectSignerType",data:Object.assign(Object.assign({},n.preference),{handshakeRequest:s})},{data:a}=await e.postRequestAndWaitForResponse(i);return a}function Zt(n){const{signerType:e,metadata:t,communicator:s,callback:r}=n;switch(e){case"scw":return new It({metadata:t,callback:r,communicator:s});case"walletlink":return new Ge({metadata:t,callback:r})}}async function Xt(n,e,t){await n.onMessage(({event:r})=>r==="WalletLinkSessionRequest");const s=new Ge({metadata:e,callback:t});n.postMessage({event:"WalletLinkUpdate",data:{session:s.getSession()}}),await s.handshake(),n.postMessage({event:"WalletLinkUpdate",data:{connected:!0}})}const en=`Coinbase Wallet SDK requires the Cross-Origin-Opener-Policy header to not be set to 'same-origin'. This is to ensure that the SDK can communicate with the Coinbase Smart Wallet app. + +Please see https://www.smartwallet.dev/guides/tips/popup-tips#cross-origin-opener-policy for more information.`,tn=()=>{let n;return{getCrossOriginOpenerPolicy:()=>n===void 0?"undefined":n,checkCrossOriginOpenerPolicy:async()=>{if(typeof window>"u"){n="non-browser-env";return}try{const e=`${window.location.origin}${window.location.pathname}`,t=await fetch(e,{method:"HEAD"});if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);const s=t.headers.get("Cross-Origin-Opener-Policy");n=s??"null",n==="same-origin"&&console.error(en)}catch(e){console.error("Error checking Cross-Origin-Opener-Policy:",e.message),n="error"}}}},{checkCrossOriginOpenerPolicy:nn,getCrossOriginOpenerPolicy:sn}=tn(),Me=420,_e=540;function rn(n){const e=(window.innerWidth-Me)/2+window.screenX,t=(window.innerHeight-_e)/2+window.screenY;on(n);const s=window.open(n,"Smart Wallet",`width=${Me}, height=${_e}, left=${e}, top=${t}`);if(s==null||s.focus(),!s)throw m.rpc.internal("Pop up window failed to open");return s}function an(n){n&&!n.closed&&n.close()}function on(n){const e={sdkName:qe,sdkVersion:K,origin:window.location.origin,coop:sn()};for(const[t,s]of Object.entries(e))n.searchParams.append(t,s.toString())}class cn{constructor({url:e=Yt,metadata:t,preference:s}){this.popup=null,this.listeners=new Map,this.postMessage=async r=>{(await this.waitForPopupLoaded()).postMessage(r,this.url.origin)},this.postRequestAndWaitForResponse=async r=>{const i=this.onMessage(({requestId:a})=>a===r.id);return this.postMessage(r),await i},this.onMessage=async r=>new Promise((i,a)=>{const c=l=>{if(l.origin!==this.url.origin)return;const h=l.data;r(h)&&(i(h),window.removeEventListener("message",c),this.listeners.delete(c))};window.addEventListener("message",c),this.listeners.set(c,{reject:a})}),this.disconnect=()=>{an(this.popup),this.popup=null,this.listeners.forEach(({reject:r},i)=>{r(m.provider.userRejectedRequest("Request rejected")),window.removeEventListener("message",i)}),this.listeners.clear()},this.waitForPopupLoaded=async()=>this.popup&&!this.popup.closed?(this.popup.focus(),this.popup):(this.popup=rn(this.url),this.onMessage(({event:r})=>r==="PopupUnload").then(this.disconnect).catch(()=>{}),this.onMessage(({event:r})=>r==="PopupLoaded").then(r=>{this.postMessage({requestId:r.id,data:{version:K,metadata:this.metadata,preference:this.preference,location:window.location.toString()}})}).then(()=>{if(!this.popup)throw m.rpc.internal();return this.popup})),this.url=new URL(e),this.metadata=t,this.preference=s}}function dn(n){const e=it(ln(n),{shouldIncludeStack:!0}),t=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");return t.searchParams.set("version",K),t.searchParams.set("code",e.code.toString()),t.searchParams.set("message",e.message),Object.assign(Object.assign({},e),{docUrl:t.href})}function ln(n){var e;if(typeof n=="string")return{message:n,code:y.rpc.internal};if(E(n)){const t=n.errorMessage,s=(e=n.errorCode)!==null&&e!==void 0?e:t.match(/(denied|rejected)/i)?y.provider.userRejectedRequest:void 0;return Object.assign(Object.assign({},n),{message:t,code:s,data:{method:n.method}})}return n}class un extends Xe{}var hn=function(n,e){var t={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&e.indexOf(s)<0&&(t[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r(r||(r=gn(s)),r)}}export{kn as createCoinbaseWalletSDK}; diff --git a/app/dist/assets/index-vLeYm_sl.js b/app/dist/assets/index-vLeYm_sl.js new file mode 100644 index 0000000..1949b28 --- /dev/null +++ b/app/dist/assets/index-vLeYm_sl.js @@ -0,0 +1,1711 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-Xo5-yze0.js","./sha3-DMa6LAII.js","./hooks.module-hYI_ep3v.js","./index-Cj7wY6S3.js","./inherits_browser-DIknFztW.js","./events-DQ172AOg.js","./index-BWLsGJDA.js","./index-Bmo1X34e.js","./index-DZIMxoKS.js","./index.es-BbfegWLX.js"])))=>i.map(i=>d[i]); +var hS=e=>{throw TypeError(e)};var J0=(e,t,n)=>t.has(e)||hS("Cannot "+n);var re=(e,t,n)=>(J0(e,t,"read from private field"),n?n.call(e):t.get(e)),et=(e,t,n)=>t.has(e)?hS("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Me=(e,t,n,r)=>(J0(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),vt=(e,t,n)=>(J0(e,t,"access private method"),n);var Dm=(e,t,n,r)=>({set _(o){Me(e,t,o,n)},get _(){return re(e,t,r)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var Rpe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ey(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function _pe(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var X0={exports:{}},_f={},Z0={exports:{}},wt={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var mS;function nD(){if(mS)return wt;mS=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function h(K){return K===null||typeof K!="object"?null:(K=m&&K[m]||K["@@iterator"],typeof K=="function"?K:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,b={};function w(K,se,Pe){this.props=K,this.context=se,this.refs=b,this.updater=Pe||g}w.prototype.isReactComponent={},w.prototype.setState=function(K,se){if(typeof K!="object"&&typeof K!="function"&&K!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,K,se,"setState")},w.prototype.forceUpdate=function(K){this.updater.enqueueForceUpdate(this,K,"forceUpdate")};function x(){}x.prototype=w.prototype;function E(K,se,Pe){this.props=K,this.context=se,this.refs=b,this.updater=Pe||g}var A=E.prototype=new x;A.constructor=E,y(A,w.prototype),A.isPureReactComponent=!0;var _=Array.isArray,j=Object.prototype.hasOwnProperty,O={current:null},P={key:!0,ref:!0,__self:!0,__source:!0};function D(K,se,Pe){var ve,Ee={},je=null,Oe=null;if(se!=null)for(ve in se.ref!==void 0&&(Oe=se.ref),se.key!==void 0&&(je=""+se.key),se)j.call(se,ve)&&!P.hasOwnProperty(ve)&&(Ee[ve]=se[ve]);var he=arguments.length-2;if(he===1)Ee.children=Pe;else if(1>>1,se=Z[K];if(0>>1;Ko(Ee,ae))jeo(Oe,Ee)?(Z[K]=Oe,Z[je]=ae,K=je):(Z[K]=Ee,Z[ve]=ae,K=ve);else if(jeo(Oe,ae))Z[K]=Oe,Z[je]=ae,K=je;else break e}}return Y}function o(Z,Y){var ae=Z.sortIndex-Y.sortIndex;return ae!==0?ae:Z.id-Y.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var c=[],d=[],p=1,m=null,h=3,g=!1,y=!1,b=!1,w=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(Z){for(var Y=n(d);Y!==null;){if(Y.callback===null)r(d);else if(Y.startTime<=Z)r(d),Y.sortIndex=Y.expirationTime,t(c,Y);else break;Y=n(d)}}function _(Z){if(b=!1,A(Z),!y)if(n(c)!==null)y=!0,te(j);else{var Y=n(d);Y!==null&&ee(_,Y.startTime-Z)}}function j(Z,Y){y=!1,b&&(b=!1,x(D),D=-1),g=!0;var ae=h;try{for(A(Y),m=n(c);m!==null&&(!(m.expirationTime>Y)||Z&&!U());){var K=m.callback;if(typeof K=="function"){m.callback=null,h=m.priorityLevel;var se=K(m.expirationTime<=Y);Y=e.unstable_now(),typeof se=="function"?m.callback=se:m===n(c)&&r(c),A(Y)}else r(c);m=n(c)}if(m!==null)var Pe=!0;else{var ve=n(d);ve!==null&&ee(_,ve.startTime-Y),Pe=!1}return Pe}finally{m=null,h=ae,g=!1}}var O=!1,P=null,D=-1,M=5,G=-1;function U(){return!(e.unstable_now()-GZ||125K?(Z.sortIndex=ae,t(d,Z),n(c)===null&&Z===n(d)&&(b?(x(D),D=-1):b=!0,ee(_,ae-K))):(Z.sortIndex=se,t(c,Z),y||g||(y=!0,te(j))),Z},e.unstable_shouldYield=U,e.unstable_wrapCallback=function(Z){var Y=h;return function(){var ae=h;h=Y;try{return Z.apply(this,arguments)}finally{h=ae}}}}(nb)),nb}var wS;function aD(){return wS||(wS=1,tb.exports=iD()),tb.exports}/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var xS;function sD(){if(xS)return Fr;xS=1;var e=Yp(),t=aD();function n(a){for(var u="https://reactjs.org/docs/error-decoder.html?invariant="+a,f=1;f"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=Object.prototype.hasOwnProperty,d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},m={};function h(a){return c.call(m,a)?!0:c.call(p,a)?!1:d.test(a)?m[a]=!0:(p[a]=!0,!1)}function g(a,u,f,v){if(f!==null&&f.type===0)return!1;switch(typeof u){case"function":case"symbol":return!0;case"boolean":return v?!1:f!==null?!f.acceptsBooleans:(a=a.toLowerCase().slice(0,5),a!=="data-"&&a!=="aria-");default:return!1}}function y(a,u,f,v){if(u===null||typeof u>"u"||g(a,u,f,v))return!0;if(v)return!1;if(f!==null)switch(f.type){case 3:return!u;case 4:return u===!1;case 5:return isNaN(u);case 6:return isNaN(u)||1>u}return!1}function b(a,u,f,v,C,I,L){this.acceptsBooleans=u===2||u===3||u===4,this.attributeName=v,this.attributeNamespace=C,this.mustUseProperty=f,this.propertyName=a,this.type=u,this.sanitizeURL=I,this.removeEmptyString=L}var w={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){w[a]=new b(a,0,!1,a,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var u=a[0];w[u]=new b(u,1,!1,a[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(a){w[a]=new b(a,2,!1,a.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){w[a]=new b(a,2,!1,a,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){w[a]=new b(a,3,!1,a.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(a){w[a]=new b(a,3,!0,a,null,!1,!1)}),["capture","download"].forEach(function(a){w[a]=new b(a,4,!1,a,null,!1,!1)}),["cols","rows","size","span"].forEach(function(a){w[a]=new b(a,6,!1,a,null,!1,!1)}),["rowSpan","start"].forEach(function(a){w[a]=new b(a,5,!1,a.toLowerCase(),null,!1,!1)});var x=/[\-:]([a-z])/g;function E(a){return a[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var u=a.replace(x,E);w[u]=new b(u,1,!1,a,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var u=a.replace(x,E);w[u]=new b(u,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(a){var u=a.replace(x,E);w[u]=new b(u,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(a){w[a]=new b(a,1,!1,a.toLowerCase(),null,!1,!1)}),w.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(a){w[a]=new b(a,1,!1,a.toLowerCase(),null,!0,!0)});function A(a,u,f,v){var C=w.hasOwnProperty(u)?w[u]:null;(C!==null?C.type!==0:v||!(2Q||C[L]!==I[Q]){var oe=` +`+C[L].replace(" at new "," at ");return a.displayName&&oe.includes("")&&(oe=oe.replace("",a.displayName)),oe}while(1<=L&&0<=Q);break}}}finally{Pe=!1,Error.prepareStackTrace=f}return(a=a?a.displayName||a.name:"")?se(a):""}function Ee(a){switch(a.tag){case 5:return se(a.type);case 16:return se("Lazy");case 13:return se("Suspense");case 19:return se("SuspenseList");case 0:case 2:case 15:return a=ve(a.type,!1),a;case 11:return a=ve(a.type.render,!1),a;case 1:return a=ve(a.type,!0),a;default:return""}}function je(a){if(a==null)return null;if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case P:return"Fragment";case O:return"Portal";case M:return"Profiler";case D:return"StrictMode";case X:return"Suspense";case V:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case U:return(a.displayName||"Context")+".Consumer";case G:return(a._context.displayName||"Context")+".Provider";case W:var u=a.render;return a=a.displayName,a||(a=u.displayName||u.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case ne:return u=a.displayName||null,u!==null?u:je(a.type)||"Memo";case te:u=a._payload,a=a._init;try{return je(a(u))}catch{}}return null}function Oe(a){var u=a.type;switch(a.tag){case 24:return"Cache";case 9:return(u.displayName||"Context")+".Consumer";case 10:return(u._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return a=u.render,a=a.displayName||a.name||"",u.displayName||(a!==""?"ForwardRef("+a+")":"ForwardRef");case 7:return"Fragment";case 5:return u;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return je(u);case 8:return u===D?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u}return null}function he(a){switch(typeof a){case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function me(a){var u=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function xe(a){var u=me(a)?"checked":"value",f=Object.getOwnPropertyDescriptor(a.constructor.prototype,u),v=""+a[u];if(!a.hasOwnProperty(u)&&typeof f<"u"&&typeof f.get=="function"&&typeof f.set=="function"){var C=f.get,I=f.set;return Object.defineProperty(a,u,{configurable:!0,get:function(){return C.call(this)},set:function(L){v=""+L,I.call(this,L)}}),Object.defineProperty(a,u,{enumerable:f.enumerable}),{getValue:function(){return v},setValue:function(L){v=""+L},stopTracking:function(){a._valueTracker=null,delete a[u]}}}}function _e(a){a._valueTracker||(a._valueTracker=xe(a))}function Ge(a){if(!a)return!1;var u=a._valueTracker;if(!u)return!0;var f=u.getValue(),v="";return a&&(v=me(a)?a.checked?"true":"false":a.value),a=v,a!==f?(u.setValue(a),!0):!1}function Le(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}function rt(a,u){var f=u.checked;return ae({},u,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:f??a._wrapperState.initialChecked})}function At(a,u){var f=u.defaultValue==null?"":u.defaultValue,v=u.checked!=null?u.checked:u.defaultChecked;f=he(u.value!=null?u.value:f),a._wrapperState={initialChecked:v,initialValue:f,controlled:u.type==="checkbox"||u.type==="radio"?u.checked!=null:u.value!=null}}function pt(a,u){u=u.checked,u!=null&&A(a,"checked",u,!1)}function Bn(a,u){pt(a,u);var f=he(u.value),v=u.type;if(f!=null)v==="number"?(f===0&&a.value===""||a.value!=f)&&(a.value=""+f):a.value!==""+f&&(a.value=""+f);else if(v==="submit"||v==="reset"){a.removeAttribute("value");return}u.hasOwnProperty("value")?Zt(a,u.type,f):u.hasOwnProperty("defaultValue")&&Zt(a,u.type,he(u.defaultValue)),u.checked==null&&u.defaultChecked!=null&&(a.defaultChecked=!!u.defaultChecked)}function Sn(a,u,f){if(u.hasOwnProperty("value")||u.hasOwnProperty("defaultValue")){var v=u.type;if(!(v!=="submit"&&v!=="reset"||u.value!==void 0&&u.value!==null))return;u=""+a._wrapperState.initialValue,f||u===a.value||(a.value=u),a.defaultValue=u}f=a.name,f!==""&&(a.name=""),a.defaultChecked=!!a._wrapperState.initialChecked,f!==""&&(a.name=f)}function Zt(a,u,f){(u!=="number"||Le(a.ownerDocument)!==a)&&(f==null?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+f&&(a.defaultValue=""+f))}var pn=Array.isArray;function An(a,u,f,v){if(a=a.options,u){u={};for(var C=0;C"+u.valueOf().toString()+"",u=Ye.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;u.firstChild;)a.appendChild(u.firstChild)}});function hn(a,u){if(u){var f=a.firstChild;if(f&&f===a.lastChild&&f.nodeType===3){f.nodeValue=u;return}}a.textContent=u}var mn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},bt=["Webkit","ms","Moz","O"];Object.keys(mn).forEach(function(a){bt.forEach(function(u){u=u+a.charAt(0).toUpperCase()+a.substring(1),mn[u]=mn[a]})});function Ke(a,u,f){return u==null||typeof u=="boolean"||u===""?"":f||typeof u!="number"||u===0||mn.hasOwnProperty(a)&&mn[a]?(""+u).trim():u+"px"}function Hn(a,u){a=a.style;for(var f in u)if(u.hasOwnProperty(f)){var v=f.indexOf("--")===0,C=Ke(f,u[f],v);f==="float"&&(f="cssFloat"),v?a.setProperty(f,C):a[f]=C}}var ga=ae({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ci(a,u){if(u){if(ga[a]&&(u.children!=null||u.dangerouslySetInnerHTML!=null))throw Error(n(137,a));if(u.dangerouslySetInnerHTML!=null){if(u.children!=null)throw Error(n(60));if(typeof u.dangerouslySetInnerHTML!="object"||!("__html"in u.dangerouslySetInnerHTML))throw Error(n(61))}if(u.style!=null&&typeof u.style!="object")throw Error(n(62))}}function vl(a,u){if(a.indexOf("-")===-1)return typeof u.is=="string";switch(a){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var bl=null;function tr(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var ya=null,eo=null,Ct=null;function Ei(a){if(a=gf(a)){if(typeof ya!="function")throw Error(n(280));var u=a.stateNode;u&&(u=Xh(u),ya(a.stateNode,a.type,u))}}function va(a){eo?Ct?Ct.push(a):Ct=[a]:eo=a}function ki(){if(eo){var a=eo,u=Ct;if(Ct=eo=null,Ei(a),u)for(a=0;a>>=0,a===0?32:31-(kl(a)/Sl|0)|0}var Qo=64,ka=4194304;function _i(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return a}}function ji(a,u){var f=a.pendingLanes;if(f===0)return 0;var v=0,C=a.suspendedLanes,I=a.pingedLanes,L=f&268435455;if(L!==0){var Q=L&~C;Q!==0?v=_i(Q):(I&=L,I!==0&&(v=_i(I)))}else L=f&~C,L!==0?v=_i(L):I!==0&&(v=_i(I));if(v===0)return 0;if(u!==0&&u!==v&&!(u&C)&&(C=v&-v,I=u&-u,C>=I||C===16&&(I&4194240)!==0))return u;if(v&4&&(v|=f&16),u=a.entangledLanes,u!==0)for(a=a.entanglements,u&=v;0f;f++)u.push(a);return u}function le(a,u,f){a.pendingLanes|=u,u!==536870912&&(a.suspendedLanes=0,a.pingedLanes=0),a=a.eventTimes,u=31-In(u),a[u]=f}function be(a,u){var f=a.pendingLanes&~u;a.pendingLanes=u,a.suspendedLanes=0,a.pingedLanes=0,a.expiredLanes&=u,a.mutableReadLanes&=u,a.entangledLanes&=u,u=a.entanglements;var v=a.eventTimes;for(a=a.expirationTimes;0=at),Or=" ",Br=!1;function Bl(a,u){switch(a){case"keyup":return nt.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function sf(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Di=!1;function eL(a,u){switch(a){case"compositionend":return sf(u);case"keypress":return u.which!==32?null:(Br=!0,Or);case"textInput":return a=u.data,a===Or&&Br?null:a;default:return null}}function tL(a,u){if(Di)return a==="compositionend"||!mt&&Bl(a,u)?(a=Mh(),uc=lc=Jo=null,Di=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1=u)return{node:f,offset:u-a};a=v}e:{for(;f;){if(f.nextSibling){f=f.nextSibling;break e}f=f.parentNode}f=void 0}f=yk(f)}}function bk(a,u){return a&&u?a===u?!0:a&&a.nodeType===3?!1:u&&u.nodeType===3?bk(a,u.parentNode):"contains"in a?a.contains(u):a.compareDocumentPosition?!!(a.compareDocumentPosition(u)&16):!1:!1}function wk(){for(var a=window,u=Le();u instanceof a.HTMLIFrameElement;){try{var f=typeof u.contentWindow.location.href=="string"}catch{f=!1}if(f)a=u.contentWindow;else break;u=Le(a.document)}return u}function Bv(a){var u=a&&a.nodeName&&a.nodeName.toLowerCase();return u&&(u==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||u==="textarea"||a.contentEditable==="true")}function cL(a){var u=wk(),f=a.focusedElem,v=a.selectionRange;if(u!==f&&f&&f.ownerDocument&&bk(f.ownerDocument.documentElement,f)){if(v!==null&&Bv(f)){if(u=v.start,a=v.end,a===void 0&&(a=u),"selectionStart"in f)f.selectionStart=u,f.selectionEnd=Math.min(a,f.value.length);else if(a=(u=f.ownerDocument||document)&&u.defaultView||window,a.getSelection){a=a.getSelection();var C=f.textContent.length,I=Math.min(v.start,C);v=v.end===void 0?I:Math.min(v.end,C),!a.extend&&I>v&&(C=v,v=I,I=C),C=vk(f,I);var L=vk(f,v);C&&L&&(a.rangeCount!==1||a.anchorNode!==C.node||a.anchorOffset!==C.offset||a.focusNode!==L.node||a.focusOffset!==L.offset)&&(u=u.createRange(),u.setStart(C.node,C.offset),a.removeAllRanges(),I>v?(a.addRange(u),a.extend(L.node,L.offset)):(u.setEnd(L.node,L.offset),a.addRange(u)))}}for(u=[],a=f;a=a.parentNode;)a.nodeType===1&&u.push({element:a,left:a.scrollLeft,top:a.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;f=document.documentMode,mc=null,Nv=null,df=null,Lv=!1;function xk(a,u,f){var v=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;Lv||mc==null||mc!==Le(v)||(v=mc,"selectionStart"in v&&Bv(v)?v={start:v.selectionStart,end:v.selectionEnd}:(v=(v.ownerDocument&&v.ownerDocument.defaultView||window).getSelection(),v={anchorNode:v.anchorNode,anchorOffset:v.anchorOffset,focusNode:v.focusNode,focusOffset:v.focusOffset}),df&&cf(df,v)||(df=v,v=Kh(Nv,"onSelect"),0wc||(a.current=Qv[wc],Qv[wc]=null,wc--)}function Vt(a,u){wc++,Qv[wc]=a.current,a.current=u}var Is={},ir=As(Is),Nr=As(!1),Ll=Is;function xc(a,u){var f=a.type.contextTypes;if(!f)return Is;var v=a.stateNode;if(v&&v.__reactInternalMemoizedUnmaskedChildContext===u)return v.__reactInternalMemoizedMaskedChildContext;var C={},I;for(I in f)C[I]=u[I];return v&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=u,a.__reactInternalMemoizedMaskedChildContext=C),C}function Lr(a){return a=a.childContextTypes,a!=null}function Zh(){Gt(Nr),Gt(ir)}function Lk(a,u,f){if(ir.current!==Is)throw Error(n(168));Vt(ir,u),Vt(Nr,f)}function Dk(a,u,f){var v=a.stateNode;if(u=u.childContextTypes,typeof v.getChildContext!="function")return f;v=v.getChildContext();for(var C in v)if(!(C in u))throw Error(n(108,Oe(a)||"Unknown",C));return ae({},f,v)}function em(a){return a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Is,Ll=ir.current,Vt(ir,a),Vt(Nr,Nr.current),!0}function Mk(a,u,f){var v=a.stateNode;if(!v)throw Error(n(169));f?(a=Dk(a,u,Ll),v.__reactInternalMemoizedMergedChildContext=a,Gt(Nr),Gt(ir),Vt(ir,a)):Gt(Nr),Vt(Nr,f)}var Ra=null,tm=!1,Kv=!1;function zk(a){Ra===null?Ra=[a]:Ra.push(a)}function CL(a){tm=!0,zk(a)}function Ps(){if(!Kv&&Ra!==null){Kv=!0;var a=0,u=Be;try{var f=Ra;for(Be=1;a>=L,C-=L,_a=1<<32-In(u)+C|f<st?(Mn=Ze,Ze=null):Mn=Ze.sibling;var _t=ke(ue,Ze,fe[st],Te);if(_t===null){Ze===null&&(Ze=Mn);break}a&&Ze&&_t.alternate===null&&u(ue,Ze),ie=I(_t,ie,st),Xe===null?Ve=_t:Xe.sibling=_t,Xe=_t,Ze=Mn}if(st===fe.length)return f(ue,Ze),Kt&&Ml(ue,st),Ve;if(Ze===null){for(;stst?(Mn=Ze,Ze=null):Mn=Ze.sibling;var Ds=ke(ue,Ze,_t.value,Te);if(Ds===null){Ze===null&&(Ze=Mn);break}a&&Ze&&Ds.alternate===null&&u(ue,Ze),ie=I(Ds,ie,st),Xe===null?Ve=Ds:Xe.sibling=Ds,Xe=Ds,Ze=Mn}if(_t.done)return f(ue,Ze),Kt&&Ml(ue,st),Ve;if(Ze===null){for(;!_t.done;st++,_t=fe.next())_t=Ae(ue,_t.value,Te),_t!==null&&(ie=I(_t,ie,st),Xe===null?Ve=_t:Xe.sibling=_t,Xe=_t);return Kt&&Ml(ue,st),Ve}for(Ze=v(ue,Ze);!_t.done;st++,_t=fe.next())_t=De(Ze,ue,st,_t.value,Te),_t!==null&&(a&&_t.alternate!==null&&Ze.delete(_t.key===null?st:_t.key),ie=I(_t,ie,st),Xe===null?Ve=_t:Xe.sibling=_t,Xe=_t);return a&&Ze.forEach(function(tD){return u(ue,tD)}),Kt&&Ml(ue,st),Ve}function un(ue,ie,fe,Te){if(typeof fe=="object"&&fe!==null&&fe.type===P&&fe.key===null&&(fe=fe.props.children),typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case j:e:{for(var Ve=fe.key,Xe=ie;Xe!==null;){if(Xe.key===Ve){if(Ve=fe.type,Ve===P){if(Xe.tag===7){f(ue,Xe.sibling),ie=C(Xe,fe.props.children),ie.return=ue,ue=ie;break e}}else if(Xe.elementType===Ve||typeof Ve=="object"&&Ve!==null&&Ve.$$typeof===te&&Hk(Ve)===Xe.type){f(ue,Xe.sibling),ie=C(Xe,fe.props),ie.ref=yf(ue,Xe,fe),ie.return=ue,ue=ie;break e}f(ue,Xe);break}else u(ue,Xe);Xe=Xe.sibling}fe.type===P?(ie=ql(fe.props.children,ue.mode,Te,fe.key),ie.return=ue,ue=ie):(Te=Tm(fe.type,fe.key,fe.props,null,ue.mode,Te),Te.ref=yf(ue,ie,fe),Te.return=ue,ue=Te)}return L(ue);case O:e:{for(Xe=fe.key;ie!==null;){if(ie.key===Xe)if(ie.tag===4&&ie.stateNode.containerInfo===fe.containerInfo&&ie.stateNode.implementation===fe.implementation){f(ue,ie.sibling),ie=C(ie,fe.children||[]),ie.return=ue,ue=ie;break e}else{f(ue,ie);break}else u(ue,ie);ie=ie.sibling}ie=q0(fe,ue.mode,Te),ie.return=ue,ue=ie}return L(ue);case te:return Xe=fe._init,un(ue,ie,Xe(fe._payload),Te)}if(pn(fe))return Fe(ue,ie,fe,Te);if(Y(fe))return Ue(ue,ie,fe,Te);im(ue,fe)}return typeof fe=="string"&&fe!==""||typeof fe=="number"?(fe=""+fe,ie!==null&&ie.tag===6?(f(ue,ie.sibling),ie=C(ie,fe),ie.return=ue,ue=ie):(f(ue,ie),ie=H0(fe,ue.mode,Te),ie.return=ue,ue=ie),L(ue)):f(ue,ie)}return un}var Sc=qk(!0),Gk=qk(!1),am=As(null),sm=null,Ac=null,t0=null;function n0(){t0=Ac=sm=null}function r0(a){var u=am.current;Gt(am),a._currentValue=u}function o0(a,u,f){for(;a!==null;){var v=a.alternate;if((a.childLanes&u)!==u?(a.childLanes|=u,v!==null&&(v.childLanes|=u)):v!==null&&(v.childLanes&u)!==u&&(v.childLanes|=u),a===f)break;a=a.return}}function Ic(a,u){sm=a,t0=Ac=null,a=a.dependencies,a!==null&&a.firstContext!==null&&(a.lanes&u&&(Dr=!0),a.firstContext=null)}function Po(a){var u=a._currentValue;if(t0!==a)if(a={context:a,memoizedValue:u,next:null},Ac===null){if(sm===null)throw Error(n(308));Ac=a,sm.dependencies={lanes:0,firstContext:a}}else Ac=Ac.next=a;return u}var zl=null;function i0(a){zl===null?zl=[a]:zl.push(a)}function Qk(a,u,f,v){var C=u.interleaved;return C===null?(f.next=f,i0(u)):(f.next=C.next,C.next=f),u.interleaved=f,Oa(a,v)}function Oa(a,u){a.lanes|=u;var f=a.alternate;for(f!==null&&(f.lanes|=u),f=a,a=a.return;a!==null;)a.childLanes|=u,f=a.alternate,f!==null&&(f.childLanes|=u),f=a,a=a.return;return f.tag===3?f.stateNode:null}var Ts=!1;function a0(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Kk(a,u){a=a.updateQueue,u.updateQueue===a&&(u.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function Ba(a,u){return{eventTime:a,lane:u,tag:0,payload:null,callback:null,next:null}}function Rs(a,u,f){var v=a.updateQueue;if(v===null)return null;if(v=v.shared,Tt&2){var C=v.pending;return C===null?u.next=u:(u.next=C.next,C.next=u),v.pending=u,Oa(a,f)}return C=v.interleaved,C===null?(u.next=u,i0(v)):(u.next=C.next,C.next=u),v.interleaved=u,Oa(a,f)}function lm(a,u,f){if(u=u.updateQueue,u!==null&&(u=u.shared,(f&4194240)!==0)){var v=u.lanes;v&=a.pendingLanes,f|=v,u.lanes=f,Re(a,f)}}function Yk(a,u){var f=a.updateQueue,v=a.alternate;if(v!==null&&(v=v.updateQueue,f===v)){var C=null,I=null;if(f=f.firstBaseUpdate,f!==null){do{var L={eventTime:f.eventTime,lane:f.lane,tag:f.tag,payload:f.payload,callback:f.callback,next:null};I===null?C=I=L:I=I.next=L,f=f.next}while(f!==null);I===null?C=I=u:I=I.next=u}else C=I=u;f={baseState:v.baseState,firstBaseUpdate:C,lastBaseUpdate:I,shared:v.shared,effects:v.effects},a.updateQueue=f;return}a=f.lastBaseUpdate,a===null?f.firstBaseUpdate=u:a.next=u,f.lastBaseUpdate=u}function um(a,u,f,v){var C=a.updateQueue;Ts=!1;var I=C.firstBaseUpdate,L=C.lastBaseUpdate,Q=C.shared.pending;if(Q!==null){C.shared.pending=null;var oe=Q,ge=oe.next;oe.next=null,L===null?I=ge:L.next=ge,L=oe;var Se=a.alternate;Se!==null&&(Se=Se.updateQueue,Q=Se.lastBaseUpdate,Q!==L&&(Q===null?Se.firstBaseUpdate=ge:Q.next=ge,Se.lastBaseUpdate=oe))}if(I!==null){var Ae=C.baseState;L=0,Se=ge=oe=null,Q=I;do{var ke=Q.lane,De=Q.eventTime;if((v&ke)===ke){Se!==null&&(Se=Se.next={eventTime:De,lane:0,tag:Q.tag,payload:Q.payload,callback:Q.callback,next:null});e:{var Fe=a,Ue=Q;switch(ke=u,De=f,Ue.tag){case 1:if(Fe=Ue.payload,typeof Fe=="function"){Ae=Fe.call(De,Ae,ke);break e}Ae=Fe;break e;case 3:Fe.flags=Fe.flags&-65537|128;case 0:if(Fe=Ue.payload,ke=typeof Fe=="function"?Fe.call(De,Ae,ke):Fe,ke==null)break e;Ae=ae({},Ae,ke);break e;case 2:Ts=!0}}Q.callback!==null&&Q.lane!==0&&(a.flags|=64,ke=C.effects,ke===null?C.effects=[Q]:ke.push(Q))}else De={eventTime:De,lane:ke,tag:Q.tag,payload:Q.payload,callback:Q.callback,next:null},Se===null?(ge=Se=De,oe=Ae):Se=Se.next=De,L|=ke;if(Q=Q.next,Q===null){if(Q=C.shared.pending,Q===null)break;ke=Q,Q=ke.next,ke.next=null,C.lastBaseUpdate=ke,C.shared.pending=null}}while(!0);if(Se===null&&(oe=Ae),C.baseState=oe,C.firstBaseUpdate=ge,C.lastBaseUpdate=Se,u=C.shared.interleaved,u!==null){C=u;do L|=C.lane,C=C.next;while(C!==u)}else I===null&&(C.shared.lanes=0);Ul|=L,a.lanes=L,a.memoizedState=Ae}}function Jk(a,u,f){if(a=u.effects,u.effects=null,a!==null)for(u=0;uf?f:4,a(!0);var v=d0.transition;d0.transition={};try{a(!1),u()}finally{Be=f,d0.transition=v}}function g2(){return To().memoizedState}function AL(a,u,f){var v=Bs(a);if(f={lane:v,action:f,hasEagerState:!1,eagerState:null,next:null},y2(a))v2(u,f);else if(f=Qk(a,u,f,v),f!==null){var C=br();ri(f,a,v,C),b2(f,u,v)}}function IL(a,u,f){var v=Bs(a),C={lane:v,action:f,hasEagerState:!1,eagerState:null,next:null};if(y2(a))v2(u,C);else{var I=a.alternate;if(a.lanes===0&&(I===null||I.lanes===0)&&(I=u.lastRenderedReducer,I!==null))try{var L=u.lastRenderedState,Q=I(L,f);if(C.hasEagerState=!0,C.eagerState=Q,Xo(Q,L)){var oe=u.interleaved;oe===null?(C.next=C,i0(u)):(C.next=oe.next,oe.next=C),u.interleaved=C;return}}catch{}finally{}f=Qk(a,u,C,v),f!==null&&(C=br(),ri(f,a,v,C),b2(f,u,v))}}function y2(a){var u=a.alternate;return a===Jt||u!==null&&u===Jt}function v2(a,u){xf=fm=!0;var f=a.pending;f===null?u.next=u:(u.next=f.next,f.next=u),a.pending=u}function b2(a,u,f){if(f&4194240){var v=u.lanes;v&=a.pendingLanes,f|=v,u.lanes=f,Re(a,f)}}var mm={readContext:Po,useCallback:ar,useContext:ar,useEffect:ar,useImperativeHandle:ar,useInsertionEffect:ar,useLayoutEffect:ar,useMemo:ar,useReducer:ar,useRef:ar,useState:ar,useDebugValue:ar,useDeferredValue:ar,useTransition:ar,useMutableSource:ar,useSyncExternalStore:ar,useId:ar,unstable_isNewReconciler:!1},PL={readContext:Po,useCallback:function(a,u){return Fi().memoizedState=[a,u===void 0?null:u],a},useContext:Po,useEffect:l2,useImperativeHandle:function(a,u,f){return f=f!=null?f.concat([a]):null,pm(4194308,4,d2.bind(null,u,a),f)},useLayoutEffect:function(a,u){return pm(4194308,4,a,u)},useInsertionEffect:function(a,u){return pm(4,2,a,u)},useMemo:function(a,u){var f=Fi();return u=u===void 0?null:u,a=a(),f.memoizedState=[a,u],a},useReducer:function(a,u,f){var v=Fi();return u=f!==void 0?f(u):u,v.memoizedState=v.baseState=u,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:u},v.queue=a,a=a.dispatch=AL.bind(null,Jt,a),[v.memoizedState,a]},useRef:function(a){var u=Fi();return a={current:a},u.memoizedState=a},useState:a2,useDebugValue:v0,useDeferredValue:function(a){return Fi().memoizedState=a},useTransition:function(){var a=a2(!1),u=a[0];return a=SL.bind(null,a[1]),Fi().memoizedState=a,[u,a]},useMutableSource:function(){},useSyncExternalStore:function(a,u,f){var v=Jt,C=Fi();if(Kt){if(f===void 0)throw Error(n(407));f=f()}else{if(f=u(),Dn===null)throw Error(n(349));$l&30||t2(v,u,f)}C.memoizedState=f;var I={value:f,getSnapshot:u};return C.queue=I,l2(r2.bind(null,v,I,a),[a]),v.flags|=2048,kf(9,n2.bind(null,v,I,f,u),void 0,null),f},useId:function(){var a=Fi(),u=Dn.identifierPrefix;if(Kt){var f=ja,v=_a;f=(v&~(1<<32-In(v)-1)).toString(32)+f,u=":"+u+"R"+f,f=Cf++,0<\/script>",a=a.removeChild(a.firstChild)):typeof v.is=="string"?a=L.createElement(f,{is:v.is}):(a=L.createElement(f),f==="select"&&(L=a,v.multiple?L.multiple=!0:v.size&&(L.size=v.size))):a=L.createElementNS(a,f),a[Mi]=u,a[mf]=v,z2(a,u,!1,!1),u.stateNode=a;e:{switch(L=vl(f,v),f){case"dialog":qt("cancel",a),qt("close",a),C=v;break;case"iframe":case"object":case"embed":qt("load",a),C=v;break;case"video":case"audio":for(C=0;Cjc&&(u.flags|=128,v=!0,Sf(I,!1),u.lanes=4194304)}else{if(!v)if(a=cm(L),a!==null){if(u.flags|=128,v=!0,f=a.updateQueue,f!==null&&(u.updateQueue=f,u.flags|=4),Sf(I,!0),I.tail===null&&I.tailMode==="hidden"&&!L.alternate&&!Kt)return sr(u),null}else 2*zt()-I.renderingStartTime>jc&&f!==1073741824&&(u.flags|=128,v=!0,Sf(I,!1),u.lanes=4194304);I.isBackwards?(L.sibling=u.child,u.child=L):(f=I.last,f!==null?f.sibling=L:u.child=L,I.last=L)}return I.tail!==null?(u=I.tail,I.rendering=u,I.tail=u.sibling,I.renderingStartTime=zt(),u.sibling=null,f=Yt.current,Vt(Yt,v?f&1|2:f&1),u):(sr(u),null);case 22:case 23:return U0(),v=u.memoizedState!==null,a!==null&&a.memoizedState!==null!==v&&(u.flags|=8192),v&&u.mode&1?lo&1073741824&&(sr(u),u.subtreeFlags&6&&(u.flags|=8192)):sr(u),null;case 24:return null;case 25:return null}throw Error(n(156,u.tag))}function LL(a,u){switch(Jv(u),u.tag){case 1:return Lr(u.type)&&Zh(),a=u.flags,a&65536?(u.flags=a&-65537|128,u):null;case 3:return Pc(),Gt(Nr),Gt(ir),c0(),a=u.flags,a&65536&&!(a&128)?(u.flags=a&-65537|128,u):null;case 5:return l0(u),null;case 13:if(Gt(Yt),a=u.memoizedState,a!==null&&a.dehydrated!==null){if(u.alternate===null)throw Error(n(340));kc()}return a=u.flags,a&65536?(u.flags=a&-65537|128,u):null;case 19:return Gt(Yt),null;case 4:return Pc(),null;case 10:return r0(u.type._context),null;case 22:case 23:return U0(),null;case 24:return null;default:return null}}var bm=!1,lr=!1,DL=typeof WeakSet=="function"?WeakSet:Set,ze=null;function Rc(a,u){var f=a.ref;if(f!==null)if(typeof f=="function")try{f(null)}catch(v){tn(a,u,v)}else f.current=null}function R0(a,u,f){try{f()}catch(v){tn(a,u,v)}}var U2=!1;function ML(a,u){if(Uv=io,a=wk(),Bv(a)){if("selectionStart"in a)var f={start:a.selectionStart,end:a.selectionEnd};else e:{f=(f=a.ownerDocument)&&f.defaultView||window;var v=f.getSelection&&f.getSelection();if(v&&v.rangeCount!==0){f=v.anchorNode;var C=v.anchorOffset,I=v.focusNode;v=v.focusOffset;try{f.nodeType,I.nodeType}catch{f=null;break e}var L=0,Q=-1,oe=-1,ge=0,Se=0,Ae=a,ke=null;t:for(;;){for(var De;Ae!==f||C!==0&&Ae.nodeType!==3||(Q=L+C),Ae!==I||v!==0&&Ae.nodeType!==3||(oe=L+v),Ae.nodeType===3&&(L+=Ae.nodeValue.length),(De=Ae.firstChild)!==null;)ke=Ae,Ae=De;for(;;){if(Ae===a)break t;if(ke===f&&++ge===C&&(Q=L),ke===I&&++Se===v&&(oe=L),(De=Ae.nextSibling)!==null)break;Ae=ke,ke=Ae.parentNode}Ae=De}f=Q===-1||oe===-1?null:{start:Q,end:oe}}else f=null}f=f||{start:0,end:0}}else f=null;for(Wv={focusedElem:a,selectionRange:f},io=!1,ze=u;ze!==null;)if(u=ze,a=u.child,(u.subtreeFlags&1028)!==0&&a!==null)a.return=u,ze=a;else for(;ze!==null;){u=ze;try{var Fe=u.alternate;if(u.flags&1024)switch(u.tag){case 0:case 11:case 15:break;case 1:if(Fe!==null){var Ue=Fe.memoizedProps,un=Fe.memoizedState,ue=u.stateNode,ie=ue.getSnapshotBeforeUpdate(u.elementType===u.type?Ue:ei(u.type,Ue),un);ue.__reactInternalSnapshotBeforeUpdate=ie}break;case 3:var fe=u.stateNode.containerInfo;fe.nodeType===1?fe.textContent="":fe.nodeType===9&&fe.documentElement&&fe.removeChild(fe.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Te){tn(u,u.return,Te)}if(a=u.sibling,a!==null){a.return=u.return,ze=a;break}ze=u.return}return Fe=U2,U2=!1,Fe}function Af(a,u,f){var v=u.updateQueue;if(v=v!==null?v.lastEffect:null,v!==null){var C=v=v.next;do{if((C.tag&a)===a){var I=C.destroy;C.destroy=void 0,I!==void 0&&R0(u,f,I)}C=C.next}while(C!==v)}}function wm(a,u){if(u=u.updateQueue,u=u!==null?u.lastEffect:null,u!==null){var f=u=u.next;do{if((f.tag&a)===a){var v=f.create;f.destroy=v()}f=f.next}while(f!==u)}}function _0(a){var u=a.ref;if(u!==null){var f=a.stateNode;switch(a.tag){case 5:a=f;break;default:a=f}typeof u=="function"?u(a):u.current=a}}function W2(a){var u=a.alternate;u!==null&&(a.alternate=null,W2(u)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(u=a.stateNode,u!==null&&(delete u[Mi],delete u[mf],delete u[Gv],delete u[wL],delete u[xL])),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}function V2(a){return a.tag===5||a.tag===3||a.tag===4}function H2(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||V2(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function j0(a,u,f){var v=a.tag;if(v===5||v===6)a=a.stateNode,u?f.nodeType===8?f.parentNode.insertBefore(a,u):f.insertBefore(a,u):(f.nodeType===8?(u=f.parentNode,u.insertBefore(a,f)):(u=f,u.appendChild(a)),f=f._reactRootContainer,f!=null||u.onclick!==null||(u.onclick=Jh));else if(v!==4&&(a=a.child,a!==null))for(j0(a,u,f),a=a.sibling;a!==null;)j0(a,u,f),a=a.sibling}function O0(a,u,f){var v=a.tag;if(v===5||v===6)a=a.stateNode,u?f.insertBefore(a,u):f.appendChild(a);else if(v!==4&&(a=a.child,a!==null))for(O0(a,u,f),a=a.sibling;a!==null;)O0(a,u,f),a=a.sibling}var Qn=null,ti=!1;function _s(a,u,f){for(f=f.child;f!==null;)q2(a,u,f),f=f.sibling}function q2(a,u,f){if(gr&&typeof gr.onCommitFiberUnmount=="function")try{gr.onCommitFiberUnmount(ro,f)}catch{}switch(f.tag){case 5:lr||Rc(f,u);case 6:var v=Qn,C=ti;Qn=null,_s(a,u,f),Qn=v,ti=C,Qn!==null&&(ti?(a=Qn,f=f.stateNode,a.nodeType===8?a.parentNode.removeChild(f):a.removeChild(f)):Qn.removeChild(f.stateNode));break;case 18:Qn!==null&&(ti?(a=Qn,f=f.stateNode,a.nodeType===8?qv(a.parentNode,f):a.nodeType===1&&qv(a,f),Ni(a)):qv(Qn,f.stateNode));break;case 4:v=Qn,C=ti,Qn=f.stateNode.containerInfo,ti=!0,_s(a,u,f),Qn=v,ti=C;break;case 0:case 11:case 14:case 15:if(!lr&&(v=f.updateQueue,v!==null&&(v=v.lastEffect,v!==null))){C=v=v.next;do{var I=C,L=I.destroy;I=I.tag,L!==void 0&&(I&2||I&4)&&R0(f,u,L),C=C.next}while(C!==v)}_s(a,u,f);break;case 1:if(!lr&&(Rc(f,u),v=f.stateNode,typeof v.componentWillUnmount=="function"))try{v.props=f.memoizedProps,v.state=f.memoizedState,v.componentWillUnmount()}catch(Q){tn(f,u,Q)}_s(a,u,f);break;case 21:_s(a,u,f);break;case 22:f.mode&1?(lr=(v=lr)||f.memoizedState!==null,_s(a,u,f),lr=v):_s(a,u,f);break;default:_s(a,u,f)}}function G2(a){var u=a.updateQueue;if(u!==null){a.updateQueue=null;var f=a.stateNode;f===null&&(f=a.stateNode=new DL),u.forEach(function(v){var C=GL.bind(null,a,v);f.has(v)||(f.add(v),v.then(C,C))})}}function ni(a,u){var f=u.deletions;if(f!==null)for(var v=0;vC&&(C=L),v&=~I}if(v=C,v=zt()-v,v=(120>v?120:480>v?480:1080>v?1080:1920>v?1920:3e3>v?3e3:4320>v?4320:1960*FL(v/1960))-v,10a?16:a,Os===null)var v=!1;else{if(a=Os,Os=null,Sm=0,Tt&6)throw Error(n(331));var C=Tt;for(Tt|=4,ze=a.current;ze!==null;){var I=ze,L=I.child;if(ze.flags&16){var Q=I.deletions;if(Q!==null){for(var oe=0;oezt()-L0?Vl(a,0):N0|=f),zr(a,u)}function aS(a,u){u===0&&(a.mode&1?(u=ka,ka<<=1,!(ka&130023424)&&(ka=4194304)):u=1);var f=br();a=Oa(a,u),a!==null&&(le(a,u,f),zr(a,f))}function qL(a){var u=a.memoizedState,f=0;u!==null&&(f=u.retryLane),aS(a,f)}function GL(a,u){var f=0;switch(a.tag){case 13:var v=a.stateNode,C=a.memoizedState;C!==null&&(f=C.retryLane);break;case 19:v=a.stateNode;break;default:throw Error(n(314))}v!==null&&v.delete(u),aS(a,f)}var sS;sS=function(a,u,f){if(a!==null)if(a.memoizedProps!==u.pendingProps||Nr.current)Dr=!0;else{if(!(a.lanes&f)&&!(u.flags&128))return Dr=!1,BL(a,u,f);Dr=!!(a.flags&131072)}else Dr=!1,Kt&&u.flags&1048576&&Fk(u,rm,u.index);switch(u.lanes=0,u.tag){case 2:var v=u.type;vm(a,u),a=u.pendingProps;var C=xc(u,ir.current);Ic(u,f),C=p0(null,u,v,a,C,f);var I=h0();return u.flags|=1,typeof C=="object"&&C!==null&&typeof C.render=="function"&&C.$$typeof===void 0?(u.tag=1,u.memoizedState=null,u.updateQueue=null,Lr(v)?(I=!0,em(u)):I=!1,u.memoizedState=C.state!==null&&C.state!==void 0?C.state:null,a0(u),C.updater=gm,u.stateNode=C,C._reactInternals=u,w0(u,v,a,f),u=k0(null,u,v,!0,I,f)):(u.tag=0,Kt&&I&&Yv(u),vr(null,u,C,f),u=u.child),u;case 16:v=u.elementType;e:{switch(vm(a,u),a=u.pendingProps,C=v._init,v=C(v._payload),u.type=v,C=u.tag=KL(v),a=ei(v,a),C){case 0:u=E0(null,u,v,a,f);break e;case 1:u=O2(null,u,v,a,f);break e;case 11:u=P2(null,u,v,a,f);break e;case 14:u=T2(null,u,v,ei(v.type,a),f);break e}throw Error(n(306,v,""))}return u;case 0:return v=u.type,C=u.pendingProps,C=u.elementType===v?C:ei(v,C),E0(a,u,v,C,f);case 1:return v=u.type,C=u.pendingProps,C=u.elementType===v?C:ei(v,C),O2(a,u,v,C,f);case 3:e:{if(B2(u),a===null)throw Error(n(387));v=u.pendingProps,I=u.memoizedState,C=I.element,Kk(a,u),um(u,v,null,f);var L=u.memoizedState;if(v=L.element,I.isDehydrated)if(I={element:v,isDehydrated:!1,cache:L.cache,pendingSuspenseBoundaries:L.pendingSuspenseBoundaries,transitions:L.transitions},u.updateQueue.baseState=I,u.memoizedState=I,u.flags&256){C=Tc(Error(n(423)),u),u=N2(a,u,v,f,C);break e}else if(v!==C){C=Tc(Error(n(424)),u),u=N2(a,u,v,f,C);break e}else for(so=Ss(u.stateNode.containerInfo.firstChild),ao=u,Kt=!0,Zo=null,f=Gk(u,null,v,f),u.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling;else{if(kc(),v===C){u=Na(a,u,f);break e}vr(a,u,v,f)}u=u.child}return u;case 5:return Xk(u),a===null&&Zv(u),v=u.type,C=u.pendingProps,I=a!==null?a.memoizedProps:null,L=C.children,Vv(v,C)?L=null:I!==null&&Vv(v,I)&&(u.flags|=32),j2(a,u),vr(a,u,L,f),u.child;case 6:return a===null&&Zv(u),null;case 13:return L2(a,u,f);case 4:return s0(u,u.stateNode.containerInfo),v=u.pendingProps,a===null?u.child=Sc(u,null,v,f):vr(a,u,v,f),u.child;case 11:return v=u.type,C=u.pendingProps,C=u.elementType===v?C:ei(v,C),P2(a,u,v,C,f);case 7:return vr(a,u,u.pendingProps,f),u.child;case 8:return vr(a,u,u.pendingProps.children,f),u.child;case 12:return vr(a,u,u.pendingProps.children,f),u.child;case 10:e:{if(v=u.type._context,C=u.pendingProps,I=u.memoizedProps,L=C.value,Vt(am,v._currentValue),v._currentValue=L,I!==null)if(Xo(I.value,L)){if(I.children===C.children&&!Nr.current){u=Na(a,u,f);break e}}else for(I=u.child,I!==null&&(I.return=u);I!==null;){var Q=I.dependencies;if(Q!==null){L=I.child;for(var oe=Q.firstContext;oe!==null;){if(oe.context===v){if(I.tag===1){oe=Ba(-1,f&-f),oe.tag=2;var ge=I.updateQueue;if(ge!==null){ge=ge.shared;var Se=ge.pending;Se===null?oe.next=oe:(oe.next=Se.next,Se.next=oe),ge.pending=oe}}I.lanes|=f,oe=I.alternate,oe!==null&&(oe.lanes|=f),o0(I.return,f,u),Q.lanes|=f;break}oe=oe.next}}else if(I.tag===10)L=I.type===u.type?null:I.child;else if(I.tag===18){if(L=I.return,L===null)throw Error(n(341));L.lanes|=f,Q=L.alternate,Q!==null&&(Q.lanes|=f),o0(L,f,u),L=I.sibling}else L=I.child;if(L!==null)L.return=I;else for(L=I;L!==null;){if(L===u){L=null;break}if(I=L.sibling,I!==null){I.return=L.return,L=I;break}L=L.return}I=L}vr(a,u,C.children,f),u=u.child}return u;case 9:return C=u.type,v=u.pendingProps.children,Ic(u,f),C=Po(C),v=v(C),u.flags|=1,vr(a,u,v,f),u.child;case 14:return v=u.type,C=ei(v,u.pendingProps),C=ei(v.type,C),T2(a,u,v,C,f);case 15:return R2(a,u,u.type,u.pendingProps,f);case 17:return v=u.type,C=u.pendingProps,C=u.elementType===v?C:ei(v,C),vm(a,u),u.tag=1,Lr(v)?(a=!0,em(u)):a=!1,Ic(u,f),x2(u,v,C),w0(u,v,C,f),k0(null,u,v,!0,a,f);case 19:return M2(a,u,f);case 22:return _2(a,u,f)}throw Error(n(156,u.tag))};function lS(a,u){return Ca(a,u)}function QL(a,u,f,v){this.tag=a,this.key=f,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=v,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _o(a,u,f,v){return new QL(a,u,f,v)}function V0(a){return a=a.prototype,!(!a||!a.isReactComponent)}function KL(a){if(typeof a=="function")return V0(a)?1:0;if(a!=null){if(a=a.$$typeof,a===W)return 11;if(a===ne)return 14}return 2}function Ls(a,u){var f=a.alternate;return f===null?(f=_o(a.tag,u,a.key,a.mode),f.elementType=a.elementType,f.type=a.type,f.stateNode=a.stateNode,f.alternate=a,a.alternate=f):(f.pendingProps=u,f.type=a.type,f.flags=0,f.subtreeFlags=0,f.deletions=null),f.flags=a.flags&14680064,f.childLanes=a.childLanes,f.lanes=a.lanes,f.child=a.child,f.memoizedProps=a.memoizedProps,f.memoizedState=a.memoizedState,f.updateQueue=a.updateQueue,u=a.dependencies,f.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},f.sibling=a.sibling,f.index=a.index,f.ref=a.ref,f}function Tm(a,u,f,v,C,I){var L=2;if(v=a,typeof a=="function")V0(a)&&(L=1);else if(typeof a=="string")L=5;else e:switch(a){case P:return ql(f.children,C,I,u);case D:L=8,C|=8;break;case M:return a=_o(12,f,u,C|2),a.elementType=M,a.lanes=I,a;case X:return a=_o(13,f,u,C),a.elementType=X,a.lanes=I,a;case V:return a=_o(19,f,u,C),a.elementType=V,a.lanes=I,a;case ee:return Rm(f,C,I,u);default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case G:L=10;break e;case U:L=9;break e;case W:L=11;break e;case ne:L=14;break e;case te:L=16,v=null;break e}throw Error(n(130,a==null?a:typeof a,""))}return u=_o(L,f,u,C),u.elementType=a,u.type=v,u.lanes=I,u}function ql(a,u,f,v){return a=_o(7,a,v,u),a.lanes=f,a}function Rm(a,u,f,v){return a=_o(22,a,v,u),a.elementType=ee,a.lanes=f,a.stateNode={isHidden:!1},a}function H0(a,u,f){return a=_o(6,a,null,u),a.lanes=f,a}function q0(a,u,f){return u=_o(4,a.children!==null?a.children:[],a.key,u),u.lanes=f,u.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},u}function YL(a,u,f,v,C){this.tag=u,this.containerInfo=a,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=de(0),this.expirationTimes=de(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=de(0),this.identifierPrefix=v,this.onRecoverableError=C,this.mutableSourceEagerHydrationData=null}function G0(a,u,f,v,C,I,L,Q,oe){return a=new YL(a,u,f,Q,oe),u===1?(u=1,I===!0&&(u|=8)):u=0,I=_o(3,null,null,u),a.current=I,I.stateNode=a,I.memoizedState={element:v,isDehydrated:f,cache:null,transitions:null,pendingSuspenseBoundaries:null},a0(I),a}function JL(a,u,f){var v=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),eb.exports=sD(),eb.exports}var ES;function lD(){if(ES)return Mm;ES=1;var e=BT();return Mm.createRoot=e.createRoot,Mm.hydrateRoot=e.hydrateRoot,Mm}var uD=lD(),jf={},kS;function cD(){if(kS)return jf;kS=1,Object.defineProperty(jf,"__esModule",{value:!0}),jf.parse=s,jf.serialize=d;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,n=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,r=/^[\u0020-\u003A\u003D-\u007E]*$/,o=Object.prototype.toString,i=(()=>{const h=function(){};return h.prototype=Object.create(null),h})();function s(h,g){const y=new i,b=h.length;if(b<2)return y;const w=(g==null?void 0:g.decode)||p;let x=0;do{const E=h.indexOf("=",x);if(E===-1)break;const A=h.indexOf(";",x),_=A===-1?b:A;if(E>_){x=h.lastIndexOf(";",E-1)+1;continue}const j=l(h,x,E),O=c(h,E,j),P=h.slice(j,O);if(y[P]===void 0){let D=l(h,E+1,_),M=c(h,_,D);const G=w(h.slice(D,M));y[P]=G}x=_+1}while(xy;){const b=h.charCodeAt(--g);if(b!==32&&b!==9)return g+1}return y}function d(h,g,y){const b=(y==null?void 0:y.encode)||encodeURIComponent;if(!e.test(h))throw new TypeError(`argument name is invalid: ${h}`);const w=b(g);if(!t.test(w))throw new TypeError(`argument val is invalid: ${g}`);let x=h+"="+w;if(!y)return x;if(y.maxAge!==void 0){if(!Number.isInteger(y.maxAge))throw new TypeError(`option maxAge is invalid: ${y.maxAge}`);x+="; Max-Age="+y.maxAge}if(y.domain){if(!n.test(y.domain))throw new TypeError(`option domain is invalid: ${y.domain}`);x+="; Domain="+y.domain}if(y.path){if(!r.test(y.path))throw new TypeError(`option path is invalid: ${y.path}`);x+="; Path="+y.path}if(y.expires){if(!m(y.expires)||!Number.isFinite(y.expires.valueOf()))throw new TypeError(`option expires is invalid: ${y.expires}`);x+="; Expires="+y.expires.toUTCString()}if(y.httpOnly&&(x+="; HttpOnly"),y.secure&&(x+="; Secure"),y.partitioned&&(x+="; Partitioned"),y.priority)switch(typeof y.priority=="string"?y.priority.toLowerCase():void 0){case"low":x+="; Priority=Low";break;case"medium":x+="; Priority=Medium";break;case"high":x+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${y.priority}`)}if(y.sameSite)switch(typeof y.sameSite=="string"?y.sameSite.toLowerCase():y.sameSite){case!0:case"strict":x+="; SameSite=Strict";break;case"lax":x+="; SameSite=Lax";break;case"none":x+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${y.sameSite}`)}return x}function p(h){if(h.indexOf("%")===-1)return h;try{return decodeURIComponent(h)}catch{return h}}function m(h){return o.call(h)==="[object Date]"}return jf}cD();/** + * react-router v7.1.3 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */var SS="popstate";function dD(e={}){function t(r,o){let{pathname:i,search:s,hash:l}=r.location;return Fw("",{pathname:i,search:s,hash:l},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:fp(o)}return pD(t,n,null,e)}function _n(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function aa(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function fD(){return Math.random().toString(36).substring(2,10)}function AS(e,t){return{usr:e.state,key:e.key,idx:t}}function Fw(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Jp(t):t,state:n,key:t&&t.key||r||fD()}}function fp({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Jp(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function pD(e,t,n,r={}){let{window:o=document.defaultView,v5Compat:i=!1}=r,s=o.history,l="POP",c=null,d=p();d==null&&(d=0,s.replaceState({...s.state,idx:d},""));function p(){return(s.state||{idx:null}).idx}function m(){l="POP";let w=p(),x=w==null?null:w-d;d=w,c&&c({action:l,location:b.location,delta:x})}function h(w,x){l="PUSH";let E=Fw(b.location,w,x);d=p()+1;let A=AS(E,d),_=b.createHref(E);try{s.pushState(A,"",_)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;o.location.assign(_)}i&&c&&c({action:l,location:b.location,delta:1})}function g(w,x){l="REPLACE";let E=Fw(b.location,w,x);d=p();let A=AS(E,d),_=b.createHref(E);s.replaceState(A,"",_),i&&c&&c({action:l,location:b.location,delta:0})}function y(w){let x=o.location.origin!=="null"?o.location.origin:o.location.href,E=typeof w=="string"?w:fp(w);return E=E.replace(/ $/,"%20"),_n(x,`No window.location.(origin|href) available to create URL for href: ${E}`),new URL(E,x)}let b={get action(){return l},get location(){return e(o,s)},listen(w){if(c)throw new Error("A history only accepts one active listener");return o.addEventListener(SS,m),c=w,()=>{o.removeEventListener(SS,m),c=null}},createHref(w){return t(o,w)},createURL:y,encodeLocation(w){let x=y(w);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:h,replace:g,go(w){return s.go(w)}};return b}function NT(e,t,n="/"){return hD(e,t,n,!1)}function hD(e,t,n,r){let o=typeof t=="string"?Jp(t):t,i=sl(o.pathname||"/",n);if(i==null)return null;let s=LT(e);mD(s);let l=null;for(let c=0;l==null&&c{let c={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};c.relativePath.startsWith("/")&&(_n(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length));let d=Ya([r,c.relativePath]),p=n.concat(c);i.children&&i.children.length>0&&(_n(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),LT(i.children,t,p,d)),!(i.path==null&&!i.index)&&t.push({path:d,score:CD(d,i.index),routesMeta:p})};return e.forEach((i,s)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))o(i,s);else for(let c of DT(i.path))o(i,s,c)}),t}function DT(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let s=DT(r.join("/")),l=[];return l.push(...s.map(c=>c===""?i:[i,c].join("/"))),o&&l.push(...s),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function mD(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:ED(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var gD=/^:[\w-]+$/,yD=3,vD=2,bD=1,wD=10,xD=-2,IS=e=>e==="*";function CD(e,t){let n=e.split("/"),r=n.length;return n.some(IS)&&(r+=xD),t&&(r+=vD),n.filter(o=>!IS(o)).reduce((o,i)=>o+(gD.test(i)?yD:i===""?bD:wD),r)}function ED(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function kD(e,t,n=!1){let{routesMeta:r}=e,o={},i="/",s=[];for(let l=0;l{if(p==="*"){let y=l[h]||"";s=i.slice(0,i.length-y.length).replace(/(.)\/+$/,"$1")}const g=l[h];return m&&!g?d[p]=void 0:d[p]=(g||"").replace(/%2F/g,"/"),d},{}),pathname:i,pathnameBase:s,pattern:e}}function SD(e,t=!1,n=!0){aa(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,l,c)=>(r.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function AD(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return aa(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function sl(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function ID(e,t="/"){let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?Jp(e):e;return{pathname:n?n.startsWith("/")?n:PD(n,t):t,search:_D(r),hash:jD(o)}}function PD(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function rb(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function TD(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function MT(e){let t=TD(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function zT(e,t,n,r=!1){let o;typeof e=="string"?o=Jp(e):(o={...e},_n(!o.pathname||!o.pathname.includes("?"),rb("?","pathname","search",o)),_n(!o.pathname||!o.pathname.includes("#"),rb("#","pathname","hash",o)),_n(!o.search||!o.search.includes("#"),rb("#","search","hash",o)));let i=e===""||o.pathname==="",s=i?"/":o.pathname,l;if(s==null)l=n;else{let m=t.length-1;if(!r&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),m-=1;o.pathname=h.join("/")}l=m>=0?t[m]:"/"}let c=ID(o,l),d=s&&s!=="/"&&s.endsWith("/"),p=(i||s===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(d||p)&&(c.pathname+="/"),c}var Ya=e=>e.join("/").replace(/\/\/+/g,"/"),RD=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),_D=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,jD=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function OD(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var FT=["POST","PUT","PATCH","DELETE"];new Set(FT);var BD=["GET",...FT];new Set(BD);var Od=R.createContext(null);Od.displayName="DataRouter";var ky=R.createContext(null);ky.displayName="DataRouterState";var $T=R.createContext({isTransitioning:!1});$T.displayName="ViewTransition";var ND=R.createContext(new Map);ND.displayName="Fetchers";var LD=R.createContext(null);LD.displayName="Await";var pa=R.createContext(null);pa.displayName="Navigation";var Sy=R.createContext(null);Sy.displayName="Location";var ds=R.createContext({outlet:null,matches:[],isDataRoute:!1});ds.displayName="Route";var Bx=R.createContext(null);Bx.displayName="RouteError";function DD(e,{relative:t}={}){_n(Xp(),"useHref() may be used only in the context of a component.");let{basename:n,navigator:r}=R.useContext(pa),{hash:o,pathname:i,search:s}=Zp(e,{relative:t}),l=i;return n!=="/"&&(l=i==="/"?n:Ya([n,i])),r.createHref({pathname:l,search:s,hash:o})}function Xp(){return R.useContext(Sy)!=null}function gl(){return _n(Xp(),"useLocation() may be used only in the context of a component."),R.useContext(Sy).location}var UT="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function WT(e){R.useContext(pa).static||R.useLayoutEffect(e)}function MD(){let{isDataRoute:e}=R.useContext(ds);return e?JD():zD()}function zD(){_n(Xp(),"useNavigate() may be used only in the context of a component.");let e=R.useContext(Od),{basename:t,navigator:n}=R.useContext(pa),{matches:r}=R.useContext(ds),{pathname:o}=gl(),i=JSON.stringify(MT(r)),s=R.useRef(!1);return WT(()=>{s.current=!0}),R.useCallback((c,d={})=>{if(aa(s.current,UT),!s.current)return;if(typeof c=="number"){n.go(c);return}let p=zT(c,JSON.parse(i),o,d.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:Ya([t,p.pathname])),(d.replace?n.replace:n.push)(p,d.state,d)},[t,n,i,o,e])}R.createContext(null);function Zp(e,{relative:t}={}){let{matches:n}=R.useContext(ds),{pathname:r}=gl(),o=JSON.stringify(MT(n));return R.useMemo(()=>zT(e,JSON.parse(o),r,t==="path"),[e,o,r,t])}function FD(e,t,n,r){_n(Xp(),"useRoutes() may be used only in the context of a component.");let{navigator:o}=R.useContext(pa),{matches:i}=R.useContext(ds),s=i[i.length-1],l=s?s.params:{},c=s?s.pathname:"/",d=s?s.pathnameBase:"/",p=s&&s.route;{let x=p&&p.path||"";VT(c,!p||x.endsWith("*")||x.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${c}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. + +Please change the parent to .`)}let m=gl(),h;h=m;let g=h.pathname||"/",y=g;if(d!=="/"){let x=d.replace(/^\//,"").split("/");y="/"+g.replace(/^\//,"").split("/").slice(x.length).join("/")}let b=NT(e,{pathname:y});return aa(p||b!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),aa(b==null||b[b.length-1].route.element!==void 0||b[b.length-1].route.Component!==void 0||b[b.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`),HD(b&&b.map(x=>Object.assign({},x,{params:Object.assign({},l,x.params),pathname:Ya([d,o.encodeLocation?o.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?d:Ya([d,o.encodeLocation?o.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),i,n,r)}function $D(){let e=YD(),t=OD(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=R.createElement(R.Fragment,null,R.createElement("p",null,"💿 Hey developer 👋"),R.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",R.createElement("code",{style:i},"ErrorBoundary")," or"," ",R.createElement("code",{style:i},"errorElement")," prop on your route.")),R.createElement(R.Fragment,null,R.createElement("h2",null,"Unexpected Application Error!"),R.createElement("h3",{style:{fontStyle:"italic"}},t),n?R.createElement("pre",{style:o},n):null,s)}var UD=R.createElement($D,null),WD=class extends R.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?R.createElement(ds.Provider,{value:this.props.routeContext},R.createElement(Bx.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function VD({routeContext:e,match:t,children:n}){let r=R.useContext(Od);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),R.createElement(ds.Provider,{value:e},n)}function HD(e,t=[],n=null,r=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,i=n==null?void 0:n.errors;if(i!=null){let c=o.findIndex(d=>d.route.id&&(i==null?void 0:i[d.route.id])!==void 0);_n(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),o=o.slice(0,Math.min(o.length,c+1))}let s=!1,l=-1;if(n)for(let c=0;c=0?o=o.slice(0,l+1):o=[o[0]];break}}}return o.reduceRight((c,d,p)=>{let m,h=!1,g=null,y=null;n&&(m=i&&d.route.id?i[d.route.id]:void 0,g=d.route.errorElement||UD,s&&(l<0&&p===0?(VT("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),h=!0,y=null):l===p&&(h=!0,y=d.route.hydrateFallbackElement||null)));let b=t.concat(o.slice(0,p+1)),w=()=>{let x;return m?x=g:h?x=y:d.route.Component?x=R.createElement(d.route.Component,null):d.route.element?x=d.route.element:x=c,R.createElement(VD,{match:d,routeContext:{outlet:c,matches:b,isDataRoute:n!=null},children:x})};return n&&(d.route.ErrorBoundary||d.route.errorElement||p===0)?R.createElement(WD,{location:n.location,revalidation:n.revalidation,component:g,error:m,children:w(),routeContext:{outlet:null,matches:b,isDataRoute:!0}}):w()},null)}function Nx(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function qD(e){let t=R.useContext(Od);return _n(t,Nx(e)),t}function GD(e){let t=R.useContext(ky);return _n(t,Nx(e)),t}function QD(e){let t=R.useContext(ds);return _n(t,Nx(e)),t}function Lx(e){let t=QD(e),n=t.matches[t.matches.length-1];return _n(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function KD(){return Lx("useRouteId")}function YD(){var r;let e=R.useContext(Bx),t=GD("useRouteError"),n=Lx("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function JD(){let{router:e}=qD("useNavigate"),t=Lx("useNavigate"),n=R.useRef(!1);return WT(()=>{n.current=!0}),R.useCallback(async(o,i={})=>{aa(n.current,UT),n.current&&(typeof o=="number"?e.navigate(o):await e.navigate(o,{fromRouteId:t,...i}))},[e,t])}var PS={};function VT(e,t,n){!t&&!PS[e]&&(PS[e]=!0,aa(!1,n))}R.memo(XD);function XD({routes:e,future:t,state:n}){return FD(e,void 0,n,t)}function ZD({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:i=!1}){_n(!Xp(),"You cannot render a inside another . You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),l=R.useMemo(()=>({basename:s,navigator:o,static:i,future:{}}),[s,o,i]);typeof n=="string"&&(n=Jp(n));let{pathname:c="/",search:d="",hash:p="",state:m=null,key:h="default"}=n,g=R.useMemo(()=>{let y=sl(c,s);return y==null?null:{location:{pathname:y,search:d,hash:p,state:m,key:h},navigationType:r}},[s,c,d,p,m,h,r]);return aa(g!=null,` is not able to match the URL "${c}${d}${p}" because it does not start with the basename, so the won't render anything.`),g==null?null:R.createElement(pa.Provider,{value:l},R.createElement(Sy.Provider,{children:t,value:g}))}var gg="get",yg="application/x-www-form-urlencoded";function Ay(e){return e!=null&&typeof e.tagName=="string"}function eM(e){return Ay(e)&&e.tagName.toLowerCase()==="button"}function tM(e){return Ay(e)&&e.tagName.toLowerCase()==="form"}function nM(e){return Ay(e)&&e.tagName.toLowerCase()==="input"}function rM(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function oM(e,t){return e.button===0&&(!t||t==="_self")&&!rM(e)}var zm=null;function iM(){if(zm===null)try{new FormData(document.createElement("form"),0),zm=!1}catch{zm=!0}return zm}var aM=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ob(e){return e!=null&&!aM.has(e)?(aa(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${yg}"`),null):e}function sM(e,t){let n,r,o,i,s;if(tM(e)){let l=e.getAttribute("action");r=l?sl(l,t):null,n=e.getAttribute("method")||gg,o=ob(e.getAttribute("enctype"))||yg,i=new FormData(e)}else if(eM(e)||nM(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a