1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFound-DO0LQY0j.js","assets/NotFound-BoWY3Jhj.css","assets/Signup-Bz8Bzf_u.js","assets/index-Dg5H5Crq.js","assets/About_us-CQyLomZ9.js","assets/index-DlrVRSu4.js","assets/index-4L2Cp8iN.js","assets/index-BK9sfADZ.css","assets/Contact_us-BBckeoN-.js","assets/Contact_us-CNPmJmQM.css","assets/Paperpdf-CBxO8TJP.js","assets/warning-BKEo_FSt.js","assets/Header-BSVhDBsL.js","assets/ChallengeMap_7Days-XBRxAwMO.js","assets/DashboardLayout-Ca4dK2eA.js","assets/DashboardLayout-sH2LkXnr.css","assets/IslandLoader-BdQVGeNJ.js","assets/UserProfile-h_vkN02K.js","assets/SkinChangeWeb-DS2WH1JZ.js","assets/slick-DFvY0fNF.css","assets/Leaderboard-DL2xBxn7.js","assets/ChallengeMapWeb-CQDVe7X6.js","assets/lodash-BXa0AFDi.js","assets/DayCompletionPopup-B4Bry1Jv.js","assets/axiosInstance-BGgSioDo.js","assets/TaskWeb-B9sDHCeZ.js","assets/DailyBonusWeb-6VL0ZSNr.js","assets/DailyRewardWeb-Cc1oFoEi.js","assets/InviteScreenWeb-DfMmHDBm.js","assets/FarmingWeb-DHGsYjHu.js","assets/UpgradeWeb-CoBnG_d6.js","assets/BoostFinalWeb-RSAqy5X8.js","assets/AIFarmingWeb-OKJZd9sV.js","assets/MyRewardsWeb-CJbd2hJo.js","assets/ABI-CEV_ioeP.js","assets/AIGameWeb-D4VlwwJ4.js","assets/SpinWheelWeb-H3iwMGqS.js","assets/AIEmojiWeb-BUgeZvPi.js","assets/TaptoLearnWeb-2f1_SfR_.js","assets/TaptoLearnWeb-CvSo1NtL.css","assets/animate-BaVkx4tQ.css","assets/AILearningWeb-CS-0J3SL.js","assets/DailyBlogsWeb-Gdg_A05k.js","assets/AIFactVaultWeb-CMv-Jk3o.js","assets/AISkillQuestWeb-BXhq-7rP.js","assets/AISpaceWeb-ERrGyy_4.js","assets/AIExplorerbadgeWeb-B_MApjA5.js","assets/AccomplishedWeb-ARIDWGAQ.js","assets/EarnedWeb-DSq8ltwM.js","assets/UnlockAIGenesisWeb-MZ9nABt1.js","assets/ChallengePathWeb-Bi3PzpqV.js","assets/ChallengeMap_30Days-CMwYAfrc.js","assets/TaskListWeb-PtSQjbdd.js","assets/UserDashboardWeb-D9tvh7Gp.js","assets/ConfirmSubscribeWeb-D-hLzFdI.js","assets/PaymentConfirmWeb-DCWmG4x1.js","assets/SubPackWeb-D-PyIesh.js","assets/SubscriptionWeb-BfVeBq6H.js","assets/AdminDashboard-CNL9maG7.js","assets/Dashboard--0MSTXFY.js","assets/Header-OG-cUTdB.js","assets/react-apexcharts.min-BhGBtYnY.js","assets/UserPerformance-TW-iP5fr.js","assets/xlsx-5_gWIQju.js","assets/FinancialReports-BFM_UZSB.js","assets/ReportnAnalytics-vRf0xtvS.js","assets/dayjs.min-D03OMJWP.js","assets/Dashboard-CC7oZcQC.js","assets/Header-mHlbNqtD.js","assets/UserManagement-BoOe9C5r.js","assets/SubscriptionTracking-BrfM3jzf.js","assets/Table-f_ht1g2z.js","assets/Activity-C1kVLlCP.js","assets/Sponsor-BMDoo_Tx.js","assets/ProfileInfo-Cqex7Gtw.js","assets/Dashboard-CSU2M_xv.js","assets/Header-B-04scwS.js","assets/Dashboard-B30oY75I.css","assets/Progress-DJbY1bqH.js","assets/CurrentProgram-aul1cyr4.js","assets/ReferralInformation-QGMny29K.js","assets/ReferralSubcription-Hd7jlbgb.js","assets/SupportTicket-DYUkOu5J.js","assets/VarkAssessment-Be56nrS_.js","assets/style-D0R8kjzC.css","assets/AILearningRoadmap-AHPfOzvk.js","assets/Roadmap-BD3956-w.js","assets/CspAssessment-BlYB81Vr.js","assets/CspJourneyStart-CJ0SN_xw.js","assets/AIJourneyStart-Ca5yfQ2H.js","assets/AIAssessment-CPmyno7f.js","assets/WebUserguidance-W0mPWU-s.js","assets/AIMythBreakerRules-eUAFuiZA.js","assets/SkillPointsEarned-BK7mFLMz.js","assets/AIFailureFilesRules-qDQrigEe.js","assets/AIToolArenaRules-CVbput-a.js","assets/AIValidationAssessmentWeb-Ctd5_m_Y.js","assets/AIValidationResultWeb-DILmnMoq.js","assets/embedded-wallet-DCHUEzWI.js","assets/if-defined-BMfMamqp.js","assets/index-DVSGNzMx.js","assets/index-D7xWvKv-.js","assets/ref-CR2UIgGF.js","assets/index-Dpva4LFm.js","assets/index-F6a95YSp.js","assets/index-CFyh-CAP.js","assets/index-e7tqceMg.js","assets/index-Byc1oIob.js","assets/index-DtjBaJMW.js","assets/index-Bl4QydjO.js","assets/email-DcVMXyPE.js","assets/index-DOva3W9i.js","assets/socials-Hezf8mB-.js","assets/index-BsYo1aDC.js","assets/ConstantsUtil-Dmg8YACJ.js","assets/index-Bm2AFnnm.js","assets/index-DXtw0ihU.js","assets/index-Dvw7uUs7.js","assets/index-p1RRXqFe.js","assets/swaps-kYGA5iFL.js","assets/index-BMvgMG93.js","assets/index-9n2wpxgm.js","assets/index-CIJ1L2SX.js","assets/send-UfKqdzcB.js","assets/index-Bh9LzGn2.js","assets/index-BjRtm2Br.js","assets/receive-CpQTVpTA.js","assets/index-DzakMU3c.js","assets/onramp-CV30ebyU.js","assets/index-CmJLjvq6.js","assets/index-DfvOK8ga.js","assets/transactions-DjZy5Zt-.js","assets/index-DmW-FMOb.js","assets/index-C0yL8gtn.js","assets/index-BHwLSAF0.js","assets/index-xN3vPsci.js","assets/index-1l94QT9m.js","assets/w3m-modal-Cmq6Vq04.js","assets/SafeProvider-C8DyH3ec.js","assets/index-DUobKHF_.js"])))=>i.map(i=>d[i]); 2function iG(t,e){for(var r=0;r<e.length;r++){const n=e[r];
vendor: 6,156 bytes, lines 2-10
2if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in t)){const s=Object.getOwnPropertyDescriptor(n,i);s&&Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=r(i);fetch(i.href,s)}})();var li=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function is(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Vn(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var zL={exports:{}},_4={},WL={exports:{}},pr={};/** 3 * @license React 4 * react.production.min.js 5 * 6 * Copyright (c) Facebook, Inc. and its affiliates. 7 * 8 * This source code is licensed under the MIT license found in the 9 * LICENSE file in the root directory of this source tree. 10 */var Ry=Symbol.for("react.element"),sG=Symbol.for("react.portal"),oG=Symbol.for("react.fragment"),aG=Symbol.for("react.strict_mode"),cG=Symbol.for("react.profiler"),lG=Symbol.for("react.provider"),uG=Symbol.for("react.context"),fG=Symbol.for("react.forward_ref"),dG=Symbol.for("react.suspense"),hG=Symbol.for("react.memo"),pG=Symbol.for("react.lazy"),W7=Symbol.iterator;function gG(t){return t===null||typeof t!="object"?null:(t=W7&&t[W7]||t["@@iterator"],typeof t=="function"?t:null)}var HL={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},qL=Object.assign,VL={};function _g(t,e,r){this.props=t,this.context=e,this.refs=VL,this.updater=r||HL}_g.prototype.isReactComponent={};_g.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,e,"setState")};_g.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function KL(){}KL.prototype=_g.prototype;function wA(t,e,r){this.props=t,this.context=e,this.refs=VL,this.updater=r||HL}var vA=wA.prototype=new KL;vA.constructor=wA;qL(vA,_g.prototype);vA.isPureReactComponent=!0;var H7=Array.isArray,GL=Object.prototype.hasOwnProperty,xA={current:null},YL={key:!0,ref:!0,__self:!0,__source:!0};function ZL(t,e,r){var n,i={},s=null,o=null;if(e!=null)for(n in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)GL.call(e,n)&&!YL.hasOwnProperty(n)&&(i[n]=e[n]);var a=arguments.length-2;if(a===1)i.children=r;else if(1<a){for(var c=Array(a),l=0;l<a;l++)c[l]=arguments[l+2];i.children=c}if(t&&t.defaultProps)for(n in a=t.defaultProps,a)i[n]===void 0&&(i[n]=a[n]);return{$$typeof:Ry,type:t,key:s,ref:o,props:i,_owner:xA.current}}function mG(t,e){return{$$typeof:Ry,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function EA(t){return typeof t=="object"&&t!==null&&t.$$typeof===Ry}function yG(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(r){return e[r]})}var q7=/\/+/g;function o5(t,e){return typeof t=="object"&&t!==null&&t.key!=null?yG(""+t.key):e.toString(36)}function Hw(t,e,r,n,i){var s=typeof t;(s==="undefined"||s==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case Ry:case sG:o=!0}}if(o)return o=t,i=i(o),t=n===""?"."+o5(o,0):n,H7(i)?(r="",t!=null&&(r=t.replace(q7,"$&/")+"/"),Hw(i,e,r,"",function(l){return l})):i!=null&&(EA(i)&&(i=mG(i,r+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(q7,"$&/")+"/")+t)),e.push(i)),1;if(o=0,n=n===""?".":n+":",H7(t))for(var a=0;a<t.length;a++){s=t[a];var c=n+o5(s,a);o+=Hw(s,e,r,c,i)}else if(c=gG(t),typeof c=="function")for(t=c.call(t),a=0;!(s=t.next()).done;)s=s.value,c=n+o5(s,a++),o+=Hw(s,e,r,c,i);else if(s==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function Ab(t,e,r){if(t==null)return t;var n=[],i=0;return Hw(t,n,"","",function(s){return e.call(r,s,i++)}),n}function bG(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(r){(t._status===0||t._status===-1)&&(t._status=1,t._result=r)},function(r){(t._status===0||t._status===-1)&&(t._status=2,t._result=r)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var Gs={current:null},qw={transition:null},wG={ReactCurrentDispatcher:Gs,ReactCurrentBatchConfig:qw,ReactCurrentOwner:xA};function JL(){throw Error("act(...) is not supported in production builds of React.")}pr.Children={map:Ab,forEach:function(t,e,r){Ab(t,function(){e.apply(this,arguments)},r)},count:function(t){var e=0;return Ab(t,function(){e++}),e},toArray:function(t){return Ab(t,function(e){return e})||[]},only:function(t){if(!EA(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};pr.Component=_g;pr.Fragment=oG;pr.Profiler=cG;pr.PureComponent=wA;pr.StrictMode=aG;
vendor: 5,742 bytes, lines 10-26
10pr.Suspense=dG;pr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=wG;pr.act=JL;pr.cloneElement=function(t,e,r){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var n=qL({},t.props),i=t.key,s=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(s=e.ref,o=xA.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(c in e)GL.call(e,c)&&!YL.hasOwnProperty(c)&&(n[c]=e[c]===void 0&&a!==void 0?a[c]:e[c])}var c=arguments.length-2;if(c===1)n.children=r;else if(1<c){a=Array(c);for(var l=0;l<c;l++)a[l]=arguments[l+2];n.children=a}return{$$typeof:Ry,type:t.type,key:i,ref:s,props:n,_owner:o}};pr.createContext=function(t){return t={$$typeof:uG,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:lG,_context:t},t.Consumer=t};pr.createElement=ZL;pr.createFactory=function(t){var e=ZL.bind(null,t);return e.type=t,e};pr.createRef=function(){return{current:null}};pr.forwardRef=function(t){return{$$typeof:fG,render:t}};pr.isValidElement=EA;pr.lazy=function(t){return{$$typeof:pG,_payload:{_status:-1,_result:t},_init:bG}};pr.memo=function(t,e){return{$$typeof:hG,type:t,compare:e===void 0?null:e}};pr.startTransition=function(t){var e=qw.transition;qw.transition={};try{t()}finally{qw.transition=e}};pr.unstable_act=JL;pr.useCallback=function(t,e){return Gs.current.useCallback(t,e)};pr.useContext=function(t){return Gs.current.useContext(t)};pr.useDebugValue=function(){};pr.useDeferredValue=function(t){return Gs.current.useDeferredValue(t)};pr.useEffect=function(t,e){return Gs.current.useEffect(t,e)};pr.useId=function(){return Gs.current.useId()};pr.useImperativeHandle=function(t,e,r){return Gs.current.useImperativeHandle(t,e,r)};pr.useInsertionEffect=function(t,e){return Gs.current.useInsertionEffect(t,e)};pr.useLayoutEffect=function(t,e){return Gs.current.useLayoutEffect(t,e)};pr.useMemo=function(t,e){return Gs.current.useMemo(t,e)};pr.useReducer=function(t,e,r){return Gs.current.useReducer(t,e,r)};pr.useRef=function(t){return Gs.current.useRef(t)};pr.useState=function(t){return Gs.current.useState(t)};pr.useSyncExternalStore=function(t,e,r){return Gs.current.useSyncExternalStore(t,e,r)};pr.useTransition=function(){return Gs.current.useTransition()};pr.version="18.3.1";WL.exports=pr;var se=WL.exports;const Be=is(se),vG=iG({__proto__:null,default:Be},[se]);/** 11 * @license React 12 * react-jsx-runtime.production.min.js 13 * 14 * Copyright (c) Facebook, Inc. and its affiliates. 15 * 16 * This source code is licensed under the MIT license found in the 17 * LICENSE file in the root directory of this source tree. 18 */var xG=se,EG=Symbol.for("react.element"),CG=Symbol.for("react.fragment"),_G=Object.prototype.hasOwnProperty,AG=xG.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,SG={key:!0,ref:!0,__self:!0,__source:!0};function QL(t,e,r){var n,i={},s=null,o=null;r!==void 0&&(s=""+r),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(o=e.ref);for(n in e)_G.call(e,n)&&!SG.hasOwnProperty(n)&&(i[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps,e)i[n]===void 0&&(i[n]=e[n]);return{$$typeof:EG,type:t,key:s,ref:o,props:i,_owner:AG.current}}_4.Fragment=CG;_4.jsx=QL;_4.jsxs=QL;zL.exports=_4;var w=zL.exports,q6={},XL={exports:{}},Go={},eM={exports:{}},tM={};/** 19 * @license React 20 * scheduler.production.min.js 21 * 22 * Copyright (c) Facebook, Inc. and its affiliates. 23 * 24 * This source code is licensed under the MIT license found in the 25 * LICENSE file in the root directory of this source tree. 26 */(function(t){function e(R,M){var H=R.length;R.push(M);e:for(;0<H;){var N=H-1>>>1,v=R[N];if(0<i(v,M))R[N]=M,R[H]=v,H=N;else break e}}function r(R){return R.length===0?null:R[0]}function n(R){if(R.length===0)return null;var M=R[0],H=R.pop();if(H!==M){R[0]=H;e:for(var N=0,v=R.length,U=v>>>1;N<U;){var G=2*(N+1)-1,S=R[G],J=G+1,ne=R[J];if(0>i(S,H))J<v&&0>i(ne,S)?(R[N]=ne,R[J]=H,N=J):(R[N]=S,R[G]=H,N=G);else if(J<v&&0>i(ne,H))R[N]=ne,R[J]=H,N=J;else break e}}return M}function i(R,M){var H=R.sortIndex-M.sortIndex;return H!==0?H:R.id-M.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var c=[],l=[],u=1,f=null,d=3,p=!1,h=!1,g=!1,y=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(R){for(var M=r(l);M!==null;){if(M.callback===null)n(l);else if(M.startTime<=R)n(l),M.sortIndex=M.expirationTime,e(c,M);else break;M=r(l)}}function L(R){if(g=!1,_(R),!h)if(r(c)!==null)h=!0,E(P);else{var M=r(l);M!==null&&k(L,M.startTime-R)}}function P(R,M){h=!1,g&&(g=!1,x(B),B=-1),p=!0;var H=d;try{for(_(M),f=r(c);f!==null&&(!(f.expirationTime>M)||R&&!D());){var N=f.callback;if(typeof N=="function"){f.callback=null,d=f.priorityLevel;var v=N(f.expirationTime<=M);M=t.unstable_now(),typeof v=="function"?f.callback=v:f===r(c)&&n(c),_(M)}else n(c);f=r(c)}if(f!==null)var U=!0;else{var G=r(l);G!==null&&k(L,G.startTime-M),U=!1}return U}finally{f=null,d=H,p=!1}}var z=!1,W=null,B=-1,I=5,j=-1;function D(){return!(t.unstable_now()-j<I)}function O(){if(W!==null){var R=t.unstable_now();j=R;var M=!0;try{M=W(!0,R)}finally{M?T():(z=!1,W=null)}}else z=!1}var T;if(typeof C=="function")T=function(){C(O)};else if(typeof MessageChannel<"u"){var m=new MessageChannel,b=m.port2;m.port1.onmessage=O,T=function(){b.postMessage(null)}}else T=function(){y(O,0)};
vendor: 8,484 bytes, lines 26-35
26function E(R){W=R,z||(z=!0,T())}function k(R,M){B=y(function(){R(t.unstable_now())},M)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(R){R.callback=null},t.unstable_continueExecution=function(){h||p||(h=!0,E(P))},t.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<R?Math.floor(1e3/R):5},t.unstable_getCurrentPriorityLevel=function(){return d},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(R){switch(d){case 1:case 2:case 3:var M=3;break;default:M=d}var H=d;d=M;try{return R()}finally{d=H}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(R,M){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var H=d;d=R;try{return M()}finally{d=H}},t.unstable_scheduleCallback=function(R,M,H){var N=t.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?N+H:N):H=N,R){case 1:var v=-1;break;case 2:v=250;break;case 5:v=1073741823;break;case 4:v=1e4;break;default:v=5e3}return v=H+v,R={id:u++,callback:M,priorityLevel:R,startTime:H,expirationTime:v,sortIndex:-1},H>N?(R.sortIndex=H,e(l,R),r(c)===null&&R===r(l)&&(g?(x(B),B=-1):g=!0,k(L,H-N))):(R.sortIndex=v,e(c,R),h||p||(h=!0,E(P))),R},t.unstable_shouldYield=D,t.unstable_wrapCallback=function(R){var M=d;return function(){var H=d;d=M;try{return R.apply(this,arguments)}finally{d=H}}}})(tM);eM.exports=tM;var NG=eM.exports;/** 27 * @license React 28 * react-dom.production.min.js 29 * 30 * Copyright (c) Facebook, Inc. and its affiliates. 31 * 32 * This source code is licensed under the MIT license found in the 33 * LICENSE file in the root directory of this source tree. 34 */var IG=se,qo=NG;function ke(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var rM=new Set,Jm={};function Kh(t,e){jp(t,e),jp(t+"Capture",e)}function jp(t,e){for(Jm[t]=e,t=0;t<e.length;t++)rM.add(e[t])}var uu=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),V6=Object.prototype.hasOwnProperty,TG=/^[: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]*$/,V7={},K7={};function kG(t){return V6.call(K7,t)?!0:V6.call(V7,t)?!1:TG.test(t)?K7[t]=!0:(V7[t]=!0,!1)}function PG(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function RG(t,e,r,n){if(e===null||typeof e>"u"||PG(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Ys(t,e,r,n,i,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var ns={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){ns[t]=new Ys(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];ns[e]=new Ys(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){ns[t]=new Ys(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){ns[t]=new Ys(t,2,!1,t,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(t){ns[t]=new Ys(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){ns[t]=new Ys(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){ns[t]=new Ys(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){ns[t]=new Ys(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){ns[t]=new Ys(t,5,!1,t.toLowerCase(),null,!1,!1)});var CA=/[\-:]([a-z])/g;function _A(t){return t[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(t){var e=t.replace(CA,_A);ns[e]=new Ys(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(CA,_A);ns[e]=new Ys(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(CA,_A);ns[e]=new Ys(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){ns[t]=new Ys(t,1,!1,t.toLowerCase(),null,!1,!1)});ns.xlinkHref=new Ys("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){ns[t]=new Ys(t,1,!1,t.toLowerCase(),null,!0,!0)});function AA(t,e,r,n){var i=ns.hasOwnProperty(e)?ns[e]:null;(i!==null?i.type!==0:n||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(RG(e,r,i,n)&&(r=null),n||i===null?kG(e)&&(r===null?t.removeAttribute(e):t.setAttribute(e,""+r)):i.mustUseProperty?t[i.propertyName]=r===null?i.type===3?!1:"":r:(e=i.attributeName,n=i.attributeNamespace,r===null?t.removeAttribute(e):(i=i.type,r=i===3||i===4&&r===!0?"":""+r,n?t.setAttributeNS(n,e,r):t.setAttribute(e,r))))}var Au=IG.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Sb=Symbol.for("react.element"),Q0=Symbol.for("react.portal"),X0=Symbol.for("react.fragment"),SA=Symbol.for("react.strict_mode"),K6=Symbol.for("react.profiler"),nM=Symbol.for("react.provider"),iM=Symbol.for("react.context"),NA=Symbol.for("react.forward_ref"),G6=Symbol.for("react.suspense"),Y6=Symbol.for("react.suspense_list"),IA=Symbol.for("react.memo"),sf=Symbol.for("react.lazy"),sM=Symbol.for("react.offscreen"),G7=Symbol.iterator;function Jg(t){return t===null||typeof t!="object"?null:(t=G7&&t[G7]||t["@@iterator"],typeof t=="function"?t:null)}var Hn=Object.assign,a5;function $1(t){if(a5===void 0)try{throw Error()}catch(r){var e=r.stack.trim().match(/\n( *(at )?)/);a5=e&&e[1]||""}return` 35`+a5+t}var c5=!1;function l5(t,e){if(!t||c5)return"";c5=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(l){var n=l}Reflect.construct(t,[],e)}else{try{e.call()}catch(l){n=l}t.call(e.prototype)}else{try{throw Error()}catch(l){n=l}t()}}
vendor: 8,484 bytes, lines 35-38
35catch(l){if(l&&n&&typeof l.stack=="string"){for(var i=l.stack.split(` 36`),s=n.stack.split(` 37`),o=i.length-1,a=s.length-1;1<=o&&0<=a&&i[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(i[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||i[o]!==s[a]){var c=` 38`+i[o].replace(" at new "," at ");return t.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",t.displayName)),c}while(1<=o&&0<=a);break}}}finally{c5=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?$1(t):""}function OG(t){switch(t.tag){case 5:return $1(t.type);case 16:return $1("Lazy");case 13:return $1("Suspense");case 19:return $1("SuspenseList");case 0:case 2:case 15:return t=l5(t.type,!1),t;case 11:return t=l5(t.type.render,!1),t;case 1:return t=l5(t.type,!0),t;default:return""}}function Z6(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case X0:return"Fragment";case Q0:return"Portal";case K6:return"Profiler";case SA:return"StrictMode";case G6:return"Suspense";case Y6:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case iM:return(t.displayName||"Context")+".Consumer";case nM:return(t._context.displayName||"Context")+".Provider";case NA:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case IA:return e=t.displayName||null,e!==null?e:Z6(t.type)||"Memo";case sf:e=t._payload,t=t._init;try{return Z6(t(e))}catch{}}return null}function DG(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Z6(e);case 8:return e===SA?"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 e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Yf(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function oM(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function LG(t){var e=oM(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,s=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Nb(t){t._valueTracker||(t._valueTracker=LG(t))}function aM(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=oM(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function Mv(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function J6(t,e){var r=e.checked;return Hn({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function Y7(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=Yf(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function cM(t,e){e=e.checked,e!=null&&AA(t,"checked",e,!1)}function Q6(t,e){cM(t,e);var r=Yf(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?X6(t,e.type,r):e.hasOwnProperty("defaultValue")&&X6(t,e.type,Yf(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Z7(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function X6(t,e,r){(e!=="number"||Mv(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var U1=Array.isArray;function xp(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i<r.length;i++)e["$"+r[i]]=!0;for(r=0;r<t.length;r++)i=e.hasOwnProperty("$"+t[r].value),t[r].selected!==i&&(t[r].selected=i),i&&n&&(t[r].defaultSelected=!0)}else{for(r=""+Yf(r),e=null,i=0;i<t.length;i++){if(t[i].value===r){t[i].selected=!0,n&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function e8(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(ke(91));return Hn({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function J7(t,e){var r=e.value;if(r==null){if(r=e.children,e=e.defaultValue,r!=null){if(e!=null)throw Error(ke(92));if(U1(r)){if(1<r.length)throw Error(ke(93));r=r[0]}e=r}e==null&&(e=""),r=e}t._wrapperState={initialValue:Yf(r)}}function lM(t,e){var r=Yf(e.value),n=Yf(e.defaultValue);r!=null&&(r=""+r,r!==t.value&&(t.value=r),e.defaultValue==null&&t.defaultValue!==r&&(t.defaultValue=r)),n!=null&&(t.defaultValue=""+n)}function Q7(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function uM(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function t8(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?uM(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Ib,fM=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,r,n,i){MSApp.execUnsafeLocalFunction(function(){return t(e,r,n,i)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(Ib=Ib||document.createElement("div"),Ib.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=Ib.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Qm(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var im={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},MG=["Webkit","ms","Moz","O"];Object.keys(im).forEach(function(t){MG.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),im[e]=im[t]})});function dM(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||im.hasOwnProperty(t)&&im[t]?(""+e).trim():e+"px"}function hM(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=dM(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var $G=Hn({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 r8(t,e){if(e){if($G[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ke(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ke(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ke(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ke(62))}}function n8(t,e){if(t.indexOf("-")===-1)return typeof e.is=="str
38ing";switch(t){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 i8=null;function TA(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var s8=null,Ep=null,Cp=null;function X7(t){if(t=Ly(t)){if(typeof s8!="function")throw Error(ke(280));var e=t.stateNode;e&&(e=T4(e),s8(t.stateNode,t.type,e))}}function pM(t){Ep?Cp?Cp.push(t):Cp=[t]:Ep=t}function gM(){if(Ep){var t=Ep,e=Cp;if(Cp=Ep=null,X7(t),e)for(t=0;t<e.length;t++)X7(e[t])}}function mM(t,e){return t(e)}function yM(){}var u5=!1;function bM(t,e,r){if(u5)return t(e,r);u5=!0;try{return mM(t,e,r)}finally{u5=!1,(Ep!==null||Cp!==null)&&(yM(),gM())}}function Xm(t,e){var r=t.stateNode;if(r===null)return null;var n=T4(r);if(n===null)return null;r=n[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(t=t.type,n=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!n;break e;default:t=!1}if(t)return null;if(r&&typeof r!="function")throw Error(ke(231,e,typeof r));return r}var o8=!1;if(uu)try{var Qg={};Object.defineProperty(Qg,"passive",{get:function(){o8=!0}}),window.addEventListener("test",Qg,Qg),window.removeEventListener("test",Qg,Qg)}catch{o8=!1}function UG(t,e,r,n,i,s,o,a,c){var l=Array.prototype.slice.call(arguments,3);try{e.apply(r,l)}catch(u){this.onError(u)}}var sm=!1,$v=null,Uv=!1,a8=null,BG={onError:function(t){sm=!0,$v=t}};function FG(t,e,r,n,i,s,o,a,c){sm=!1,$v=null,UG.apply(BG,arguments)}function jG(t,e,r,n,i,s,o,a,c){if(FG.apply(this,arguments),sm){if(sm){var l=$v;sm=!1,$v=null}else throw Error(ke(198));Uv||(Uv=!0,a8=l)}}function Gh(t){var e=t,r=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(r=e.return),t=e.return;while(t)}return e.tag===3?r:null}function wM(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function eN(t){if(Gh(t)!==t)throw Error(ke(188))}function zG(t){var e=t.alternate;if(!e){if(e=Gh(t),e===null)throw Error(ke(188));return e!==t?null:t}for(var r=t,n=e;;){var i=r.return;if(i===null)break;var s=i.alternate;if(s===null){if(n=i.return,n!==null){r=n;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===r)return eN(i),t;if(s===n)return eN(i),e;s=s.sibling}throw Error(ke(188))}if(r.return!==n.return)r=i,n=s;else{for(var o=!1,a=i.child;a;){if(a===r){o=!0,r=i,n=s;break}if(a===n){o=!0,n=i,r=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===r){o=!0,r=s,n=i;break}if(a===n){o=!0,n=s,r=i;break}a=a.sibling}if(!o)throw Error(ke(189))}}if(r.alternate!==n)throw Error(ke(190))}if(r.tag!==3)throw Error(ke(188));return r.stateNode.current===r?t:e}function vM(t){return t=zG(t),t!==null?xM(t):null}function xM(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=xM(t);if(e!==null)return e;t=t.sibling}return null}var EM=qo.unstable_scheduleCallback,tN=qo.unstable_cancelCallback,WG=qo.unstable_shouldYield,HG=qo.unstable_requestPaint,ui=qo.unstable_now,qG=qo.unstable_getCurrentPriorityLevel,kA=qo.unstable_ImmediatePriority,CM=qo.unstable_UserBlockingPriority,Bv=qo.unstable_NormalPriority,VG=qo.unstable_LowPriority,_M=qo.unstable_IdlePriority,A4=null,el=null;function KG(t){if(el&&typeof el.onCommitFiberRoot=="function")try{el.onCommitFiberRoot(A4,t,void 0,(t.current.flags&128)===128)}catch{}}var oc=Math.clz32?Math.clz32:ZG,GG=Math.log,YG=Math.LN2;function ZG(t){return t>>>=0,t===0?32:31-(GG(t)/YG|0)|0}var Tb=64,kb=4194304;function B1(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Fv(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,i=t.suspendedLanes,s=t.pingedLanes,o=r&268435455;if(o!==0){var a=o&~i;
vendor: 4,886 bytes, line 38
38a!==0?n=B1(a):(s&=o,s!==0&&(n=B1(s)))}else o=r&~i,o!==0?n=B1(o):s!==0&&(n=B1(s));if(n===0)return 0;if(e!==0&&e!==n&&!(e&i)&&(i=n&-n,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0<e;)r=31-oc(e),i=1<<r,n|=t[r],e&=~i;return n}function JG(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 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 e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function QG(t,e){for(var r=t.suspendedLanes,n=t.pingedLanes,i=t.expirationTimes,s=t.pendingLanes;0<s;){var o=31-oc(s),a=1<<o,c=i[o];c===-1?(!(a&r)||a&n)&&(i[o]=JG(a,e)):c<=e&&(t.expiredLanes|=a),s&=~a}}function c8(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function AM(){var t=Tb;return Tb<<=1,!(Tb&4194240)&&(Tb=64),t}function f5(t){for(var e=[],r=0;31>r;r++)e.push(t);return e}function Oy(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-oc(e),t[e]=r}function XG(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0<r;){var i=31-oc(r),s=1<<i;e[i]=0,n[i]=-1,t[i]=-1,r&=~s}}function PA(t,e){var r=t.entangledLanes|=e;for(t=t.entanglements;r;){var n=31-oc(r),i=1<<n;i&e|t[n]&e&&(t[n]|=e),r&=~i}}var an=0;function SM(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var NM,RA,IM,TM,kM,l8=!1,Pb=[],Pf=null,Rf=null,Of=null,e2=new Map,t2=new Map,gf=[],eY="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function rN(t,e){switch(t){case"focusin":case"focusout":Pf=null;break;case"dragenter":case"dragleave":Rf=null;break;case"mouseover":case"mouseout":Of=null;break;case"pointerover":case"pointerout":e2.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":t2.delete(e.pointerId)}}function Xg(t,e,r,n,i,s){return t===null||t.nativeEvent!==s?(t={blockedOn:e,domEventName:r,eventSystemFlags:n,nativeEvent:s,targetContainers:[i]},e!==null&&(e=Ly(e),e!==null&&RA(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function tY(t,e,r,n,i){switch(e){case"focusin":return Pf=Xg(Pf,t,e,r,n,i),!0;case"dragenter":return Rf=Xg(Rf,t,e,r,n,i),!0;case"mouseover":return Of=Xg(Of,t,e,r,n,i),!0;case"pointerover":var s=i.pointerId;return e2.set(s,Xg(e2.get(s)||null,t,e,r,n,i)),!0;case"gotpointercapture":return s=i.pointerId,t2.set(s,Xg(t2.get(s)||null,t,e,r,n,i)),!0}return!1}function PM(t){var e=zd(t.target);if(e!==null){var r=Gh(e);if(r!==null){if(e=r.tag,e===13){if(e=wM(r),e!==null){t.blockedOn=e,kM(t.priority,function(){IM(r)});return}}else if(e===3&&r.stateNode.current.memoizedState.isDehydrated){t.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Vw(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var r=u8(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(r===null){r=t.nativeEvent;var n=new r.constructor(r.type,r);i8=n,r.target.dispatchEvent(n),i8=null}else return e=Ly(r),e!==null&&RA(e),t.blockedOn=r,!1;e.shift()}return!0}function nN(t,e,r){Vw(t)&&r.delete(e)}function rY(){l8=!1,Pf!==null&&Vw(Pf)&&(Pf=null),Rf!==null&&Vw(Rf)&&(Rf=null),Of!==null&&Vw(Of)&&(Of=null),e2.forEach(nN),t2.forEach(nN)}function e1(t,e){t.blockedOn===e&&(t.blockedOn=null,l8||(l8=!0,qo.unstable_scheduleCallback(qo.unstable_NormalPriority,rY)))}function r2(t){function e(i){return e1(i,t)}if(0<Pb.length){e1(Pb[0],t);for(var r=1;r<Pb.length;r++){var n=Pb[r];n.blockedOn===t&&(n.blockedOn=null)}}for(Pf!==null&&e1(Pf,t),Rf!==null&&e1(Rf,t),Of!==null&&e1(Of,t),e2.forEach(e),t2.forEach(e),r=0;r<gf.length;r++)n=gf[r],n.blockedOn===t&&(n.blockedOn=null);for(;0<gf.length&&(r=gf[0],r.blockedOn===null);)PM(r),r.blockedOn===null&&gf.shift()}var _p=Au.ReactCurrentBatchConfig,jv=!0;function nY(t,e,r,n){var i=an,s=_p.transition;_p.transition=null;try{an=1,OA(t,e,r,n)}finally{an=i,_p.transition=s}}function iY(t,e,r,n){var i=an,s=_p.transition;_p.transition=null;try{an=4,OA(t,e,r,n)}finally{an=i,_p.transition=s}}function OA(t,e,r,n){if(jv){var i=u8(t,e,r,n);if(i===null)x5(t,e,n,zv,r),rN(t,n);else if(tY(i,t,e,r,n))n.stopPropagation();else if(rN(t,n),e&4&&-1<eY.indexOf(t)){for(;i!==null;){var s=Ly(i);if(s!==null&&NM(s),s=u8(t,e,r,n),s===null&&x5(t,e,n,zv,r),s===i)break;i=s}i!==null&&n.stopPropagation()}
vendor: 10,738 bytes, line 38
38else x5(t,e,n,null,r)}}var zv=null;function u8(t,e,r,n){if(zv=null,t=TA(n),t=zd(t),t!==null)if(e=Gh(t),e===null)t=null;else if(r=e.tag,r===13){if(t=wM(e),t!==null)return t;t=null}else if(r===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return zv=t,null}function RM(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(qG()){case kA:return 1;case CM:return 4;case Bv:case VG:return 16;case _M:return 536870912;default:return 16}default:return 16}}var Ef=null,DA=null,Kw=null;function OM(){if(Kw)return Kw;var t,e=DA,r=e.length,n,i="value"in Ef?Ef.value:Ef.textContent,s=i.length;for(t=0;t<r&&e[t]===i[t];t++);var o=r-t;for(n=1;n<=o&&e[r-n]===i[s-n];n++);return Kw=i.slice(t,1<n?1-n:void 0)}function Gw(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Rb(){return!0}function iN(){return!1}function Yo(t){function e(r,n,i,s,o){this._reactName=r,this._targetInst=i,this.type=n,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in t)t.hasOwnProperty(a)&&(r=t[a],this[a]=r?r(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Rb:iN,this.isPropagationStopped=iN,this}return Hn(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Rb)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Rb)},persist:function(){},isPersistent:Rb}),e}var Ag={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},LA=Yo(Ag),Dy=Hn({},Ag,{view:0,detail:0}),sY=Yo(Dy),d5,h5,t1,S4=Hn({},Dy,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:MA,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==t1&&(t1&&t.type==="mousemove"?(d5=t.screenX-t1.screenX,h5=t.screenY-t1.screenY):h5=d5=0,t1=t),d5)},movementY:function(t){return"movementY"in t?t.movementY:h5}}),sN=Yo(S4),oY=Hn({},S4,{dataTransfer:0}),aY=Yo(oY),cY=Hn({},Dy,{relatedTarget:0}),p5=Yo(cY),lY=Hn({},Ag,{animationName:0,elapsedTime:0,pseudoElement:0}),uY=Yo(lY),fY=Hn({},Ag,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),dY=Yo(fY),hY=Hn({},Ag,{data:0}),oN=Yo(hY),pY={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gY={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},mY={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function yY(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=mY[t])?!!e[t]:!1}function MA(){return yY}var bY=Hn({},Dy,{key:function(t){if(t.key){var e=pY[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Gw(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?gY[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:MA,charCode:function(t){return t.type==="keypress"?Gw(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Gw(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),wY=Yo(bY),vY=Hn({},S4,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),aN=Yo(vY),xY=Hn({},Dy,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:MA}),EY=Yo(xY),CY=Hn({},Ag,{propertyName:0,elapsedTime:0,pseudoElement:0}),_Y=Yo(CY),AY=Hn({},S4,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),SY=Yo(AY),NY=[9,13,27,32],$A=uu&&"CompositionEvent"in window,om=null;uu&&"documentMode"in document&&(om=document.documentMode);var IY=uu&&"TextEvent"in window&&!om,DM=uu&&(!$A||om&&8<om&&11>=om),cN=" ",lN=!1;function LM(t,e){switch(t){case"keyup":return NY.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function MM(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ep=!1;function TY(t,e){switch(t){case"compositionend":return MM(e);case"keypress":return e.which!==32?null:(lN=!0,cN);case"textInput":return t=e.data,t===cN&&lN?null:t;default:return null}}function kY(t,e){if(ep)return t==="compositionend"||!$A&&LM(t,e)?(t=OM(),Kw=DA=Ef=null,ep=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return DM&&e.locale!=="ko"?null:e.data;default:return null}}var PY={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function uN(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!PY[t.type]:e==="textarea"}function $M(t,e,r,n){pM(n),e=Wv(e,"onChange"),0<e.length&&(r=new LA("onChange","change",null,r,n),t.push({event:r,listeners:e}))}var am=null,n2=null;function RY(t){GM(t,0)}function N4(t){var e=np(t);if(aM(e))return t}function OY(t,e){if(t==="change")return e}var UM=!1;if(uu){var g5;if(uu){var m5="oninput"in document;if(!m5){var fN=document.createElement("div");fN.setAttribute("oninput","return;"),m5=typeof fN.oninput=="function"}g5=m5}else g5=!1;UM=g5&&(!document.documentMode||9<document.documentMode)}function dN(){am&&(am.detachEvent("onpropertychange",BM),n2=am=null)}function BM(t){if(t.propertyName==="value"&&N4(n2)){var e=[];$M(e,n2,t,TA(t)),bM(RY,e)}}function DY(t,e,r){t==="focusin"?(dN(),am=e,n2=r,am.attachEvent("onpropertychange",BM)):t==="focusout"&&dN()}function LY(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return N4(n2)}function MY(t,e){if(t==="click")return N4(e)}function $Y(t,e){if(t==="input"||t==="change")return N4(e)}function UY(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var hc=typeof Object.is=="function"?Object.is:UY;function i2(t,e){if(hc(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var i=r[n];if(!V6.call(e,i)||!hc(t[i],e[i]))return!1}return!0}function hN(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function pN(t,e){var r=hN(t);t=0;for(var n;r;){if(r.nodeType===3){if(n=t+r.textContent.length,t<=e&&n>=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=hN(r)}}function FM(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?FM(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function jM(){for(var t=window,e=Mv();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=Mv(t.document)}return e}function UA(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function BY(t){var e=jM(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&FM(r.ownerDocument.documentElement,r)){if(n!==null&&UA(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=r.textContent.length,s=Math.min(n.start,i);n=n.end===void 0?s:Math.min(n.end,i),!t.extend&&s>n&&(i=n,n=s,s=i),i=pN(r,s);var o=pN(r,n);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>n?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<e.length;r++)t=e[r],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var FY=uu&&"documentMode"in document&&11>=document.documentMode,tp=null,f8=null,cm=null,d8=!1;function gN(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;d8||tp==null||tp!==Mv(n)||(n=tp,"selectionStart"in n&&UA(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focu
vendor: 4,383 bytes, line 38
38sNode:n.focusNode,focusOffset:n.focusOffset}),cm&&i2(cm,n)||(cm=n,n=Wv(f8,"onSelect"),0<n.length&&(e=new LA("onSelect","select",null,e,r),t.push({event:e,listeners:n}),e.target=tp)))}function Ob(t,e){var r={};return r[t.toLowerCase()]=e.toLowerCase(),r["Webkit"+t]="webkit"+e,r["Moz"+t]="moz"+e,r}var rp={animationend:Ob("Animation","AnimationEnd"),animationiteration:Ob("Animation","AnimationIteration"),animationstart:Ob("Animation","AnimationStart"),transitionend:Ob("Transition","TransitionEnd")},y5={},zM={};uu&&(zM=document.createElement("div").style,"AnimationEvent"in window||(delete rp.animationend.animation,delete rp.animationiteration.animation,delete rp.animationstart.animation),"TransitionEvent"in window||delete rp.transitionend.transition);function I4(t){if(y5[t])return y5[t];if(!rp[t])return t;var e=rp[t],r;for(r in e)if(e.hasOwnProperty(r)&&r in zM)return y5[t]=e[r];return t}var WM=I4("animationend"),HM=I4("animationiteration"),qM=I4("animationstart"),VM=I4("transitionend"),KM=new Map,mN="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function hd(t,e){KM.set(t,e),Kh(e,[t])}for(var b5=0;b5<mN.length;b5++){var w5=mN[b5],jY=w5.toLowerCase(),zY=w5[0].toUpperCase()+w5.slice(1);hd(jY,"on"+zY)}hd(WM,"onAnimationEnd");hd(HM,"onAnimationIteration");hd(qM,"onAnimationStart");hd("dblclick","onDoubleClick");hd("focusin","onFocus");hd("focusout","onBlur");hd(VM,"onTransitionEnd");jp("onMouseEnter",["mouseout","mouseover"]);jp("onMouseLeave",["mouseout","mouseover"]);jp("onPointerEnter",["pointerout","pointerover"]);jp("onPointerLeave",["pointerout","pointerover"]);Kh("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Kh("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Kh("onBeforeInput",["compositionend","keypress","textInput","paste"]);Kh("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Kh("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Kh("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var F1="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),WY=new Set("cancel close invalid load scroll toggle".split(" ").concat(F1));function yN(t,e,r){var n=t.type||"unknown-event";t.currentTarget=r,jG(n,e,void 0,t),t.currentTarget=null}function GM(t,e){e=(e&4)!==0;for(var r=0;r<t.length;r++){var n=t[r],i=n.event;n=n.listeners;e:{var s=void 0;if(e)for(var o=n.length-1;0<=o;o--){var a=n[o],c=a.instance,l=a.currentTarget;if(a=a.listener,c!==s&&i.isPropagationStopped())break e;yN(i,a,l),s=c}else for(o=0;o<n.length;o++){if(a=n[o],c=a.instance,l=a.currentTarget,a=a.listener,c!==s&&i.isPropagationStopped())break e;yN(i,a,l),s=c}}}if(Uv)throw t=a8,Uv=!1,a8=null,t}function Sn(t,e){var r=e[y8];r===void 0&&(r=e[y8]=new Set);var n=t+"__bubble";r.has(n)||(YM(e,t,2,!1),r.add(n))}function v5(t,e,r){var n=0;e&&(n|=4),YM(r,t,n,e)}var Db="_reactListening"+Math.random().toString(36).slice(2);function s2(t){if(!t[Db]){t[Db]=!0,rM.forEach(function(r){r!=="selectionchange"&&(WY.has(r)||v5(r,!1,t),v5(r,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Db]||(e[Db]=!0,v5("selectionchange",!1,e))}}function YM(t,e,r,n){switch(RM(e)){case 1:var i=nY;break;case 4:i=iY;break;default:i=OA}r=i.bind(null,e,r,t),i=void 0,!o8||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),n?i!==void 0?t.addEventListener(e,r,{capture:!0,passive:i}):t.addEventListener(e,r,!0):i!==void 0?t.addEventListener(e,r,{passive:i}):t.addEventListener(e,r,!1)}function x5(t,e,r,n,i){var s=n;
vendor: 2,645 bytes, line 38
38if(!(e&1)&&!(e&2)&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var a=n.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(o===4)for(o=n.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;o=o.return}for(;a!==null;){if(o=zd(a),o===null)return;if(c=o.tag,c===5||c===6){n=s=o;continue e}a=a.parentNode}}n=n.return}bM(function(){var l=s,u=TA(r),f=[];e:{var d=KM.get(t);if(d!==void 0){var p=LA,h=t;switch(t){case"keypress":if(Gw(r)===0)break e;case"keydown":case"keyup":p=wY;break;case"focusin":h="focus",p=p5;break;case"focusout":h="blur",p=p5;break;case"beforeblur":case"afterblur":p=p5;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=sN;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=aY;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=EY;break;case WM:case HM:case qM:p=uY;break;case VM:p=_Y;break;case"scroll":p=sY;break;case"wheel":p=SY;break;case"copy":case"cut":case"paste":p=dY;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=aN}var g=(e&4)!==0,y=!g&&t==="scroll",x=g?d!==null?d+"Capture":null:d;g=[];for(var C=l,_;C!==null;){_=C;var L=_.stateNode;if(_.tag===5&&L!==null&&(_=L,x!==null&&(L=Xm(C,x),L!=null&&g.push(o2(C,L,_)))),y)break;C=C.return}0<g.length&&(d=new p(d,h,null,r,u),f.push({event:d,listeners:g}))}}if(!(e&7)){e:{if(d=t==="mouseover"||t==="pointerover",p=t==="mouseout"||t==="pointerout",d&&r!==i8&&(h=r.relatedTarget||r.fromElement)&&(zd(h)||h[fu]))break e;if((p||d)&&(d=u.window===u?u:(d=u.ownerDocument)?d.defaultView||d.parentWindow:window,p?(h=r.relatedTarget||r.toElement,p=l,h=h?zd(h):null,h!==null&&(y=Gh(h),h!==y||h.tag!==5&&h.tag!==6)&&(h=null)):(p=null,h=l),p!==h)){if(g=sN,L="onMouseLeave",x="onMouseEnter",C="mouse",(t==="pointerout"||t==="pointerover")&&(g=aN,L="onPointerLeave",x="onPointerEnter",C="pointer"),y=p==null?d:np(p),_=h==null?d:np(h),d=new g(L,C+"leave",p,r,u),d.target=y,d.relatedTarget=_,L=null,zd(u)===l&&(g=new g(x,C+"enter",h,r,u),g.target=_,g.relatedTarget=y,L=g),y=L,p&&h)t:{for(g=p,x=h,C=0,_=g;_;_=d0(_))C++;for(_=0,L=x;L;L=d0(L))_++;for(;0<C-_;)g=d0(g),C--;for(;0<_-C;)x=d0(x),_--;for(;C--;){if(g===x||x!==null&&g===x.alternate)break t;g=d0(g),x=d0(x)}g=null}else g=null;p!==null&&bN(f,d,p,g,!1),h!==null&&y!==null&&bN(f,y,h,g,!0)}}
vendor: 5,926 bytes, lines 38-39
38e:{if(d=l?np(l):window,p=d.nodeName&&d.nodeName.toLowerCase(),p==="select"||p==="input"&&d.type==="file")var P=OY;else if(uN(d))if(UM)P=$Y;else{P=LY;var z=DY}else(p=d.nodeName)&&p.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(P=MY);if(P&&(P=P(t,l))){$M(f,P,r,u);break e}z&&z(t,d,l),t==="focusout"&&(z=d._wrapperState)&&z.controlled&&d.type==="number"&&X6(d,"number",d.value)}switch(z=l?np(l):window,t){case"focusin":(uN(z)||z.contentEditable==="true")&&(tp=z,f8=l,cm=null);break;case"focusout":cm=f8=tp=null;break;case"mousedown":d8=!0;break;case"contextmenu":case"mouseup":case"dragend":d8=!1,gN(f,r,u);break;case"selectionchange":if(FY)break;case"keydown":case"keyup":gN(f,r,u)}var W;if($A)e:{switch(t){case"compositionstart":var B="onCompositionStart";break e;case"compositionend":B="onCompositionEnd";break e;case"compositionupdate":B="onCompositionUpdate";break e}B=void 0}else ep?LM(t,r)&&(B="onCompositionEnd"):t==="keydown"&&r.keyCode===229&&(B="onCompositionStart");B&&(DM&&r.locale!=="ko"&&(ep||B!=="onCompositionStart"?B==="onCompositionEnd"&&ep&&(W=OM()):(Ef=u,DA="value"in Ef?Ef.value:Ef.textContent,ep=!0)),z=Wv(l,B),0<z.length&&(B=new oN(B,t,null,r,u),f.push({event:B,listeners:z}),W?B.data=W:(W=MM(r),W!==null&&(B.data=W)))),(W=IY?TY(t,r):kY(t,r))&&(l=Wv(l,"onBeforeInput"),0<l.length&&(u=new oN("onBeforeInput","beforeinput",null,r,u),f.push({event:u,listeners:l}),u.data=W))}GM(f,e)})}function o2(t,e,r){return{instance:t,listener:e,currentTarget:r}}function Wv(t,e){for(var r=e+"Capture",n=[];t!==null;){var i=t,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Xm(t,r),s!=null&&n.unshift(o2(t,s,i)),s=Xm(t,e),s!=null&&n.push(o2(t,s,i))),t=t.return}return n}function d0(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function bN(t,e,r,n,i){for(var s=e._reactName,o=[];r!==null&&r!==n;){var a=r,c=a.alternate,l=a.stateNode;if(c!==null&&c===n)break;a.tag===5&&l!==null&&(a=l,i?(c=Xm(r,s),c!=null&&o.unshift(o2(r,c,a))):i||(c=Xm(r,s),c!=null&&o.push(o2(r,c,a)))),r=r.return}o.length!==0&&t.push({event:e,listeners:o})}var HY=/\r\n?/g,qY=/\u0000|\uFFFD/g;function wN(t){return(typeof t=="string"?t:""+t).replace(HY,` 39`).replace(qY,"")}function Lb(t,e,r){if(e=wN(e),wN(t)!==e&&r)throw Error(ke(425))}function Hv(){}var h8=null,p8=null;function g8(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var m8=typeof setTimeout=="function"?setTimeout:void 0,VY=typeof clearTimeout=="function"?clearTimeout:void 0,vN=typeof Promise=="function"?Promise:void 0,KY=typeof queueMicrotask=="function"?queueMicrotask:typeof vN<"u"?function(t){return vN.resolve(null).then(t).catch(GY)}:m8;function GY(t){setTimeout(function(){throw t})}function E5(t,e){var r=e,n=0;do{var i=r.nextSibling;if(t.removeChild(r),i&&i.nodeType===8)if(r=i.data,r==="/$"){if(n===0){t.removeChild(i),r2(e);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=i}while(r);r2(e)}function Df(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function xN(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="$"||r==="$!"||r==="$?"){if(e===0)return t;e--}else r==="/$"&&e++}t=t.previousSibling}return null}var Sg=Math.random().toString(36).slice(2),Hc="__reactFiber$"+Sg,a2="__reactProps$"+Sg,fu="__reactContainer$"+Sg,y8="__reactEvents$"+Sg,YY="__reactListeners$"+Sg,ZY="__reactHandles$"+Sg;function zd(t){var e=t[Hc];if(e)return e;for(var r=t.parentNode;r;){if(e=r[fu]||r[Hc]){if(r=e.alternate,e.child!==null||r!==null&&r.child!==null)for(t=xN(t);t!==null;){if(r=t[Hc])return r;t=xN(t)}return e}t=r,r=t.parentNode}return null}function Ly(t){return t=t[Hc]||t[fu],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function np(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(ke(33))}function T4(t){return t[a2]||null}var b8=[],ip=-1;function pd(t){return{current:t}}function Tn(t){0>ip||(t.current=b8[ip],b8[ip]=null,ip--)}function En(t,e){ip++,b8[ip]=t.current,t.current=e}var Zf={},ks=pd(Zf),Eo=pd(!1),wh=Zf;function zp(t,e){var r=t.type.contextTypes;if(!r)return Zf;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in r)i[s]=e[s];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Co(t){return t=t.childContextTypes,t!=null}function qv(){Tn(Eo),Tn(ks)}function EN(t,e,r){if(ks.current!==Zf)throw Error(ke(168));En(ks,e),En(Eo,r)}function ZM(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error(ke(108,DG(t)||"Unknown",i));return Hn({},r,n)}function Vv(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Zf,wh=ks.current,En(ks,t),En(Eo,Eo.current),!0}function CN(t,e,r){var n=t.stateNode;if(!n)throw Error(ke(169));r?(t=ZM(t,e,wh),n.__reactInternalMemoizedMergedChildContext=t,Tn(Eo),Tn(ks),En(ks,t)):Tn(Eo),En(Eo,r)}var Gl=null,k4=!1,C5=!1;function JM(t){Gl===null?Gl=[t]:Gl.push(t)}function JY(t){k4=!0,JM(t)}function gd(){if(!C5&&Gl!==null){C5=!0;var t=0,e=an;try{var r=Gl;for(an=1;t<r.length;t++){var n=r[t];do n=n(!0);while(n!==null)}Gl=null,k4=!1}catch(i){throw Gl!==null&&(Gl=Gl.slice(t+1)),EM(kA,gd),i}finally{an=e,C5=!1}}return null}var sp=[],op=0,Kv=null,Gv=0,ma=[],ya=0,vh=null,Xl=1,eu="";function Rd(t,e){sp[op++]=Gv,sp[op++]=Kv,Kv=t,Gv=e}function QM(t,e,r){ma[ya++]=Xl,ma[ya++]=eu,ma[ya++]=vh,vh=t;var n=Xl;t=eu;var i=32-oc(n)-1;n&=~(1<<i),r+=1;var s=32-oc(e)+i;if(30<s){var o=i-i%5;s=(n&(1<<o)-1).toString(32),n>>=o,i-=o,Xl=1<<32-oc(e)+i|r<<i|n,eu=s+t}else Xl=1<<s|r<<i|n,eu=t}
vendor: 4,696 bytes, line 39
39function BA(t){t.return!==null&&(Rd(t,1),QM(t,1,0))}function FA(t){for(;t===Kv;)Kv=sp[--op],sp[op]=null,Gv=sp[--op],sp[op]=null;for(;t===vh;)vh=ma[--ya],ma[ya]=null,eu=ma[--ya],ma[ya]=null,Xl=ma[--ya],ma[ya]=null}var Ho=null,zo=null,Dn=!1,Ja=null;function XM(t,e){var r=wa(5,null,null,0);r.elementType="DELETED",r.stateNode=e,r.return=t,e=t.deletions,e===null?(t.deletions=[r],t.flags|=16):e.push(r)}function _N(t,e){switch(t.tag){case 5:var r=t.type;return e=e.nodeType!==1||r.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,Ho=t,zo=Df(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,Ho=t,zo=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(r=vh!==null?{id:Xl,overflow:eu}:null,t.memoizedState={dehydrated:e,treeContext:r,retryLane:1073741824},r=wa(18,null,null,0),r.stateNode=e,r.return=t,t.child=r,Ho=t,zo=null,!0):!1;default:return!1}}function w8(t){return(t.mode&1)!==0&&(t.flags&128)===0}function v8(t){if(Dn){var e=zo;if(e){var r=e;if(!_N(t,e)){if(w8(t))throw Error(ke(418));e=Df(r.nextSibling);var n=Ho;e&&_N(t,e)?XM(n,r):(t.flags=t.flags&-4097|2,Dn=!1,Ho=t)}}else{if(w8(t))throw Error(ke(418));t.flags=t.flags&-4097|2,Dn=!1,Ho=t}}}function AN(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Ho=t}function Mb(t){if(t!==Ho)return!1;if(!Dn)return AN(t),Dn=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!g8(t.type,t.memoizedProps)),e&&(e=zo)){if(w8(t))throw e$(),Error(ke(418));for(;e;)XM(t,e),e=Df(e.nextSibling)}if(AN(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(ke(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="/$"){if(e===0){zo=Df(t.nextSibling);break e}e--}else r!=="$"&&r!=="$!"&&r!=="$?"||e++}t=t.nextSibling}zo=null}}else zo=Ho?Df(t.stateNode.nextSibling):null;return!0}function e$(){for(var t=zo;t;)t=Df(t.nextSibling)}function Wp(){zo=Ho=null,Dn=!1}function jA(t){Ja===null?Ja=[t]:Ja.push(t)}var QY=Au.ReactCurrentBatchConfig;function r1(t,e,r){if(t=r.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(ke(309));var n=r.stateNode}if(!n)throw Error(ke(147,t));var i=n,s=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===s?e.ref:(e=function(o){var a=i.refs;o===null?delete a[s]:a[s]=o},e._stringRef=s,e)}if(typeof t!="string")throw Error(ke(284));if(!r._owner)throw Error(ke(290,t))}return t}function $b(t,e){throw t=Object.prototype.toString.call(e),Error(ke(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function SN(t){var e=t._init;return e(t._payload)}function t$(t){function e(x,C){if(t){var _=x.deletions;_===null?(x.deletions=[C],x.flags|=16):_.push(C)}}function r(x,C){if(!t)return null;for(;C!==null;)e(x,C),C=C.sibling;return null}function n(x,C){for(x=new Map;C!==null;)C.key!==null?x.set(C.key,C):x.set(C.index,C),C=C.sibling;return x}function i(x,C){return x=Uf(x,C),x.index=0,x.sibling=null,x}function s(x,C,_){return x.index=_,t?(_=x.alternate,_!==null?(_=_.index,_<C?(x.flags|=2,C):_):(x.flags|=2,C)):(x.flags|=1048576,C)}function o(x){return t&&x.alternate===null&&(x.flags|=2),x}function a(x,C,_,L){return C===null||C.tag!==6?(C=k5(_,x.mode,L),C.return=x,C):(C=i(C,_),C.return=x,C)}function c(x,C,_,L){var P=_.type;return P===X0?u(x,C,_.props.children,L,_.key):C!==null&&(C.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===sf&&SN(P)===C.type)?(L=i(C,_.props),L.ref=r1(x,C,_),L.return=x,L):(L=tv(_.type,_.key,_.props,null,x.mode,L),L.ref=r1(x,C,_),L.return=x,L)}function l(x,C,_,L){return C===null||C.tag!==4||C.stateNode.containerInfo!==_.containerInfo||C.stateNode.implementation!==_.implementation?(C=P5(_,x.mode,L),C.return=x,C):(C=i(C,_.children||[]),C.return=x,C)}function u(x,C,_,L,P){return C===null||C.tag!==7?(C=ah(_,x.mode,L,P),C.return=x,C):(C=i(C,_),C.return=x,C)}function f(x,C,_){if(typeof C=="string"&&C!==""||typeof C=="number")return C=k5(""+C,x.mode,_),C.return=x,C;if(typeof C=="object"&&C!==null){switch(C.$$typeof){case Sb:return _=tv(C.type,C.key,C.props,null,x.mode,_),_.ref=r1(x,null,C),_.return=x,_;case Q0:return C=P5(C,x.mode,_),C.return=x,C;case sf:var L=C._init;return f(x,L(C._payload),_)}if(U1(C)||Jg(C))return C=ah(C,x.mode,_,null),C.return=x,C;$b(x,C)}return null}function d(x,C,_,L){var P=C!==null?C.key:null;if(typeof _=="string"&&_!==""||typeof _=="number")return P!==null?null:a(x,C,""+_,L);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Sb:return _.key===P?c(x,C,_,L):null;case Q0:return _.key===P?l(x,C,_,L):null;case sf:return P=_._init,d(x,C,P(_._payload),L)}
vendor: 1,780 bytes, line 39
39if(U1(_)||Jg(_))return P!==null?null:u(x,C,_,L,null);$b(x,_)}return null}function p(x,C,_,L,P){if(typeof L=="string"&&L!==""||typeof L=="number")return x=x.get(_)||null,a(C,x,""+L,P);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case Sb:return x=x.get(L.key===null?_:L.key)||null,c(C,x,L,P);case Q0:return x=x.get(L.key===null?_:L.key)||null,l(C,x,L,P);case sf:var z=L._init;return p(x,C,_,z(L._payload),P)}if(U1(L)||Jg(L))return x=x.get(_)||null,u(C,x,L,P,null);$b(C,L)}return null}function h(x,C,_,L){for(var P=null,z=null,W=C,B=C=0,I=null;W!==null&&B<_.length;B++){W.index>B?(I=W,W=null):I=W.sibling;var j=d(x,W,_[B],L);if(j===null){W===null&&(W=I);break}t&&W&&j.alternate===null&&e(x,W),C=s(j,C,B),z===null?P=j:z.sibling=j,z=j,W=I}if(B===_.length)return r(x,W),Dn&&Rd(x,B),P;if(W===null){for(;B<_.length;B++)W=f(x,_[B],L),W!==null&&(C=s(W,C,B),z===null?P=W:z.sibling=W,z=W);return Dn&&Rd(x,B),P}for(W=n(x,W);B<_.length;B++)I=p(W,x,B,_[B],L),I!==null&&(t&&I.alternate!==null&&W.delete(I.key===null?B:I.key),C=s(I,C,B),z===null?P=I:z.sibling=I,z=I);return t&&W.forEach(function(D){return e(x,D)}),Dn&&Rd(x,B),P}function g(x,C,_,L){var P=Jg(_);if(typeof P!="function")throw Error(ke(150));if(_=P.call(_),_==null)throw Error(ke(151));for(var z=P=null,W=C,B=C=0,I=null,j=_.next();W!==null&&!j.done;B++,j=_.next()){W.index>B?(I=W,W=null):I=W.sibling;var D=d(x,W,j.value,L);if(D===null){W===null&&(W=I);break}t&&W&&D.alternate===null&&e(x,W),C=s(D,C,B),z===null?P=D:z.sibling=D,z=D,W=I}if(j.done)return r(x,W),Dn&&Rd(x,B),P;if(W===null){for(;!j.done;B++,j=_.next())j=f(x,j.value,L),j!==null&&(C=s(j,C,B),z===null?P=j:z.sibling=j,z=j);return Dn&&Rd(x,B),P}for(W=n(x,W);!j.done;B++,j=_.next())j=p(W,x,B,j.value,L),j!==null&&(t&&j.alternate!==null&&W.delete(j.key===null?B:j.key),
vendor: 5,509 bytes, line 39
39C=s(j,C,B),z===null?P=j:z.sibling=j,z=j);return t&&W.forEach(function(O){return e(x,O)}),Dn&&Rd(x,B),P}function y(x,C,_,L){if(typeof _=="object"&&_!==null&&_.type===X0&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case Sb:e:{for(var P=_.key,z=C;z!==null;){if(z.key===P){if(P=_.type,P===X0){if(z.tag===7){r(x,z.sibling),C=i(z,_.props.children),C.return=x,x=C;break e}}else if(z.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===sf&&SN(P)===z.type){r(x,z.sibling),C=i(z,_.props),C.ref=r1(x,z,_),C.return=x,x=C;break e}r(x,z);break}else e(x,z);z=z.sibling}_.type===X0?(C=ah(_.props.children,x.mode,L,_.key),C.return=x,x=C):(L=tv(_.type,_.key,_.props,null,x.mode,L),L.ref=r1(x,C,_),L.return=x,x=L)}return o(x);case Q0:e:{for(z=_.key;C!==null;){if(C.key===z)if(C.tag===4&&C.stateNode.containerInfo===_.containerInfo&&C.stateNode.implementation===_.implementation){r(x,C.sibling),C=i(C,_.children||[]),C.return=x,x=C;break e}else{r(x,C);break}else e(x,C);C=C.sibling}C=P5(_,x.mode,L),C.return=x,x=C}return o(x);case sf:return z=_._init,y(x,C,z(_._payload),L)}if(U1(_))return h(x,C,_,L);if(Jg(_))return g(x,C,_,L);$b(x,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,C!==null&&C.tag===6?(r(x,C.sibling),C=i(C,_),C.return=x,x=C):(r(x,C),C=k5(_,x.mode,L),C.return=x,x=C),o(x)):r(x,C)}return y}var Hp=t$(!0),r$=t$(!1),Yv=pd(null),Zv=null,ap=null,zA=null;function WA(){zA=ap=Zv=null}function HA(t){var e=Yv.current;Tn(Yv),t._currentValue=e}function x8(t,e,r){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===r)break;t=t.return}}function Ap(t,e){Zv=t,zA=ap=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(bo=!0),t.firstContext=null)}function _a(t){var e=t._currentValue;if(zA!==t)if(t={context:t,memoizedValue:e,next:null},ap===null){if(Zv===null)throw Error(ke(308));ap=t,Zv.dependencies={lanes:0,firstContext:t}}else ap=ap.next=t;return e}var Wd=null;function qA(t){Wd===null?Wd=[t]:Wd.push(t)}function n$(t,e,r,n){var i=e.interleaved;return i===null?(r.next=r,qA(e)):(r.next=i.next,i.next=r),e.interleaved=r,du(t,n)}function du(t,e){t.lanes|=e;var r=t.alternate;for(r!==null&&(r.lanes|=e),r=t,t=t.return;t!==null;)t.childLanes|=e,r=t.alternate,r!==null&&(r.childLanes|=e),r=t,t=t.return;return r.tag===3?r.stateNode:null}var of=!1;function VA(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function i$(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function nu(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Lf(t,e,r){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,Lr&2){var i=n.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),n.pending=e,du(t,r)}return i=n.interleaved,i===null?(e.next=e,qA(n)):(e.next=i.next,i.next=e),n.interleaved=e,du(t,r)}function Yw(t,e,r){if(e=e.updateQueue,e!==null&&(e=e.shared,(r&4194240)!==0)){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,PA(t,r)}}function NN(t,e){var r=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,s=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};s===null?i=s=o:s=s.next=o,r=r.next}while(r!==null);s===null?i=s=e:s=s.next=e}else i=s=e;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:n.shared,effects:n.effects},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=e:t.next=e,r.lastBaseUpdate=e}function Jv(t,e,r,n){var i=t.updateQueue;of=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var c=a,l=c.next;c.next=null,o===null?s=l:o.next=l,o=c;var u=t.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==o&&(a===null?u.firstBaseUpdate=l:a.next=l,u.lastBaseUpdate=c))}if(s!==null){var f=i.baseState;o=0,u=l=c=null,a=s;do{var d=a.lane,p=a.eventTime;if((n&d)===d){u!==null&&(u=u.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=t,g=a;switch(d=e,p=r,g.tag){case 1:if(h=g.payload,typeof h=="function"){f=h.call(p,f,d);break e}f=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,d=typeof h=="function"?h.call(p,f,d):h,d==null)break e;f=Hn({},f,d);break e;case 2:of=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,d=i.effects,d===null?i.effects=[a]:d.push(a))}else p={eventTime:p,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(l=u=p,c=f):u=u.next=p,o|=d;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;d=a,a=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(u===null&&(c=f),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,e=i.shared.interleaved,e!==null){i=e;do o|=i.lane,i=i.next;while(i!==e)}else s===null&&(i.shared.lanes=0);Eh|=o,t.lanes=o,t.memoizedState=f}}function IN(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var n=t[e],i=n.callback;if(i!==null){if(n.callback=null,n=r,typeof i!="function")throw Error(ke(191,i));i.call(n)}}}var My={},tl=pd(My),c2=pd(My),l2=pd(My);function Hd(t){if(t===My)throw Error(ke(174));return t}function KA(t,e){switch(En(l2,e),En(c2,t),En(tl,My),t=e.nodeType,t){case 9:case 11:e=(e
vendor: 8,907 bytes, line 39
39=e.documentElement)?e.namespaceURI:t8(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=t8(e,t)}Tn(tl),En(tl,e)}function qp(){Tn(tl),Tn(c2),Tn(l2)}function s$(t){Hd(l2.current);var e=Hd(tl.current),r=t8(e,t.type);e!==r&&(En(c2,t),En(tl,r))}function GA(t){c2.current===t&&(Tn(tl),Tn(c2))}var Fn=pd(0);function Qv(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var _5=[];function YA(){for(var t=0;t<_5.length;t++)_5[t]._workInProgressVersionPrimary=null;_5.length=0}var Zw=Au.ReactCurrentDispatcher,A5=Au.ReactCurrentBatchConfig,xh=0,zn=null,Si=null,Li=null,Xv=!1,lm=!1,u2=0,XY=0;function ds(){throw Error(ke(321))}function ZA(t,e){if(e===null)return!1;for(var r=0;r<e.length&&r<t.length;r++)if(!hc(t[r],e[r]))return!1;return!0}function JA(t,e,r,n,i,s){if(xh=s,zn=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Zw.current=t===null||t.memoizedState===null?nZ:iZ,t=r(n,i),lm){s=0;do{if(lm=!1,u2=0,25<=s)throw Error(ke(301));s+=1,Li=Si=null,e.updateQueue=null,Zw.current=sZ,t=r(n,i)}while(lm)}if(Zw.current=e3,e=Si!==null&&Si.next!==null,xh=0,Li=Si=zn=null,Xv=!1,e)throw Error(ke(300));return t}function QA(){var t=u2!==0;return u2=0,t}function Mc(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Li===null?zn.memoizedState=Li=t:Li=Li.next=t,Li}function Aa(){if(Si===null){var t=zn.alternate;t=t!==null?t.memoizedState:null}else t=Si.next;var e=Li===null?zn.memoizedState:Li.next;if(e!==null)Li=e,Si=t;else{if(t===null)throw Error(ke(310));Si=t,t={memoizedState:Si.memoizedState,baseState:Si.baseState,baseQueue:Si.baseQueue,queue:Si.queue,next:null},Li===null?zn.memoizedState=Li=t:Li=Li.next=t}return Li}function f2(t,e){return typeof e=="function"?e(t):e}function S5(t){var e=Aa(),r=e.queue;if(r===null)throw Error(ke(311));r.lastRenderedReducer=t;var n=Si,i=n.baseQueue,s=r.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}n.baseQueue=i=s,r.pending=null}if(i!==null){s=i.next,n=n.baseState;var a=o=null,c=null,l=s;do{var u=l.lane;if((xh&u)===u)c!==null&&(c=c.next={lane:0,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null}),n=l.hasEagerState?l.eagerState:t(n,l.action);else{var f={lane:u,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null};c===null?(a=c=f,o=n):c=c.next=f,zn.lanes|=u,Eh|=u}l=l.next}while(l!==null&&l!==s);c===null?o=n:c.next=a,hc(n,e.memoizedState)||(bo=!0),e.memoizedState=n,e.baseState=o,e.baseQueue=c,r.lastRenderedState=n}if(t=r.interleaved,t!==null){i=t;do s=i.lane,zn.lanes|=s,Eh|=s,i=i.next;while(i!==t)}else i===null&&(r.lanes=0);return[e.memoizedState,r.dispatch]}function N5(t){var e=Aa(),r=e.queue;if(r===null)throw Error(ke(311));r.lastRenderedReducer=t;var n=r.dispatch,i=r.pending,s=e.memoizedState;if(i!==null){r.pending=null;var o=i=i.next;do s=t(s,o.action),o=o.next;while(o!==i);hc(s,e.memoizedState)||(bo=!0),e.memoizedState=s,e.baseQueue===null&&(e.baseState=s),r.lastRenderedState=s}return[s,n]}function o$(){}function a$(t,e){var r=zn,n=Aa(),i=e(),s=!hc(n.memoizedState,i);if(s&&(n.memoizedState=i,bo=!0),n=n.queue,XA(u$.bind(null,r,n,t),[t]),n.getSnapshot!==e||s||Li!==null&&Li.memoizedState.tag&1){if(r.flags|=2048,d2(9,l$.bind(null,r,n,i,e),void 0,null),ji===null)throw Error(ke(349));xh&30||c$(r,e,i)}return i}function c$(t,e,r){t.flags|=16384,t={getSnapshot:e,value:r},e=zn.updateQueue,e===null?(e={lastEffect:null,stores:null},zn.updateQueue=e,e.stores=[t]):(r=e.stores,r===null?e.stores=[t]:r.push(t))}function l$(t,e,r,n){e.value=r,e.getSnapshot=n,f$(e)&&d$(t)}function u$(t,e,r){return r(function(){f$(e)&&d$(t)})}function f$(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!hc(t,r)}catch{return!0}}function d$(t){var e=du(t,1);e!==null&&ac(e,t,1,-1)}function TN(t){var e=Mc();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:f2,lastRenderedState:t},e.queue=t,t=t.dispatch=rZ.bind(null,zn,t),[e.memoizedState,t]}function d2(t,e,r,n){return t={tag:t,create:e,destroy:r,deps:n,next:null},e=zn.updateQueue,e===null?(e={lastEffect:null,stores:null},zn.updateQueue=e,e.lastEffect=t.next=t):(r=e.lastEffect,r===null?e.lastEffect=t.next=t:(n=r.next,r.next=t,t.next=n,e.lastEffect=t)),t}function h$(){return Aa().memoizedState}function Jw(t,e,r,n){var i=Mc();zn.flags|=t,i.memoizedState=d2(1|e,r,void 0,n===void 0?null:n)}function P4(t,e,r,n){var i=Aa();n=n===void 0?null:n;var s=void 0;if(Si!==null){var o=Si.memoizedState;if(s=o.destroy,n!==null&&ZA(n,o.deps)){i.memoizedState=d2(e,r,s,n);return}}zn.flags|=t,i.memoizedState=d2(1|e,r,s,n)}function kN(t,e){return Jw(8390656,8,t,e)}function XA(t,e){return P4(2048,8,t,e)}function p$(t,e){return P4(4,2,t,e)}function g$(t,e){return P4(4,4,t,e)}function m$(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function y$(t,e,r){return r=r!=null?r.concat([t]):null,P4(4,4,m$.bind(null,e,t),r)}function e9(){}function b$(t,e){var r=Aa();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&ZA(e,n[1])?n[0]:(r.memoizedState=[t,e],t)}function w$(t,e){var r=Aa();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&ZA(e,n[1])?n[0]:(t=t(),r.memoizedState=[t,e],t)}function v$(t,e,r){return xh&21?(hc(r,e)||(r=AM(),zn.lanes|=r,Eh|=r,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,bo=!0),t.memoizedState=r)}function eZ(t,e){var r=an;an=r!==0&&4>r?r:4,t(!0);var n=A5.transition;A5.transition={};try{t(!1),e()}finally{an=r,A5.transition=n}}function x$(){return Aa().memoizedState}function tZ(t,e,r){var n=$f(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},E$(t))C$(e,r);else if(r=n$(t,e,r,n),r!==null){var i=zs();ac(r,t,n,i),_$(r,e,n)}}function rZ(t,e,r){var n=$f(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(E$(t))C$(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,r);if(i.hasEagerState=!0,i.eagerState=a,hc(a,o)){var c=e.interleaved;c===null?(i.next=i,qA(e)):(i.next=c.next,c.next=i),e.interleaved=i;return}}catch{}finally{}r=n$(t,e,i,n),r!==null&&(i=zs(),ac(r,t,n,i),_$(r,e,n))}}function E$(t){var e=t.alternate;return t===zn||e!==null&&e===zn}function C$(t,e){lm=Xv=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function _$(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,PA(t,r)}}var e3={readContext:_a,useCallback:ds,useContext:ds,useEffect:ds,useImperativeHandle:ds,useInsertionEffect:ds,useLayoutEffect:ds,useMemo:ds,useReducer:ds,useRef:ds,useState:ds,useDebugValue:ds,useDeferredValue:ds,useTransition:ds,useMutableSource:ds,useSyncExternalStore:ds,useId:ds,unstable_isNewReconciler:!1},nZ={readContext:_a,useCallback:function(t,e){return Mc().memoizedState=[t,e===void 0?null:e],t},useContext:_a,useEffect:kN,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,Jw(4194308,4,m$.bind(null,e,t),r)},useLayoutEffect:function(t,e){return Jw(4194308,4,t,e)},useInsertionEffect:function(t,e){return Jw(4,2,t,e)},useMemo:function(t,e){var r=Mc();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=Mc();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=tZ.bind(null,zn,t),[n.memoizedState,t]},useRef:function(t){var e=Mc();return t={current:t},e.memoizedState=t},useState:TN,useDebugValue:e9,useDeferredValue:function(t){return Mc().memoizedState=t},useTransition:function(){var t=TN(!1),e=t[0];return t=eZ.bind(null,t[1]),Mc().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=zn,i=Mc();if(Dn){if(r===void 0)throw Error(ke(407));r=r()}else{if(r=e(),ji===null)throw Error(ke(349));xh&30||c$(n,e,r)}i.memoizedState=r;var s={value:r,getSnapshot:e};return i.queue=s,kN(u$.bind(null,n,s,t),[t]),n.flags|=2048,d2(9,l$.bind(null,n,s,r,e),void 0,null),r},useId:function(){var t=Mc(),e=ji.identifierPrefix;if(Dn){var r=eu,n=Xl;r=(n&~(1<<32-oc(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=u2++,0<r&&(e+="H"+r.toString(32)),e+=":"}else r=XY++,e=":"+e+"r"+r.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},iZ={readContext:_a,useCallback:b$,useContext:_a,useEffect:XA,useImperativeHandle:y$,useInsertionEffect:p$,useLayoutEffect:g$,useMemo:w$,useReducer:S
vendor: 11,130 bytes, lines 39-41
395,useRef:h$,useState:function(){return S5(f2)},useDebugValue:e9,useDeferredValue:function(t){var e=Aa();return v$(e,Si.memoizedState,t)},useTransition:function(){var t=S5(f2)[0],e=Aa().memoizedState;return[t,e]},useMutableSource:o$,useSyncExternalStore:a$,useId:x$,unstable_isNewReconciler:!1},sZ={readContext:_a,useCallback:b$,useContext:_a,useEffect:XA,useImperativeHandle:y$,useInsertionEffect:p$,useLayoutEffect:g$,useMemo:w$,useReducer:N5,useRef:h$,useState:function(){return N5(f2)},useDebugValue:e9,useDeferredValue:function(t){var e=Aa();return Si===null?e.memoizedState=t:v$(e,Si.memoizedState,t)},useTransition:function(){var t=N5(f2)[0],e=Aa().memoizedState;return[t,e]},useMutableSource:o$,useSyncExternalStore:a$,useId:x$,unstable_isNewReconciler:!1};function Ga(t,e){if(t&&t.defaultProps){e=Hn({},e),t=t.defaultProps;for(var r in t)e[r]===void 0&&(e[r]=t[r]);return e}return e}function E8(t,e,r,n){e=t.memoizedState,r=r(n,e),r=r==null?e:Hn({},e,r),t.memoizedState=r,t.lanes===0&&(t.updateQueue.baseState=r)}var R4={isMounted:function(t){return(t=t._reactInternals)?Gh(t)===t:!1},enqueueSetState:function(t,e,r){t=t._reactInternals;var n=zs(),i=$f(t),s=nu(n,i);s.payload=e,r!=null&&(s.callback=r),e=Lf(t,s,i),e!==null&&(ac(e,t,i,n),Yw(e,t,i))},enqueueReplaceState:function(t,e,r){t=t._reactInternals;var n=zs(),i=$f(t),s=nu(n,i);s.tag=1,s.payload=e,r!=null&&(s.callback=r),e=Lf(t,s,i),e!==null&&(ac(e,t,i,n),Yw(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var r=zs(),n=$f(t),i=nu(r,n);i.tag=2,e!=null&&(i.callback=e),e=Lf(t,i,n),e!==null&&(ac(e,t,n,r),Yw(e,t,n))}};function PN(t,e,r,n,i,s,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(n,s,o):e.prototype&&e.prototype.isPureReactComponent?!i2(r,n)||!i2(i,s):!0}function A$(t,e,r){var n=!1,i=Zf,s=e.contextType;return typeof s=="object"&&s!==null?s=_a(s):(i=Co(e)?wh:ks.current,n=e.contextTypes,s=(n=n!=null)?zp(t,i):Zf),e=new e(r,s),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=R4,t.stateNode=e,e._reactInternals=t,n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=s),e}function RN(t,e,r,n){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(r,n),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(r,n),e.state!==t&&R4.enqueueReplaceState(e,e.state,null)}function C8(t,e,r,n){var i=t.stateNode;i.props=r,i.state=t.memoizedState,i.refs={},VA(t);var s=e.contextType;typeof s=="object"&&s!==null?i.context=_a(s):(s=Co(e)?wh:ks.current,i.context=zp(t,s)),i.state=t.memoizedState,s=e.getDerivedStateFromProps,typeof s=="function"&&(E8(t,e,s,r),i.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(e=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),e!==i.state&&R4.enqueueReplaceState(i,i.state,null),Jv(t,r,i,n),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308)}function Vp(t,e){try{var r="",n=e;do r+=OG(n),n=n.return;while(n);var i=r}catch(s){i=` 40Error generating stack: `+s.message+` 41`+s.stack}return{value:t,source:e,stack:i,digest:null}}function I5(t,e,r){return{value:t,source:null,stack:r??null,digest:e??null}}function _8(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var oZ=typeof WeakMap=="function"?WeakMap:Map;function S$(t,e,r){r=nu(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){r3||(r3=!0,D8=n),_8(t,e)},r}function N$(t,e,r){r=nu(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var i=e.value;r.payload=function(){return n(i)},r.callback=function(){_8(t,e)}}var s=t.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(r.callback=function(){_8(t,e),typeof n!="function"&&(Mf===null?Mf=new Set([this]):Mf.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),r}function ON(t,e,r){var n=t.pingCache;if(n===null){n=t.pingCache=new oZ;var i=new Set;n.set(e,i)}else i=n.get(e),i===void 0&&(i=new Set,n.set(e,i));i.has(r)||(i.add(r),t=vZ.bind(null,t,e,r),e.then(t,t))}function DN(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function LN(t,e,r,n,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(e=nu(-1,1),e.tag=2,Lf(r,e,1))),r.lanes|=1),t)}var aZ=Au.ReactCurrentOwner,bo=!1;function $s(t,e,r,n){e.child=t===null?r$(e,null,r,n):Hp(e,t.child,r,n)}function MN(t,e,r,n,i){r=r.render;var s=e.ref;return Ap(e,i),n=JA(t,e,r,n,s,i),r=QA(),t!==null&&!bo?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,hu(t,e,i)):(Dn&&r&&BA(e),e.flags|=1,$s(t,e,n,i),e.child)}function $N(t,e,r,n,i){if(t===null){var s=r.type;return typeof s=="function"&&!c9(s)&&s.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=s,I$(t,e,s,n,i)):(t=tv(r.type,null,n,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(s=t.child,!(t.lanes&i)){var o=s.memoizedProps;if(r=r.compare,r=r!==null?r:i2,r(o,n)&&t.ref===e.ref)return hu(t,e,i)}return e.flags|=1,t=Uf(s,n),t.ref=e.ref,t.return=e,e.child=t}function I$(t,e,r,n,i){if(t!==null){var s=t.memoizedProps;if(i2(s,n)&&t.ref===e.ref)if(bo=!1,e.pendingProps=n=s,(t.lanes&i)!==0)t.flags&131072&&(bo=!0);else return e.lanes=t.lanes,hu(t,e,i)}return A8(t,e,r,n,i)}function T$(t,e,r){var n=e.pendingProps,i=n.children,s=t!==null?t.memoizedState:null;if(n.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},En(lp,Mo),Mo|=r;else{if(!(r&1073741824))return t=s!==null?s.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,En(lp,Mo),Mo|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=s!==null?s.baseLanes:r,En(lp,Mo),Mo|=n}else s!==null?(n=s.baseLanes|r,e.memoizedState=null):n=r,En(lp,Mo),Mo|=n;return $s(t,e,i,r),e.child}function k$(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=512,e.flags|=2097152)}function A8(t,e,r,n,i){var s=Co(r)?wh:ks.current;return s=zp(e,s),Ap(e,i),r=JA(t,e,r,n,s,i),n=QA(),t!==null&&!bo?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,hu(t,e,i)):(Dn&&n&&BA(e),e.flags|=1,$s(t,e,r,i),e.child)}function UN(t,e,r,n,i){if(Co(r)){var s=!0;Vv(e)}else s=!1;if(Ap(e,i),e.stateNode===null)Qw(t,e),A$(e,r,n),C8(e,r,n,i),n=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var c=o.context,l=r.contextType;typeof l=="object"&&l!==null?l=_a(l):(l=Co(r)?wh:ks.current,l=zp(e,l));var u=r.getDerivedStateFromProps,f=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==n||c!==l)&&RN(e,o,n,l),of=!1;var d=e.memoizedState;o.state=d,Jv(e,n,o,i),c=e.memoizedState,a!==n||d!==c||Eo.current||of?(typeof u=="function"&&(E8(e,r,u,n),c=e.memoizedState),(a=of||PN(e,r,a,n,d,c,l))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=c),o.props=n,o.state=c,o.context=l,n=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{o=e.stateNode,i$(t,e),a=e.memoizedProps,l=e.type===e.elementType?a:Ga(e.type,a),o.props=l,f=e.pendingProps,d=o.context,c=r.contextType,typeof c=="object"&&c!==null?c=_a(c):(c=Co(r)?wh:ks.current,c=zp(e,c));var p=r.getDerivedStateFromProps;(u=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==f||d!==c)&&RN(e,o,n,c),of=!1,d=e.memoizedState,o.state=d,Jv(e,n,o,i);var h=e.memoizedState;a!==f||d!==h||Eo.current||of?(typeof p=="function"&&(E8(e,r,p,n),h=e.memoizedState),(l=of||PN(e,r,l,n,d,h,c)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,h,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,h,c)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=h),o.props=n,o.state=h,o.context=c,n=l):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),n=!1)}return S8(t,e,r,n,s,i)}function S8(t,e,r,n,i,s){k$(t,e);var o=(e.flags&128)!==0;if(!n&&!o)return i&&CN(e,r,!1),hu(t,e,s);n=e.stateNode,aZ.current=e;var a=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&o?(e.child=Hp(e,t.child,null,s),e.child=Hp(e,null,a,s)):$s(t,e,a,s),e.memoizedState=n.state,i&&CN(e,r,!0),e.child}function P$(t){var e=t.stateNode;e.pendingContext?EN(t,e.pendingContext,e.pendingContext!==e.context):e.context&&EN(t,e.context,!1),KA(t,e.containerInfo)}function BN(t,e,r,n,i){return Wp(),jA(i),e.flags|=256,$s(t,e,r,n),e.child}var N8={dehydrated:null,treeContext:null,retryLane:0};function I8(t){return{baseLanes:t,cachePool:null,transitions:null}}function R$(t,e,r){var n=e.pendingProps,i=Fn.current,s=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(i&2)!==0),a?(s=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),En(Fn,i&1),t===null)return v8(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=n.children,t=n.fallback,s?(n=e.mode,s=e.child,o={mode:"hidden",children:o},!(n&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=L4(o,n,0,null),t=ah(t,n,r,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=I8(r),e.memoizedState=N8,t):t9(e,o));if(i=t.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return cZ(t,e,o,n,a,i,r);if(s){s=n.fallback,o=e.mode,i=t.child,a=i.sibling;var c={mode:"hidden",children:n.children};return!(o&1)&&e.child!==i?(n=e.child,n.childLanes=0,n.pendingProps=c,e.deletions=null):(n=Uf(i,c),n.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Uf(a,s):(s=ah(s,o,r,null),s.flags|=2),s.return=e,n.return=e,n.sibling=s,e.child=n,n=s,s=e.child,o=t.child.memoizedState,o=o===null?I8(r):{base
vendor: 7,079 bytes, line 41
41Lanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=t.childLanes&~r,e.memoizedState=N8,n}return s=t.child,t=s.sibling,n=Uf(s,{mode:"visible",children:n.children}),!(e.mode&1)&&(n.lanes=r),n.return=e,n.sibling=null,t!==null&&(r=e.deletions,r===null?(e.deletions=[t],e.flags|=16):r.push(t)),e.child=n,e.memoizedState=null,n}function t9(t,e){return e=L4({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Ub(t,e,r,n){return n!==null&&jA(n),Hp(e,t.child,null,r),t=t9(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function cZ(t,e,r,n,i,s,o){if(r)return e.flags&256?(e.flags&=-257,n=I5(Error(ke(422))),Ub(t,e,o,n)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=n.fallback,i=e.mode,n=L4({mode:"visible",children:n.children},i,0,null),s=ah(s,i,o,null),s.flags|=2,n.return=e,s.return=e,n.sibling=s,e.child=n,e.mode&1&&Hp(e,t.child,null,o),e.child.memoizedState=I8(o),e.memoizedState=N8,s);if(!(e.mode&1))return Ub(t,e,o,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var a=n.dgst;return n=a,s=Error(ke(419)),n=I5(s,n,void 0),Ub(t,e,o,n)}if(a=(o&t.childLanes)!==0,bo||a){if(n=ji,n!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,du(t,i),ac(n,t,i,-1))}return a9(),n=I5(Error(ke(421))),Ub(t,e,o,n)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=xZ.bind(null,t),i._reactRetry=e,null):(t=s.treeContext,zo=Df(i.nextSibling),Ho=e,Dn=!0,Ja=null,t!==null&&(ma[ya++]=Xl,ma[ya++]=eu,ma[ya++]=vh,Xl=t.id,eu=t.overflow,vh=e),e=t9(e,n.children),e.flags|=4096,e)}function FN(t,e,r){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),x8(t.return,e,r)}function T5(t,e,r,n,i){var s=t.memoizedState;s===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=n,s.tail=r,s.tailMode=i)}function O$(t,e,r){var n=e.pendingProps,i=n.revealOrder,s=n.tail;if($s(t,e,n.children,r),n=Fn.current,n&2)n=n&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&FN(t,r,e);else if(t.tag===19)FN(t,r,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}n&=1}if(En(Fn,n),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(r=e.child,i=null;r!==null;)t=r.alternate,t!==null&&Qv(t)===null&&(i=r),r=r.sibling;r=i,r===null?(i=e.child,e.child=null):(i=r.sibling,r.sibling=null),T5(e,!1,i,r,s);break;case"backwards":for(r=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&Qv(t)===null){e.child=i;break}t=i.sibling,i.sibling=r,r=i,i=t}T5(e,!0,r,null,s);break;case"together":T5(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Qw(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function hu(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),Eh|=e.lanes,!(r&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(ke(153));if(e.child!==null){for(t=e.child,r=Uf(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=Uf(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}function lZ(t,e,r){switch(e.tag){case 3:P$(e),Wp();break;case 5:s$(e);break;case 1:Co(e.type)&&Vv(e);break;case 4:KA(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,i=e.memoizedProps.value;En(Yv,n._currentValue),n._currentValue=i;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(En(Fn,Fn.current&1),e.flags|=128,null):r&e.child.childLanes?R$(t,e,r):(En(Fn,Fn.current&1),t=hu(t,e,r),t!==null?t.sibling:null);En(Fn,Fn.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&128){if(n)return O$(t,e,r);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),En(Fn,Fn.current),n)break;return null;case 22:case 23:return e.lanes=0,T$(t,e,r)}return hu(t,e,r)}var D$,T8,L$,M$;D$=function(t,e){for(var r=e.child;r!==null;){if(r.tag===5||r.tag===6)t.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};T8=function(){};L$=function(t,e,r,n){var i=t.memoizedProps;if(i!==n){t=e.stateNode,Hd(tl.current);var s=null;switch(r){case"input":i=J6(t,i),n=J6(t,n),s=[];break;case"select":i=Hn({},i,{value:void 0}),n=Hn({},n,{value:void 0}),s=[];break;case"textarea":i=e8(t,i),n=e8(t,n),s=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=Hv)}r8(r,n);var o;r=null;for(l in i)if(!n.hasOwnProperty(l)&&i.hasOwnProperty(l)&&i[l]!=null)if(l==="style"){var a=i[l];for(o in a)a.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else l!=="dangerouslySetInnerHTML"&&l!=="children"&&l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(Jm.hasOwnProperty(l)?s||(s=[]):(s=s||[]).push(l,null));for(l in n){var c=n[l];if(a=i!=null?i[l]:void 0,n.hasOwnProperty(l)&&c!==a&&(c!=null||a!=null))if(l==="style")if(a){for(o in a)!a.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in c)c.hasOwnProperty(o)&&a[o]!==c[o]&&(r||(r={}),r[o]=c[o])}else r||(s||(s=[]),s.push(l,r)),r=c;else l==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,a=a?a.__html:void 0,c!=null&&a!==c&&(s=s||[]).push(l,c)):l==="children"?typeof c!="string"&&typeof c!="number"||(s=s||[]).push(l,""+c):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&(Jm.hasOwnProperty(l)?(c!=null&&l==="onScroll"&&Sn("scroll",t),s||a===c||(s=[])):(s=s||[]).push(l,c))}r&&(s=s||[]).push("style",r);var l=s;(e.updateQueue=l)&&(e.flags|=4)}};M$=function(t,e,r,n){r!==n&&(e.flags|=4)};function n1(t,e){if(!Dn)switch(t.tailMode){case"hidden":e=t.tail;for(var r=null;e!==null;)e.alternate!==null&&(r=e),e=e.sibling;r===null?t.tail=null:r.sibling=null;break;case"collapsed":r=t.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null}}function hs(t){var e=t.alternate!==null&&t.alternate.child===t.child,r=0,n=0;if(e)for(var i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=n,t.childLanes=r,e}function uZ(t,e,r){var n=e.pendingProps;switch(FA(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return hs(e),null;case 1:return Co(e.type)&&qv(),hs(e),null;
vendor: 35,906 bytes, line 41
41case 3:return n=e.stateNode,qp(),Tn(Eo),Tn(ks),YA(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(Mb(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Ja!==null&&($8(Ja),Ja=null))),T8(t,e),hs(e),null;case 5:GA(e);var i=Hd(l2.current);if(r=e.type,t!==null&&e.stateNode!=null)L$(t,e,r,n,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error(ke(166));return hs(e),null}if(t=Hd(tl.current),Mb(e)){n=e.stateNode,r=e.type;var s=e.memoizedProps;switch(n[Hc]=e,n[a2]=s,t=(e.mode&1)!==0,r){case"dialog":Sn("cancel",n),Sn("close",n);break;case"iframe":case"object":case"embed":Sn("load",n);break;case"video":case"audio":for(i=0;i<F1.length;i++)Sn(F1[i],n);break;case"source":Sn("error",n);break;case"img":case"image":case"link":Sn("error",n),Sn("load",n);break;case"details":Sn("toggle",n);break;case"input":Y7(n,s),Sn("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!s.multiple},Sn("invalid",n);break;case"textarea":J7(n,s),Sn("invalid",n)}r8(r,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?n.textContent!==a&&(s.suppressHydrationWarning!==!0&&Lb(n.textContent,a,t),i=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Lb(n.textContent,a,t),i=["children",""+a]):Jm.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&Sn("scroll",n)}switch(r){case"input":Nb(n),Z7(n,s,!0);break;case"textarea":Nb(n),Q7(n);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(n.onclick=Hv)}n=i,e.updateQueue=n,n!==null&&(e.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=uM(r)),t==="http://www.w3.org/1999/xhtml"?r==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=o.createElement(r,{is:n.is}):(t=o.createElement(r),r==="select"&&(o=t,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):t=o.createElementNS(t,r),t[Hc]=e,t[a2]=n,D$(t,e,!1,!1),e.stateNode=t;e:{switch(o=n8(r,n),r){case"dialog":Sn("cancel",t),Sn("close",t),i=n;break;case"iframe":case"object":case"embed":Sn("load",t),i=n;break;case"video":case"audio":for(i=0;i<F1.length;i++)Sn(F1[i],t);i=n;break;case"source":Sn("error",t),i=n;break;case"img":case"image":case"link":Sn("error",t),Sn("load",t),i=n;break;case"details":Sn("toggle",t),i=n;break;case"input":Y7(t,n),i=J6(t,n),Sn("invalid",t);break;case"option":i=n;break;case"select":t._wrapperState={wasMultiple:!!n.multiple},i=Hn({},n,{value:void 0}),Sn("invalid",t);break;case"textarea":J7(t,n),i=e8(t,n),Sn("invalid",t);break;default:i=n}r8(r,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var c=a[s];s==="style"?hM(t,c):s==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&fM(t,c)):s==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&Qm(t,c):typeof c=="number"&&Qm(t,""+c):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Jm.hasOwnProperty(s)?c!=null&&s==="onScroll"&&Sn("scroll",t):c!=null&&AA(t,s,c,o))}switch(r){case"input":Nb(t),Z7(t,n,!1);break;case"textarea":Nb(t),Q7(t);break;case"option":n.value!=null&&t.setAttribute("value",""+Yf(n.value));break;case"select":t.multiple=!!n.multiple,s=n.value,s!=null?xp(t,!!n.multiple,s,!1):n.defaultValue!=null&&xp(t,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=Hv)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return hs(e),null;case 6:if(t&&e.stateNode!=null)M$(t,e,t.memoizedProps,n);else{if(typeof n!="string"&&e.stateNode===null)throw Error(ke(166));if(r=Hd(l2.current),Hd(tl.current),Mb(e)){if(n=e.stateNode,r=e.memoizedProps,n[Hc]=e,(s=n.nodeValue!==r)&&(t=Ho,t!==null))switch(t.tag){case 3:Lb(n.nodeValue,r,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&Lb(n.nodeValue,r,(t.mode&1)!==0)}s&&(e.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Hc]=e,e.stateNode=n}return hs(e),null;case 13:if(Tn(Fn),n=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(Dn&&zo!==null&&e.mode&1&&!(e.flags&128))e$(),Wp(),e.flags|=98560,s=!1;else if(s=Mb(e),n!==null&&n.dehydrated!==null){if(t===null){if(!s)throw Error(ke(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(ke(317));s[Hc]=e}else Wp(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;hs(e),s=!1}else Ja!==null&&($8(Ja),Ja=null),s=!0;if(!s)return e.flags&65536?e:null}return e.flags&128?(e.lanes=r,e):(n=n!==null,n!==(t!==null&&t.memoizedState!==null)&&n&&(e.child.flags|=8192,e.mode&1&&(t===null||Fn.current&1?ki===0&&(ki=3):a9())),e.updateQueue!==null&&(e.flags|=4),hs(e),null);case 4:return qp(),T8(t,e),t===null&&s2(e.stateNode.containerInfo),hs(e),null;case 10:return HA(e.type._context),hs(e),null;case 17:return Co(e.type)&&qv(),hs(e),null;case 19:if(Tn(Fn),s=e.memoizedState,s===null)return hs(e),null;if(n=(e.flags&128)!==0,o=s.rendering,o===null)if(n)n1(s,!1);else{if(ki!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=Qv(t),o!==null){for(e.flags|=128,n1(s,!1),n=o.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),e.subtreeFlags=0,n=r,r=e.child;r!==null;)s=r,t=n,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=t,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,t=o.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),r=r.sibling;return En(Fn,Fn.current&1|2),e.child}t=t.sibling}s.tail!==null&&ui()>Kp&&(e.flags|=128,n=!0,n1(s,!1),e.lanes=4194304)}else{if(!n)if(t=Qv(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),n1(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Dn)return hs(e),null}else 2*ui()-s.renderingStartTime>Kp&&r!==1073741824&&(e.flags|=128,n=!0,n1(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(r=s.last,r!==null?r.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=ui(),e.sibling=null,r=Fn.current,En(Fn,n?r&1|2:r&1),e):(hs(e),null);case 22:case 23:return o9(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?Mo&1073741824&&(hs(e),e.subtreeFlags&6&&(e.flags|=8192)):hs(e),null;case 24:return null;case 25:return null}throw Error(ke(156,e.tag))}function fZ(t,e){switch(FA(e),e.tag){case 1:return Co(e.type)&&qv(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return qp(),Tn(Eo),Tn(ks),YA(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return GA(e),null;case 13:if(Tn(Fn),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ke(340));Wp()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Tn(Fn),null;case 4:return qp(),null;case 10:return HA(e.type._context),null;case 22:case 23:return o9(),null;case 24:return null;default:return null}}var Bb=!1,_s=!1,dZ=typeof WeakSet=="function"?WeakSet:Set,at=null;function cp(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){ri(t,e,n)}else r.current=null}function k8(t,e,r){try{r()}catch(n){ri(t,e,n)}}var jN=!1;function hZ(t,e){if(h8=jv,t=jM(),UA(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{r.nodeType,s.nodeType}catch{r=null;break e}var o=0,a=-1,c=-1,l=0,u=0,f=t,d=null;t:for(;;){for(var p;f!==r||i!==0&&f.nodeType!==3||(a=o+i),f!==s||n!==0&&f.nodeType!==3||(c=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(p=f.firstChild)!==null;)d=f,f=p;for(;;){if(f===t)break t;if(d===r&&++l===i&&(a=o),d===s&&++u===n&&(c=o),(p=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=p}r=a===-1||c===-1?null:{start:a,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(p8={focusedElem:t,selectionRange:r},jv=!1,at=e;at!==null;)if(e=at,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,at=t;else for(;at!==null;){e=at;try{var h=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,y=h.memoizedState,x=e.stateNode,C=x.getSnapshotBeforeUpdate(e.elementType===e.type?g:Ga(e.type,g),y);x.__reactInternalSnapshotBeforeUpdate=C}break;case 3:var _=e.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ke(163))}}catch(L){ri(e,e.return,L)}if(t=e.sibling,t!==null){t.return=e.return,at=t;break}at=e.return}return h=jN,jN=!1,h}function um(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&k8(e,r,s)}i=i.next}while(i!==n)}}function O4(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function P8(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function $$(t){var e=t.alternate;e!==null&&(t.alternate=null,$$(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Hc],delete e[a2],delete e[y8],delete e[YY],delete e[ZY])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function U$(t){return t.tag===5||t.tag===3||t.tag===4}function zN(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||U$(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function R8(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=Hv));else if(n!==4&&(t=t.child,t!==null))for(R8(t,e,r),t=t.sibling;t!==null;)R8(t,e,r),t=t.sibling}function O8(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(O8(t,e,r),t=t.sibling;t!==null;)O8(t,e,r),t=t.sibling}var Qi=null,Za=!1;function Lu(t,e,r){for(r=r.child;r!==null;)B$(t,e,r),r=r.sibling}function B$(t,e,r){if(el&&typeof el.onCommitFiberUnmount=="function")try{el.onCommitFiberUnmount(A4,r)}catch{}switch(r.tag){case 5:_s||cp(r,e);case 6:var n=Qi,i=Za;Qi=null,Lu(t,e,r),Qi=n,Za=i,Qi!==null&&(Za?(t=Qi,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):Qi.removeChild(r.stateNode));break;case 18:Qi!==null&&(Za?(t=Qi,r=r.stateNode,t.nodeType===8?E5(t.parentNode,r):t.nodeType===1&&E5(t,r),r2(t)):E5(Qi,r.stateNode));break;case 4:n=Qi,i=Za,Qi=r.stateNode.containerInfo,Za=!0,Lu(t,e,r),Qi=n,Za=i;break;case 0:case 11:case 14:case 15:if(!_s&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&k8(r,e,o),i=i.next}while(i!==n)}Lu(t,e,r);break;case 1:if(!_s&&(cp(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){ri(r,e,a)}Lu(t,e,r);break;case 21:Lu(t,e,r);break;case 22:r.mode&1?(_s=(n=_s)||r.memoizedState!==null,Lu(t,e,r),_s=n):Lu(t,e,r);break;default:Lu(t,e,r)}}function WN(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new dZ),e.forEach(function(n){var i=EZ.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Ma(t,e){var r=e.deletions;if(r!==null)for(var n=0;n<r.length;n++){var i=r[n];try{var s=t,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 5:Qi=a.stateNode,Za=!1;break e;case 3:Qi=a.stateNode.containerInfo,Za=!0;break e;case 4:Qi=a.stateNode.containerInfo,Za=!0;break e}a=a.return}if(Qi===null)throw Error(ke(160));B$(s,o,i),Qi=null,Za=!1;var c=i.alternate;c!==null&&(c.return=null),i.return=null}catch(l){ri(i,e,l)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)F$(e,t),e=e.sibling}function F$(t,e){var r=t.alternate,n=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Ma(e,t),Ac(t),n&4){try{um(3,t,t.return),O4(3,t)}catch(g){ri(t,t.return,g)}try{um(5,t,t.return)}catch(g){ri(t,t.return,g)}}break;case 1:Ma(e,t),Ac(t),n&512&&r!==null&&cp(r,r.return);break;case 5:if(Ma(e,t),Ac(t),n&512&&r!==null&&cp(r,r.return),t.flags&32){var i=t.stateNode;try{Qm(i,"")}catch(g){ri(t,t.return,g)}}if(n&4&&(i=t.stateNode,i!=null)){var s=t.memoizedProps,o=r!==null?r.memoizedProps:s,a=t.type,c=t.updateQueue;if(t.updateQueue=null,c!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&cM(i,s),n8(a,o);var l=n8(a,s);for(o=0;o<c.length;o+=2){var u=c[o],f=c[o+1];u==="style"?hM(i,f):u==="dangerouslySetInnerHTML"?fM(i,f):u==="children"?Qm(i,f):AA(i,u,f,l)}switch(a){case"input":Q6(i,s);break;case"textarea":lM(i,s);break;case"select":var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var p=s.value;p!=null?xp(i,!!s.multiple,p,!1):d!==!!s.multiple&&(s.defaultValue!=null?xp(i,!!s.multiple,s.defaultValue,!0):xp(i,!!s.multiple,s.multiple?[]:"",!1))}i[a2]=s}catch(g){ri(t,t.return,g)}}break;case 6:if(Ma(e,t),Ac(t),n&4){if(t.stateNode===null)throw Error(ke(162));i=t.stateNode,s=t.memoizedProps;try{i.nodeValue=s}catch(g){ri(t,t.return,g)}}break;case 3:if(Ma(e,t),Ac(t),n&4&&r!==null&&r.memoizedState.isDehydrated)try{r2(e.containerInfo)}catch(g){ri(t,t.return,g)}break;case 4:Ma(e,t),Ac(t);break;case 13:Ma(e,t),Ac(t),i=t.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(i9=ui())),n&4&&WN(t);break;case 22:if(u=r!==null&&r.memoizedState!==null,t.mode&1?(_s=(l=_s)||u,Ma(e,t),_s=l):Ma(e,t),Ac(t),n&8192){if(l=t.memoizedState!==null,(t.stateNode.isHidden=l)&&!u&&t.mode&1)for(at=t,u=t.child;u!==null;){for(f=at=u;at!==null;){switch(d=at,p=d.child,d.tag){case 0:case 11:case 14:case 15:um(4,d,d.return);break;case 1:cp(d,d.return);var h=d.stateNode;if(typeof h.componentWillUnmount=="function"){n=d,r=d.return;try{e=n,h.props=e.memoizedProps,h.state=e.memoizedState,h.componentWillUnmount()}catch(g){ri(n,r,g)}}break;case 5:cp(d,d.return);break;case 22:if(d.memoizedState!==null){qN(f);continue}}p!==null?(p.return=d,at=p):qN(f)}u=u.sibling}e:for(u=null,f=t;;){if(f.tag===5){if(u===null){u=f;try{i=f.stateNode,l?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=f.stateNode,c=f.memoizedProps.style,o=c!=null&&c.hasOwnProperty("display")?c.display:null,a.style.display=dM("display",o))}catch(g){ri(t,t.return,g)}}}else if(f.tag===6){if(u===null)try{f.stateNode.nodeValue=l?"":f.memoizedProps}catch(g){ri(t,t.return,g)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===t)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;u===f&&(u=null),f=f.return}u===f&&(u=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Ma(e,t),Ac(t),n&4&&WN(t);break;case 21:break;default:Ma(e,t),Ac(t)}}function Ac(t){var e=t.flags;if(e&2){try{e:{for(var r=t.return;r!==null;){if(U$(r)){var n=r;break e}r=r.return}throw Error(ke(160))}switch(n.tag){case 5:var i=n.stateNode;n.flags&32&&(Qm(i,""),n.flags&=-33);var s=zN(t);O8(t,s,i);break;case 3:case 4:var o=n.stateNode.containerInfo,a=zN(t);R8(t,a,o);break;default:throw Error(ke(161))}}catch(c){ri(t,t.return,c)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function pZ(t,e,r){at=t,j$(t)}function j$(t,e,r){for(var n=(t.mode&1)!==0;at!==null;){var i=at,s=i.child;if(i.tag===22&&n){var o=i.memoizedState!==null||Bb;if(!o){var a=i.alternate,c=a!==null&&a.memoizedState!==null||_s;a=Bb;var l=_s;if(Bb=o,(_s=c)&&!l)for(at=i;at!==null;)o=at,c=o.child,o.tag===22&&o.memoizedState!==null?VN(i):c!==null?(c.return=o,at=c):VN(i);for(;s!==null;)at=s,j$(s),s=s.sibling;at=i,Bb=a,_s=l}HN(t)}else i.subtreeFlags&8772&&s!==null?(s.return=i,at=s):HN(t)}}function HN(t){for(;at!==null;){var e=at;if(e.flags&8772){var r=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:_s||O4(5,e);break;case 1:var n=e.stateNode;if(e.flags&4&&!_s)if(r===null)n.componentDidMount();else{var i=e.elementType===e.type?r.memoizedProps:Ga(e.type,r.memoizedProps);n.componentDidUpdate(i,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var s=e.updateQueue;s!==null&&IN(e,s,n);break;case 3:var o=e.updateQueue;if(o!==null){if(r=null,e.child!==null)switch(e.child.tag){case 5:r=e.child.stateNode;break;case 1:r=e.child.stateNode}IN(e,o,r)}break;case 5:var a=e.stateNode;if(r===null&&e.flags&4){r=a;var c=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var l=e.alternate;if(l!==null){var u=l.memoizedState;if(u!==null){var f=u.dehydrated;f!==null&&r2(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(ke(163))}_s||e.flags&512&&P8(e)}catch(d){ri(e,e.return,d)}}if(e===t){at=null;break}if(r=e.sibling,r!==null){r.return=e.return,at=r;break}at=e.return}}function qN(t){for(;at!==null;){var e=at;if(e===t){at=null;break}var r=e.sibling;if(r!==null){r.return=e.return,at=r;break}at=e.return}}function VN(t){for(;at!==null;){var e=at;try{switch(e.tag){case 0:case 11:case 15:var r=e.return;try{O4(4,e)}catch(c){ri(e,r,c)}break;case 1:var n=e.stateNode;if(typeof n.componentDidMount=="function"){var i=e.return;try{n.componentDidMount()}catch(c){ri(e,i,c)}}var s=e.return;try{P8(e)}catch(c){ri(e,s,c)}break;case 5:var o=e.return;try{P8(e)}catch(c){ri(e,o,c)}}}catch(c){ri(e,e.return,c)}if(e===t){at=null;break}var a=e.sibling;if(a!==null){a.return=e.return,at=a;break}at=e.return}}var gZ=Math.ceil,t3=Au.ReactCurrentDispatcher,r9=Au.ReactCurrentOwner,Ea=Au.ReactCurrentBatchConfig,Lr=0,ji=null,yi=null,rs=0,Mo=0,lp=pd(0),ki=0,h2=null,Eh=0,D4=0,n9=0,fm=null,mo=null,i9=0,Kp=1/0,Hl=null,r3=!1,D8=null,Mf=null,Fb=!1,Cf=null,n3=0,dm=0,L8=null,Xw=-1,ev=0;function zs(){return Lr&6?ui():Xw!==-1?Xw:Xw=ui()}function $f(t){return t.mode&1?Lr&2&&rs!==0?rs&-rs:QY.transition!==null?(ev===0&&(ev=AM()),ev):(t=an,t!==0||(t=window.event,t=t===void 0?16:RM(t.type)),t):1}function ac(t,e,r,n){if(50<dm)throw dm=0,L8=null,Error(ke(185));Oy(t,r,n),(!(Lr&2)||t!==ji)&&(t===ji&&(!(Lr&2)&&(D4|=r),ki===4&&mf(t,rs)),_o(t,n),r===1&&Lr===0&&!(e.mode&1)&&(Kp=ui()+500,k4&&gd()))}function _o(t,e){var r=t.callbackNode;QG(t,e);var n=Fv(t,t===ji?rs:0);if(n===0)r!==null&&tN(r),t.callbackNode=null,t.callbackPriority=0;else if(e=n&-n,t.callbackPriority!==e){if(r!=null&&tN(r),e===1)t.tag===0?JY(KN.bind(null,t)):JM(KN.bind(null,t)),KY(function(){!(Lr&6)&&gd()}),r=null;else{switch(SM(n)){case 1:r=kA;break;case 4:r=CM;break;case 16:r=Bv;break;case 536870912:r=_M;break;default:r=Bv}r=Y$(r,z$.bind(null,t))}t.callbackPriority=e,t.callbackNode=r}}function z$(t,e){if(Xw=-1,ev=0,Lr&6)throw Error(ke(327));var r=t.callbackNode;if(Sp()&&t.callbackNode!==r)return null;var n=Fv(t,t===ji?rs:0);if(n===0)return null;if(n&30||n&t.expiredLanes||e)e=i3(t,n);else{e=n;var i=Lr;Lr|=2;var s=H$();(ji!==t||rs!==e)&&(Hl=null,Kp=ui()+500,oh(t,e));do try{bZ();break}catch(a){W$(t,a)}while(!0);WA(),t3.current=s,Lr=i,yi!==null?e=0:(ji=null,rs=0,e=ki)}if(e!==0){if(e===2&&(i=c8(t),i!==0&&(n=i,e=M8(t,i))),e===1)throw r=h2,oh(t,0),mf(t,n),_o(t,ui()),r;if(e===6)mf(t,n);else{if(i=t.current.alternate,!(n&30)&&!mZ(i)&&(e=i3(t,n),e===2&&(s=c8(t),s!==0&&(n=s,e=M8(t,s))),e===1))throw r=h2,oh(t,0),mf(t,n),_o(t,ui()),r;switch(t.finishedWork=i,t.finishedLanes=n,e){case 0:case 1:throw Error(ke(345));case 2:Od(t,mo,Hl);break;case 3:if(mf(t,n),(n&130023424)===n&&(e=i9+500-ui(),10<e)){if(Fv(t,0)!==0)break;if(i=t.suspendedLanes,(i&n)!==n){zs(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=m8(Od.bind(null,t,mo,Hl),e);break}Od(t,mo,Hl);break;case 4:if(mf(t,n),(n&4194240)===n)break;for(e=t.eventTimes,i=-1;0<n;){var o=31-oc(n);s=1<<o,o=e[o],o>i&&(i=o),n&=~s}if(n=i,n=ui()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*gZ(n/1960))-n,10<n){t.timeoutHandle=m8(Od.bind(null,t,mo,Hl),n);break}Od(t,mo,Hl);break;case 5:Od(t,mo,Hl);break;default:throw Error(ke(329))}}}return _o(t,ui()),t.callbackNode===r?z$.bind(null,t):null}function M8(t,e){var r=fm;return t.current.memoizedState.isDehydrated&&(oh(t,e).flags|=256),t=i3(t,e),t!==2&&(e=mo,mo=r,e!==null&&$8(e)),t}function $8(t){mo===null?mo=t:mo.push.apply(mo,t)}function mZ(t){for(var e=t;;){if(e.flags&16384){var r=e.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var i=r[n],s=i.getSnapshot;i=i.value;try{if(!hc(s(),i))return!1}catch{return!1}}}if(r=e.child,e.subtreeFlags&16384&&r!==null)r.return=e,e=r;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function mf(t,e){for(e&=~n9,e&=~D4,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var r=31-oc(e),n=1<<r;t[r]=-1,e&=~n}}function KN(t){if(Lr&6)throw Error(ke(327));Sp();var e=Fv(t,0);if(!(e&1))return _o(t,ui()),null;var r=i3(t,e);if(t.tag!==0&&r===2){var n=c8(t);n!==0&&(e=n,r=M8(t,n))}if(r===1)throw r=h2,oh(t,0),mf(t,e),_o(t,ui()),r;if(r===6)throw Error(ke(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,Od(t,mo,Hl),_o(t,ui()),null}function s9(t,e){var r=Lr;Lr|=1;try{return t(e)}finally{Lr=r,Lr===0&&(Kp=ui()+500,k4&&gd())}}function Ch(t){Cf!==null&&Cf.tag===0&&!(Lr&6)&&Sp();var e=Lr;Lr|=1;var r=Ea.transition,n=an;try{if(Ea.transition=null,an=1,t)return t()}finally{an=n,Ea.transition=r,Lr=e,!(Lr&6)&&gd()}}function o9(){Mo=lp.current,Tn(lp)}function oh(t,e){t.finishedWork=null,t.finishedLanes=0;var r=t.timeoutHandle;if(r!==-1&&(t.timeoutHandle=-1,VY(r)),yi!==null)for(r=yi.return;r!==null;){var n=r;switch(FA(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&qv();break;case 3:qp(),Tn(Eo),Tn(ks),YA();break;case 5:GA(n);break;case 4:qp();break;case 13:Tn(Fn);break;case 19:Tn(Fn);break;case 10:HA(n.type._context);break;case 22:case 23:o9()}r=r.return}if(ji=t,yi=t=Uf(t.current,null),rs=Mo=e,ki=0,h2=null,n9=D4=Eh=0,mo=fm=null,Wd!==null){for(e=0;e<Wd.length;e++)if(r=Wd[e],n=r.interleaved,n!==null){r.interleaved=null;var i=n.next,s=r.pending;if(s!==null){var o=s.next;s.next=i,n.next=o}r.pending=n}Wd=null}return t}function W$(t,e){do{var r=yi;try{if(WA(),Zw.current=e3,Xv){for(var n=zn.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}Xv=!1}if(xh=0,Li=Si=zn=null,lm=!1,u2=0,r9.current=null,r===null||r.return===null){ki=1,h2=e,yi=null;break}e:{var s=t,o=r.return,a=r,c=e;if(e=rs,a.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var l=c,u=a,f=u.tag;if(!(u.mode&1)&&(f===0||f===11||f===15)){var d=u.alternate;d?(u.updateQueue=d.updateQueue,u.memoizedState=d.memoizedState,u.lanes=d.lanes):(u.updateQueue=null,u.memoizedState=null)}var p=DN(o);if(p!==null){p.flags&=-257,LN(p,o,a,s,e),p.mode&1&&ON(s,l,e),e=p,c=l;var h=e.updateQueue;if(h===null){var g=new Set;g.add(c),e.updateQueue=g}else h.add(c);break e}else{if(!(e&1)){ON(s,l,e),a9();break e}c=Error(ke(426))}}else if(Dn&&a.mode&1){var y=DN(o);if(y!==null){!(y.flags&65536)&&(y.flags|=256),LN(y,o,a,s,e),jA(Vp(c,a));break e}}s=c=Vp(c,a),ki!==4&&(ki=2),fm===null?fm=[s]:fm.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e;var x=S$(s,c,e);NN(s,x);break e;case 1:a=c;var C=s.type,_=s.stateNode;if(!(s.flags&128)&&(typeof C.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(Mf===null||!Mf.has(_)))){s.flags|=65536,e&=-e,s.lanes|=e;var L=N$(s,a,e);NN(s,L);break e}}s=s.return}while(s!==null)}V$(r)}catch(P){e=P,yi===r&&r!==null&&(yi=r=r.return);continue}break}while(!0)}function H$(){var t=t3.current;return t3.current=e3,t===null?e3:t}function a9(){(ki===0||ki===3||ki===2)&&(ki=4),ji===null||!(Eh&268435455)&&!(D4&268435455)||mf(ji,rs)}function i3(t,e){var r=Lr;Lr|=2;var n=H$();(ji!==t||rs!==e)&&(Hl=null,oh(t,e));do try{yZ();break}catch(i){W$(t,i)}while(!0);if(WA(),Lr=r,t3.current=n,yi!==null)throw Error(ke(261));return ji=null,rs=0,ki}function yZ(){for(;yi!==null;)q$(yi)}function bZ(){for(;yi!==null&&!WG();)q$(yi)}function q$(t){var e=G$(t.alternate,t,Mo);t.memoizedProps=t.pendingProps,e===null?V$(t):yi=e,r9.current=null}function V$(t){var e=t;do{var r=e.alternate;if(t=e.return,e.flags&32768){if(r=fZ(r,e),r!==null){r.flags&=32767,yi=r;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{ki=6,yi=null;return}}else if(r=uZ(r,e,Mo),r!==null){yi=r;return}if(e=e.sibling,e!==null){yi=e;return}yi=e=t}while(e!==null);ki===0&&(ki=5)}function Od(t,e,r){var n=an,i=Ea.transition;try{Ea.transition=null,an=1,wZ(t,e,r,n)}finally{Ea.transition=i,an=n}return null}function wZ(t,e,r,n){do Sp();while(Cf!==null);if(Lr&6)throw Error(ke(327));r=t.finishedWork;var i=t.finishedLanes;if(r===null)return null;if(t.finishedWork=null,t.finishedLanes=0,r===t.current)throw Error(ke(177));t.callbackNode=null,t.callbackPriority=0;var s=r.lanes|r.childLanes;if(XG(t,s),t===ji&&(yi=ji=null,rs=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Fb||(Fb=!0,Y$(Bv,function(){return Sp(),null})),s=(r.flags&15990)!==0,r.subtreeFlags&15990||s){s=Ea.transition,Ea.transition=null;var o=an;an=1;var a=Lr;Lr|=4,r9.current=null,hZ(t,r),F$(r,t),BY(p8),jv=!!h8,p8=h8=null,t.current=r,pZ(r),HG(),Lr=a,an=o,Ea.transition=s}else t.current=r;if(Fb&&(Fb=!1,Cf=t,n3=i),s=t.pendingLanes,s===0&&(Mf=null),KG(r.stateNode),_o(t,ui()),e!==null)for(n=t.onRecoverableError,r=0;r<e.length;r++)i=e[r],n(i.value,{componentStack:i.stack,digest:i.digest});if(r3)throw r3=!1,t=D8,D8=null,t;return n3&1&&t.tag!==0&&Sp(),s=t.pendingLanes,s&1?t===L8?dm++:(dm=0,L8=t):dm=0,gd(),null}function Sp(){if(Cf!==null){var t=SM(n3),e=Ea.transition,r=an;try{if(Ea.transition=null,an=16>t?16:t,Cf===null)var n=!1;else{if(t=Cf,Cf=null,n3=0,Lr&6)throw Error(ke(331));var i=Lr;for(Lr|=4,at=t.current;at!==null;){var s=at,o=s.child;if(at.flags&16){var a=s.deletions;if(a!==null){for(var c=0;c<a.length;c++){var l=a[c];for(at=l;at!==null;){var u=at;switch(u.tag){case 0:case 11:case 15:um(8,u,s)}var f=u.child;if(f!==null)f.return=u,at=f;else for(;at!==null;){u=at;var d=u.sibling,p=u.return;if($$(u),u===l){at=null;break}if(d!==null){d.return=p,at=d;break}at=p}}}var h=s.alternate;if(h!==null){var g=h.child;if(g!==null){h.child=null;do{var y=g.sibling;g.sibling=null,g=y}while(g!==null)}}at=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,at=o;else e:for(;at!==null;){if(s=at,s.flags&2048)switch(s.tag){case 0:case 11:case 15:um(9,s,s.return)}var x=s.sibling;if(x!==null){x.return=s.return,at=x;break e}at=s.return}}var C=t.current;for(at=C;at!==null;){o=at;var _=o.child;if(o.subtreeFlags&2064&&_!==null)_.return=o,at=_;else e:for(o=C;at!==null;){if(a=at,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:O4(9,a)}}catch(P){ri(a,a.return,P)}if(a===o){at=null;break e}var L=a.sibling;if(L!==null){L.return=a.return,at=L;break e}at=a.return}}if(Lr=i,gd(),el&&typeof el.onPostCommitFiberRoot=="function")try{el.onPostCommitFiberRoot(A4,t)}catch{}n=!0}return n}finally{an=r,Ea.transition=e}}return!1}function GN(t,e,r){e=Vp(r,e),e=S$(t,e,1),t=Lf(t,e,1),e=zs(),t!==null&&(Oy(t,1,e),_o(t,e))}function ri(t,e,r){if(t.tag===3)GN(t,t,r);else for(;e!==null;){if(e.tag===3){GN(e,t,r);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Mf===null||!Mf.has(n))){t=Vp(r,t),t=N$(e,t,1),e=Lf(e,t,1),t=zs(),e!==null&&(Oy(e,1,t),_o(e,t));break}}e=e.return}}function vZ(t,e,r){var n=t.pingCache;n!==null&&n.delete(e),e=zs(),t.pingedLanes|=t.suspendedLanes&r,ji===t&&(rs&r)===r&&(ki===4||ki===3&&(rs&130023424)===rs&&500>ui()-i9?oh(t,0):n9|=r),_o(t,e)}function K$(t,e){e===0&&(t.mode&1?(e=kb,kb<<=1,!(kb&130023424)&&(kb=4194304)):e=1);var r=zs();t=du(t,e),t!==null&&(Oy(t,e,r),_o(t,r))}function xZ(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),K$(t,r)}function EZ(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,i=t.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(ke(314))}n!==null&&n.delete(e),K$(t,r)}var G$;G$=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||Eo.current)bo=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return bo=!1,lZ(t,e,r);bo=!!(t.flags&131072)}else bo=!1,Dn&&e.flags&1048576&&QM(e,Gv,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;Qw(t,e),t=e.pendingProps;var i=zp(e,ks.current);Ap(e,r),i=JA(null,e,n,t,i,r);var s=QA();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Co(n)?(s=!0,Vv(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,VA(e),i.updater=R4,e.stateNode=i,i._reactInternals=e,C8(e,n,t,r),e=S8(null,e,n,!0,s,r)):(e.tag=0,Dn&&s&&BA(e),$s(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(Qw(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=_Z(n),t=Ga(n,t),i){case 0:e=A8(null,e,n,t,r);break e;case 1:e=UN(null,e,n,t,r);break e;case 11:e=MN(null,e,n,t,r);break e;case 14:e=$N(null,e,n,Ga(n.type,t),r);break e}throw Error(ke(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Ga(n,i),A8(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Ga(n,i),UN(t,e,n,i,r);case 3:e:{if(P$(e),t===null)throw Error(ke(387));n=e.pendingProps,s=e.memoizedState,i=s.element,i$(t,e),Jv(e,n,null,r);var o=e.memoizedState;if(n=o.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=Vp(Error(ke(423)),e),e=BN(t,e,n,r,i);break e}else if(n!==i){i=Vp(Error(ke(424)),e),e=BN(t,e,n,r,i);break e}else for(zo=Df(e.stateNode.containerInfo.firstChild),Ho=e,Dn=!0,Ja=null,r=r$(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Wp(),n===i){e=hu(t,e,r);break e}$s(t,e,n,r)}e=e.child}return e;case 5:return s$(e),t===null&&v8(e),n=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,g8(n,i)?o=null:s!==null&&g8(n,s)&&(e.flags|=32),k$(t,e),$s(t,e,o,r),e.child;case 6:return t===null&&v8(e),null;case 13:return R$(t,e,r);case 4:return KA(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=Hp(e,null,n,r):$s(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Ga(n,i),MN(t,e,n,i,r);case 7:return $s(t,e,e.pendingProps,r),e.child;case 8:return $s(t,e,e.pendingProps.children,r),e.child;case 12:return $s(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value,En(Yv,n._currentValue),n._currentValue=o,s!==null)if(hc(s.value,o)){if(s.children===i.children&&!Eo.current){e=hu(t,e,r);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var c=a.firstContext;c!==null;){if(c.context===n){if(s.tag===1){c=nu(-1,r&-r),c.tag=2;var l=s.updateQueue;if(l!==null){l=l.shared;var u=l.pending;u===null?c.next=c:(c.next=u.next,u.next=c),l.pending=c}}s.lanes|=r,c=s.alternate,c!==null&&(c.lanes|=r),x8(s.return,r,e),a.lanes|=r;break}c=c.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(ke(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),x8(o,r,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}$s(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,Ap(e,r),i=_a(i),n=n(i),e.flags|=1,$s(t,e,n,r),e.child;case 14:return n=e.type,i=Ga(n,e.pendingProps),i=Ga(n.type,i),$N(t,e,n,i,r);case 15:return I$(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Ga(n,i),Qw(t,e),e.tag=1,Co(n)?(t=!0,Vv(e)):t=!1,Ap(e,r),A$(e,n,i),C8(e,n,i,r),S8(null,e,n,!0,t,r);case 19:return O$(t,e,r);case 22:return T$(t,e,r)}throw Error(ke(156,e.tag))};function Y$(t,e){return EM(t,e)}function CZ(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function wa(t,e,r,n){return new CZ(t,e,r,n)}function c9(t){return t=t.prototype,!(!t||!t.isReactComponent)}function _Z(t){if(typeof t=="function")return c9(t)?1:0;if(t!=null){if(t=t.$$typeof,t===NA)return 11;if(t===IA)return 14}return 2}function Uf(t,e){var r=t.alternate;return r===null?(r=wa(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function tv(t,e,r,n,i,s){var o=2;if(n=t,typeof t=="function")c9(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case X0:return ah(r.children,i,s,e);case SA:o=8,i|=8;break;case K6:return t=wa(12,r,e,i|2),t.elementType=K6,t.lanes=s,t;case G6:return t=wa(13,r,e,i),t.elementType=G6,t.lanes=s,t;case Y6:return t=wa(19,r,e,i),t.elementType=Y6,t.lanes=s,t;case sM:return L4(r,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case nM:o=10;break e;case iM:o=9;break e;case NA:o=11;break e;case IA:o=14;break e;case sf:o=16,n=null;break e}throw Error(ke(130,t==null?t:typeof t,""))}return e=wa(o,r,e,i),e.elementType=t,e.type=n,e.lanes=s,e}function ah(t,e,r,n){return t=wa(7,t,n,e),t.lanes=r,t}function L4(t,e,r,n){return t=wa(22,t,n,e),t.elementType=sM,t.lanes=r,t.stateNode={isHidden:!1},t}function k5(t,e,r){return t=wa(6,t,null,e),t.lanes=r,t}function P5(t,e,r){return e=wa(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function AZ(t,e,r,n,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=f5(0),this.expirationTimes=f5(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=f5(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function l9(t,e,r,n,i,s,o,a,c){return t=new AZ(t,e,r,a,c),e===1?(e=1,s===!0&&(e|=8)):e=0,s=wa(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},VA(s),t}function SZ(t,e,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;
vendor: 4,595 bytes, line 41
41return{$$typeof:Q0,key:n==null?null:""+n,children:t,containerInfo:e,implementation:r}}function Z$(t){if(!t)return Zf;t=t._reactInternals;e:{if(Gh(t)!==t||t.tag!==1)throw Error(ke(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(Co(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(ke(171))}if(t.tag===1){var r=t.type;if(Co(r))return ZM(t,r,e)}return e}function J$(t,e,r,n,i,s,o,a,c){return t=l9(r,n,!0,t,i,s,o,a,c),t.context=Z$(null),r=t.current,n=zs(),i=$f(r),s=nu(n,i),s.callback=e??null,Lf(r,s,i),t.current.lanes=i,Oy(t,i,n),_o(t,n),t}function M4(t,e,r,n){var i=e.current,s=zs(),o=$f(i);return r=Z$(r),e.context===null?e.context=r:e.pendingContext=r,e=nu(s,o),e.payload={element:t},n=n===void 0?null:n,n!==null&&(e.callback=n),t=Lf(i,e,o),t!==null&&(ac(t,i,o,s),Yw(t,i,o)),o}function s3(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function YN(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var r=t.retryLane;t.retryLane=r!==0&&r<e?r:e}}function u9(t,e){YN(t,e),(t=t.alternate)&&YN(t,e)}function NZ(){return null}var Q$=typeof reportError=="function"?reportError:function(t){console.error(t)};function f9(t){this._internalRoot=t}$4.prototype.render=f9.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(ke(409));M4(t,e,null,null)};$4.prototype.unmount=f9.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Ch(function(){M4(null,t,null,null)}),e[fu]=null}};function $4(t){this._internalRoot=t}$4.prototype.unstable_scheduleHydration=function(t){if(t){var e=TM();t={blockedOn:null,target:t,priority:e};for(var r=0;r<gf.length&&e!==0&&e<gf[r].priority;r++);gf.splice(r,0,t),r===0&&PM(t)}};function d9(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function U4(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function ZN(){}function IZ(t,e,r,n,i){if(i){if(typeof n=="function"){var s=n;n=function(){var l=s3(o);s.call(l)}}var o=J$(e,n,t,0,null,!1,!1,"",ZN);return t._reactRootContainer=o,t[fu]=o.current,s2(t.nodeType===8?t.parentNode:t),Ch(),o}for(;i=t.lastChild;)t.removeChild(i);if(typeof n=="function"){var a=n;n=function(){var l=s3(c);a.call(l)}}var c=l9(t,0,!1,null,null,!1,!1,"",ZN);return t._reactRootContainer=c,t[fu]=c.current,s2(t.nodeType===8?t.parentNode:t),Ch(function(){M4(e,c,r,n)}),c}function B4(t,e,r,n,i){var s=r._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var c=s3(o);a.call(c)}}M4(e,o,t,i)}else o=IZ(r,e,t,i,n);return s3(o)}NM=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var r=B1(e.pendingLanes);r!==0&&(PA(e,r|1),_o(e,ui()),!(Lr&6)&&(Kp=ui()+500,gd()))}break;case 13:Ch(function(){var n=du(t,1);if(n!==null){var i=zs();ac(n,t,1,i)}}),u9(t,1)}};RA=function(t){if(t.tag===13){var e=du(t,134217728);if(e!==null){var r=zs();ac(e,t,134217728,r)}u9(t,134217728)}};IM=function(t){if(t.tag===13){var e=$f(t),r=du(t,e);if(r!==null){var n=zs();ac(r,t,e,n)}u9(t,e)}};TM=function(){return an};kM=function(t,e){var r=an;try{return an=t,e()}finally{an=r}};s8=function(t,e,r){switch(e){case"input":if(Q6(t,r),e=r.name,r.type==="radio"&&e!=null){for(r=t;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<r.length;e++){var n=r[e];if(n!==t&&n.form===t.form){var i=T4(n);if(!i)throw Error(ke(90));aM(n),Q6(n,i)}}}break;case"textarea":lM(t,r);break;case"select":e=r.value,e!=null&&xp(t,!!r.multiple,e,!1)}};mM=s9;yM=Ch;var TZ={usingClientEntryPoint:!1,Events:[Ly,np,T4,pM,gM,s9]},i1={findFiberByHostInstance:zd,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},kZ={bundleType:i1.bundleType,version:i1.version,rendererPackageName:i1.rendererPackageName,rendererConfig:i1.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Au.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=vM(t),t===null?null:t.stateNode},findFiberByHostInstance:i1.findFiberByHostInstance||NZ,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
41if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var jb=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!jb.isDisabled&&jb.supportsFiber)try{A4=jb.inject(kZ),el=jb}catch{}}Go.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=TZ;Go.createPortal=function(t,e){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d9(e))throw Error(ke(200));return SZ(t,e,null,r)};Go.createRoot=function(t,e){if(!d9(t))throw Error(ke(299));var r=!1,n="",i=Q$;return e!=null&&(e.unstable_strictMode===!0&&(r=!0),e.identifierPrefix!==void 0&&(n=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=l9(t,1,!1,null,null,r,!1,n,i),t[fu]=e.current,s2(t.nodeType===8?t.parentNode:t),new f9(e)};Go.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(ke(188)):(t=Object.keys(t).join(","),Error(ke(268,t)));return t=vM(e),t=t===null?null:t.stateNode,t};Go.flushSync=function(t){return Ch(t)};Go.hydrate=function(t,e,r){if(!U4(e))throw Error(ke(200));return B4(null,t,e,!0,r)};Go.hydrateRoot=function(t,e,r){if(!d9(t))throw Error(ke(405));var n=r!=null&&r.hydratedSources||null,i=!1,s="",o=Q$;if(r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(s=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),e=J$(e,null,t,1,r??null,i,!1,s,o),t[fu]=e.current,s2(t),n)for(t=0;t<n.length;t++)r=n[t],i=r._getVersion,i=i(r._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[r,i]:e.mutableSourceEagerHydrationData.push(r,i);return new $4(e)};Go.render=function(t,e,r){if(!U4(e))throw Error(ke(200));return B4(null,t,e,!1,r)};Go.unmountComponentAtNode=function(t){if(!U4(t))throw Error(ke(40));return t._reactRootContainer?(Ch(function(){B4(null,null,t,!1,function(){t._reactRootContainer=null,t[fu]=null})}),!0):!1};Go.unstable_batchedUpdates=s9;Go.unstable_renderSubtreeIntoContainer=function(t,e,r,n){if(!U4(r))throw Error(ke(200));if(t==null||t._reactInternals===void 0)throw Error(ke(38));return B4(t,e,r,!1,n)};Go.version="18.3.1-next-f1338f8080-20240426";function X$(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(X$)}catch(t){console.error(t)}}X$(),XL.exports=Go;var PZ=XL.exports,JN=PZ;q6.createRoot=JN.createRoot,q6.hydrateRoot=JN.hydrateRoot;/** 42 * @remix-run/router v1.23.0 43 * 44 * Copyright (c) Remix Software Inc. 45 * 46 * This source code is licensed under the MIT license found in the 47 * LICENSE.md file in the root directory of this source tree. 48 * 49 * @license MIT 50 */function p2(){return p2=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},p2.apply(this,arguments)}var _f;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(_f||(_f={}));const QN="popstate";function RZ(t){t===void 0&&(t={});function e(n,i){let{pathname:s,search:o,hash:a}=n.location;return U8("",{pathname:s,search:o,hash:a},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(n,i){return typeof i=="string"?i:o3(i)}return DZ(e,r,null,t)}function Wn(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function eU(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function OZ(){return Math.random().toString(36).substr(2,8)}function XN(t,e){return{usr:t.state,key:t.key,idx:e}}function U8(t,e,r,n){return r===void 0&&(r=null),p2({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Ng(e):e,{state:r,key:e&&e.key||n||OZ()})}function o3(t){let{pathname:e="/",search:r="",hash:n=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Ng(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}function DZ(t,e,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:s=!1}=n,o=i.history,a=_f.Pop,c=null,l=u();l==null&&(l=0,o.replaceState(p2({},o.state,{idx:l}),""));function u(){return(o.state||{idx:null}).idx}function f(){a=_f.Pop;let y=u(),x=y==null?null:y-l;l=y,c&&c({action:a,location:g.location,delta:x})}function d(y,x){a=_f.Push;let C=U8(g.location,y,x);l=u()+1;let _=XN(C,l),L=g.createHref(C);try{o.pushState(_,"",L)}
vendor: 3,212 bytes, line 50
50catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;i.location.assign(L)}s&&c&&c({action:a,location:g.location,delta:1})}function p(y,x){a=_f.Replace;let C=U8(g.location,y,x);l=u();let _=XN(C,l),L=g.createHref(C);o.replaceState(_,"",L),s&&c&&c({action:a,location:g.location,delta:0})}function h(y){let x=i.location.origin!=="null"?i.location.origin:i.location.href,C=typeof y=="string"?y:o3(y);return C=C.replace(/ $/,"%20"),Wn(x,"No window.location.(origin|href) available to create URL for href: "+C),new URL(C,x)}let g={get action(){return a},get location(){return t(i,o)},listen(y){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(QN,f),c=y,()=>{i.removeEventListener(QN,f),c=null}},createHref(y){return e(i,y)},createURL:h,encodeLocation(y){let x=h(y);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:d,replace:p,go(y){return o.go(y)}};return g}var eI;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(eI||(eI={}));function LZ(t,e,r){return r===void 0&&(r="/"),MZ(t,e,r)}function MZ(t,e,r,n){let i=typeof e=="string"?Ng(e):e,s=Gp(i.pathname||"/",r);if(s==null)return null;let o=tU(t);$Z(o);let a=null;for(let c=0;a==null&&c<o.length;++c){let l=GZ(s);a=VZ(o[c],l)}return a}function tU(t,e,r,n){e===void 0&&(e=[]),r===void 0&&(r=[]),n===void 0&&(n="");let i=(s,o,a)=>{let c={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};c.relativePath.startsWith("/")&&(Wn(c.relativePath.startsWith(n),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(n.length));let l=Bf([n,c.relativePath]),u=r.concat(c);s.children&&s.children.length>0&&(Wn(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+l+'".')),tU(s.children,e,u,l)),!(s.path==null&&!s.index)&&e.push({path:l,score:HZ(l,s.index),routesMeta:u})};return t.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let c of rU(s.path))i(s,o,c)}),e}function rU(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,i=r.endsWith("?"),s=r.replace(/\?$/,"");if(n.length===0)return i?[s,""]:[s];let o=rU(n.join("/")),a=[];return a.push(...o.map(c=>c===""?s:[s,c].join("/"))),i&&a.push(...o),a.map(c=>t.startsWith("/")&&c===""?"/":c)}function $Z(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:qZ(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const UZ=/^:[\w-]+$/,BZ=3,FZ=2,jZ=1,zZ=10,WZ=-2,tI=t=>t==="*";function HZ(t,e){let r=t.split("/"),n=r.length;return r.some(tI)&&(n+=WZ),e&&(n+=FZ),r.filter(i=>!tI(i)).reduce((i,s)=>i+(UZ.test(s)?BZ:s===""?jZ:zZ),n)}function qZ(t,e){return t.length===e.length&&t.slice(0,-1).every((n,i)=>n===e[i])?t[t.length-1]-e[e.length-1]:0}function VZ(t,e,r){let{routesMeta:n}=t,i={},s="/",o=[];for(let a=0;a<n.length;++a){let c=n[a],l=a===n.length-1,u=s==="/"?e:e.slice(s.length)||"/",f=B8({path:c.relativePath,caseSensitive:c.caseSensitive,end:l},u),d=c.route;if(!f)return null;
vendor: 4,080 bytes, lines 50-59
50Object.assign(i,f.params),o.push({params:i,pathname:Bf([s,f.pathname]),pathnameBase:QZ(Bf([s,f.pathnameBase])),route:d}),f.pathnameBase!=="/"&&(s=Bf([s,f.pathnameBase]))}return o}function B8(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=KZ(t.path,t.caseSensitive,t.end),i=e.match(r);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:n.reduce((l,u,f)=>{let{paramName:d,isOptional:p}=u;if(d==="*"){let g=a[f]||"";o=s.slice(0,s.length-g.length).replace(/(.)\/+$/,"$1")}const h=a[f];return p&&!h?l[d]=void 0:l[d]=(h||"").replace(/%2F/g,"/"),l},{}),pathname:s,pathnameBase:o,pattern:t}}function KZ(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),eU(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,c)=>(n.push({paramName:a,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}function GZ(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return eU(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function Gp(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}function YZ(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?Ng(t):t;return{pathname:r?r.startsWith("/")?r:ZZ(r,e):e,search:XZ(n),hash:eJ(i)}}function ZZ(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function R5(t,e,r,n){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function JZ(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function h9(t,e){let r=JZ(t);return e?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function p9(t,e,r,n){n===void 0&&(n=!1);let i;typeof t=="string"?i=Ng(t):(i=p2({},t),Wn(!i.pathname||!i.pathname.includes("?"),R5("?","pathname","search",i)),Wn(!i.pathname||!i.pathname.includes("#"),R5("#","pathname","hash",i)),Wn(!i.search||!i.search.includes("#"),R5("#","search","hash",i)));let s=t===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=r;else{let f=e.length-1;if(!n&&o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),f-=1;i.pathname=d.join("/")}a=f>=0?e[f]:"/"}let c=YZ(i,a),l=o&&o!=="/"&&o.endsWith("/"),u=(s||o===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(l||u)&&(c.pathname+="/"),c}const Bf=t=>t.join("/").replace(/\/\/+/g,"/"),QZ=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),XZ=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,eJ=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function tJ(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const nU=["post","put","patch","delete"];new Set(nU);const rJ=["get",...nU];new Set(rJ);/** 51 * React Router v6.30.1 52 * 53 * Copyright (c) Remix Software Inc. 54 * 55 * This source code is licensed under the MIT license found in the 56 * LICENSE.md file in the root directory of this source tree. 57 * 58 * @license MIT 59 */function g2(){return g2=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];
59for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},g2.apply(this,arguments)}const F4=se.createContext(null),iU=se.createContext(null),Su=se.createContext(null),j4=se.createContext(null),Cl=se.createContext({outlet:null,matches:[],isDataRoute:!1}),sU=se.createContext(null);function nJ(t,e){let{relative:r}=e===void 0?{}:e;Ig()||Wn(!1);let{basename:n,navigator:i}=se.useContext(Su),{hash:s,pathname:o,search:a}=z4(t,{relative:r}),c=o;return n!=="/"&&(c=o==="/"?n:Bf([n,o])),i.createHref({pathname:c,search:a,hash:s})}function Ig(){return se.useContext(j4)!=null}function Nu(){return Ig()||Wn(!1),se.useContext(j4).location}function oU(t){se.useContext(Su).static||se.useLayoutEffect(t)}function $y(){let{isDataRoute:t}=se.useContext(Cl);return t?bJ():iJ()}function iJ(){Ig()||Wn(!1);let t=se.useContext(F4),{basename:e,future:r,navigator:n}=se.useContext(Su),{matches:i}=se.useContext(Cl),{pathname:s}=Nu(),o=JSON.stringify(h9(i,r.v7_relativeSplatPath)),a=se.useRef(!1);return oU(()=>{a.current=!0}),se.useCallback(function(l,u){if(u===void 0&&(u={}),!a.current)return;if(typeof l=="number"){n.go(l);return}let f=p9(l,JSON.parse(o),s,u.relative==="path");t==null&&e!=="/"&&(f.pathname=f.pathname==="/"?e:Bf([e,f.pathname])),(u.replace?n.replace:n.push)(f,u.state,u)},[e,n,o,s,t])}const sJ=se.createContext(null);function oJ(t){let e=se.useContext(Cl).outlet;return e&&se.createElement(sJ.Provider,{value:t},e)}function OMe(){let{matches:t}=se.useContext(Cl),e=t[t.length-1];return e?e.params:{}}function z4(t,e){let{relative:r}=e===void 0?{}:e,{future:n}=se.useContext(Su),{matches:i}=se.useContext(Cl),{pathname:s}=Nu(),o=JSON.stringify(h9(i,n.v7_relativeSplatPath));return se.useMemo(()=>p9(t,JSON.parse(o),s,r==="path"),[t,o,s,r])}function aJ(t,e){return cJ(t,e)}function cJ(t,e,r,n){Ig()||Wn(!1);let{navigator:i}=se.useContext(Su),{matches:s}=se.useContext(Cl),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let l=Nu(),u;if(e){var f;let y=typeof e=="string"?Ng(e):e;c==="/"||(f=y.pathname)!=null&&f.startsWith(c)||Wn(!1),u=y}else u=l;let d=u.pathname||"/",p=d;if(c!=="/"){let y=c.replace(/^\//,"").split("/");p="/"+d.replace(/^\//,"").split("/").slice(y.length).join("/")}let h=LZ(t,{pathname:p}),g=hJ(h&&h.map(y=>Object.assign({},y,{params:Object.assign({},a,y.params),pathname:Bf([c,i.encodeLocation?i.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?c:Bf([c,i.encodeLocation?i.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),s,r,n);return e&&g?se.createElement(j4.Provider,{value:{location:g2({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:_f.Pop}},g):g}function lJ(){let t=yJ(),e=tJ(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return se.createElement(se.Fragment,null,se.createElement("h2",null,"Unexpected Application Error!"),se.createElement("h3",{style:{fontStyle:"italic"}},e),r?se.createElement("pre",{style:i},r):null,null)}const uJ=se.createElement(lJ,null);class fJ extends se.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,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){console.error("React Router caught the following error during render",e,r)}render(){return this.state.error!==void 0?se.createElement(Cl.Provider,{value:this.props.routeContext},se.createElement(sU.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function dJ(t){let{routeContext:e,match:r,children:n}=t,i=se.useContext(F4);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),se.createElement(Cl.Provider,{value:e},n)}function hJ(t,e,r,n){var i;if(e===void 0&&(e=[]),r===void 0&&(r=null),n===void 0&&(n=null),t==null){var s;if(!r)return null;if(r.errors)t=r.matches;else if((s=n)!=null&&s.v7_partialHydration&&e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let o=t,a=(i=r)==null?void 0:i.errors;if(a!=null){let u=o.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);u>=0||Wn(!1),o=o.slice(0,Math.min(o.length,u+1))}let c=!1,l=-1;if(r&&n&&n.v7_partialHydration)for(let u=0;u<o.length;u++){let f=o[u];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(l=u),f.route.id){let{loaderData:d,errors:p}=r,h=f.route.loader&&d[f.route.id]===void 0&&(!p||p[f.route.id]===void 0);if(f.route.lazy||h){c=!0,l>=0?o=o.slice(0,l+1):o=[o[0]];break}}}return o.reduceRight((u,f,d)=>{let p,h=!1,g=null,y=null;r&&(p=a&&f.route.id?a[f.route.id]:void 0,g=f.route.errorElement||uJ,c&&(l<0&&d===0?(wJ("route-fallback"),h=!0,y=null):l===d&&(h=!0,y=f.route.hydrateFallbackElement||null)));let x=e.concat(o.slice(0,d+1)),C=()=>{let _;return p?_=g:h?_=y:f.route.Component?_=se.createElement(f.route.Component,null):f.route.element?_=f.route.element:_=u,se.createElement(dJ,{match:f,routeContext:{outlet:u,matches:x,isDataRoute:r!=null},children:_})};return r&&(f.route.ErrorBoundary||f.route.errorElement||d===0)?se.createElement(fJ,{location:r.location,revalidation:r.revalidation,component:g,error:p,children:C(),routeC
59ontext:{outlet:null,matches:x,isDataRoute:!0}}):C()},null)}var aU=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(aU||{}),cU=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(cU||{});function pJ(t){let e=se.useContext(F4);return e||Wn(!1),e}function gJ(t){let e=se.useContext(iU);return e||Wn(!1),e}function mJ(t){let e=se.useContext(Cl);return e||Wn(!1),e}function lU(t){let e=mJ(),r=e.matches[e.matches.length-1];return r.route.id||Wn(!1),r.route.id}function yJ(){var t;let e=se.useContext(sU),r=gJ(),n=lU();return e!==void 0?e:(t=r.errors)==null?void 0:t[n]}function bJ(){let{router:t}=pJ(aU.UseNavigateStable),e=lU(cU.UseNavigateStable),r=se.useRef(!1);return oU(()=>{r.current=!0}),se.useCallback(function(i,s){s===void 0&&(s={}),r.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,g2({fromRouteId:e},s)))},[t,e])}const rI={};function wJ(t,e,r){rI[t]||(rI[t]=!0)}function vJ(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function g9(t){let{to:e,replace:r,state:n,relative:i}=t;Ig()||Wn(!1);let{future:s,static:o}=se.useContext(Su),{matches:a}=se.useContext(Cl),{pathname:c}=Nu(),l=$y(),u=p9(e,h9(a,s.v7_relativeSplatPath),c,i==="path"),f=JSON.stringify(u);return se.useEffect(()=>l(JSON.parse(f),{replace:r,state:n,relative:i}),[l,f,i,r,n]),null}function W4(t){return oJ(t.context)}function Re(t){Wn(!1)}function xJ(t){let{basename:e="/",children:r=null,location:n,navigationType:i=_f.Pop,navigator:s,static:o=!1,future:a}=t;Ig()&&Wn(!1);let c=e.replace(/^\/*/,"/"),l=se.useMemo(()=>({basename:c,navigator:s,static:o,future:g2({v7_relativeSplatPath:!1},a)}),[c,a,s,o]);typeof n=="string"&&(n=Ng(n));let{pathname:u="/",search:f="",hash:d="",state:p=null,key:h="default"}=n,g=se.useMemo(()=>{let y=Gp(u,c);return y==null?null:{location:{pathname:y,search:f,hash:d,state:p,key:h},navigationType:i}},[c,u,f,d,p,h,i]);return g==null?null:se.createElement(Su.Provider,{value:l},se.createElement(j4.Provider,{children:r,value:g}))}function EJ(t){let{children:e,location:r}=t;return aJ(F8(e),r)}new Promise(()=>{});function F8(t,e){e===void 0&&(e=[]);let r=[];return se.Children.forEach(t,(n,i)=>{if(!se.isValidElement(n))return;let s=[...e,i];if(n.type===se.Fragment){r.push.apply(r,F8(n.props.children,s));return}n.type!==Re&&Wn(!1),!n.props.index||!n.props.children||Wn(!1);let o={id:n.props.id||s.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=F8(n.props.children,s)),r.push(o)}),r}/** 60 * React Router DOM v6.30.1 61 * 62 * Copyright (c) Remix Software Inc. 63 * 64 * This source code is licensed under the MIT license found in the 65 * LICENSE.md file in the root directory of this source tree. 66 * 67 * @license MIT 68 */function a3(){return a3=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},a3.apply(this,arguments)}function uU(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,s;for(s=0;s<n.length;s++)i=n[s],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}function CJ(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function _J(t,e){return t.button===0&&(!e||e==="_self")&&!CJ(t)}function j8(t){return t===void 0&&(t=""),new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((e,r)=>{let n=t[r];return e.concat(Array.isArray(n)?n.map(i=>[r,i]):[[r,n]])},[]))}function AJ(t,e){let r=j8(t);return e&&e.forEach((n,i)=>
68{r.has(i)||e.getAll(i).forEach(s=>{r.append(i,s)})}),r}const SJ=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],NJ=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],IJ="6";try{window.__reactRouterVersion=IJ}catch{}const TJ=se.createContext({isTransitioning:!1}),kJ="startTransition",nI=vG[kJ];function PJ(t){let{basename:e,children:r,future:n,window:i}=t,s=se.useRef();s.current==null&&(s.current=RZ({window:i,v5Compat:!0}));let o=s.current,[a,c]=se.useState({action:o.action,location:o.location}),{v7_startTransition:l}=n||{},u=se.useCallback(f=>{l&&nI?nI(()=>c(f)):c(f)},[c,l]);return se.useLayoutEffect(()=>o.listen(u),[o,u]),se.useEffect(()=>vJ(n),[n]),se.createElement(xJ,{basename:e,children:r,location:a.location,navigationType:a.action,navigator:o,future:n})}const RJ=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",OJ=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Oc=se.forwardRef(function(e,r){let{onClick:n,relative:i,reloadDocument:s,replace:o,state:a,target:c,to:l,preventScrollReset:u,viewTransition:f}=e,d=uU(e,SJ),{basename:p}=se.useContext(Su),h,g=!1;if(typeof l=="string"&&OJ.test(l)&&(h=l,RJ))try{let _=new URL(window.location.href),L=l.startsWith("//")?new URL(_.protocol+l):new URL(l),P=Gp(L.pathname,p);L.origin===_.origin&&P!=null?l=P+L.search+L.hash:g=!0}catch{}let y=nJ(l,{relative:i}),x=LJ(l,{replace:o,state:a,target:c,preventScrollReset:u,relative:i,viewTransition:f});function C(_){n&&n(_),_.defaultPrevented||x(_)}return se.createElement("a",a3({},d,{href:h||y,onClick:g||s?n:C,ref:r,target:c}))}),ps=se.forwardRef(function(e,r){let{"aria-current":n="page",caseSensitive:i=!1,className:s="",end:o=!1,style:a,to:c,viewTransition:l,children:u}=e,f=uU(e,NJ),d=z4(c,{relative:f.relative}),p=Nu(),h=se.useContext(iU),{navigator:g,basename:y}=se.useContext(Su),x=h!=null&&MJ(d)&&l===!0,C=g.encodeLocation?g.encodeLocation(d).pathname:d.pathname,_=p.pathname,L=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;i||(_=_.toLowerCase(),L=L?L.toLowerCase():null,C=C.toLowerCase()),L&&y&&(L=Gp(L,y)||L);const P=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let z=_===C||!o&&_.startsWith(C)&&_.charAt(P)==="/",W=L!=null&&(L===C||!o&&L.startsWith(C)&&L.charAt(C.length)==="/"),B={isActive:z,isPending:W,isTransitioning:x},I=z?n:void 0,j;typeof s=="function"?j=s(B):j=[s,z?"active":null,W?"pending":null,x?"transitioning":null].filter(Boolean).join(" ");let D=typeof a=="function"?a(B):a;return se.createElement(Oc,a3({},f,{"aria-current":I,className:j,ref:r,style:D,to:c,viewTransition:l}),typeof u=="function"?u(B):u)});var z8;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(z8||(z8={}));var iI;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(iI||(iI={}));function DJ(t){let e=se.useContext(F4);return e||Wn(!1),e}function LJ(t,e){let{target:r,replace:n,state:i,preventScrollReset:s,relative:o,viewTransition:a}=e===void 0?{}:e,c=$y(),l=Nu(),u=z4(t,{relative:o});return se.useCallback(f=>{if(_J(f,r)){f.preventDefault();let d=n!==void 0?n:o3(l)===o3(u);c(t,{replace:d,state:i,preventScrollReset:s,relative:o,viewTransition:a})}},[l,c,u,n,i,r,t,s,o,a])}function DMe(t){let e=se.useRef(j8(t)),r=se.useRef(!1),n=Nu(),i=se.useMemo(()=>AJ(n.search,r.current?null:e.current),[n.search]),s=$y(),o=se.useCallback((a,c)=>{const l=j8(typeof a=="function"?a(i):a);r.current=!0,s("?"+l,c)},[s,i]);return[i,o]}function MJ(t,e){e===void 0&&(e={});let r=se.useContext(TJ);r==null&&Wn(!1);let{basename:n}=DJ(z8.useViewTransitionState),i=z4(t,{relative:e.relative});if(!r.isTransitioning)return!1;let s=Gp(r.currentLocation.pathname,n)||r.currentLocation.pathname,o=Gp(r.nextLocation.pathname,n)||r.nextLocation.pathname;return B8(i.pathname,o)!=null||B8(i.pathname,s)!=null}const $J="modulepreload",UJ=function(t){return"/"+t},sI={},Ie=function(e,r,n){let i=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.allSettled(r.map(c=>{if(c=UJ(c),c in sI)return;sI[c]=!0;const l=c.endsWith(".css"),u=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${u}`))return;const f=document.createElement("link");if(f.rel=l?"stylesheet":$J,l||(f.as="script"),f.crossOrigin="",f.href=c,a&&f.setAttribute("nonce",a),document.head.appendChild(f),l)return new Promise((d,p)=>{f.addEventListener("load",d),f.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${c}`)))})}))}function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return i.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return e().catch(s)})},Wt=t=>typeof t=="string",s1=()=>{let t,e;const r=new Promise((n,i)=>{t=n,e=i});return r.resolve=t,r.reject=e,r},oI=t=>t==null?"":""+t,BJ=(t,e,r)=>{t.forEach(n=>{e[n]&&(r[n]=e[n])})},FJ=/###/g,aI=t=>t&&t.indexOf("###")>-1?t.replace(FJ,"."):t,cI=t=>!t||Wt(t),hm=(t,e,r)=>{const n=Wt(e)?e.split("."):e;let i=0;for(;i<n.length-1;){if(cI(t))return{};const s=aI(n[i]);!t[s]&&r&&(t[s]=new r),Object.prototype.hasOwnProperty.call(t,s)?t=t[s]:t={},++i}return cI(t)?{}:{obj:t,k:aI(n[i])}},lI=(t,e,r)=>{const{obj:n,k:i}=hm(t,e,Object);if(n!==void 0||e.length===1){n[i]=r;return}let s=e[e.length-1],o=e.slice(0,e.length-1),a=hm(t,o,Object);for(;a.obj===void 0&&o.length;)s=`${o[o.length-1]}.${s}`,o=o.slice(0,o.length-1),a=hm(t,o,Object),a!=null&&a.obj&&typeof a.obj[`${a.k}.${s}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${s}`]=r},jJ=(t,e,r,n)=>{const{obj:i,k:s}=hm(t,e,Object);i[s]=i[s]||[],i[s].push(r)},c3=(t,e)=>{const{obj:r,k:n}=hm(t,e);if(r&&Object.prototype.hasOwnProperty.call(r,n))return r[n]},zJ=(t,e,r)=>{const n=c3(t,r);return n!==void 0?n:c3(e,r)},fU=(t,e,r)=>{for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in t?Wt(t[n])||t[n]instanceof String||Wt(e[n])||e[n]instanceof String?r&&(t[n]=e[n]):fU(t[n],e[n],r):t[n]=e[n]);return t},Cd=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var WJ={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const HJ=t=>Wt(t)?t.replace(/[&<>
68"'\/]/g,e=>WJ[e]):t;class qJ{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const r=this.regExpMap.get(e);if(r!==void 0)return r;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}const VJ=[" ",",","?","!",";"],KJ=new qJ(20),GJ=(t,e,r)=>{e=e||"",r=r||"";const n=VJ.filter(o=>e.indexOf(o)<0&&r.indexOf(o)<0);if(n.length===0)return!0;const i=KJ.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`);let s=!i.test(t);if(!s){const o=t.indexOf(r);o>0&&!i.test(t.substring(0,o))&&(s=!0)}return s},W8=(t,e,r=".")=>{if(!t)return;if(t[e])return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0;const n=e.split(r);let i=t;for(let s=0;s<n.length;){if(!i||typeof i!="object")return;let o,a="";for(let c=s;c<n.length;++c)if(c!==s&&(a+=r),a+=n[c],o=i[a],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&c<n.length-1)continue;s+=c-s+1;break}i=o}return i},m2=t=>t==null?void 0:t.replace("_","-"),YJ={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){var r,n;(n=(r=console==null?void 0:console[t])==null?void 0:r.apply)==null||n.call(r,console,e)}};let ZJ=class H8{constructor(e,r={}){this.init(e,r)}init(e,r={}){this.prefix=r.prefix||"i18next:",this.logger=e||YJ,this.options=r,this.debug=r.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,r,n,i){return i&&!this.debug?null:(Wt(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[r](e))}create(e){return new H8(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new H8(this.logger,e)}};var Gc=new ZJ;let H4=class{constructor(){this.observers={}}on(e,r){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(r)||0;this.observers[n].set(r,i+1)}),this}off(e,r){if(this.observers[e]){if(!r){delete this.observers[e];return}this.observers[e].delete(r)}}emit(e,...r){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([i,s])=>{for(let o=0;o<s;o++)i(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([i,s])=>{for(let o=0;o<s;o++)i.apply(i,[e,...r])})}};class uI extends H4{constructor(e,r={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const r=this.options.ns.indexOf(e);r>-1&&this.options.ns.splice(r,1)}getResource(e,r,n,i={}){var l,u;const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,r],n&&(Array.isArray(n)?a.push(...n):Wt(n)&&s?a.push(...n.split(s)):a.push(n)));const c=c3(this.data,a);return!c&&!r&&!n&&e.indexOf(".")>-1&&(e=a[0],r=a[1],n=a.slice(2).join(".")),c||!o||!Wt(n)?c:W8((u=(l=this.data)==null?void 0:l[e])==null?void 0:u[r],n,s)}addResource(e,r,n,i,s={silent:!1}){const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let a=[e,r];
68n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."),i=r,r=a[1]),this.addNamespaces(r),lI(this.data,a,i),s.silent||this.emit("added",e,r,n,i)}addResources(e,r,n,i={silent:!1}){for(const s in n)(Wt(n[s])||Array.isArray(n[s]))&&this.addResource(e,r,s,n[s],{silent:!0});i.silent||this.emit("added",e,r,n)}addResourceBundle(e,r,n,i,s,o={silent:!1,skipCopy:!1}){let a=[e,r];e.indexOf(".")>-1&&(a=e.split("."),i=n,n=r,r=a[1]),this.addNamespaces(r);let c=c3(this.data,a)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?fU(c,n,s):c={...c,...n},lI(this.data,a,c),o.silent||this.emit("added",e,r,n)}removeResourceBundle(e,r){this.hasResourceBundle(e,r)&&delete this.data[e][r],this.removeNamespaces(r),this.emit("removed",e,r)}hasResourceBundle(e,r){return this.getResource(e,r)!==void 0}getResourceBundle(e,r){return r||(r=this.options.defaultNS),this.getResource(e,r)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const r=this.getDataByLanguage(e);return!!(r&&Object.keys(r)||[]).find(i=>r[i]&&Object.keys(r[i]).length>0)}toJSON(){return this.data}}var dU={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,r,n,i){return t.forEach(s=>{var o;e=((o=this.processors[s])==null?void 0:o.process(e,r,n,i))??e}),e}};const hU=Symbol("i18next/PATH_KEY");function JJ(){const t=[],e=Object.create(null);let r;return e.get=(n,i)=>{var s;return(s=r==null?void 0:r.revoke)==null||s.call(r),i===hU?t:(t.push(i),r=Proxy.revocable(n,e),r.proxy)},Proxy.revocable(Object.create(null),e).proxy}function q8(t,e){const{[hU]:r}=t(JJ());return r.join((e==null?void 0:e.keySeparator)??".")}const fI={},O5=t=>!Wt(t)&&typeof t!="boolean"&&typeof t!="number";class l3 extends H4{constructor(e,r={}){super(),BJ(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","
68i18nFormat","utils"],e,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Gc.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,r={interpolation:{}}){const n={...r};if(e==null)return!1;const i=this.resolve(e,n);if((i==null?void 0:i.res)===void 0)return!1;const s=O5(i.res);return!(n.returnObjects===!1&&s)}extractFromKey(e,r){let n=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let s=r.ns||this.options.defaultNS||[];const o=n&&e.indexOf(n)>-1,a=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!GJ(e,n,i);if(o&&!a){const c=e.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:e,namespaces:Wt(s)?[s]:s};const l=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(l[0])>-1)&&(s=l.shift()),e=l.join(i)}return{key:e,namespaces:Wt(s)?[s]:s}}translate(e,r,n){let i=typeof r=="object"?{...r}:r;if(typeof i!="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i=="object"&&(i={...i}),i||(i={}),e==null)return"";typeof e=="function"&&(e=q8(e,{...this.options,...i})),Array.isArray(e)||(e=[String(e)]);const s=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,{key:a,namespaces:c}=this.extractFromKey(e[e.length-1],i),l=c[c.length-1];let u=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;u===void 0&&(u=":");const f=i.lng||this.language,d=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((f==null?void 0:f.toLowerCase())==="cimode")return d?s?{res:`${l}${u}${a}`,usedKey:a,exactUsedKey:a,usedLng:f,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${a}`:s?{res:a,usedKey:a,exactUsedKey:a,usedLng:f,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:a;const p=this.resolve(e,i);let h=p==null?void 0:p.res;const g=(p==null?void 0:p.usedKey)||a,y=(p==null?void 0:p.exactUsedKey)||a,x=["[object Number]","[object Function]","[object RegExp]"],C=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,_=!this.i18nFormat||this.i18nFormat.handleAsObject,L=i.count!==void 0&&!Wt(i.count),P=l3.hasDefaultValue(i),z=L?this.pluralResolver.getSuffix(f,i.count,i):"",W=i.ordinal&&L?this.pluralResolver.getSuffix(f,i.count,{ordinal:!1}):"",B=L&&!i.ordinal&&i.count===0,I=B&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${z}`]||i[`defaultValue${W}`]||i.defaultValue;let j=h;_&&!h&&P&&(j=I);const D=O5(j),O=Object.prototype.toString.apply(j);if(_&&j&&D&&x.indexOf(O)<0&&!(Wt(C)&&Array.isArray(j))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const T=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,j,{...i,ns:c}):`key '${a} (${this.language})' returned an object instead of string.`;return s?(p.res=T,p.usedParams=this.getUsedParamsDetails(i),p):T}if(o){const T=Array.isArray(j),m=T?[]:{},b=T?y:g;for(const E in j)if(Object.prototype.hasOwnProperty.call(j,E)){const k=`${b}${o}${E}`;P&&!h?m[E]=this.translate(k,{...i,defaultValue:O5(I)?I[E]:void 0,joinArrays:!1,ns:c}):m[E]=this.translate(k,{...i,joinArrays:!1,ns:c}),m[E]===k&&(m[E]=j[E])}h=m}}else if(_&&Wt(C)&&Array.isArray(h))h=h.join(C),h&&(h=this.extendTranslation(h,e,i,n));else{let T=!1,m=!1;!this.isValidLookup(h)&&P&&(T=!0,h=I),this.isValidLookup(h)||(m=!0,h=a);const E=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&m?void 0:h,k=P&&I!==h&&this.options.updateMissing;if(m||T||k){if(this.logger.log(k?"updateKey":"missingKey",f,l,a,k?I:h),o){const N=this.resolve(a,{...i,keySeparator:!1});N&&N.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let R=[];const M=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&M&&M[0])for(let N=0;N<M.length;N++)R.push(M[N]);else this.options.saveMissingTo==="all"?R=this.languageUtils.toResolveHierarchy(i.lng||this.language):R.push(i.lng||this.language);const H=(N,v,U)=>{var S;const G=P&&U!==h?U:E;this.options.missingKeyHandler?this.options.missingKeyHandler(N,l,v,G,k,i):(S=this.backendConnector)!=null&&S.saveMissing&&this.backendConnector.saveMissing(N,l,v,G,k,i),this.emit
vendor: 20,738 bytes, line 68
68("missingKey",N,l,v,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&L?R.forEach(N=>{const v=this.pluralResolver.getSuffixes(N,i);B&&i[`defaultValue${this.options.pluralSeparator}zero`]&&v.indexOf(`${this.options.pluralSeparator}zero`)<0&&v.push(`${this.options.pluralSeparator}zero`),v.forEach(U=>{H([N],a+U,i[`defaultValue${U}`]||I)})}):H(R,a,I))}h=this.extendTranslation(h,e,i,p,n),m&&h===a&&this.options.appendNamespaceToMissingKey&&(h=`${l}${u}${a}`),(m||T)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${a}`:a,T?h:void 0,i))}return s?(p.res=h,p.usedParams=this.getUsedParamsDetails(i),p):h}extendTranslation(e,r,n,i,s){var c,l;if((c=this.i18nFormat)!=null&&c.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const u=Wt(e)&&(((l=n==null?void 0:n.interpolation)==null?void 0:l.skipOnVariables)!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(u){const p=e.match(this.interpolator.nestingRegexp);f=p&&p.length}let d=n.replace&&!Wt(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),e=this.interpolator.interpolate(e,d,n.lng||this.language||i.usedLng,n),u){const p=e.match(this.interpolator.nestingRegexp),h=p&&p.length;f<h&&(n.nest=!1)}!n.lng&&i&&i.res&&(n.lng=this.language||i.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...p)=>(s==null?void 0:s[0])===p[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${r[0]}`),null):this.translate(...p,r),n)),n.interpolation&&this.interpolator.reset()}const o=n.postProcess||this.options.postProcess,a=Wt(o)?[o]:o;return e!=null&&(a!=null&&a.length)&&n.applyPostProcessor!==!1&&(e=dU.handle(a,e,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,r={}){let n,i,s,o,a;return Wt(e)&&(e=[e]),e.forEach(c=>{if(this.isValidLookup(n))return;const l=this.extractFromKey(c,r),u=l.key;i=u;let f=l.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const d=r.count!==void 0&&!Wt(r.count),p=d&&!r.ordinal&&r.count===0,h=r.context!==void 0&&(Wt(r.context)||typeof r.context=="number")&&r.context!=="",g=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);f.forEach(y=>{var x,C;this.isValidLookup(n)||(a=y,!fI[`${g[0]}-${y}`]&&((x=this.utils)!=null&&x.hasLoadedNamespace)&&!((C=this.utils)!=null&&C.hasLoadedNamespace(a))&&(fI[`${g[0]}-${y}`]=!0,this.logger.warn(`key "${i}" for languages "${g.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(_=>{var z;if(this.isValidLookup(n))return;o=_;const L=[u];if((z=this.i18nFormat)!=null&&z.addLookupKeys)this.i18nFormat.addLookupKeys(L,u,_,y,r);else{let W;d&&(W=this.pluralResolver.getSuffix(_,r.count,r));const B=`${this.options.pluralSeparator}zero`,I=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(r.ordinal&&W.indexOf(I)===0&&L.push(u+W.replace(I,this.options.pluralSeparator)),L.push(u+W),p&&L.push(u+B)),h){const j=`${u}${this.options.contextSeparator||"_"}${r.context}`;L.push(j),d&&(r.ordinal&&W.indexOf(I)===0&&L.push(j+W.replace(I,this.options.pluralSeparator)),L.push(j+W),p&&L.push(j+B))}}let P;for(;P=L.pop();)this.isValidLookup(n)||(s=P,n=this.getResource(_,y,P,r))}))})}),{res:n,usedKey:i,exactUsedKey:s,usedLng:o,usedNS:a}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,r,n,i={}){var s;return(s=this.i18nFormat)!=null&&s.getResource?this.i18nFormat.getResource(e,r,n,i):this.resourceStore.getResource(e,r,n,i)}getUsedParamsDetails(e={}){const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!Wt(e.replace);let i=n?e.replace:e;if(n&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const s of r)delete i[s]}return i}static hasDefaultValue(e){const r="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&r===n.substring(0,r.length)&&e[n]!==void 0)return!0;return!1}}class dI{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Gc.create("languageUtils")}getScriptPartFromCode(e){if(e=m2(e),!e||e.indexOf("-")<0)return null;const r=e.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(e){if(e=m2(e),!e||e.indexOf("-")<0)return e;const r=e.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(e){if(Wt(e)&&e.indexOf("-")>-1){let r;try{r=Intl.getCanonicalLocales(e)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let r;return e.forEach(n=>{if(r)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(r=i)}),!r&&this.options.supportedLngs&&e.forEach(n=>{if(r)return;const i=this.getScriptPartFromCode(n);if(this.isSupportedCode(i))return r=i;const s=this.getLanguagePartFromCode(n);if(this.isSupportedCode(s))return r=s;r=this.options.supportedLngs.find(o=>{if(o===s)return o;if(!(o.indexOf("-")<0&&s.indexOf("-")<0)&&(o.indexOf("-")>0&&s.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===s||o.indexOf(s)===0&&s.length>1))return o})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(e,r){if(!e)return[];if(typeof e=="function"&&(e=e(r)),Wt(e)&&(e=[e]),Array.isArray(e))return e;if(!r)return e.default||[];let n=e[r];return n||(n=e[this.getScriptPartFromCode(r)]),n||(n=e[this.formatLanguageCode(r)]),n||(n=e[this.getLanguagePartFromCode(r)]),n||(n=e.default),n||[]}toResolveHierarchy(e,r){const n=this.getFallbackCodes((r===!1?[]:r)||this.options.fallbackLng||[],e),i=[],s=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return Wt(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(e))):Wt(e)&&s(this.formatLanguageCode(e)),n.forEach(o=>{i.indexOf(o)<0&&s(this.formatLanguageCode(o))}),i}}const hI={zero:0,one:1,two:2,few:3,many:4,other:5},pI={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class QJ{constructor(e,r={}){this.languageUtils=e,this.options=r,this.logger=Gc.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,r={}){const n=m2(e==="dev"?"en":e),i=r.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:n,type:i});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];let o;try{o=new Intl.PluralRules(n,{type:i})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),pI;if(!e.match(/-|_/))return pI;const c=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(c,r)}return this.pluralRulesCache[s]=o,o}needsPlural(e,r={}){let n=this.getRule(e,r);return n||(n=this.getRule("dev",r)),(n==null?void 0:n.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,r,n={}){return this.getSuffixes(e,n).map(i=>`${r}${i}`)}getSuffixes(e,r={}){let n=this.getRule(e,r);return n||(n=this.getRule("dev",r)),n?n.resolvedOptions().pluralCategories.sort((i,s)=>hI[i]-hI[s]).map(i=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(e,r,n={}){const i=this.getRule(e,n);return i?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(r)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",r,n))}}const gI=(t,e,r,n=".",i=!0)=>{let s=zJ(t,e,r);return!s&&i&&Wt(r)&&(s=W8(t,r,n),s===void 0&&(s=W8(e,r,n))),s},D5=t=>t.replace(/\$/g,"$$$$");class mI{constructor(e={}){var r;this.logger=Gc.create("interpolator"),this.options=e,this.format=((r=e==null?void 0:e.interpolation)==null?void 0:r.format)||(n=>n),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:r,escapeValue:n,useRawValueToEscape:i,prefix:s,prefixEscaped:o,suffix:a,suffixEscaped:c,formatSeparator:l,unescapeSuffix:u,unescapePrefix:f,nestingPrefix:d,nestingPrefixEscaped:p,nestingSuffix:h,nestingSuffixEscaped:g,nestingOptionsSeparator:y,maxReplaces:x,alwaysFormat:C}=e.interpolation;this.escape=r!==void 0?r:HJ,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=s?Cd(s):o||"{{",this.suffix=a?Cd(a):c||"}}",this.formatSeparator=l||",",this.unescapePrefix=u?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=d?Cd(d):p||Cd("$t("),this.nestingSuffix=h?Cd(h):g||Cd(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=x||1e3,this.alwaysFormat=C!==void 0?C:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(r,n)=>(r==null?void 0:r.source)===n?(r.lastIndex=0,r):new RegExp(n,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,r,n,i){var p;let s,o,a;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=h=>{if(h.indexOf(this.formatSeparator)<0){const C=gI(r,c,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(C,void 0,n,{...i,...r,interpolationkey:h}):C}const g=h.split(this.formatSeparator),y=g.shift().trim(),x=g.join(this.formatSeparator).trim();return this.format(gI(r,c,y,this.options.keySeparator,this.options.ignoreJSONStructure),x,n,{...i,...r,interpolationkey:y})};this.resetRegExp();const u=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,f=((p=i==null?void 0:i.interpolation)==null?void 0:p.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:h=>D5(h)},{regex:this.regexp,safeValue:h=>this.escapeValue?D5(this.escape(h)):D5(h)}].forEach(h=>{for(a=0;s=h.regex.exec(e);){const g=s[1].trim();if(o=l(g),o===void 0)if(typeof u=="function"){const x=u(e,s,i);o=Wt(x)?x:""}else if(i&&Object.prototype.hasOwnProperty.call(i,g))o="";else if(f){o=s[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${e}`),o="";else!Wt(o)&&!this.useRawValueToEscape&&(o=oI(o));const y=h.safeValue(o);if(e=e.replace(s[0],y),f?(h.regex.lastIndex+=o.length,h.regex.lastIndex-=s[0].length):h.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,r,n={}){let i,s,o;const a=(c,l)=>{const u=this.nestingOptionsSeparator;if(c.indexOf(u)<0)return c;const f=c.split(new RegExp(`${Cd(u)}[ ]*{`));let d=`{${f[1]}`;c=f[0],d=this.interpolate(d,o);const p=d.match(/'/g),h=d.match(/"/g);(((p==null?void 0:p.length)??0)%2===0&&!h||((h==null?void 0:h.length)??0)%2!==0)&&(d=d.replace(/'/g,'"'));try{o=JSON.parse(d),l&&(o={...l,...o})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,g),`${c}${u}${d}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,c};for(;i=this.nestingRegexp.exec(e);){let c=[];o={...n},o=o.replace&&!Wt(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;const l=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(l!==-1&&(c=i[1].slice(l).split(this.formatSeparator).map(u=>u.trim()).filter(Boolean),i[1]=i[1].slice(0,l)),s=r(a.call(this,i[1].trim(),o),o),s&&i[0]===e&&!Wt(s))return s;Wt(s)||(s=oI(s)),s||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),s=""),c.length&&(s=c.reduce((u,f)=>this.format(u,f,n.lng,{...n,interpolationkey:i[1].trim()}),s.trim())),e=e.replace(i[0],s),this.regexp.lastIndex=0}return e}}const XJ=t=>{let e=t.toLowerCase().trim();const r={};if(t.indexOf("(")>-1){const n=t.split("(");e=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);e==="currency"&&i.indexOf(":")<0?r.currency||(r.currency=i.trim()):e==="relativetime"&&i.indexOf(":")<0?r.range||(r.range=i.trim()):i.split(";").forEach(o=>{if(o){const[a,...c]=o.split(":"),l=c.join(":").trim().replace(/^'+|'+$/g,""),u=a.trim();r[u]||(r[u]=l),l==="false"&&(r[u]=!1),l==="true"&&(r[u]=!0),isNaN(l)||(r[u]=parseInt(l,10))}})}return{formatName:e,formatOptions:r}},yI=t=>{const e={};return(r,n,i)=>{let s=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(s={...s,[i.interpolationkey]:void 0});const o=n+JSON.stringify(s);let a=e[o];return a||(a=t(m2(n),i),e[o]=a),a(r)}},eQ=t=>(e,r,n)=>t(m2(r),n)(e);let tQ=class{constructor(e={}){this.logger=Gc.create("formatter"),this.options=e,this.init(e)}init(e,r={interpolation:{}}){this.formatSeparator=r.interpolation.formatSeparator||",";const n=r.cacheInBuiltFormats?yI:eQ;this.formats={number:n((i,s)=>{const o=new Intl.NumberFormat(i,{...s});return a=>o.format(a)}),currency:n((i,s)=>{const o=new Intl.NumberFormat(i,{...s,style:"currency"});return a=>o.format(a)}),datetime:n((i,s)=>{const o=new Intl.DateTimeFormat(i,{...s});return a=>o.format(a)}),relativetime:n((i,s)=>{const o=new Intl.RelativeTimeFormat(i,{...s});return a=>o.format(a,s.range||"day")}),list:n((i,s)=>{const o=new Intl.ListFormat(i,{...s});return a=>o.format(a)})}}add(e,r){this.formats[e.toLowerCase().trim()]=r}addCached(e,r){this.formats[e.toLowerCase().trim()]=yI(r)}format(e,r,n,i={}){const s=r.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(a=>a.indexOf(")")>-1)){const a=s.findIndex(c=>c.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,a)].join(this.formatSeparator)}return s.reduce((a,c)=>{var f;const{formatName:l,formatOptions:u}=XJ(c);if(this.formats[l]){let d=a;try{const p=((f=i==null?void 0:i.formatParams)==null?void 0:f[i.interpolationkey])||{},h=p.locale||p.lng||i.locale||i.lng||n;d=this.formats[l](a,h,{...u,...i,...p})}catch(p){this.logger.warn(p)}return d}else this.logger.warn(`there was no format function for ${l}`);return a},e)}};const rQ=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class nQ extends H4{constructor(e,r,n,i={}){var s,o;super(),this.backend=e,this.store=r,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=Gc.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],(o=(s=this.backend)==null?void 0:s.init)==null||o.call(s,n,i.backend,i)}queueLoad(e,r,n,i){const s={},o={},a={},c={};return e.forEach(l=>{let u=!0;r.forEach(f=>{const d=`${l}|${f}`;!n.reload&&this.store.hasResourceBundle(l,f)?this.state[d]=2:this.state[d]<0||(this.state[d]===1?o[d]===void 0&&(o[d]=!0):(this.state[d]=1,u=!1,o[d]===void 0&&(o[d]=!0),s[d]===void 0&&(s[d]=!0),c[f]===void 0&&(c[f]=!0)))}),u||(a[l]=!0)}),(Object.keys(s).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(s),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(c)}}loaded(e,r,n){const i=e.split("|"),s=i[0],o=i[1];r&&this.emit("failedLoading",s,o,r),!r&&n&&this.store.addResourceBundle(s,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=r?-1:2,r&&n&&(this.state[e]=0);const a={};this.queue.forEach(c=>{jJ(c.loaded,[s],o),rQ(c,e),r&&c.errors.push(r),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(l=>{a[l]||(a[l]={});const u=c.loaded[l];u.length&&u.forEach(f=>{a[l][f]===void 0&&(a[l][f]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(c=>!c.done)}read(e,r,n,i=0,s=this.retryTimeout,o){if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:r,fcName:n,tried:i,wait:s,callback:o});return}this.readingCalls++;const a=(l,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(l&&u&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,e,r,n,i+1,s*2,o)},s);return}o(l,u)},c=this.backend[n].bind(this.backend);if(c.length===2){try{const l=c(e,r);l&&typeof l.then=="function"?l.then(u=>a(null,u)).catch(a):a(null,l)}catch(l){a(l)}return}return c(e,r,a)}prepareLoading(e,r,n={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();Wt(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Wt(r)&&(r=[r]);const s=this.queueLoad(e,r,n,i);if(!s.toLoad.length)return s.pending.length||i(),null;s.toLoad.forEach(o=>{this.loadOne(o)})}load(e,r,n){this.prepareLoading(e,r,{},n)}reload(e,r,n){this.prepareLoading(e,r,{reload:!0},n)}loadOne(e,r=""){const n=e.split("|"),i=n[0],s=n[1];this.read(i,s,"read",void 0,void 0,(o,a)=>{o&&this.logger.warn(`${r}loading namespace ${s} for language ${i} failed`,o),!o&&a&&this.logger.log(`${r}loaded namespace ${s} for language ${i}`,a),this.loaded(e,o,a)})}saveMissing(e,r,n,i,s,o={},a=()=>{}){var c,l,u,f,d;if((l=(c=this.services)==null?void 0:c.utils)!=null&&l.hasLoadedNamespace&&!((f=(u=this.services)==null?void 0:u.utils)!=null&&f.hasLoadedNamespace(r))){this.logger.warn(`did not save key "${n}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if((d=this.backend)!=null&&d.create){const p={...o,isUpdate:s},h=this.backend.create.bind(this.backend);if(h.length<6)try{let g;h.length===5?g=h(e,r,n,i,p):g=h(e,r,n,i),g&&typeof g.then=="function"?g.then(y=>a(null,y)).catch(a):a(null,g)}catch(g){a(g)}else h(e,r,n,i,a,p)}!e||!e[0]||this.store.addResource(e[0],r,n,i)}}}const L5=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),Wt(t[1])&&(e.defaultValue=t[1]),Wt(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(n=>{e[n]=r[n]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),bI=t=>{var e,r;return Wt(t.ns)&&(t.ns=[t.ns]),Wt(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),Wt(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),((r=(e=t.supportedLngs)==null?void 0:e.indexOf)==null?void 0:r.call(e,"cimode"))<0&&(t.supp
68ortedLngs=t.supportedLngs.concat(["cimode"])),typeof t.initImmediate=="boolean"&&(t.initAsync=t.initImmediate),t},zb=()=>{},iQ=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(r=>{typeof t[r]=="function"&&(t[r]=t[r].bind(t))})};let wI=!1;const sQ=t=>{var e,r,n,i,s,o,a,c,l;return!!(((n=(r=(e=t==null?void 0:t.modules)==null?void 0:e.backend)==null?void 0:r.name)==null?void 0:n.indexOf("Locize"))>0||((a=(o=(s=(i=t==null?void 0:t.modules)==null?void 0:i.backend)==null?void 0:s.constructor)==null?void 0:o.name)==null?void 0:a.indexOf("Locize"))>0||(l=(c=t==null?void 0:t.options)==null?void 0:c.backend)!=null&&l.backends&&t.options.backend.backends.some(u=>{var f,d,p;return((f=u==null?void 0:u.name)==null?void 0:f.indexOf("Locize"))>0||((p=(d=u==null?void 0:u.constructor)==null?void 0:d.name)==null?void 0:p.indexOf("Locize"))>0}))};class pm extends H4{constructor(e={},r){if(super(),this.options=bI(e),this.services={},this.logger=Gc,this.modules={external:[]},iQ(this),r&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,r),this;setTimeout(()=>{this.init(e,r)},0)}}init(e={},r){this.isInitializing=!0,typeof e=="function"&&(r=e,e={}),e.defaultNS==null&&e.ns&&(Wt(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=L5();this.options={...n,...this.options,...bI(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!sQ(this)&&!wI&&(typeof console<"u"&&typeof console.info<"u"&&console.info("ð i18next is maintained with support from Locize â consider powering your project with managed localization (AI, CDN, integrations): https://locize.com ð"),wI=!0);const i=l=>l?typeof l=="function"?new l:l:null;if(!this.options.isClone){this.modules.logger?Gc.init(i(this.modules.logger),this.options):Gc.init(null,this.options);let l;this.modules.formatter?l=this.modules.formatter:l=tQ;const u=new dI(this.options);this.store=new uI(this.options.resources,this.options);const f=this.services;f.logger=Gc,f.resourceStore=this.store,f.languageUtils=u,f.pluralResolver=new QJ(u,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),l&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(f.formatter=i(l),f.formatter.init&&f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new mI(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new nQ(i(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",(p,...h)=>{this.emit(p,...h)}),this.modules.languageDetector&&(f.languageDetector=i(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=i(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new l3(this.services,this.options),this.translator.on("*",(p,...h)=>{this.emit(p,...h)}),this.modules.external.forEach(p=>{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,r||(r=zb),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&l[0]!=="dev"&&(this.options.lng=l[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(l=>{this[l]=(...u)=>this.store[l](...u)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(l=>{this[l]=(...u)=>(this.store[l](...u),this)});const a=s1(),c=()=>{const l=(u,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit
vendor: 4,485 bytes, line 68
68("initialized",this.options),a.resolve(f),r(u,f)};if(this.languages&&!this.isInitialized)return l(null,this.t.bind(this));this.changeLanguage(this.options.lng,l)};return this.options.resources||!this.options.initAsync?c():setTimeout(c,0),a}loadResources(e,r=zb){var s,o;let n=r;const i=Wt(e)?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if((i==null?void 0:i.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const a=[],c=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(f=>{f!=="cimode"&&a.indexOf(f)<0&&a.push(f)})};i?c(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>c(u)),(o=(s=this.options.preload)==null?void 0:s.forEach)==null||o.call(s,l=>c(l)),this.services.backendConnector.load(a,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(l)})}else n(null)}reloadResources(e,r,n){const i=s1();return typeof e=="function"&&(n=e,e=void 0),typeof r=="function"&&(n=r,r=void 0),e||(e=this.languages),r||(r=this.options.ns),n||(n=zb),this.services.backendConnector.reload(e,r,s=>{i.resolve(),n(s)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&dU.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1)){for(let r=0;r<this.languages.length;r++){const n=this.languages[r];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,r){this.isLanguageChangingTo=e;const n=s1();this.emit("languageChanging",e);const i=a=>{this.language=a,this.languages=this.services.languageUtils.toResolveHierarchy(a),this.resolvedLanguage=void 0,this.setResolvedLanguage(a)},s=(a,c)=>{c?this.isLanguageChangingTo===e&&(i(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,n.resolve((...l)=>this.t(...l)),r&&r(a,(...l)=>this.t(...l))},o=a=>{var u,f;!e&&!a&&this.services.languageDetector&&(a=[]);const c=Wt(a)?a:a&&a[0],l=this.store.hasLanguageSomeTranslations(c)?c:this.services.languageUtils.getBestMatchFromCodes(Wt(a)?[a]:a);l&&(this.language||i(l),this.translator.language||this.translator.changeLanguage(l),(f=(u=this.services.languageDetector)==null?void 0:u.cacheUserLanguage)==null||f.call(u,l)),this.loadResources(l,d=>{s(d,l)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),n}getFixedT(e,r,n){const i=(s,o,...a)=>{let c;typeof o!="object"?c=this.options.overloadTranslationOptionHandler([s,o].concat(a)):c={...o},c.lng=c.lng||i.lng,c.lngs=c.lngs||i.lngs,c.ns=c.ns||i.ns,c.keyPrefix!==""&&(c.keyPrefix=c.keyPrefix||n||i.keyPrefix);const l=this.options.keySeparator||".";let u;return c.keyPrefix&&Array.isArray(s)?u=s.map(f=>(typeof f=="function"&&(f=q8(f,{...this.options,...o})),`${c.keyPrefix}${l}${f}`)):(typeof s=="function"&&(s=q8(s,{...this.options,...o})),u=c.keyPrefix?`${c.keyPrefix}${l}${s}`:s),this.t(u,c)};return Wt(e)?i.lng=e:i.lngs=e,i.ns=r,i.keyPrefix=n,i}t(...e){var r;return(r=this.translator)==null?void 0:r.translate(...e)}exists(...e){var r;return(r=this.translator)==null?void 0:r.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,r={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;
68if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=r.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const o=(a,c)=>{const l=this.services.backendConnector.state[`${a}|${c}`];return l===-1||l===0||l===2};if(r.precheck){const a=r.precheck(this,o);if(a!==void 0)return a}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,e)&&(!i||o(s,e)))}loadNamespaces(e,r){const n=s1();return this.options.ns?(Wt(e)&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),r&&r(i)}),n):(r&&r(),Promise.resolve())}loadLanguages(e,r){const n=s1();Wt(e)&&(e=[e]);const i=this.options.preload||[],s=e.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return s.length?(this.options.preload=i.concat(s),this.loadResources(o=>{n.resolve(),r&&r(o)}),n):(r&&r(),Promise.resolve())}dir(e){var i,s;if(e||(e=this.resolvedLanguage||(((i=this.languages)==null?void 0:i.length)>0?this.languages[0]:this.language)),!e)return"rtl";try{const o=new Intl.Locale(e);if(o&&o.getTextInfo){const a=o.getTextInfo();if(a&&a.direction)return a.direction}}catch{}const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=((s=this.services)==null?void 0:s.languageUtils)||new dI(L5());return e.toLowerCase().indexOf("-latn")>1?"ltr":r.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},r){const n=new pm(e,r);return n.createInstance=pm.createInstance,n}cloneInstance(e={},r=zb){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},s=new pm(i);if((e.debug!==void 0||e.prefix!==void 0)&&(s.logger=s.logger.clone(e)),["store","services","language"].forEach(a=>{s[a]=this[a]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},n){const a=Object.keys(this.store.data).reduce((c,l)=>(c[l]={...this.store.data[l]},c[l]=Object.keys(c[l]).reduce((u,f)=>(u[f]={...c[l][f]},u),c[l]),c),{});s.store=new uI(a,i),s.services.resourceStore=s.store}if(e.interpolation){const c={...L5().interpolation,...this.options.interpolation,...e.interpolation},l={...i,interpolation:c};s.services.interpolator=new mI(l)}return s.translator=new l3(s.services,i),s.translator.on("*",(a,...c)=>{s.emit(a,...c)}),s.init(i,r),s.translator.options=i,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Zs=pm.createInstance();Zs.createInstance;Zs.dir;Zs.init;Zs.loadResources;Zs.reloadResources;Zs.use;Zs.changeLanguage;Zs.getFixedT;Zs.t;Zs.exists;Zs.setDefaultNamespace;Zs.hasLoadedNamespace;Zs.loadNamespaces;Zs.loadLanguages;const oQ=(t,e,r,n)=>{var s,o,a,c;const i=[r,{code:e,...n||{}}];if((o=(s=t==null?void 0:t.services)==null?void 0:s.logger)!=null&&o.forward)return t.services.logger.forward(i,"warn","react-i18next::",!0);_h(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),(c=(a=t==null?void 0:t.services)==null?void 0:a.logger)!=null&&c.warn?t.services.logger.warn(...i):console!=null&&console.warn&&console.warn(...i)},vI={},pU=(t,e,r,n)=>{_h(r)&&vI[r]||(_h(r)&&(vI[r]=new Date),oQ(t,e,r,n))},gU=(t,e)=>()=>{if(t.isInitialized)e();else{const r=()=>{setTimeout(()=>{t.off("initialized",r)},0),e()};t.on("initialized",r)}},V8=(t,e,r)=>{t.loadNamespaces(e,gU(t,r))},xI=(t,e,r,n)=>{if(_h(r)&&(r=[r]),t.options.preload&&t.options.preload.indexOf(e)>-1)return V8(t,r,n);r.forEach(i=>
68{t.options.ns.indexOf(i)<0&&t.options.ns.push(i)}),t.loadLanguages(e,gU(t,n))},aQ=(t,e,r={})=>!e.languages||!e.languages.length?(pU(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(t,{lng:r.lng,precheck:(n,i)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!i(n.isLanguageChangingTo,t))return!1}}),_h=t=>typeof t=="string",cQ=t=>typeof t=="object"&&t!==null,lQ=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,uQ={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"â¦","…":"â¦","/":"/","/":"/"},fQ=t=>uQ[t],dQ=t=>t.replace(lQ,fQ);let K8={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:dQ,transDefaultProps:void 0};const hQ=(t={})=>{K8={...K8,...t}},pQ=()=>K8;let mU;const gQ=t=>{mU=t},mQ=()=>mU,yQ={type:"3rdParty",init(t){hQ(t.options.react),gQ(t)}},bQ=se.createContext();class wQ{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var yU={exports:{}},bU={};/** 69 * @license React 70 * use-sync-external-store-shim.production.js 71 * 72 * Copyright (c) Meta Platforms, Inc. and affiliates. 73 * 74 * This source code is licensed under the MIT license found in the 75 * LICENSE file in the root directory of this source tree. 76 */var Yp=se;function vQ(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var xQ=typeof Object.is=="function"?Object.is:vQ,EQ=Yp.useState,CQ=Yp.useEffect,_Q=Yp.useLayoutEffect,AQ=Yp.useDebugValue;function SQ(t,e){var r=e(),n=EQ({inst:{value:r,getSnapshot:e}}),i=n[0].inst,s=n[1];return _Q(function(){i.value=r,i.getSnapshot=e,M5(i)&&s({inst:i})},[t,r,e]),CQ(function(){return M5(i)&&s({inst:i}),t(function(){M5(i)&&s({inst:i})})},[t]),AQ(r),r}function M5(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!xQ(t,r)}catch{return!0}}function NQ(t,e){return e()}var IQ=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?NQ:SQ;bU.useSyncExternalStore=Yp.useSyncExternalStore!==void 0?Yp.useSyncExternalStore:IQ;yU.exports=bU;var TQ=yU.exports;const kQ=(t,e)=>_h(e)?e:cQ(e)&&_h(e.defaultValue)?e.defaultValue:Array.isArray(t)?t[t.length-1]:t,PQ={t:kQ,ready:!1},RQ=()=>()=>{},Zo=(t,e={})=>{var I,j,D;const{i18n:r}=e,{i18n:n,defaultNS:i}=se.useContext(bQ)||{},s=r||n||mQ();s&&!s.reportNamespaces&&(s.reportNamespaces=new wQ),s||pU(s,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const o=se.useMemo(()=>{var O;return{...pQ(),...(O=s==null?void 0:s.options)==null?void 0:O.react,...e}},[s,e]),{useSuspense:a,keyPrefix:c}=o,l=t||i||((I=s==null?void 0:s.options)==null?void 0:I.defaultNS),u=_h(l)?[l]:l||["translation"],f=se.useMemo(()=>u,u);(D=(j=s==null?void 0:s.reportNamespaces)==null?void 0:j.addUsedNamespaces)==null||D.call(j,f);const d=se.useRef(0),p=se.useCallback(O=>{if(!s)return RQ;const{bindI18n:T,bindI18nStore:m}=o,b=()=>{d.current+=1,O()};return T&&s.on(T,b),m&&s.store.on(m,b),()=>{T&&T.split(" ").forEach(E=>s.off(E,b)),m&&m.split(" ").forEach(E=>s.store.off(E,b))}},[s,o]),h=se.useRef(),g=se.useCallback(()=>{if(!s)return PQ;const O=!!(s.isInitialized||s.initializedStoreOnce)&&f.every(R=>aQ(R,s,o)),T=e.lng||s.language,m=d.current,b=h.current;if(b&&b.ready===O&&b.lng===T&&b.keyPrefix===c&&b.revision===m)return b;const k={t:s.getFixedT(T,o.nsMode==="fallback"?f:f[0],c),ready:O,lng:T,keyPrefix:c,revision:m};return h.current=k,k},[s,f,c,o,e.lng]),[y,x]=se.useState(0),{t:C,ready:_}=TQ.useSyncExternalStore(p,g,g);se.useEffect(()=>{if(s&&!_&&!a){const O=()=>x(T=>T+1);e.lng?xI(s,e.lng,f,O):V8(s,f,O)}},[s,e.lng,f,_,a,y]);const L=s||{},P=se.useRef(null),z=se.useRef(),W=O=>{const T=Object.getOwnPropertyDescriptors(O);T.__original&&delete T.__original;const m=Object.create(Object.getPrototypeOf(O),T);if(!Object.prototype.hasOwnProperty.call(m,"__original"))try{Object.defineProperty(m,"__original",{value:O,writable:!1,enumerable:!1,
76configurable:!1})}catch{}return m},B=se.useMemo(()=>{const O=L,T=O==null?void 0:O.language;let m=O;O&&(P.current&&P.current.__original===O?z.current!==T?(m=W(O),P.current=m,z.current=T):m=P.current:(m=W(O),P.current=m,z.current=T));const b=[C,m,_];return b.t=C,b.i18n=m,b.ready=_,b},[C,L,_,L.resolvedLanguage,L.language,L.languages]);if(s&&a&&!_)throw new Promise(O=>{const T=()=>O();e.lng?xI(s,e.lng,f,T):V8(s,f,T)});return B};var wU={exports:{}},vU={};/** 77 * @license React 78 * use-sync-external-store-with-selector.production.js 79 * 80 * Copyright (c) Meta Platforms, Inc. and affiliates. 81 * 82 * This source code is licensed under the MIT license found in the 83 * LICENSE file in the root directory of this source tree. 84 */var Uy=se;function OQ(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var DQ=typeof Object.is=="function"?Object.is:OQ,LQ=Uy.useSyncExternalStore,MQ=Uy.useRef,$Q=Uy.useEffect,UQ=Uy.useMemo,BQ=Uy.useDebugValue;vU.useSyncExternalStoreWithSelector=function(t,e,r,n,i){var s=MQ(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=UQ(function(){function c(p){if(!l){if(l=!0,u=p,p=n(p),i!==void 0&&o.hasValue){var h=o.value;if(i(h,p))return f=h}return f=p}if(h=f,DQ(u,p))return h;var g=n(p);return i!==void 0&&i(h,g)?(u=p,h):(u=p,f=g)}var l=!1,u,f,d=r===void 0?null:r;return[function(){return c(e())},d===null?void 0:function(){return c(d())}]},[e,r,n,i]);var a=LQ(t,s[0],s[1]);return $Q(function(){o.hasValue=!0,o.value=a},[a]),BQ(a),a};wU.exports=vU;var FQ=wU.exports;function jQ(t){t()}function zQ(){let t=null,e=null;return{clear(){t=null,e=null},notify(){jQ(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=t;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const i=e={callback:r,next:null,prev:e};return i.prev?i.prev.next=i:t=i,function(){!n||t===null||(n=!1,i.next?i.next.prev=i.prev:e=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}var EI={notify(){},get:()=>[]};function WQ(t,e){let r,n=EI,i=0,s=!1;function o(g){u();const y=n.subscribe(g);let x=!1;return()=>{x||(x=!0,y(),f())}}function a(){n.notify()}function c(){h.onStateChange&&h.onStateChange()}function l(){return s}function u(){i++,r||(r=t.subscribe(c),n=zQ())}function f(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=EI)}function d(){s||(s=!0,u())}function p(){s&&(s=!1,f())}const h={addNestedSub:o,notifyNestedSubs:a,handleChangeWrapper:c,isSubscribed:l,trySubscribe:d,tryUnsubscribe:p,getListeners:()=>n};return h}var HQ=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",qQ=HQ(),VQ=()=>typeof navigator<"u"&&navigator.product==="ReactNative",KQ=VQ(),GQ=()=>qQ||KQ?se.useLayoutEffect:se.useEffect,YQ=GQ(),$5=Symbol.for("react-redux-context"),U5=typeof globalThis<"u"?globalThis:{};function ZQ(){if(!se.createContext)return{};const t=U5[$5]??(U5[$5]=new Map);let e=t.get(se.createContext);return e||(e=se.createContext(null),t.set(se.createContext,e)),e}var Jf=ZQ();function JQ(t){const{children:e,context:r,serverState:n,store:i}=t,s=se.useMemo(()=>{const c=WQ(i);return{store:i,subscription:c,getServerState:n?()=>n:void 0}},[i,n]),o=se.useMemo(()=>i.getState(),[i]);YQ(()=>{const{subscription:c}=s;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),o!==i.getState()&&c.notifyNestedSubs(),()=>{c.tryUnsubscribe(),c.onStateChange=void 0}},[s,o]);const a=r||Jf;return se.createElement(a.Provider,{value:s},e)}var QQ=JQ;function m9(t=Jf){return function(){return se.useContext(t)}}var xU=m9();function EU(t=Jf){const e=t===Jf?xU:m9(t),r=()=>{const{store:n}=e();return n};return Object.assign(r,{withTypes:()=>r}),r}var XQ=EU();function eX(t=Jf){const e=t===Jf?XQ:EU(t),r=()=>e().dispatch;return Object.assign(r,{withTypes:()=>r}),r}var tX=eX(),rX=(t,e)=>t===e;function nX(t=Jf){const e=t===Jf?xU:m9(t),r=(n,i={})=>{const{equalityFn:s=rX}=typeof i=="function"?{equalityFn:i}:i,o=e(),{store:a,subscription:c,getServerState:l}=o;se.useRef(!0);const u=se.useCallback({[n.name](d){return n(d)}}
84[n.name],[n]),f=FQ.useSyncExternalStoreWithSelector(c.addNestedSub,a.getState,l||a.getState,u,s);return se.useDebugValue(f),f};return Object.assign(r,{withTypes:()=>r}),r}var Ah=nX();const iX=()=>{const t=Ah(n=>n.user_email),e=$y(),r=Nu();return se.useEffect(()=>{if(!t)return;const{vark_completed:n,cps_completed:i,ai_completed:s}=t;console.log("user",t);const o=!!(n&&i&&s),a=r.pathname,l=["/user-guidance","/vark","/vark-start","/csp","/csp-start","/ai","/ai-start","/assessment-intro","/res"].includes(a)||a.startsWith("/res/");if(o)l&&e("/ChallengeMap_7Days");else{if(!l){e("/user-guidance");return}n?i||(a==="/ai"||a==="/ai-start")&&e("/csp-start"):(a==="/csp"||a==="/csp-start"||a==="/ai"||a==="/ai-start")&&e("/vark-start")}},[t,r.pathname,e]),w.jsx(W4,{})},sX=()=>Ah(e=>e.user_email)?w.jsx(W4,{}):w.jsx(g9,{to:"/UserLogin",replace:!0}),oX=()=>{const t=Ah(n=>n.admin),e=Ah(n=>n.admin_email);return t||e?w.jsx(W4,{}):w.jsx(g9,{to:"/AdminLogin",replace:!0})},aX=()=>{const t=Ah(r=>r.merchant);return t&&t.token?w.jsx(W4,{}):w.jsx(g9,{to:"/merchant-login",replace:!0})};/*! 85 * Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com 86 * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) 87 * Copyright 2024 Fonticons, Inc. 88 */const $Me={prefix:"fas",iconName:"calendar-days",icon:[448,512,["calendar-alt"],"f073","M128 0c17.7 0 32 14.3 32 32l0 32 128 0 0-32c0-17.7 14.3-32 32-32s32 14.3 32 32l0 32 48 0c26.5 0 48 21.5 48 48l0 48L0 160l0-48C0 85.5 21.5 64 48 64l48 0 0-32c0-17.7 14.3-32 32-32zM0 192l448 0 0 272c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48L0 192zm64 80l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm128 0l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zM64 400l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zm112 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16z"]},UMe={prefix:"fas",iconName:"arrow-up-long",icon:[384,512,["long-arrow-up"],"f176","M214.6 9.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 109.3 160 480c0 17.7 14.3 32 32 32s32-14.3 32-32l0-370.7 73.4 73.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-128-128z"]},cX={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]},BMe={prefix:"fas",iconName:"arrow-right-from-bracket",icon:[512,512,["sign-out"],"f08b","M502.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-128-128c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 224 192 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l210.7 0-73.4 73.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l128-128zM160 96c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 32C43 32 0 75 0 128L0 384c0 53 43 96 96 96l64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l64 0z"]},FMe={prefix:"fas",iconName:"lock",icon:[448,512,[128274],"f023","M144 144l0 48 160 0 0-48c0-44.2-35.8-80-80-80s-80 35.8-80 80zM80 192l0-48C80 64.5 144.5 0 224 0s144 64.5 144 144l0 48 16 0c35.3 0 64 28.7 64 64l0 192c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 256c0-35.3 28.7-64 64-64l16 0z"]},jMe={prefix:"fas",iconName:"eye-slash",icon:[640,512,[],"f070","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zM223.1 149.5C248.6 126.2 282.7 112 320 112c79.5 0 144 64.5 144 144c0 24.9-6.3 48.3-17.4 68.7L408 294.5c8.4-19.3 10.6-41.4 4.8-63.3c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3c0 10.2-2.4 19.8-6.6 28.3l-90.3-70.8zM373 389.9c-16.4 6.5-34.3 10.1-53 10.1c-79.5 0-144-64.5-144-144c0-6.9 .5-13.6 1.4-20.2L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5L373 389.9z"]}
vendor: 4,625 bytes, line 88
88,zMe={prefix:"fas",iconName:"chevron-up",icon:[512,512,[],"f077","M233.4 105.4c12.5-12.5 32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L256 173.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z"]},CI={prefix:"fas",iconName:"user",icon:[448,512,[128100,62144],"f007","M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512l388.6 0c16.4 0 29.7-13.3 29.7-29.7C448 383.8 368.2 304 269.7 304l-91.4 0z"]},WMe={prefix:"fas",iconName:"crown",icon:[576,512,[128081],"f521","M309 106c11.4-7 19-19.7 19-34c0-22.1-17.9-40-40-40s-40 17.9-40 40c0 14.4 7.6 27 19 34L209.7 220.6c-9.1 18.2-32.7 23.4-48.6 10.7L72 160c5-6.7 8-15 8-24c0-22.1-17.9-40-40-40S0 113.9 0 136s17.9 40 40 40c.2 0 .5 0 .7 0L86.4 427.4c5.5 30.4 32 52.6 63 52.6l277.2 0c30.9 0 57.4-22.1 63-52.6L535.3 176c.2 0 .5 0 .7 0c22.1 0 40-17.9 40-40s-17.9-40-40-40s-40 17.9-40 40c0 9 3 17.3 8 24l-89.1 71.3c-15.9 12.7-39.5 7.5-48.6-10.7L309 106z"]},HMe={prefix:"fas",iconName:"circle-play",icon:[512,512,[61469,"play-circle"],"f144","M0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zM188.3 147.1c-7.6 4.2-12.3 12.3-12.3 20.9l0 176c0 8.7 4.7 16.7 12.3 20.9s16.8 4.1 24.3-.5l144-88c7.1-4.4 11.5-12.1 11.5-20.5s-4.4-16.1-11.5-20.5l-144-88c-7.4-4.5-16.7-4.7-24.3-.5z"]},lX={prefix:"fas",iconName:"circle-check",icon:[512,512,[61533,"check-circle"],"f058","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"]},qMe=lX,uX={prefix:"fas",iconName:"bolt-lightning",icon:[384,512,[],"e0b7","M0 256L28.5 28c2-16 15.6-28 31.8-28H228.9c15 0 27.1 12.1 27.1 27.1c0 3.2-.6 6.5-1.7 9.5L208 160H347.3c20.2 0 36.7 16.4 36.7 36.7c0 7.4-2.2 14.6-6.4 20.7l-192.2 281c-5.9 8.6-15.6 13.7-25.9 13.7h-2.9c-15.7 0-28.5-12.8-28.5-28.5c0-2.3 .3-4.6 .9-6.9L176 288H32c-17.7 0-32-14.3-32-32z"]},Af={prefix:"fas",iconName:"arrow-right",icon:[448,512,[8594],"f061","M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z"]},VMe={prefix:"fas",iconName:"heart",icon:[512,512,[128153,128154,128155,128156,128420,129293,129294,129505,9829,10084,61578],"f004","M47.6 300.4L228.3 469.1c7.5 7 17.4 10.9 27.7 10.9s20.2-3.9 27.7-10.9L464.4 300.4c30.4-28.3 47.6-68 47.6-109.5v-5.8c0-69.9-50.5-129.5-119.4-141C347 36.5 300.6 51.4 268 84L256 96 244 84c-32.6-32.6-79-47.5-124.6-39.9C50.5 55.6 0 115.2 0 185.1v5.8c0 41.5 17.2 81.2 47.6 109.5z"]},KMe={prefix:"fas",iconName:"circle",icon:[512,512,[128308,128309,128992,128993,128994,128995,128996,9679,9898,9899,11044,61708,61915],"f111","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512z"]},GMe={prefix:"fas",iconName:"eye",icon:[576,512,[128065],"f06e","M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64c-7.1 0-13.9-1.2-20.3-3.3c-5.5-1.8-11.9 1.6-11.7 7.4c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3z"]},YMe={prefix:"fas",iconName:"web-awesome",icon:[640,512,[],"e682","M372.2 52c0 20.9-12.4 39-30.2 47.2L448 192l104.4-20.9c-5.3-7.7-8.4-17.1-8.4-27.1c0-26.5 21.5-48 48-48s48 21.5 48 48c0 26-20.6 47.1-46.4 48L481 442.3c-10.3 23-33.2 37.7-58.4 37.7l-205.2 0c-25.2 0-48-14.8-58.4-37.7L46.4 192C20.6 191.1 0 170 0 144c0-26.5 21.5-48 48-48s48 21.5 48 48c0 10.1-3.1 19.4-8.4 27.1L192 192 298.1 99.1c-17.7-8.3-30-26.3-30-47.1c0-28.7 23.3-52 52-52s52 23.3 52 52z"]},ZMe={prefix:"fas",iconName:"headphones",icon:[512,512,[127911],"f025","M256 80C149.9 80 62.4 159.4 49.6 262c9.4-3.8 19.6-6 30.4-6c26.5 0 48 21.5 48 48l0 128c0 26.5-21.5 48-48 48c-44.2 0-80-35.8-80-80l0-16 0-48 0-48C0 146.6 114.6 32 256 32s256 114.6 256 256l0 48 0 48 0 16c0 44.2-35.8 80-80 80c-26.5 0-48-21.5-48-48l0-128c0-26.5 21.5-48 48-48c10.8 0 21 2.1 30.4 6C449.6 159.4 362.1 80 256 80z"]},JMe={prefix:"fas",iconName:"arrow-left",icon:[448,512,[8592],"f060","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"]}
88,QMe={prefix:"fas",iconName:"circle-info",icon:[512,512,["info-circle"],"f05a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},fX={prefix:"fas",iconName:"minus",icon:[448,512,[8211,8722,10134,"subtract"],"f068","M432 256c0 17.7-14.3 32-32 32L48 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l352 0c17.7 0 32 14.3 32 32z"]},XMe={prefix:"fas",iconName:"arrow-left-long",icon:[512,512,["long-arrow-left"],"f177","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 288 480 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-370.7 0 73.4-73.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-128 128z"]},_I={prefix:"fas",iconName:"caret-down",icon:[320,512,[],"f0d7","M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"]},dX={prefix:"fas",iconName:"power-off",icon:[512,512,[9211],"f011","M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 224c0 17.7 14.3 32 32 32s32-14.3 32-32l0-224zM143.5 120.6c13.6-11.3 15.4-31.5 4.1-45.1s-31.5-15.4-45.1-4.1C49.7 115.4 16 181.8 16 256c0 132.5 107.5 240 240 240s240-107.5 240-240c0-74.2-33.8-140.6-86.6-184.6c-13.6-11.3-33.8-9.4-45.1 4.1s-9.4 33.8 4.1 45.1c38.9 32.3 63.5 81 63.5 135.4c0 97.2-78.8 176-176 176s-176-78.8-176-176c0-54.4 24.7-103.1 63.5-135.4z"]},e$e={prefix:"fas",iconName:"download",icon:[512,512,[],"f019","M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 242.7-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7 288 32zM64 352c-35.3 0-64 28.7-64 64l0 32c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-32c0-35.3-28.7-64-64-64l-101.5 0-45.3 45.3c-25 25-6
885.5 25-90.5 0L165.5 352 64 352zm368 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"]},hX={prefix:"fas",iconName:"magnifying-glass",icon:[512,512,[128269,"search"],"f002","M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]},t$e={prefix:"fas",iconName:"chevron-down",icon:[512,512,[],"f078","M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},pX={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0 0 144c0 17.7 14.3 32 32 32s32-14.3 32-32l0-144 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-144z"]},gX={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},mX={prefix:"fas",iconName:"arrow-trend-up",icon:[576,512,[],"e098","M384 160c-17.7 0-32-14.3-32-32s14.3-32 32-32l160 0c17.7 0 32 14.3 32 32l0 160c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-82.7L342.6 374.6c-12.5 12.5-32.8 12.5-45.3 0L192 269.3 54.6 406.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l160-160c12.5-12.5 32.8-12.5 45.3 0L320 306.7 466.7 160 384 160z"]},r$e={prefix:"fas",iconName:"chevron-left",icon:[320,512,[9001],"f053","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"]},n$e={prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"]},i$e={prefix:"fas",iconName:"spinner",icon:[512,512,[],"f110","M304 48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zm0 416a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM48 304a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm464-48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM142.9 437A48 48 0 1 0 75 369.1 48 48 0 1 0 142.9 437zm0-294.2A48 48 0 1 0 75 75a48 48 0 1 0 67.9 67.9zM369.1 437A48 48 0 1 0 437 369.1 48 48 0 1 0 369.1 437z"]},s$e={prefix:"fas",iconName:"chart-column",icon:[512,512,[],"e0e3","M32 32c17.7 0 32 14.3 32 32l0 336c0 8.8 7.2 16 16 16l400 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L80 480c-44.2 0-80-35.8-80-80L0 64C0 46.3 14.3 32 32 32zM160 224c17.7 0 32 14.3 32 32l0 64c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-64c0-17.7 14.3-32 32-32zm128-64l0 160c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-160c0-17.7 14.3-32 32-32s32 14.3 32 32zm64 32c17.7 0 32 14.3 32 32l0 96c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-96c0-17.7 14.3-32 32-32zM480 96l0 224c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-224c0-17.7 14.3-32 32-32s32 14.3 32 32z"]},o$e={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"]},yX={prefix:"fas",iconName:"circle-xmark",icon:[512,512,[61532,"times-circle","xmark-circle"],"f057","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z"]},a$e=yX;/*! 89 * Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com 90 * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) 91 * Copyright 2024 Fonticons, Inc. 92 */function bX(t,e,r){return(e=vX(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function AI(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Te(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};
vendor: 5,609 bytes, line 92
92e%2?AI(Object(r),!0).forEach(function(n){bX(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):AI(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function wX(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function vX(t){var e=wX(t,"string");return typeof e=="symbol"?e:e+""}const SI=()=>{};let y9={},CU={},_U=null,AU={mark:SI,measure:SI};try{typeof window<"u"&&(y9=window),typeof document<"u"&&(CU=document),typeof MutationObserver<"u"&&(_U=MutationObserver),typeof performance<"u"&&(AU=performance)}catch{}const{userAgent:NI=""}=y9.navigator||{},Qf=y9,kn=CU,II=_U,Wb=AU;Qf.document;const Iu=!!kn.documentElement&&!!kn.head&&typeof kn.addEventListener=="function"&&typeof kn.createElement=="function",SU=~NI.indexOf("MSIE")||~NI.indexOf("Trident/");var xX=/fa(s|r|l|t|d|dr|dl|dt|b|k|kd|ss|sr|sl|st|sds|sdr|sdl|sdt)?[\-\ ]/,EX=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit)?.*/i,NU={classic:{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fab:"brands","fa-brands":"brands"},duotone:{fa:"solid",fad:"solid","fa-solid":"solid","fa-duotone":"solid",fadr:"regular","fa-regular":"regular",fadl:"light","fa-light":"light",fadt:"thin","fa-thin":"thin"},sharp:{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"},"sharp-duotone":{fa:"solid",fasds:"solid","fa-solid":"solid",fasdr:"regular","fa-regular":"regular",fasdl:"light","fa-light":"light",fasdt:"thin","fa-thin":"thin"}},CX={GROUP:"duotone-group",PRIMARY:"primary",SECONDARY:"secondary"},IU=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone"],Ps="classic",q4="duotone",_X="sharp",AX="sharp-duotone",TU=[Ps,q4,_X,AX],SX={classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},duotone:{900:"fad",400:"fadr",300:"fadl",100:"fadt"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds",400:"fasdr",300:"fasdl",100:"fasdt"}},NX={"Font Awesome 6 Free":{900:"fas",400:"far"},"Font Awesome 6 Pro":{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},"Font Awesome 6 Brands":{400:"fab",normal:"fab"},"Font Awesome 6 Duotone":{900:"fad",400:"fadr",normal:"fadr",300:"fadl",100:"fadt"},"Font Awesome 6 Sharp":{900:"fass",400:"fasr",normal:"fasr",300:"fasl",100:"fast"},"Font Awesome 6 Sharp Duotone":{900:"fasds",400:"fasdr",normal:"fasdr",300:"fasdl",100:"fasdt"}},IX=new Map([["classic",{defaultShortPrefixId:"fas",defaultStyleId:"solid",styleIds:["solid","regular","light","thin","brands"],futureStyleIds:[],defaultFontWeight:900}],["sharp",{defaultShortPrefixId:"fass",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["duotone",{defaultShortPrefixId:"fad",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["sharp-duotone",{defaultShortPrefixId:"fasds",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}]]),TX={classic:{solid:"fas",regular:"far",light:"fal",thin:"fat",brands:"fab"},duotone:{solid:"fad",regular:"fadr",light:"fadl",thin:"fadt"},sharp:{solid:"fass",regular:"fasr",light:"fasl",thin:"fast"},"sharp-duotone":{solid:"fasds",regular:"fasdr",light:"fasdl",thin:"fasdt"}},kX=["fak","fa-kit","fakd","fa-kit-duotone"],TI={kit:{fak:"kit","fa-kit":"kit"},"kit-duotone":{fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"}},PX=["kit"],RX={kit:{"fa-kit":"fak"}},OX=["fak","fakd"],DX={kit:{fak:"fa-kit"}},kI={kit:{kit:"fak"},"kit-duotone":{"kit-duotone":"fakd"}},Hb={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},LX=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone"],MX=["fak","fa-kit","fakd","fa-kit-duotone"],$X={"Font Awesome Kit":{400:"fak",normal:"fak"},"Font Awesome Kit Duotone":{400:"fakd",normal:"fakd"}},UX={classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},duotone:{"fa-regular":"fadr","fa-light":"fadl","fa-thin":"fadt"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds","fa-regular":"fasdr","fa-light":"fasdl","fa-thin":"fasdt"}},BX={classic:["fas","far","fal","fat","fad"],duotone:["fadr","fadl","fadt"],sharp:["fass","fasr","fasl","fast"],"sharp-duotone":["fasds","fasdr","fasdl","fasdt"]},G8={classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},duotone:{fadr:"fa-regular",fadl:"fa-light",fadt:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid",fasdr:"fa-regular",fasdl:"fa-light",fasdt:"fa-thin"}},FX=["fa-solid","fa-regular","fa-light","fa-thin","fa-duotone","fa-brands"],Y8=["fa","fas","far","fal","fat","fad","fadr","fadl","fadt","fab","fass","fasr","fasl","fast","fasds","fasdr","fasdl","fasdt",...LX,...FX],jX=["solid","regular","light","thin","duotone","brands"],kU=[1,2,3,4,5,6,7,8,9,10],zX=kU.concat([11,12,13,14,15,16,17,18,19,20]),WX=[...Object.keys(BX),...jX,"2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vert
92ical","flip","fw","inverse","layers-counter","layers-text","layers","li","pull-left","pull-right","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul",Hb.GROUP,Hb.SWAP_OPACITY,Hb.PRIMARY,Hb.SECONDARY].concat(kU.map(t=>"".concat(t,"x"))).concat(zX.map(t=>"w-".concat(t))),HX={"Font Awesome 5 Free":{900:"fas",400:"far"},"Font Awesome 5 Pro":{900:"fas",400:"far",normal:"far",300:"fal"},"Font Awesome 5 Brands":{400:"fab",normal:"fab"},"Font Awesome 5 Duotone":{900:"fad"}};const pu="___FONT_AWESOME___",Z8=16,PU="fa",RU="svg-inline--fa",Sh="data-fa-i2svg",J8="data-fa-pseudo-element",qX="data-fa-pseudo-element-pending",b9="data-prefix",w9="data-icon",PI="fontawesome-i2svg",VX="async",KX=["HTML","HEAD","STYLE","SCRIPT"],OU=(()=>{try{return!0}catch{return!1}})();function By(t){return new Proxy(t,{get(e,r){return r in e?e[r]:e[Ps]}})}const DU=Te({},NU);DU[Ps]=Te(Te(Te(Te({},{"fa-duotone":"duotone"}),NU[Ps]),TI.kit),TI["kit-duotone"]);const GX=By(DU),Q8=Te({},TX);Q8[Ps]=Te(Te(Te(Te({},{duotone:"fad"}),Q8[Ps]),kI.kit),kI["kit-duotone"]);const RI=By(Q8),X8=Te({},G8);X8[Ps]=Te(Te({},X8[Ps]),DX.kit);const v9=By(X8),eC=Te({},UX);eC[Ps]=Te(Te({},eC[Ps]),RX.kit);By(eC);const YX=xX,LU="fa-layers-text",ZX=EX,JX=Te({},SX);By(JX);const QX=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],B5=CX,XX=[...PX,...WX],gm=Qf.FontAwesomeConfig||{};function eee(t){var e=kn.querySelector("script["+t+"]");if(e)return e.getAttribute(t)}function tee(t){return t===""?!0:t==="false"?!1:t==="true"?!0:t}kn&&typeof kn.querySelector=="function"&&[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]].forEach(e=>{let[r,n]=e;const i=tee(eee(r));i!=null&&(gm[n]=i)});const MU={styleDefault:"solid",familyDefault:Ps,cssPrefix:PU,replacementClass:RU,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};gm.familyPrefix&&(gm.cssPrefix=gm.familyPrefix);const Zp=Te(Te({},MU),gm);Zp.autoReplaceSvg||(Zp.observeMutations=!1);const bt={};Object.keys(MU).forEach(t=>{Object.defineProperty(bt,t,{enumerable:!0,set:function(e){Zp[t]=e,mm.forEach(r=>r(bt))},get:function(){return Zp[t]}})});Object.defineProperty(bt,"familyPrefix",{enumerable:!0,set:function(t){Zp.cssPrefix=t,mm.forEach(e=>e(bt))},get:function(){return Zp.cssPrefix}});Qf.FontAwesomeConfig=bt;const mm=[];function ree(t){return mm.push(t),()=>{mm.splice(mm.indexOf(t),1)}}const Mu=Z8,Yc={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function nee(t){if(!t||!Iu)return;const e=kn.createElement("style");e.setAttribute("type","text/css"),e.innerHTML=t;const r=kn.head.childNodes;let n=null;for(let i=r.length-1;i>-1;i--){const s=r[i],o=(s.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(o)>-1&&(n=s)}return kn.head.insertBefore(e,n),t}const iee="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function y2(){let t=12,e="";for(;t-- >0;)e+=iee[Math.random()*62|0];return e}function Tg(t){const e=[];for(let r=(t||[]).length>>>0;r--;)e[r]=t[r];return e}function x9(t){return t.classList?Tg(t.classList):(t.getAttribute("class")||"").split(" ").filter(e=>e)}function $U(t){return"".concat(t).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function see(t){return Object.keys(t||{}).reduce((e,r)=>e+"".concat(r,'="').concat($U(t[r]),'" '),"").trim()}function V4(t){return Object.keys(t||{}).reduce((e,r)=>e+"".concat(r,": ").concat(t[r].trim(),";"),"")}function E9(t){return t.size!==Yc.size||t.x!==Yc.x||t.y!==Yc.y||t.rotate!==Yc.rotate||t.flipX||t.flipY}function oee(t){let{transform:e,containerWidth:r,iconWidth:n}=t;const i={transform:"translate(".concat(r/2," 256)")},s="translate(".concat(e.x*32,", ").concat(e.y*32,") "),o="scale(".concat(e.size/16*(e.flipX?-1:1),", ").concat(e.size/16*(e.flipY?-1:1),") "),a="rotate(".concat(e.rotate," 0 0)"),c={transform:"".concat(s," ").concat(o," ").concat(a)},l={transform:"translate(".concat(n/2*-1," -256)")};return{outer:i,inner:c,path:l}}function aee(t){let{transform:e,width:r=Z8,height:n=Z8,startCentered:i=!1}
vendor: 373 bytes, line 92
92=t,s="";return i&&SU?s+="translate(".concat(e.x/Mu-r/2,"em, ").concat(e.y/Mu-n/2,"em) "):i?s+="translate(calc(-50% + ".concat(e.x/Mu,"em), calc(-50% + ").concat(e.y/Mu,"em)) "):s+="translate(".concat(e.x/Mu,"em, ").concat(e.y/Mu,"em) "),s+="scale(".concat(e.size/Mu*(e.flipX?-1:1),", ").concat(e.size/Mu*(e.flipY?-1:1),") "),s+="rotate(".concat(e.rotate,"deg) "),s}var cee=
vendor: 12,335 bytes, lines 92-645
92`:root, :host { 93 --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Free"; 94 --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Free"; 95 --fa-font-light: normal 300 1em/1 "Font Awesome 6 Pro"; 96 --fa-font-thin: normal 100 1em/1 "Font Awesome 6 Pro"; 97 --fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone"; 98 --fa-font-duotone-regular: normal 400 1em/1 "Font Awesome 6 Duotone"; 99 --fa-font-duotone-light: normal 300 1em/1 "Font Awesome 6 Duotone"; 100 --fa-font-duotone-thin: normal 100 1em/1 "Font Awesome 6 Duotone"; 101 --fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands"; 102 --fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 6 Sharp"; 103 --fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 6 Sharp"; 104 --fa-font-sharp-light: normal 300 1em/1 "Font Awesome 6 Sharp"; 105 --fa-font-sharp-thin: normal 100 1em/1 "Font Awesome 6 Sharp"; 106 --fa-font-sharp-duotone-solid: normal 900 1em/1 "Font Awesome 6 Sharp Duotone"; 107 --fa-font-sharp-duotone-regular: normal 400 1em/1 "Font Awesome 6 Sharp Duotone"; 108 --fa-font-sharp-duotone-light: normal 300 1em/1 "Font Awesome 6 Sharp Duotone"; 109 --fa-font-sharp-duotone-thin: normal 100 1em/1 "Font Awesome 6 Sharp Duotone"; 110} 111 112svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa { 113 overflow: visible; 114 box-sizing: content-box; 115} 116 117.svg-inline--fa { 118 display: var(--fa-display, inline-block); 119 height: 1em; 120 overflow: visible; 121 vertical-align: -0.125em; 122} 123.svg-inline--fa.fa-2xs { 124 vertical-align: 0.1em; 125} 126.svg-inline--fa.fa-xs { 127 vertical-align: 0em; 128} 129.svg-inline--fa.fa-sm { 130 vertical-align: -0.0714285705em; 131} 132.svg-inline--fa.fa-lg { 133 vertical-align: -0.2em; 134} 135.svg-inline--fa.fa-xl { 136 vertical-align: -0.25em; 137} 138.svg-inline--fa.fa-2xl { 139 vertical-align: -0.3125em; 140} 141.svg-inline--fa.fa-pull-left { 142 margin-right: var(--fa-pull-margin, 0.3em); 143 width: auto; 144} 145.svg-inline--fa.fa-pull-right { 146 margin-left: var(--fa-pull-margin, 0.3em); 147 width: auto; 148} 149.svg-inline--fa.fa-li { 150 width: var(--fa-li-width, 2em); 151 top: 0.25em; 152} 153.svg-inline--fa.fa-fw { 154 width: var(--fa-fw-width, 1.25em); 155} 156 157.fa-layers svg.svg-inline--fa { 158 bottom: 0; 159 left: 0; 160 margin: auto; 161 position: absolute; 162 right: 0; 163 top: 0; 164} 165 166.fa-layers-counter, .fa-layers-text { 167 display: inline-block; 168 position: absolute; 169 text-align: center; 170} 171 172.fa-layers { 173 display: inline-block; 174 height: 1em; 175 position: relative; 176 text-align: center; 177 vertical-align: -0.125em; 178 width: 1em; 179} 180.fa-layers svg.svg-inline--fa { 181 transform-origin: center center; 182} 183 184.fa-layers-text { 185 left: 50%; 186 top: 50%; 187 transform: translate(-50%, -50%); 188 transform-origin: center center; 189} 190 191.fa-layers-counter { 192 background-color: var(--fa-counter-background-color, #ff253a); 193 border-radius: var(--fa-counter-border-radius, 1em); 194 box-sizing: border-box; 195 color: var(--fa-inverse, #fff); 196 line-height: var(--fa-counter-line-height, 1); 197 max-width: var(--fa-counter-max-width, 5em); 198 min-width: var(--fa-counter-min-width, 1.5em); 199 overflow: hidden; 200 padding: var(--fa-counter-padding, 0.25em 0.5em); 201 right: var(--fa-right, 0); 202 text-overflow: ellipsis; 203 top: var(--fa-top, 0); 204 transform: scale(var(--fa-counter-scale, 0.25)); 205 transform-origin: top right; 206} 207 208.fa-layers-bottom-right { 209 bottom: var(--fa-bottom, 0); 210 right: var(--fa-right, 0); 211 top: auto; 212 transform: scale(var(--fa-layers-scale, 0.25)); 213 transform-origin: bottom right; 214} 215 216.fa-layers-bottom-left { 217 bottom: var(--fa-bottom, 0); 218 left: var(--fa-left, 0); 219 right: auto; 220 top: auto; 221 transform: scale(var(--fa-layers-scale, 0.25)); 222 transform-origin: bottom left; 223} 224 225.fa-layers-top-right { 226 top: var(--fa-top, 0); 227 right: var(--fa-right, 0); 228 transform: scale(var(--fa-layers-scale, 0.25)); 229 transform-origin: top right; 230} 231 232.fa-layers-top-left { 233 left: var(--fa-left, 0); 234 right: auto; 235 top: var(--fa-top, 0); 236 transform: scale(var(--fa-layers-scale, 0.25)); 237 transform-origin: top left; 238} 239 240.fa-1x { 241 font-size: 1em; 242} 243 244.fa-2x { 245 font-size: 2em; 246} 247 248.fa-3x { 249 font-size: 3em; 250} 251 252.fa-4x { 253 font-size: 4em; 254} 255 256.fa-5x { 257 font-size: 5em; 258} 259 260.fa-6x { 261 font-size: 6em; 262} 263 264.fa-7x { 265 font-size: 7em; 266} 267 268.fa-8x { 269 font-size: 8em; 270} 271 272.fa-9x { 273 font-size: 9em; 274} 275 276.fa-10x { 277 font-size: 10em; 278} 279 280.fa-2xs { 281 font-size: 0.625em; 282 line-height: 0.1em; 283 vertical-align: 0.225em; 284} 285 286.fa-xs { 287 font-size: 0.75em; 288 line-height: 0.0833333337em; 289 vertical-align: 0.125em; 290} 291 292.fa-sm { 293 font-size: 0.875em; 294 line-height: 0.0714285718em; 295 vertical-align: 0.0535714295em; 296} 297 298.fa-lg { 299 font-size: 1.25em; 300 line-height: 0.05em; 301 vertical-align: -0.075em; 302} 303 304.fa-xl { 305 font-size: 1.5em; 306 line-height: 0.0416666682em; 307 vertical-align: -0.125em; 308} 309 310.fa-2xl { 311 font-size: 2em; 312 line-height: 0.03125em; 313 vertical-align: -0.1875em; 314} 315 316.fa-fw { 317 text-align: center; 318 width: 1.25em; 319} 320 321.fa-ul { 322 list-style-type: none; 323 margin-left: var(--fa-li-margin, 2.5em); 324 padding-left: 0; 325} 326.fa-ul > li { 327 position: relative; 328} 329 330.fa-li { 331 left: calc(-1 * var(--fa-li-width, 2em)); 332 position: absolute; 333 text-align: center; 334 width: var(--fa-li-width, 2em); 335 line-height: inherit; 336} 337 338.fa-border { 339 border-color: var(--fa-border-color, #eee); 340 border-radius: var(--fa-border-radius, 0.1em); 341 border-style: var(--fa-border-style, solid); 342 border-width: var(--fa-border-width, 0.08em); 343 padding: var(--fa-border-padding, 0.2em 0.25em 0.15em); 344} 345 346.fa-pull-left { 347 float: left; 348 margin-right: var(--fa-pull-margin, 0.3em); 349} 350 351.fa-pull-right { 352 float: right; 353 margin-left: var(--fa-pull-margin, 0.3em); 354} 355 356.fa-beat { 357 animation-name: fa-beat; 358 animation-delay: var(--fa-animation-delay, 0s); 359 animation-direction: var(--fa-animation-direction, normal); 360 animation-duration: var(--fa-animation-duration, 1s); 361 animation-iteration-count: var(--fa-animation-iteration-count, infinite); 362 animation-timing-function: var(--fa-animation-timing, ease-in-out); 363} 364 365.fa-bounce { 366 animation-name: fa-bounce; 367 animation-delay: var(--fa-animation-delay, 0s); 368 animation-direction: var(--fa-animation-direction, normal); 369 animation-duration: var(--fa-animation-duration, 1s); 370 animation-iteration-count: var(--fa-animation-iteration-count, infinite); 371 animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1)); 372} 373 374.fa-fade { 375 animation-name: fa-fade; 376 animation-delay: var(--fa-animation-delay, 0s); 377 animation-direction: var(--fa-animation-direction, normal); 378 animation-duration: var(--fa-animation-duration, 1s); 379 animation-iteration-count: var(--fa-animation-iteration-count, infinite); 380 animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); 381} 382 383.fa-beat-fade { 384 animation-name: fa-beat-fade; 385 animation-delay: var(--fa-animation-delay, 0s); 386 animation-direction: var(--fa-animation-direction, normal); 387 animation-duration: var(--fa-animation-duration, 1s); 388 animation-iteration-count: var(--fa-animation-iteration-count, infinite); 389 animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); 390} 391 392.fa-flip { 393 animation-name: fa-flip; 394 animation-delay: var(--fa-animation-delay, 0s); 395 animation-direction: var(--fa-animation-direction, normal); 396 animation-duration: var(--fa-animation-duration, 1s); 397 animation-iteration-count: var(--fa-animation-iteration-count, infinite); 398 animation-timing-function: var(--fa-animation-timing, ease-in-out); 399} 400 401.fa-shake { 402 animation-name: fa-shake; 403 animation-delay: var(--fa-animation-delay, 0s); 404 animation-direction: var(--fa-animation-direction, normal); 405 animation-duration: var(--fa-animation-duration, 1s); 406 animation-iteration-count: var(--fa-animation-iteration-count, infinite); 407 animation-timing-function: var(--fa-animation-timing, linear); 408} 409 410.fa-spin { 411 animation-name: fa-spin; 412 animation-delay: var(--fa-animation-delay, 0s); 413 animation-direction: var(--fa-animation-direction, normal); 414 animation-duration: var(--fa-animation-duration, 2s); 415 animation-iteration-count: var(--fa-animation-iteration-count, infinite); 416 animation-timing-function: var(--fa-animation-timing, linear); 417} 418 419.fa-spin-reverse { 420 --fa-animation-direction: reverse; 421} 422 423.fa-pulse, 424.fa-spin-pulse { 425 animation-name: fa-spin; 426 animation-direction: var(--fa-animation-direction, normal); 427 animation-duration: var(--fa-animation-duration, 1s); 428 animation-iteration-count: var(--fa-animation-iteration-count, infinite); 429 animation-timing-function: var(--fa-animation-timing, steps(8)); 430} 431 432@media (prefers-reduced-motion: reduce) { 433 .fa-beat, 434.fa-bounce, 435.fa-fade, 436.fa-beat-fade, 437.fa-flip, 438.fa-pulse, 439.fa-shake, 440.fa-spin, 441.fa-spin-pulse { 442 animation-delay: -1ms; 443 animation-duration: 1ms; 444 animation-iteration-count: 1; 445 transition-delay: 0s; 446 transition-duration: 0s; 447 } 448} 449@keyframes fa-beat { 450 0%, 90% { 451 transform: scale(1); 452 } 453 45% { 454 transform: scale(var(--fa-beat-scale, 1.25)); 455 } 456} 457@keyframes fa-bounce { 458 0% { 459 transform: scale(1, 1) translateY(0); 460 } 461 10% { 462 transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); 463 } 464 30% { 465 transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); 466 } 467 50% { 468 transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); 469 } 470 57% { 471 transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); 472 } 473 64% { 474 transform: scale(1, 1) translateY(0); 475 } 476 100% { 477 transform: scale(1, 1) translateY(0); 478 } 479} 480@keyframes fa-fade { 481 50% { 482 opacity: var(--fa-fade-opacity, 0.4); 483 } 484} 485@keyframes fa-beat-fade { 486 0%, 100% { 487 opacity: var(--fa-beat-fade-opacity, 0.4); 488 transform: scale(1); 489 } 490 50% { 491 opacity: 1; 492 transform: scale(var(--fa-beat-fade-scale, 1.125)); 493 } 494} 495@keyframes fa-flip { 496 50% { 497 transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); 498 } 499} 500@keyframes fa-shake { 501 0% { 502 transform: rotate(-15deg); 503 } 504 4% { 505 transform: rotate(15deg); 506 } 507 8%, 24% { 508 transform: rotate(-18deg); 509 } 510 12%, 28% { 511 transform: rotate(18deg); 512 } 513 16% { 514 transform: rotate(-22deg); 515 } 516 20% { 517 transform: rotate(22deg); 518 } 519 32% { 520 transform: rotate(-12deg); 521 } 522 36% { 523 transform: rotate(12deg); 524 } 525 40%, 100% { 526 transform: rotate(0deg); 527 } 528} 529@keyframes fa-spin { 530 0% { 531 transform: rotate(0deg); 532 } 533 100% { 534 transform: rotate(360deg); 535 } 536} 537.fa-rotate-90 { 538 transform: rotate(90deg); 539} 540 541.fa-rotate-180 { 542 transform: rotate(180deg); 543} 544 545.fa-rotate-270 { 546 transform: rotate(270deg); 547} 548 549.fa-flip-horizontal { 550 transform: scale(-1, 1); 551} 552 553.fa-flip-vertical { 554 transform: scale(1, -1); 555} 556 557.fa-flip-both, 558.fa-flip-horizontal.fa-flip-vertical { 559 transform: scale(-1, -1); 560} 561 562.fa-rotate-by { 563 transform: rotate(var(--fa-rotate-angle, 0)); 564} 565 566.fa-stack { 567 display: inline-block; 568 vertical-align: middle; 569 height: 2em; 570 position: relative; 571 width: 2.5em; 572} 573 574.fa-stack-1x, 575.fa-stack-2x { 576 bottom: 0; 577 left: 0; 578 margin: auto; 579 position: absolute; 580 right: 0; 581 top: 0; 582 z-index: var(--fa-stack-z-index, auto); 583} 584 585.svg-inline--fa.fa-stack-1x { 586 height: 1em; 587 width: 1.25em; 588} 589.svg-inline--fa.fa-stack-2x { 590 height: 2em; 591 width: 2.5em; 592} 593 594.fa-inverse { 595 color: var(--fa-inverse, #fff); 596} 597 598.sr-only, 599.fa-sr-only { 600 position: absolute; 601 width: 1px; 602 height: 1px; 603 padding: 0; 604 margin: -1px; 605 overflow: hidden; 606 clip: rect(0, 0, 0, 0); 607 white-space: nowrap; 608 border-width: 0; 609} 610 611.sr-only-focusable:not(:focus), 612.fa-sr-only-focusable:not(:focus) { 613 position: absolute; 614 width: 1px; 615 height: 1px; 616 padding: 0; 617 margin: -1px; 618 overflow: hidden; 619 clip: rect(0, 0, 0, 0); 620 white-space: nowrap; 621 border-width: 0; 622} 623 624.svg-inline--fa .fa-primary { 625 fill: var(--fa-primary-color, currentColor); 626 opacity: var(--fa-primary-opacity, 1); 627} 628 629.svg-inline--fa .fa-secondary { 630 fill: var(--fa-secondary-color, currentColor); 631 opacity: var(--fa-secondary-opacity, 0.4); 632} 633 634.svg-inline--fa.fa-swap-opacity .fa-primary { 635 opacity: var(--fa-secondary-opacity, 0.4); 636} 637 638.svg-inline--fa.fa-swap-opacity .fa-secondary { 639 opacity: var(--fa-primary-opacity, 1); 640} 641 642.svg-inline--fa mask .fa-primary, 643.svg-inline--fa mask .fa-secondary { 644 fill: black; 645}`;
645function UU(){const t=PU,e=RU,r=bt.cssPrefix,n=bt.replacementClass;let i=cee;if(r!==t||n!==e){const s=new RegExp("\\.".concat(t,"\\-"),"g"),o=new RegExp("\\--".concat(t,"\\-"),"g"),a=new RegExp("\\.".concat(e),"g");i=i.replace(s,".".concat(r,"-")).replace(o,"--".concat(r,"-")).replace(a,".".concat(n))}return i}let OI=!1;function F5(){bt.autoAddCss&&!OI&&(nee(UU()),OI=!0)}var lee={mixout(){return{dom:{css:UU,insertCss:F5}}},hooks(){return{beforeDOMElementCreation(){F5()},beforeI2svg(){F5()}}}};const gu=Qf||{};gu[pu]||(gu[pu]={});gu[pu].styles||(gu[pu].styles={});gu[pu].hooks||(gu[pu].hooks={});gu[pu].shims||(gu[pu].shims=[]);var Zc=gu[pu];const BU=[],FU=function(){kn.removeEventListener("DOMContentLoaded",FU),u3=1,BU.map(t=>t())};let u3=!1;Iu&&(u3=(kn.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(kn.readyState),u3||kn.addEventListener("DOMContentLoaded",FU));function uee(t){Iu&&(u3?setTimeout(t,0):BU.push(t))}function Fy(t){const{tag:e,attributes:r={},children:n=[]}=t;return typeof t=="string"?$U(t):"<".concat(e," ").concat(see(r),">").concat(n.map(Fy).join(""),"</").concat(e,">")}function DI(t,e,r){if(t&&t[e]&&t[e][r])return{prefix:e,iconName:r,icon:t[e][r]}}var j5=function(e,r,n,i){var s=Object.keys(e),o=s.length,a=r,c,l,u;for(n===void 0?(c=1,u=e[s[0]]):(c=0,u=n);c<o;c++)l=s[c],u=a(u,e[l],l,e);return u};function fee(t){const e=[];let r=0;const n=t.length;for(;r<n;){const i=t.charCodeAt(r++);if(i>=55296&&i<=56319&&r<n){const s=t.charCodeAt(r++);(s&64512)==56320?e.push(((i&1023)<<10)+(s&1023)+65536):(e.push(i),r--)}else e.push(i)}return e}function tC(t){const e=fee(t);return e.length===1?e[0].toString(16):null}function dee(t,e){const r=t.length;let n=t.charCodeAt(e),i;return n>=55296&&n<=56319&&r>e+1&&(i=t.charCodeAt(e+1),i>=56320&&i<=57343)?(n-55296)*1024+i-56320+65536:n}function LI(t){return Object.keys(t).reduce((e,r)=>{const n=t[r];return!!n.icon?e[n.iconName]=n.icon:e[r]=n,e},{})}function rC(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{skipHooks:n=!1}=r,i=LI(e);typeof Zc.hooks.addPack=="function"&&!n?Zc.hooks.addPack(t,LI(e)):Zc.styles[t]=Te(Te({},Zc.styles[t]||{}),i),t==="fas"&&rC("fa",e)}const{styles:b2,shims:hee}=Zc,jU=Object.keys(v9),pee=jU.reduce((t,e)=>(t[e]=Object.keys(v9[e]),t),{});let C9=null,zU={},WU={},HU={},qU={},VU={};function gee(t){return~XX.indexOf(t)}function mee(t,e){const r=e.split("-"),n=r[0],i=r.slice(1).join("-");return n===t&&i!==""&&!gee(i)?i:null}const KU=()=>{const t=n=>j5(b2,(i,s,o)=>(i[o]=j5(s,n,{}),i),{});zU=t((n,i,s)=>(i[3]&&(n[i[3]]=s),i[2]&&i[2].filter(a=>typeof a=="number").forEach(a=>{n[a.toString(16)]=s}),n)),WU=t((n,i,s)=>(n[s]=s,i[2]&&i[2].filter(a=>typeof a=="string").forEach(a=>{n[a]=s}),n)),VU=t((n,i,s)=>{const o=i[2];return n[s]=s,o.forEach(a=>{n[a]=s}),n});const e="far"in b2||bt.autoFetchSvg,r=j5(hee,(n,i)=>{const s=i[0];let o=i[1];const a=i[2];return o==="far"&&!e&&(o="fas"),typeof s=="string"&&(n.names[s]={prefix:o,iconName:a}),typeof s=="number"&&(n.unicodes[s.toString(16)]={prefix:o,iconName:a}),n},{names:{},unicodes:{}});HU=r.names,qU=r.unicodes,C9=K4(bt.styleDefault,{family:bt.familyDefault})};ree(t=>{C9=K4(t.styleDefault,{family:bt.familyDefault})});KU();function _9(t,e){return(zU[t]||{})[e]}function yee(t,e){return(WU[t]||{})[e]}function qd(t,e){return(VU[t]||{})[e]}function GU(t){return HU[t]||{prefix:null,iconName:null}}function bee(t){const e=qU[t],r=_9("fas",t);return e||(r?{prefix:"fas",iconName:r}:null)||{prefix:null,iconName:null}}function Xf(){return C9}const YU=()=>({prefix:null,iconName:null,rest:[]}
645);function wee(t){let e=Ps;const r=jU.reduce((n,i)=>(n[i]="".concat(bt.cssPrefix,"-").concat(i),n),{});return TU.forEach(n=>{(t.includes(r[n])||t.some(i=>pee[n].includes(i)))&&(e=n)}),e}function K4(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{family:r=Ps}=e,n=GX[r][t];if(r===q4&&!t)return"fad";const i=RI[r][t]||RI[r][n],s=t in Zc.styles?t:null;return i||s||null}function vee(t){let e=[],r=null;return t.forEach(n=>{const i=mee(bt.cssPrefix,n);i?r=i:n&&e.push(n)}),{iconName:r,rest:e}}function MI(t){return t.sort().filter((e,r,n)=>n.indexOf(e)===r)}function G4(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{skipLookups:r=!1}=e;let n=null;const i=Y8.concat(MX),s=MI(t.filter(f=>i.includes(f))),o=MI(t.filter(f=>!Y8.includes(f))),a=s.filter(f=>(n=f,!IU.includes(f))),[c=null]=a,l=wee(s),u=Te(Te({},vee(o)),{},{prefix:K4(c,{family:l})});return Te(Te(Te({},u),_ee({values:t,family:l,styles:b2,config:bt,canonical:u,givenPrefix:n})),xee(r,n,u))}function xee(t,e,r){let{prefix:n,iconName:i}=r;if(t||!n||!i)return{prefix:n,iconName:i};const s=e==="fa"?GU(i):{},o=qd(n,i);return i=s.iconName||o||i,n=s.prefix||n,n==="far"&&!b2.far&&b2.fas&&!bt.autoFetchSvg&&(n="fas"),{prefix:n,iconName:i}}const Eee=TU.filter(t=>t!==Ps||t!==q4),Cee=Object.keys(G8).filter(t=>t!==Ps).map(t=>Object.keys(G8[t])).flat();function _ee(t){const{values:e,family:r,canonical:n,givenPrefix:i="",styles:s={},config:o={}}=t,a=r===q4,c=e.includes("fa-duotone")||e.includes("fad"),l=o.familyDefault==="duotone",u=n.prefix==="fad"||n.prefix==="fa-duotone";if(!a&&(c||l||u)&&(n.prefix="fad"),(e.includes("fa-brands")||e.includes("fab"))&&(n.prefix="fab"),!n.prefix&&Eee.includes(r)&&(Object.keys(s).find(d=>Cee.includes(d))||o.autoFetchSvg)){const d=IX.get(r).defaultShortPrefixId;n.prefix=d,n.iconName=qd(n.prefix,n.iconName)||n.iconName}return(n.prefix==="fa"||i==="fa")&&(n.prefix=Xf()||"fas"),n}class Aee{constructor(){this.definitions={}}add(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];const i=r.reduce(this._pullDefinitions,{});
645Object.keys(i).forEach(s=>{this.definitions[s]=Te(Te({},this.definitions[s]||{}),i[s]),rC(s,i[s]);const o=v9[Ps][s];o&&rC(o,i[s]),KU()})}reset(){this.definitions={}}_pullDefinitions(e,r){const n=r.prefix&&r.iconName&&r.icon?{0:r}:r;return Object.keys(n).map(i=>{const{prefix:s,iconName:o,icon:a}=n[i],c=a[2];e[s]||(e[s]={}),c.length>0&&c.forEach(l=>{typeof l=="string"&&(e[s][l]=a)}),e[s][o]=a}),e}}let $I=[],up={};const Np={},See=Object.keys(Np);function Nee(t,e){let{mixoutsTo:r}=e;return $I=t,up={},Object.keys(Np).forEach(n=>{See.indexOf(n)===-1&&delete Np[n]}),$I.forEach(n=>{const i=n.mixout?n.mixout():{};if(Object.keys(i).forEach(s=>{typeof i[s]=="function"&&(r[s]=i[s]),typeof i[s]=="object"&&Object.keys(i[s]).forEach(o=>{r[s]||(r[s]={}),r[s][o]=i[s][o]})}),n.hooks){const s=n.hooks();Object.keys(s).forEach(o=>{up[o]||(up[o]=[]),up[o].push(s[o])})}n.provides&&n.provides(Np)}),r}function nC(t,e){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];return(up[t]||[]).forEach(o=>{e=o.apply(null,[e,...n])}),e}function Nh(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];(up[t]||[]).forEach(s=>{s.apply(null,r)})}function ed(){const t=arguments[0],e=Array.prototype.slice.call(arguments,1);return Np[t]?Np[t].apply(null,e):void 0}function iC(t){t.prefix==="fa"&&(t.prefix="fas");let{iconName:e}=t;const r=t.prefix||Xf();if(e)return e=qd(r,e)||e,DI(ZU.definitions,r,e)||DI(Zc.styles,r,e)}const ZU=new Aee,Iee=()=>{bt.autoReplaceSvg=!1,bt.observeMutations=!1,Nh("noAuto")},Tee={i2svg:function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Iu?(Nh("beforeI2svg",t),ed("pseudoElements2svg",t),ed("i2svg",t)):Promise.reject(new Error("Operation requires a DOM of some kind."))},watch:function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{autoReplaceSvgRoot:e}=t;bt.autoReplaceSvg===!1&&(bt.autoReplaceSvg=!0),bt.observeMutations=!0,uee(()=>{Pee({autoReplaceSvgRoot:e}),Nh("watch",t)})}},kee={icon:t=>{if(t===null)return null;if(typeof t=="object"&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:qd(t.prefix,t.iconName)||t.iconName};if(Array.isArray(t)&&t.length===2){const e=t[1].indexOf("fa-")===0?t[1].slice(3):t[1],r=K4(t[0]);return{prefix:r,iconName:qd(r,e)||e}}if(typeof t=="string"&&(t.indexOf("".concat(bt.cssPrefix,"-"))>-1||t.match(YX))){const e=G4(t.split(" "),{skipLookups:!0});return{prefix:e.prefix||Xf(),iconName:qd(e.prefix,e.iconName)||e.iconName}}if(typeof t=="string"){const e=Xf();return{prefix:e,iconName:qd(e,t)||t}}}},Jo={noAuto:Iee,config:bt,dom:Tee,parse:kee,library:ZU,findIconDefinition:iC,toHtml:Fy},Pee=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{autoReplaceSvgRoot:e=kn}=t;(Object.keys(Zc.styles).length>0||bt.autoFetchSvg)&&Iu&&bt.autoReplaceSvg&&Jo.dom.i2svg({node:e})};function Y4(t,e){return Object.defineProperty(t,"abstract",{get:e}),Object.defineProperty(t,"html",{get:function(){return t.abstract.map(r=>Fy(r))}}),Object.defineProperty(t,"node",{get:function(){if(!Iu)return;const r=kn.createElement("div");return r.innerHTML=t.html,r.children}}),t}function Ree(t){let{children:e,main:r,mask:n,attributes:i,styles:s,transform:o}=t;if(E9(o)&&r.found&&!n.found){const{width:a,height:c}=r,l={x:a/c/2,y:.5};i.style=V4(Te(Te({},s),{},{"transform-origin":"".concat(l.x+o.x/16,"em ").concat(l.y+o.y/16,"em")}))}return[{tag:"svg",attributes:i,children:e}]}function Oee(t){let{prefix:e,iconName:r,children:n,attributes:i,symbol:s}=t;const o=s===!0?"".concat(e,"-").concat(bt.cssPrefix,"-").concat(r):s;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:Te(Te({},i),{},{id:o}),children:n}]}]}function A9(t){const{icons:{main:e,mask:r},prefix:n,iconName:i,transform:s,symbol:o,title:a,maskId:c,titleId:l,extra:u,watchable:f=!1}=t,{width:d,height:p}=r.found?r:e,h=OX.includes(n),g=[bt.replacementClass,i?"".concat(bt.cssPrefix,"-").concat(i):""].filter(P=>u.classes.indexOf(P)===-1).filter(P=>P!==""||!!P).concat(u.classes).join(" ");let y={children:[],attributes:Te(Te({},u.attributes),{},{"data-prefix":n,"data-icon":i,class:g,role:u.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(d," ").concat(p)})};const x=h&&!~u.classes.indexOf("fa-fw")?{width:"".concat(d/p*16*.0625,"em")}:{};f&&(y.attributes[Sh]=""),a&&(y.children.push({tag:"title",attributes:{id:y.attributes["aria-labelledby"]||"title-".concat(l||y2())},children:[a]}),delete y.attributes.title);const C=Te(Te({},y),{},{prefix:n,iconName:i,main:e,mask:r,maskId:c,transform:s,symbol:o,styles:Te(Te({},x),u.styles)}),{children:_,attributes:L}
645=r.found&&e.found?ed("generateAbstractMask",C)||{children:[],attributes:{}}:ed("generateAbstractIcon",C)||{children:[],attributes:{}};return C.children=_,C.attributes=L,o?Oee(C):Ree(C)}function UI(t){const{content:e,width:r,height:n,transform:i,title:s,extra:o,watchable:a=!1}=t,c=Te(Te(Te({},o.attributes),s?{title:s}:{}),{},{class:o.classes.join(" ")});a&&(c[Sh]="");const l=Te({},o.styles);E9(i)&&(l.transform=aee({transform:i,startCentered:!0,width:r,height:n}),l["-webkit-transform"]=l.transform);const u=V4(l);u.length>0&&(c.style=u);const f=[];return f.push({tag:"span",attributes:c,children:[e]}),s&&f.push({tag:"span",attributes:{class:"sr-only"},children:[s]}),f}function Dee(t){const{content:e,title:r,extra:n}=t,i=Te(Te(Te({},n.attributes),r?{title:r}:{}),{},{class:n.classes.join(" ")}),s=V4(n.styles);s.length>0&&(i.style=s);const o=[];return o.push({tag:"span",attributes:i,children:[e]}),r&&o.push({tag:"span",attributes:{class:"sr-only"},children:[r]}),o}const{styles:z5}=Zc;function sC(t){const e=t[0],r=t[1],[n]=t.slice(4);let i=null;return Array.isArray(n)?i={tag:"g",attributes:{class:"".concat(bt.cssPrefix,"-").concat(B5.GROUP)},children:[{tag:"path",attributes:{class:"".concat(bt.cssPrefix,"-").concat(B5.SECONDARY),fill:"currentColor",d:n[0]}},{tag:"path",attributes:{class:"".concat(bt.cssPrefix,"-").concat(B5.PRIMARY),fill:"currentColor",d:n[1]}}]}:i={tag:"path",attributes:{fill:"currentColor",d:n}},{found:!0,width:e,height:r,icon:i}}const Lee={found:!1,width:512,height:512};function Mee(t,e){!OU&&!bt.showMissingIcons&&t&&console.error('Icon with name "'.concat(t,'" and prefix "').concat(e,'" is missing.'))}function oC(t,e){let r=e;return e==="fa"&&bt.styleDefault!==null&&(e=Xf()),new Promise((n,i)=>{if(r==="fa"){const s=GU(t)||{};t=s.iconName||t,e=s.prefix||e}if(t&&e&&z5[e]&&z5[e][t]){const s=z5[e][t];return n(sC(s))}Mee(t,e),n(Te(Te({},Lee),{},{icon:bt.showMissingIcons&&t?ed("missingIconAbstract")||{}:{}}))})}const BI=()=>{},aC=bt.measurePerformance&&Wb&&Wb.mark&&Wb.measure?Wb:{mark:BI,measure:BI},j1='FA "6.7.2"',$ee=t=>(aC.mark("".concat(j1," ").concat(t," begins")),()=>JU(t)),JU=t=>{aC.mark("".concat(j1," ").concat(t," ends")),aC.measure("".concat(j1," ").concat(t),"".concat(j1," ").concat(t," begins"),"".concat(j1," ").concat(t," ends"))};var S9={begin:$ee,end:JU};const rv=()=>{};function FI(t){return typeof(t.getAttribute?t.getAttribute(Sh):null)=="string"}function Uee(t){const e=t.getAttribute?t.getAttribute(b9):null,r=t.getAttribute?t.getAttribute(w9):null;return e&&r}function Bee(t){return t&&t.classList&&t.classList.contains&&t.classList.contains(bt.replacementClass)}function Fee(){return bt.autoReplaceSvg===!0?nv.replace:nv[bt.autoReplaceSvg]||nv.replace}function jee(t){return kn.createElementNS("http://www.w3.org/2000/svg",t)}function zee(t){return kn.createElement(t)}function QU(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{ceFn:r=t.tag==="svg"?jee:zee}=e;if(typeof t=="string")return kn.createTextNode(t);const n=r(t.tag);return Object.keys(t.attributes||[]).forEach(function(s){n.setAttribute(s,t.attributes[s])}),(t.children||[]).forEach(function(s){n.appendChild(QU(s,{ceFn:r}))}),n}function Wee(t){let e=" ".concat(t.outerHTML," ");return e="".concat(e,"Font Awesome fontawesome.com "),e}const nv={replace:function(t){const e=t[0];
645if(e.parentNode)if(t[1].forEach(r=>{e.parentNode.insertBefore(QU(r),e)}),e.getAttribute(Sh)===null&&bt.keepOriginalSource){let r=kn.createComment(Wee(e));e.parentNode.replaceChild(r,e)}else e.remove()},nest:function(t){const e=t[0],r=t[1];if(~x9(e).indexOf(bt.replacementClass))return nv.replace(t);const n=new RegExp("".concat(bt.cssPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){const s=r[0].attributes.class.split(" ").reduce((o,a)=>(a===bt.replacementClass||a.match(n)?o.toSvg.push(a):o.toNode.push(a),o),{toNode:[],toSvg:[]});r[0].attributes.class=s.toSvg.join(" "),s.toNode.length===0?e.removeAttribute("class"):e.setAttribute("class",s.toNode.join(" "))}const i=r.map(s=>Fy(s)).join(` 646`);e.setAttribute(Sh,""),e.innerHTML=i}};function jI(t){t()}function XU(t,e){const r=typeof e=="function"?e:rv;if(t.length===0)r();else{let n=jI;bt.mutateApproach===VX&&(n=Qf.requestAnimationFrame||jI),n(()=>{const i=Fee(),s=S9.begin("mutate");t.map(i),s(),r()})}}let N9=!1;function eB(){N9=!0}function cC(){N9=!1}let f3=null;function zI(t){if(!II||!bt.observeMutations)return;const{treeCallback:e=rv,nodeCallback:r=rv,pseudoElementsCallback:n=rv,observeMutationsRoot:i=kn}=t;f3=new II(s=>{if(N9)return;const o=Xf();Tg(s).forEach(a=>{if(a.type==="childList"&&a.addedNodes.length>0&&!FI(a.addedNodes[0])&&(bt.searchPseudoElements&&n(a.target),e(a.target)),a.type==="attributes"&&a.target.parentNode&&bt.searchPseudoElements&&n(a.target.parentNode),a.type==="attributes"&&FI(a.target)&&~QX.indexOf(a.attributeName))if(a.attributeName==="class"&&Uee(a.target)){const{prefix:c,iconName:l}=G4(x9(a.target));a.target.setAttribute(b9,c||o),l&&a.target.setAttribute(w9,l)}else Bee(a.target)&&r(a.target)})}),Iu&&f3.observe(i,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}function Hee(){f3&&f3.disconnect()}function qee(t){const e=t.getAttribute("style");let r=[];return e&&(r=e.split(";").reduce((n,i)=>{const s=i.split(":"),o=s[0],a=s.slice(1);return o&&a.length>0&&(n[o]=a.join(":").trim()),n},{})),r}function Vee(t){const e=t.getAttribute("data-prefix"),r=t.getAttribute("data-icon"),n=t.innerText!==void 0?t.innerText.trim():"";let i=G4(x9(t));return i.prefix||(i.prefix=Xf()),e&&r&&(i.prefix=e,i.iconName=r),i.iconName&&i.prefix||(i.prefix&&n.length>0&&(i.iconName=yee(i.prefix,t.innerText)||_9(i.prefix,tC(t.innerText))),!i.iconName&&bt.autoFetchSvg&&t.firstChild&&t.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=t.firstChild.data)),i}function Kee(t){const e=Tg(t.attributes).reduce((i,s)=>(i.name!=="class"&&i.name!=="style"&&(i[s.name]=s.value),i),{}),r=t.getAttribute("title"),n=t.getAttribute("data-fa-title-id");return bt.autoA11y&&(r?e["aria-labelledby"]="".concat(bt.replacementClass,"-title-").concat(n||y2()):(e["aria-hidden"]="true",e.focusable="false")),e}function Gee(){return{iconName:null,title:null,titleId:null,prefix:null,transform:Yc,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function WI(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0};const{iconName:r,prefix:n,rest:i}=Vee(t),s=Kee(t),o=nC("parseNodeAttributes",{},t);let a=e.styleParser?qee(t):[];return Te({iconName:r,title:t.getAttribute("title"),titleId:t.getAttribute("data-fa-title-id"),prefix:n,transform:Yc,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:i,styles:a,attributes:s}},o)}const{styles:Yee}=Zc;function tB(t){const e=bt.autoReplaceSvg==="nest"?WI(t,{styleParser:!1}):WI(t);return~e.extra.classes.indexOf(LU)?ed("generateLayersText",t,e):ed("generateSvgReplacementMutation",t,e)}function Zee(){return[...kX,...Y8]}function HI(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!Iu)return Promise.resolve();const r=kn.documentElement.classList,n=u=>r.add("".concat(PI,"-").concat(u)),i=u=>r.remove("".concat(PI,"-").concat(u)),s=bt.autoFetchSvg?Zee():IU.concat(Object.keys(Yee));s.includes("fa")||s.push("fa");const o=[".".concat(LU,":not([").concat(Sh,"])")].concat(s.map(u=>".".concat(u,":not([").concat(Sh,"])"))).join(", ");if(o.length===0)return Promise.resolve();let a=[];
646try{a=Tg(t.querySelectorAll(o))}catch{}if(a.length>0)n("pending"),i("complete");else return Promise.resolve();const c=S9.begin("onTree"),l=a.reduce((u,f)=>{try{const d=tB(f);d&&u.push(d)}catch(d){OU||d.name==="MissingIcon"&&console.error(d)}return u},[]);return new Promise((u,f)=>{Promise.all(l).then(d=>{XU(d,()=>{n("active"),n("complete"),i("pending"),typeof e=="function"&&e(),c(),u()})}).catch(d=>{c(),f(d)})})}function Jee(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;tB(t).then(r=>{r&&XU([r],e)})}function Qee(t){return function(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=(e||{}).icon?e:iC(e||{});let{mask:i}=r;return i&&(i=(i||{}).icon?i:iC(i||{})),t(n,Te(Te({},r),{},{mask:i}))}}const Xee=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{transform:r=Yc,symbol:n=!1,mask:i=null,maskId:s=null,title:o=null,titleId:a=null,classes:c=[],attributes:l={},styles:u={}}=e;if(!t)return;const{prefix:f,iconName:d,icon:p}=t;return Y4(Te({type:"icon"},t),()=>(Nh("beforeDOMElementCreation",{iconDefinition:t,params:e}),bt.autoA11y&&(o?l["aria-labelledby"]="".concat(bt.replacementClass,"-title-").concat(a||y2()):(l["aria-hidden"]="true",l.focusable="false")),A9({icons:{main:sC(p),mask:i?sC(i.icon):{found:!1,width:null,height:null,icon:{}}},prefix:f,iconName:d,transform:Te(Te({},Yc),r),symbol:n,title:o,maskId:s,titleId:a,extra:{attributes:l,styles:u,classes:c}})))};var ete={mixout(){return{icon:Qee(Xee)}},hooks(){return{mutationObserverCallbacks(t){return t.treeCallback=HI,t.nodeCallback=Jee,t}}},provides(t){t.i2svg=function(e){const{node:r=kn,callback:n=()=>{}}=e;return HI(r,n)},t.generateSvgReplacementMutation=function(e,r){const{iconName:n,title:i,titleId:s,prefix:o,transform:a,symbol:c,mask:l,maskId:u,extra:f}=r;return new Promise((d,p)=>{Promise.all([oC(n,o),l.iconName?oC(l.iconName,l.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(h=>{let[g,y]=h;d([e,A9({icons:{main:g,mask:y},prefix:o,iconName:n,transform:a,symbol:c,maskId:u,title:i,titleId:s,extra:f,watchable:!0})])}).catch(p)})},t.generateAbstractIcon=function(e){let{children:r,attributes:n,main:i,transform:s,styles:o}=e;const a=V4(o);a.length>0&&(n.style=a);let c;return E9(s)&&(c=ed("generateAbstractTransformGrouping",{main:i,transform:s,containerWidth:i.width,iconWidth:i.width})),r.push(c||i.icon),{children:r,attributes:n}}}},tte={mixout(){return{layer(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{classes:r=[]}=e;return Y4({type:"layer"},()=>{Nh("beforeDOMElementCreation",{assembler:t,params:e});let n=[];return t(i=>{Array.isArray(i)?i.map(s=>{n=n.concat(s.abstract)}):n=n.concat(i.abstract)}),[{tag:"span",attributes:{class:["".concat(bt.cssPrefix,"-layers"),...r].join(" ")},children:n}]})}}}},rte={mixout(){return{counter(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{title:r=null,classes:n=[],attributes:i={},styles:s={}}=e;return Y4({type:"counter",content:t},()=>(Nh("beforeDOMElementCreation",{content:t,params:e}),Dee({content:t.toString(),title:r,extra:{attributes:i,styles:s,classes:["".concat(bt.cssPrefix,"-layers-counter"),...n]}})))}}}},nte={mixout(){return{text(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{transform:r=Yc,title:n=null,classes:i=[],attributes:s={},styles:o={}}=e;return Y4({type:"text",content:t},()=>(Nh("beforeDOMElementCreation",{content:t,params:e}),UI({content:t,transform:Te(Te({},Yc),r),title:n,extra:{attributes:s,styles:o,classes:["".concat(bt.cssPrefix,"-layers-text"),...i]}})))}}},provides(t){t.generateLayersText=function(e,r){const{title:n,transform:i,extra:s}=r;let o=null,a=null;if(SU){const c=parseInt(getComputedStyle(e).fontSize,10),l=e.getBoundingClientRect();o=l.width/c,a=l.height/c}return bt.autoA11y&&!n&&(s.attributes["aria-hidden"]="true"),Promise.resolve([e,UI({content:e.innerHTML,width:o,height:a,transform:i,title:n,extra:s,watchable:!0})])}}};const ite=new RegExp('"',"ug"),qI=[1105920,1112319],VI=Te(Te(Te(Te({},{FontAwesome:{normal:"fas",400:"fas"}}),NX),HX),$X),lC=Object.keys(VI).reduce((t,e)=>(t[e.toLowerCase()]=VI[e],t),{}),ste=Object.keys(lC).reduce((t,e)=>{const r=lC[e];return t[e]=r[900]||[...Object.entries(r)][0][1],t},{});function ote(t){const e=t.replace(ite,""),r=dee(e,0),n=r>=qI[0]&&r<=qI[1],i=e.length===2?e[0]===e[1]:!1;return{value:tC(i?e[0]:e),isSecondary:n||i}}function ate(t,e){const r=t.replace(/^['"]|['"]$/g,"").toLowerCase(),n=parseInt(e),i=isNaN(n)?"normal":n;return(lC[r]||{})[i]||ste[r]}function KI(t,e){const r="".concat(qX).concat(e.replace(":","-"));return new Promise((n,i)=>{if(t.getAttribute(r)!==null)return n();const o=Tg(t.children).filter(d=>d.getAttribute(J8)===e)[0],a=Qf.getComputedStyle(t,e),c=a.getPropertyValue("font-family"),l=c.match(ZX),u=a.getPropertyValue("font-weight"),f=a.getPropertyValue("content");
646if(o&&!l)return t.removeChild(o),n();if(l&&f!=="none"&&f!==""){const d=a.getPropertyValue("content");let p=ate(c,u);const{value:h,isSecondary:g}=ote(d),y=l[0].startsWith("FontAwesome");let x=_9(p,h),C=x;if(y){const _=bee(h);_.iconName&&_.prefix&&(x=_.iconName,p=_.prefix)}if(x&&!g&&(!o||o.getAttribute(b9)!==p||o.getAttribute(w9)!==C)){t.setAttribute(r,C),o&&t.removeChild(o);const _=Gee(),{extra:L}=_;L.attributes[J8]=e,oC(x,p).then(P=>{const z=A9(Te(Te({},_),{},{icons:{main:P,mask:YU()},prefix:p,iconName:C,extra:L,watchable:!0})),W=kn.createElementNS("http://www.w3.org/2000/svg","svg");e==="::before"?t.insertBefore(W,t.firstChild):t.appendChild(W),W.outerHTML=z.map(B=>Fy(B)).join(` 647`),t.removeAttribute(r),n()}).catch(i)}else n()}else n()})}function cte(t){return Promise.all([KI(t,"::before"),KI(t,"::after")])}function lte(t){return t.parentNode!==document.head&&!~KX.indexOf(t.tagName.toUpperCase())&&!t.getAttribute(J8)&&(!t.parentNode||t.parentNode.tagName!=="svg")}function GI(t){if(Iu)return new Promise((e,r)=>{const n=Tg(t.querySelectorAll("*")).filter(lte).map(cte),i=S9.begin("searchPseudoElements");eB(),Promise.all(n).then(()=>{i(),cC(),e()}).catch(()=>{i(),cC(),r()})})}var ute={hooks(){return{mutationObserverCallbacks(t){return t.pseudoElementsCallback=GI,t}}},provides(t){t.pseudoElements2svg=function(e){const{node:r=kn}=e;bt.searchPseudoElements&&GI(r)}}};let YI=!1;var fte={mixout(){return{dom:{unwatch(){eB(),YI=!0}}}},hooks(){return{bootstrap(){zI(nC("mutationObserverCallbacks",{}))},noAuto(){Hee()},watch(t){const{observeMutationsRoot:e}=t;YI?cC():zI(nC("mutationObserverCallbacks",{observeMutationsRoot:e}))}}}};const ZI=t=>{let e={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t.toLowerCase().split(" ").reduce((r,n)=>{const i=n.toLowerCase().split("-"),s=i[0];let o=i.slice(1).join("-");if(s&&o==="h")return r.flipX=!0,r;if(s&&o==="v")return r.flipY=!0,r;if(o=parseFloat(o),isNaN(o))return r;switch(s){case"grow":r.size=r.size+o;break;case"shrink":r.size=r.size-o;break;case"left":r.x=r.x-o;break;case"right":r.x=r.x+o;break;case"up":r.y=r.y-o;break;case"down":r.y=r.y+o;break;case"rotate":r.rotate=r.rotate+o;break}return r},e)};var dte={mixout(){return{parse:{transform:t=>ZI(t)}}},hooks(){return{parseNodeAttributes(t,e){const r=e.getAttribute("data-fa-transform");return r&&(t.transform=ZI(r)),t}}},provides(t){t.generateAbstractTransformGrouping=function(e){let{main:r,transform:n,containerWidth:i,iconWidth:s}=e;const o={transform:"translate(".concat(i/2," 256)")},a="translate(".concat(n.x*32,", ").concat(n.y*32,") "),c="scale(".concat(n.size/16*(n.flipX?-1:1),", ").concat(n.size/16*(n.flipY?-1:1),") "),l="rotate(".concat(n.rotate," 0 0)"),u={transform:"".concat(a," ").concat(c," ").concat(l)},f={transform:"translate(".concat(s/2*-1," -256)")},d={outer:o,inner:u,path:f};return{tag:"g",attributes:Te({},d.outer),children:[{tag:"g",attributes:Te({},d.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:Te(Te({},r.icon.attributes),d.path)}]}]}}}};const W5={x:0,y:0,width:"100%",height:"100%"};function JI(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return t.attributes&&(t.attributes.fill||e)&&(t.attributes.fill="black"),t}function hte(t){return t.tag==="g"?t.children:[t]}var pte={hooks(){return{parseNodeAttributes(t,e){const r=e.getAttribute("data-fa-mask"),n=r?G4(r.split(" ").map(i=>i.trim())):YU();return n.prefix||(n.prefix=Xf()),t.mask=n,t.maskId=e.getAttribute("data-fa-mask-id"),t}}},provides(t){t.generateAbstractMask=function(e){let{children:r,attributes:n,main:i,mask:s,maskId:o,transform:a}=e;const{width:c,icon:l}=i,{width:u,icon:f}=s,d=oee({transform:a,containerWidth:u,iconWidth:c}),p={tag:"rect",attributes:Te(Te({},W5),{},{fill:"white"})},h=l.children?{children:l.children.map(JI)}:{},g={tag:"g",attributes:Te({},d.inner),children:[JI(Te({tag:l.tag,attributes:Te(Te({},l.attributes),d.path)},h))]},y={tag:"g",attributes:Te({},d.outer),children:[g]}
647,x="mask-".concat(o||y2()),C="clip-".concat(o||y2()),_={tag:"mask",attributes:Te(Te({},W5),{},{id:x,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[p,y]},L={tag:"defs",children:[{tag:"clipPath",attributes:{id:C},children:hte(f)},_]};return r.push(L,{tag:"rect",attributes:Te({fill:"currentColor","clip-path":"url(#".concat(C,")"),mask:"url(#".concat(x,")")},W5)}),{children:r,attributes:n}}}},gte={provides(t){let e=!1;Qf.matchMedia&&(e=Qf.matchMedia("(prefers-reduced-motion: reduce)").matches),t.missingIconAbstract=function(){const r=[],n={fill:"currentColor"},i={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};r.push({tag:"path",attributes:Te(Te({},n),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});const s=Te(Te({},i),{},{attributeName:"opacity"}),o={tag:"circle",attributes:Te(Te({},n),{},{cx:"256",cy:"364",r:"28"}),children:[]};return e||o.children.push({tag:"animate",attributes:Te(Te({},i),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:Te(Te({},s),{},{values:"1;0;1;1;0;1;"})}),r.push(o),r.push({tag:"path",attributes:Te(Te({},n),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:e?[]:[{tag:"animate",attributes:Te(Te({},s),{},{values:"1;0;0;0;0;1;"})}]}),e||r.push({tag:"path",attributes:Te(Te({},n),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:Te(Te({},s),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},mte={hooks(){return{parseNodeAttributes(t,e){const r=e.getAttribute("data-fa-symbol"),n=r===null?!1:r===""?!0:r;return t.symbol=n,t}}}},yte=[lee,ete,tte,rte,nte,ute,fte,dte,pte,gte,mte];Nee(yte,{mixoutsTo:Jo});Jo.noAuto;Jo.config;Jo.library;Jo.dom;const uC=Jo.parse;Jo.findIconDefinition;Jo.toHtml;const bte=Jo.icon;Jo.layer;Jo.text;Jo.counter;var rB={exports:{}},wte="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",vte=wte,xte=vte;function nB(){}function iB(){}iB.resetWarningCache=nB;var Ete=function(){function t(n,i,s,o,a,c){if(c!==xte){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}t.isRequired=t;function e(){return t}var r={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:iB,resetWarningCache:nB};return r.PropTypes=r,r};rB.exports=Ete();var Cte=rB.exports;const dr=is(Cte);function QI(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Fc(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};
647e%2?QI(Object(r),!0).forEach(function(n){fp(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):QI(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function d3(t){"@babel/helpers - typeof";return d3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d3(t)}function fp(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _te(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,s;for(s=0;s<n.length;s++)i=n[s],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}function Ate(t,e){if(t==null)return{};var r=_te(t,e),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)n=s[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function fC(t){return Ste(t)||Nte(t)||Ite(t)||Tte()}function Ste(t){if(Array.isArray(t))return dC(t)}function Nte(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Ite(t,e){if(t){if(typeof t=="string")return dC(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return dC(t,e)}}function dC(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Tte(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 648In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kte(t){var e,r=t.beat,n=t.fade,i=t.beatFade,s=t.bounce,o=t.shake,a=t.flash,c=t.spin,l=t.spinPulse,u=t.spinReverse,f=t.pulse,d=t.fixedWidth,p=t.inverse,h=t.border,g=t.listItem,y=t.flip,x=t.size,C=t.rotation,_=t.pull,L=(e={"fa-beat":r,"fa-fade":n,"fa-beat-fade":i,"fa-bounce":s,"fa-shake":o,"fa-flash":a,"fa-spin":c,"fa-spin-reverse":u,"fa-spin-pulse":l,"fa-pulse":f,"fa-fw":d,"fa-inverse":p,"fa-border":h,"fa-li":g,"fa-flip":y===!0,"fa-flip-horizontal":y==="horizontal"||y==="both","fa-flip-vertical":y==="vertical"||y==="both"},fp(e,"fa-".concat(x),typeof x<"u"&&x!==null),fp(e,"fa-rotate-".concat(C),typeof C<"u"&&C!==null&&C!==0),fp(e,"fa-pull-".concat(_),typeof _<"u"&&_!==null),fp(e,"fa-swap-opacity",t.swapOpacity),e);return Object.keys(L).map(function(P){return L[P]?P:null}).filter(function(P){return P})}function Pte(t){return t=t-0,t===t}function sB(t){return Pte(t)?t:(t=t.replace(/[\-_\s]+(.)?/g,function(e,r){return r?r.toUpperCase():""}),t.substr(0,1).toLowerCase()+t.substr(1))}var Rte=["style"];function Ote(t){return t.charAt(0).toUpperCase()+t.slice(1)}function Dte(t){return t.split(";").map(function(e){return e.trim()}).filter(function(e){return e}).reduce(function(e,r){var n=r.indexOf(":"),i=sB(r.slice(0,n)),s=r.slice(n+1).trim();return i.startsWith("webkit")?e[Ote(i)]=s:e[i]=s,e},{})}function oB(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(typeof e=="string")return e;var n=(e.children||[]).map(function(c){return oB(t,c)}),i=Object.keys(e.attributes||{}).reduce(function(c,l){var u=e.attributes[l];switch(l){case"class":c.attrs.className=u,delete e.attributes.class;break;case"style":c.attrs.style=Dte(u);break;default:l.indexOf("aria-")===0||l.indexOf("data-")===0?c.attrs[l.toLowerCase()]=u:c.attrs[sB(l)]=u}return c},{attrs:{}}),s=r.style,o=s===void 0?{}:s,a=Ate(r,Rte);return i.attrs.style=Fc(Fc({},i.attrs.style),o),t.apply(void 0,[e.tag,Fc(Fc({},i.attrs),a)].concat(fC(n)))}var aB=!1;try{aB=!0}catch{}function Lte(){if(!aB&&console&&typeof console.error=="function"){var t;(t=console).error.apply(t,arguments)}}function XI(t){if(t&&d3(t)==="object"&&t.prefix&&t.iconName&&t.icon)return t;if(uC.icon)return uC.icon(t);if(t===null)return null;if(t&&d3(t)==="object"&&t.prefix&&t.iconName)return t;if(Array.isArray(t)&&t.length===2)return{prefix:t[0],iconName:t[1]};if(typeof t=="string")return{prefix:"fas",iconName:t}}function H5(t,e){return Array.isArray(e)&&e.length>0||!Array.isArray(e)&&e?fp({},t,e):{}}var eT={border:!1,className:"",mask:null,maskId:null,fixedWidth:!1,inverse:!1,flip:!1,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:null,transform:null,swapOpacity:!1},ni=Be.forwardRef(function(t,e){var r=Fc(Fc({},eT),t),n=r.icon,i=r.mask,s=r.symbol,o=r.className,a=r.title,c=r.titleId,l=r.maskId,u=XI(n),f=H5("classes",[].concat(fC(kte(r)),fC((o||"").split(" ")))),d=H5("transform",typeof r.transform=="string"?uC.transform(r.transform):r.transform),p=H5("mask",XI(i)),h=bte(u,Fc(Fc(Fc(Fc({},f),d),p),{},{symbol:s,title:a,titleId:c,maskId:l}));if(!h)return Lte("Could not find icon",u),null;var g=h.abstract,y={ref:e};return Object.keys(r).forEach(function(x){eT.hasOwnProperty(x)||(y[x]=r[x])}),Mte(g[0],y)});ni.displayName="FontAwesomeIcon";ni.propTypes={beat:dr.bool,border:dr.bool,beatFade:dr.bool,bounce:dr.bool,className:dr.string,fade:dr.bool,flash:dr.bool,mask:dr.oneOfType([dr.object,dr.array,dr.string]),maskId:dr.string,fixedWidth:dr.bool,inverse:dr.bool,flip:dr.oneOf([
648!0,!1,"horizontal","vertical","both"]),icon:dr.oneOfType([dr.object,dr.array,dr.string]),listItem:dr.bool,pull:dr.oneOf(["right","left"]),pulse:dr.bool,rotation:dr.oneOf([0,90,180,270]),shake:dr.bool,size:dr.oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:dr.bool,spinPulse:dr.bool,spinReverse:dr.bool,symbol:dr.oneOfType([dr.bool,dr.string]),title:dr.string,titleId:dr.string,transform:dr.oneOfType([dr.string,dr.object]),swapOpacity:dr.bool};var Mte=oB.bind(null,Be.createElement);const $te=()=>{const{t}=Zo("landing");return w.jsxs("div",{className:"pt-20 px-4 sm:px-6 lg:px-16 font-gilroy relative",children:[w.jsxs("div",{className:"w-[100%] mx-auto flex justify-between items-center absolute -top-20 left-0 right-0",children:[w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/p1.svg",className:" lg:block hidden scale-x-[-1] w-4/12 -translate-x-16 "}),w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/p1.svg",className:" lg:block hidden w-4/12 translate-x-16 "})]}),w.jsxs("div",{className:"flex flex-col items-center pt-20 ",children:[w.jsxs("div",{className:"",children:[w.jsxs("h1",{className:" leading-8 text-3xl sm:text-5xl lg:text-6xl text-center tracking-wide font-medium ",style:{backgroundClip:"text",color:"transparent",backgroundImage:"linear-gradient(to right, #0285FF, #FFFFFF, #FFFFFF, #1EEF32)",WebkitBackgroundClip:"text"},children:[t("title"),w.jsx("br",{}),w.jsx("span",{className:" text-2xl sm:text-3xl lg:text-2xl",style:{backgroundClip:"text",color:"transparent",backgroundImage:"linear-gradient(to right, #0285FF, #FFFFFF, #FFFFFF, #1EEF32)",WebkitBackgroundClip:"text"},children:t("subtitle")})]}),w.jsxs("p",{className:" mt-3 text-center ",children:[t("description")," "]})]}),w.jsx("div",{className:" mt-10 ",children:w.jsxs("a",{href:"/home",target:"_blank",children:[" ",w.jsxs("button",{className:" font-semibold flex items-center gap-2 px-5 py-2 bg-gradient-to-r from-[#0285FF] to-[#1EEF32] rounded-full ",children:[t("getStarted"),w.jsx("span",{className:" w-5 h-5 border border-white rounded-full flex justify-center items-center -rotate-45 text-sm ",children:w.jsx(ni,{icon:Af})})]})]})}),w.jsxs("div",{"data-aos":"fade-up",className:" relative mt-10 ",children:[w.jsxs("div",{className:" flex sm:flex-row flex-col justify-around grp ",children:[w.jsxs("div",{className:" flex flex-row lg:justify-t justify-center translate-x-5 ",children:[w.jsx("div",{"data-aos":"fade-right","data-aos-duration":"1000",className:"w-40 h-48 relative ",children:w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/learn.svg",alt:"Learn",className:"w-full h-full object-cover"})}),w.jsx("div",{"data-aos":"fade-right","data-aos-duration":"2000",className:"w-40 h-48 relative sm:mt-16",children:w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/earn.svg",alt:"Earn",className:"w-full h-full object-cover"})})]}),w.jsxs("div",{className:"flex flex-col items-center justify-center mt-14 ",children:[w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/assets/SKL_MAscot_Wave_Landscape.gif",className:" sm:w-12/12 z-20 "}),w.jsx("div",{className:"w-full sm:hidden block -translate-y-16 ",children:w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/Group.svg",className:"sm:w-1/2 mx-auto z-0"})})]}),w.jsxs("div",{className:" flex flex-row lg:justify-t justify-center -translate-x-5",children:[w.jsxs("div",{"data-aos":"fade-up","data-aos-duration":"1000",className:"w-40 h-48 relative sm:mt-16",children:[w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/grow.svg",alt:"Repeat",className:"w-full h-full object-cover"}),w.jsx("div",{className:"w-10 absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2",children:w.jsx("svg",{width:"30",height:"30",viewBox:"0 0 47 50",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w.jsx("path",{d:"M0 50V31.25H9.375V50H0ZM18.75 50V15.625H28.125V50H18.75ZM37.5 50V0H46.875V50H37.5Z",fill:"white"})})})]}),w.jsxs("div",{"data-aos":"fade-up","data-aos-duration":"2000",className:"w-40 h-48 relative ",children:[w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/repeat.svg",alt:"Repeat",className:"w-full h-full object-cover"}),w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/section26.svg",alt:"Overlay",className:"w-10 absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2"})]})]})]}),w.jsx("div",{className:"w-full sm:block hidden -translate-y-40",children:w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/Group.svg",className:"w-[70%] mx-auto z-0"})})]})]})]})},c$e="https://web.skilleareum.ai",hC="https://web.skilleareum.ai",l$e="0x13A297B8b4aF710A67e9bf1d8b02Afc106DE1e99",u$e="https://red-special-sea.bsc.quiknode.pro/71805dc676a9b32991fd57b913fd3b7b6dff75f2",f$e=async t=>{};function cB(t,e){return function(){return t.apply(e,arguments)}}const{toString:Ute}=Object.prototype,{getPrototypeOf:I9}=Object,{iterator:Z4,toStringTag:lB}=Symbol,J4=(t=>e=>{const r=Ute.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),wc=t=>(t=t.toLowerCase(),e=>J4(e)===t),Q4=t=>e=>typeof e===t,{isArray:kg}=Array,w2=Q4("undefined");function Bte(t){return t!==null&&!w2(t)&&t.constructor!==null&&!w2(t.constructor)&&Ao(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const uB=wc("ArrayBuffer");function Fte(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&uB(t.buffer),e}const jte=Q4("string"),Ao=Q4("function"),fB=Q4("number"),X4=t=>t!==null&&typeof t=="object",zte=t=>t===!0||t===!1,iv=t=>{if(J4(t)!=="object")return!1;const e=I9(t);
vendor: 3,280 bytes, line 648
648return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(lB in t)&&!(Z4 in t)},Wte=wc("Date"),Hte=wc("File"),qte=wc("Blob"),Vte=wc("FileList"),Kte=t=>X4(t)&&Ao(t.pipe),Gte=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Ao(t.append)&&((e=J4(t))==="formdata"||e==="object"&&Ao(t.toString)&&t.toString()==="[object FormData]"))},Yte=wc("URLSearchParams"),[Zte,Jte,Qte,Xte]=["ReadableStream","Request","Response","Headers"].map(wc),ere=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function jy(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,i;if(typeof t!="object"&&(t=[t]),kg(t))for(n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else{const s=r?Object.getOwnPropertyNames(t):Object.keys(t),o=s.length;let a;for(n=0;n<o;n++)a=s[n],e.call(null,t[a],a,t)}}function dB(t,e){e=e.toLowerCase();const r=Object.keys(t);let n=r.length,i;for(;n-- >0;)if(i=r[n],e===i.toLowerCase())return i;return null}const Vd=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,hB=t=>!w2(t)&&t!==Vd;function pC(){const{caseless:t}=hB(this)&&this||{},e={},r=(n,i)=>{const s=t&&dB(e,i)||i;iv(e[s])&&iv(n)?e[s]=pC(e[s],n):iv(n)?e[s]=pC({},n):kg(n)?e[s]=n.slice():e[s]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&jy(arguments[n],r);return e}const tre=(t,e,r,{allOwnKeys:n}={})=>(jy(e,(i,s)=>{r&&Ao(i)?t[s]=cB(i,r):t[s]=i},{allOwnKeys:n}),t),rre=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),nre=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},ire=(t,e,r,n)=>{let i,s,o;const a={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),s=i.length;s-- >0;)o=i[s],(!n||n(o,t,e))&&!a[o]&&(e[o]=t[o],a[o]=!0);t=r!==!1&&I9(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},sre=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return n!==-1&&n===r},ore=t=>{if(!t)return null;if(kg(t))return t;let e=t.length;if(!fB(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},are=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&I9(Uint8Array)),cre=(t,e)=>{const n=(t&&t[Z4]).call(t);let i;for(;(i=n.next())&&!i.done;){const s=i.value;e.call(t,s[0],s[1])}},lre=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},ure=wc("HTMLFormElement"),fre=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),tT=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),dre=wc("RegExp"),pB=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};jy(r,(i,s)=>{let o;(o=e(i,s,t))!==!1&&(n[s]=o||i)}),Object.defineProperties(t,n)},hre=t=>{pB(t,(e,r)=>{if(Ao(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(Ao(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},pre=(t,e)=>{const r={},n=i=>{i.forEach(s=>{r[s]=!0})};return kg(t)?n(t):n(String(t).split(e)),r},gre=()=>{},mre=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function yre(t){return!!(t&&Ao(t.append)&&t[lB]==="FormData"&&t[Z4])}const bre=t=>{const e=new Array(10),r=(n,i)=>
vendor: 4,503 bytes, line 648
648{if(X4(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[i]=n;const s=kg(n)?[]:{};return jy(n,(o,a)=>{const c=r(o,i+1);!w2(c)&&(s[a]=c)}),e[i]=void 0,s}}return n};return r(t,0)},wre=wc("AsyncFunction"),vre=t=>t&&(X4(t)||Ao(t))&&Ao(t.then)&&Ao(t.catch),gB=((t,e)=>t?setImmediate:e?((r,n)=>(Vd.addEventListener("message",({source:i,data:s})=>{i===Vd&&s===r&&n.length&&n.shift()()},!1),i=>{n.push(i),Vd.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Ao(Vd.postMessage)),xre=typeof queueMicrotask<"u"?queueMicrotask.bind(Vd):typeof process<"u"&&process.nextTick||gB,Ere=t=>t!=null&&Ao(t[Z4]),ge={isArray:kg,isArrayBuffer:uB,isBuffer:Bte,isFormData:Gte,isArrayBufferView:Fte,isString:jte,isNumber:fB,isBoolean:zte,isObject:X4,isPlainObject:iv,isReadableStream:Zte,isRequest:Jte,isResponse:Qte,isHeaders:Xte,isUndefined:w2,isDate:Wte,isFile:Hte,isBlob:qte,isRegExp:dre,isFunction:Ao,isStream:Kte,isURLSearchParams:Yte,isTypedArray:are,isFileList:Vte,forEach:jy,merge:pC,extend:tre,trim:ere,stripBOM:rre,inherits:nre,toFlatObject:ire,kindOf:J4,kindOfTest:wc,endsWith:sre,toArray:ore,forEachEntry:cre,matchAll:lre,isHTMLForm:ure,hasOwnProperty:tT,hasOwnProp:tT,reduceDescriptors:pB,freezeMethods:hre,toObjectSet:pre,toCamelCase:fre,noop:gre,toFiniteNumber:mre,findKey:dB,global:Vd,isContextDefined:hB,isSpecCompliantForm:yre,toJSONObject:bre,isAsyncFn:wre,isThenable:vre,setImmediate:gB,asap:xre,isIterable:Ere};function Qt(t,e,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}ge.inherits(Qt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ge.toJSONObject(this.config),code:this.code,status:this.status}}});const mB=Qt.prototype,yB={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{yB[t]={value:t}});Object.defineProperties(Qt,yB);Object.defineProperty(mB,"isAxiosError",{value:!0});Qt.from=(t,e,r,n,i,s)=>{const o=Object.create(mB);return ge.toFlatObject(t,o,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),Qt.call(o,t.message,e,r,n,i),o.cause=t,o.name=t.name,s&&Object.assign(o,s),o};const Cre=null;function gC(t){return ge.isPlainObject(t)||ge.isArray(t)}function bB(t){return ge.endsWith(t,"[]")?t.slice(0,-2):t}function rT(t,e,r){return t?t.concat(e).map(function(i,s){return i=bB(i),!r&&s?"["+i+"]":i}).join(r?".":""):e}function _re(t){return ge.isArray(t)&&!t.some(gC)}const Are=ge.toFlatObject(ge,{},null,function(e){return/^is[A-Z]/.test(e)});function ex(t,e,r){if(!ge.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=ge.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,y){return!ge.isUndefined(y[g])});const n=r.metaTokens,i=r.visitor||u,s=r.dots,o=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&ge.isSpecCompliantForm(e);if(!ge.isFunction(i))throw new TypeError("visitor must be a function");function l(h){if(h===null)return"";if(ge.isDate(h))return h.toISOString();if(ge.isBoolean(h))return h.toString();if(!c&&ge.isBlob(h))throw new Qt("Blob is not supported. Use a Buffer instead.");return ge.isArrayBuffer(h)||ge.isTypedArray(h)?c&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,g,y){let x=h;if(h&&!y&&typeof h=="object"){if(ge.endsWith(g,"{}"))g=n?g:g.slice(0,-2),h=JSON.stringify(h);else if(ge.isArray(h)&&_re(h)||(ge.isFileList(h)||ge.endsWith(g,"[]"))&&(x=ge.toArray(h)))return g=bB(g),x.forEach(function(_,L){!(ge.isUndefined(_)||_===null)&&e.append(o===!0?rT([g],L,s):o===null?g:g+"[]",l(_))}),!1}return gC(h)?!0:(e.append(rT(y,g,s),l(h)),!1)}const f=[],d=Object.assign(Are,{defaultVisitor:u,convertValue:l,isVisitable:gC});function p(h,g){if(!ge.isUndefined(h)){if(f.indexOf(h)!==-1)throw Error("Circular reference detected in "+g.join("."));f.push(h),ge.forEach(h,function(x,C){(!(ge.isUndefined(x)||x===null)&&i.call(e,x,ge.isString(C)?C.trim():C,g,d))===!0&&p(x,g?g.concat(C):[C])}),f.pop()}}if(!ge.isObject(t))throw new TypeError("data must be an object");return p(t),e}
vendor: 5,473 bytes, lines 648-649
648function nT(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function T9(t,e){this._pairs=[],t&&ex(t,this,e)}const wB=T9.prototype;wB.append=function(e,r){this._pairs.push([e,r])};wB.toString=function(e){const r=e?function(n){return e.call(this,n,nT)}:nT;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function Sre(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function vB(t,e,r){if(!e)return t;const n=r&&r.encode||Sre;ge.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let s;if(i?s=i(e,r):s=ge.isURLSearchParams(e)?e.toString():new T9(e,r).toString(n),s){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class iT{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ge.forEach(this.handlers,function(n){n!==null&&e(n)})}}const xB={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Nre=typeof URLSearchParams<"u"?URLSearchParams:T9,Ire=typeof FormData<"u"?FormData:null,Tre=typeof Blob<"u"?Blob:null,kre={isBrowser:!0,classes:{URLSearchParams:Nre,FormData:Ire,Blob:Tre},protocols:["http","https","file","blob","url","data"]},k9=typeof window<"u"&&typeof document<"u",mC=typeof navigator=="object"&&navigator||void 0,Pre=k9&&(!mC||["ReactNative","NativeScript","NS"].indexOf(mC.product)<0),Rre=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ore=k9&&window.location.href||"http://localhost",Dre=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:k9,hasStandardBrowserEnv:Pre,hasStandardBrowserWebWorkerEnv:Rre,navigator:mC,origin:Ore},Symbol.toStringTag,{value:"Module"})),Ss={...Dre,...kre};function Lre(t,e){return ex(t,new Ss.classes.URLSearchParams,Object.assign({visitor:function(r,n,i,s){return Ss.isNode&&ge.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function Mre(t){return ge.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function $re(t){const e={},r=Object.keys(t);let n;const i=r.length;let s;for(n=0;n<i;n++)s=r[n],e[s]=t[s];return e}function EB(t){function e(r,n,i,s){let o=r[s++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),c=s>=r.length;return o=!o&&ge.isArray(i)?i.length:o,c?(ge.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!a):((!i[o]||!ge.isObject(i[o]))&&(i[o]=[]),e(r,n,i[o],s)&&ge.isArray(i[o])&&(i[o]=$re(i[o])),!a)}if(ge.isFormData(t)&&ge.isFunction(t.entries)){const r={};return ge.forEachEntry(t,(n,i)=>{e(Mre(n),i,r,0)}),r}return null}function Ure(t,e,r){if(ge.isString(t))try{return(e||JSON.parse)(t),ge.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}const zy={transitional:xB,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,s=ge.isObject(e);if(s&&ge.isHTMLForm(e)&&(e=new FormData(e)),ge.isFormData(e))return i?JSON.stringify(EB(e)):e;if(ge.isArrayBuffer(e)||ge.isBuffer(e)||ge.isStream(e)||ge.isFile(e)||ge.isBlob(e)||ge.isReadableStream(e))return e;if(ge.isArrayBufferView(e))return e.buffer;if(ge.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Lre(e,this.formSerializer).toString();if((a=ge.isFileList(e))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return ex(a?{"files[]":e}:e,c&&new c,this.formSerializer)}}return s||i?(r.setContentType("application/json",!1),Ure(e)):e}],transformResponse:[function(e){const r=this.transitional||zy.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(ge.isResponse(e)||ge.isReadableStream(e))return e;if(e&&ge.isString(e)&&(n&&!this.responseType||i)){const o=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(a){if(o)throw a.name==="SyntaxError"?Qt.from(a,Qt.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ss.classes.FormData,Blob:Ss.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ge.forEach(["delete","get","head","post","put","patch"],t=>{zy.headers[t]={}});const Bre=ge.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Fre=t=>{const e={};let r,n,i;return t&&t.split(` 649`).forEach(function(o){i=o.indexOf(":"),r=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim(),!(!r||e[r]&&Bre[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e},sT=Symbol("internals");function o1(t){return t&&String(t).trim().toLowerCase()}function sv(t){return t===!1||t==null?t:ge.isArray(t)?t.map(sv):String(t)}function jre(t){const e=Object.create(null),r=/([^\s,;
649=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}const zre=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function q5(t,e,r,n,i){if(ge.isFunction(n))return n.call(this,e,r);if(i&&(e=r),!!ge.isString(e)){if(ge.isString(n))return e.indexOf(n)!==-1;if(ge.isRegExp(n))return n.test(e)}}function Wre(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function Hre(t,e){const r=ge.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(i,s,o){return this[n].call(this,e,i,s,o)},configurable:!0})})}let So=class{constructor(e){e&&this.set(e)}set(e,r,n){const i=this;function s(a,c,l){const u=o1(c);if(!u)throw new Error("header name must be a non-empty string");const f=ge.findKey(i,u);(!f||i[f]===void 0||l===!0||l===void 0&&i[f]!==!1)&&(i[f||c]=sv(a))}const o=(a,c)=>ge.forEach(a,(l,u)=>s(l,u,c));if(ge.isPlainObject(e)||e instanceof this.constructor)o(e,r);else if(ge.isString(e)&&(e=e.trim())&&!zre(e))o(Fre(e),r);else if(ge.isObject(e)&&ge.isIterable(e)){let a={},c,l;for(const u of e){if(!ge.isArray(u))throw TypeError("Object iterator must return a key-value pair");a[l=u[0]]=(c=a[l])?ge.isArray(c)?[...c,u[1]]:[c,u[1]]:u[1]}o(a,r)}else e!=null&&s(r,e,n);return this}get(e,r){if(e=o1(e),e){const n=ge.findKey(this,e);if(n){const i=this[n];if(!r)return i;if(r===!0)return jre(i);if(ge.isFunction(r))return r.call(this,i,n);if(ge.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=o1(e),e){const n=ge.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||q5(this,this[n],n,r)))}return!1}delete(e,r){const n=this;let i=!1;function s(o){if(o=o1(o),o){const a=ge.findKey(n,o);a&&(!r||q5(n,n[a],a,r))&&(delete n[a],i=!0)}}return ge.isArray(e)?e.forEach(s):s(e),i}clear(e){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const s=r[n];(!e||q5(this,this[s],s,e,!0))&&(delete this[s],i=!0)}return i}normalize(e){const r=this,n={};return ge.forEach(this,(i,s)=>{const o=ge.findKey(n,s);if(o){r[o]=sv(i),delete r[s];return}const a=e?Wre(s):String(s).trim();a!==s&&delete r[s],r[a]=sv(i),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return ge.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=e&&ge.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(` 650`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const n=new this(e);return r.forEach(i=>n.set(i)),n}static accessor(e){const n=(this[sT]=this[sT]={accessors:{}}).accessors,i=this.prototype;function s(o){const a=o1(o);n[a]||(Hre(i,o),n[a]=!0)}return ge.isArray(e)?e.forEach(s):s(e),this}};So.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ge.reduceDescriptors(So.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});ge.freezeMethods(So);function V5(t,e){const r=this||zy,n=e||r,i=So.from(n.headers);let s=n.data;return ge.forEach(t,function(a){s=a.call(r,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function CB(t){return!!(t&&t.__CANCEL__)}function Pg(t,e,r){Qt.call(this,t??"canceled",Qt.ERR_CANCELED,e,r),this.name="CanceledError"}ge.inherits(Pg,Qt,{__CANCEL__:!0});function _B(t,e,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new Qt("Request failed with status code "+r.status,[Qt.ERR_BAD_REQUEST,Qt.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function qre(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Vre(t,e){t=t||10;const r=new Array(t),n=new Array(t);let i=0,s=0,o;return e=e!==void 0?e:1e3,function(c){const l=Date.now(),u=n[s];o||(o=l),r[i]=c,n[i]=l;let f=s,d=0;for(;f!==i;)d+=r[f++],f=f%t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),l-o<e)return;const p=u&&l-u;return p?Math.round(d*1e3/p):void 0}}function Kre(t,e){let r=0,n=1e3/e,i,s;const o=(l,u=Date.now())=>
vendor: 7,051 bytes, line 650
650{r=u,i=null,s&&(clearTimeout(s),s=null),t.apply(null,l)};return[(...l)=>{const u=Date.now(),f=u-r;f>=n?o(l,u):(i=l,s||(s=setTimeout(()=>{s=null,o(i)},n-f)))},()=>i&&o(i)]}const h3=(t,e,r=3)=>{let n=0;const i=Vre(50,250);return Kre(s=>{const o=s.loaded,a=s.lengthComputable?s.total:void 0,c=o-n,l=i(c),u=o<=a;n=o;const f={loaded:o,total:a,progress:a?o/a:void 0,bytes:c,rate:l||void 0,estimated:l&&a&&u?(a-o)/l:void 0,event:s,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(f)},r)},oT=(t,e)=>{const r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},aT=t=>(...e)=>ge.asap(()=>t(...e)),Gre=Ss.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,Ss.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(Ss.origin),Ss.navigator&&/(msie|trident)/i.test(Ss.navigator.userAgent)):()=>!0,Yre=Ss.hasStandardBrowserEnv?{write(t,e,r,n,i,s){const o=[t+"="+encodeURIComponent(e)];ge.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),ge.isString(n)&&o.push("path="+n),ge.isString(i)&&o.push("domain="+i),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Zre(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Jre(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function AB(t,e,r){let n=!Zre(e);return t&&(n||r==!1)?Jre(t,e):e}const cT=t=>t instanceof So?{...t}:t;function Ih(t,e){e=e||{};const r={};function n(l,u,f,d){return ge.isPlainObject(l)&&ge.isPlainObject(u)?ge.merge.call({caseless:d},l,u):ge.isPlainObject(u)?ge.merge({},u):ge.isArray(u)?u.slice():u}function i(l,u,f,d){if(ge.isUndefined(u)){if(!ge.isUndefined(l))return n(void 0,l,f,d)}else return n(l,u,f,d)}function s(l,u){if(!ge.isUndefined(u))return n(void 0,u)}function o(l,u){if(ge.isUndefined(u)){if(!ge.isUndefined(l))return n(void 0,l)}else return n(void 0,u)}function a(l,u,f){if(f in e)return n(l,u);if(f in t)return n(void 0,l)}const c={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(l,u,f)=>i(cT(l),cT(u),f,!0)};return ge.forEach(Object.keys(Object.assign({},t,e)),function(u){const f=c[u]||i,d=f(t[u],e[u],u);ge.isUndefined(d)&&f!==a||(r[u]=d)}),r}const SB=t=>{const e=Ih({},t);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:a}=e;e.headers=o=So.from(o),e.url=vB(AB(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(ge.isFormData(r)){if(Ss.hasStandardBrowserEnv||Ss.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((c=o.getContentType())!==!1){const[l,...u]=c?c.split(";").map(f=>f.trim()).filter(Boolean):[];o.setContentType([l||"multipart/form-data",...u].join("; "))}}if(Ss.hasStandardBrowserEnv&&(n&&ge.isFunction(n)&&(n=n(e)),n||n!==!1&&Gre(e.url))){const l=i&&s&&Yre.read(s);l&&o.set(i,l)}return e},Qre=typeof XMLHttpRequest<"u",Xre=Qre&&function(t){return new Promise(function(r,n){const i=SB(t);let s=i.data;const o=So.from(i.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:l}=i,u,f,d,p,h;function g(){p&&p(),h&&h(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let y=new XMLHttpRequest;y.open(i.method.toUpperCase(),i.url,!0),y.timeout=i.timeout;function x(){if(!y)return;const _=So.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),P={data:!a||a==="text"||a==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:_,config:t,request:y};_B(function(W){r(W),g()},function(W){n(W),g()},P),y=null}"onloadend"in y?y.onloadend=x:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(x)},y.onabort=function(){y&&(n(new Qt("Request aborted",Qt.ECONNABORTED,t,y)),y=null)},y.onerror=function(){n(new Qt("Network Error",Qt.ERR_NETWORK,t,y)),y=null},y.ontimeout=function(){let L=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const P=i.transitional||xB;i.timeoutErrorMessage&&(L=i.timeoutErrorMessage),n(new Qt(L,P.clarifyTimeoutError?Qt.ETIMEDOUT:Qt.ECONNABORTED,t,y)),y=null},s===void 0&&o.setContentType(null),"setRequestHeader"in y&&ge.forEach(o.toJSON(),function(L,P){y.setRequestHeader(P,L)}),ge.isUndefined(i.withCredentials)||(y.withCredentials=!!i.withCredentials),a&&a!=="json"&&(y.responseType=i.responseType),l&&([d,h]=h3(l,!0),y.addEventListener("progress",d)),c&&y.upload&&([f,p]=h3(c),y.upload.addEventListener("progress",f),y.upload.addEventListener("loadend",p)),(i.cancelToken||i.signal)&&(u=_=>{y&&(n(!_||_.type?new Pg(null,t,y):_),y.abort(),y=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const C=qre(i.url);if(C&&Ss.protocols.indexOf(C)===-1){n(new Qt("Unsupported protocol "+C+":",Qt.ERR_BAD_REQUEST,t));return}y.send(s||null)})},ene=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let n=new AbortController,i;const s=function(l){if(!i){i=!0,a();const u=l instanceof Error?l:this.reason;n.abort(u instanceof Qt?u:new Pg(u instanceof Error?u.message:u))}};let o=e&&setTimeout(()=>{o=null,s(new Qt(`timeout ${e} of ms exceeded`,Qt.ETIMEDOUT))},e);const a=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),t=null)};t.forEach(l=>l.addEventListener("abort",s));const{signal:c}=n;return c.unsubscribe=()=>ge.asap(a),c}},tne=function*(t,e){let r=t.byteLength;if(r<e){yield t;return}let n=0,i;for(;n<r;)i=n+e,yield t.slice(n,i),n=i},rne=async function*(t,e){for await(const r of nne(t))yield*tne(r,e)},nne=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:r,value:n}=await e.read();if(r)break;yield n}}finally{await e.cancel()}},lT=(t,e,r,n)=>{const i=rne(t,e);let s=0,o,a=c=>{o||(o=!0,n&&n(c))};return new ReadableStream({async pull(c){try{const{done:l,value:u}=await i.next();if(l){a(),c.close();return}let f=u.byteLength;if(r){let d=s+=f;r(d)}c.enqueue(new Uint8Array(u))}catch(l){throw a(l),l}},cancel(c){return a(c),i.return()}},{highWaterMark:2})},tx=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",NB=tx&&typeof ReadableStream=="function",ine=tx&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),IB=(t,...e)=>{try{return!!t(...e)}catch{return!1}},sne=NB&&IB(()=>{let t=!1;
650const e=new Request(Ss.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),uT=64*1024,yC=NB&&IB(()=>ge.isReadableStream(new Response("").body)),p3={stream:yC&&(t=>t.body)};tx&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!p3[e]&&(p3[e]=ge.isFunction(t[e])?r=>r[e]():(r,n)=>{throw new Qt(`Response type '${e}' is not supported`,Qt.ERR_NOT_SUPPORT,n)})})})(new Response);const one=async t=>{if(t==null)return 0;if(ge.isBlob(t))return t.size;if(ge.isSpecCompliantForm(t))return(await new Request(Ss.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(ge.isArrayBufferView(t)||ge.isArrayBuffer(t))return t.byteLength;if(ge.isURLSearchParams(t)&&(t=t+""),ge.isString(t))return(await ine(t)).byteLength},ane=async(t,e)=>{const r=ge.toFiniteNumber(t.getContentLength());return r??one(e)},cne=tx&&(async t=>{let{url:e,method:r,data:n,signal:i,cancelToken:s,timeout:o,onDownloadProgress:a,onUploadProgress:c,responseType:l,headers:u,withCredentials:f="same-origin",fetchOptions:d}=SB(t);l=l?(l+"").toLowerCase():"text";let p=ene([i,s&&s.toAbortSignal()],o),h;const g=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let y;try{if(c&&sne&&r!=="get"&&r!=="head"&&(y=await ane(u,n))!==0){let P=new Request(e,{method:"POST",body:n,duplex:"half"}),z;if(ge.isFormData(n)&&(z=P.headers.get("content-type"))&&u.setContentType(z),P.body){const[W,B]=oT(y,h3(aT(c)));n=lT(P.body,uT,W,B)}}ge.isString(f)||(f=f?"include":"omit");const x="credentials"in Request.prototype;h=new Request(e,{...d,signal:p,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:x?f:void 0});let C=await fetch(h,d);const _=yC&&(l==="stream"||l==="response");if(yC&&(a||_&&g)){const P={};["status","statusText","headers"].forEach(I=>{P[I]=C[I]});const z=ge.toFiniteNumber(C.headers.get("content-length")),[W,B]=a&&oT(z,h3(aT(a),!0))||[];C=new Response(lT(C.body,uT,W,()=>{B&&B(),g&&g()}),P)}l=l||"text";let L=await p3[ge.findKey(p3,l)||"text"](C,t);return!_&&g&&g(),await new Promise((P,z)=>{_B(P,z,{data:L,headers:So.from(C.headers),status:C.status,statusText:C.statusText,config:t,request:h})})}catch(x){throw g&&g(),x&&x.name==="TypeError"&&/Load failed|fetch/i.test(x.message)?Object.assign(new Qt("Network Error",Qt.ERR_NETWORK,t,h),{cause:x.cause||x}):Qt.from(x,x&&x.code,t,h)}}),bC={http:Cre,xhr:Xre,fetch:cne};ge.forEach(bC,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const fT=t=>`- ${t}`,lne=t=>ge.isFunction(t)||t===null||t===!1,TB={getAdapter:t=>{t=ge.isArray(t)?t:[t];const{length:e}=t;let r,n;const i={};for(let s=0;s<e;s++){r=t[s];let o;if(n=r,!lne(r)&&(n=bC[(o=String(r)).toLowerCase()],n===void 0))throw new Qt(`Unknown adapter '${o}'`);if(n)break;i[o||"#"+s]=n}if(!n){const s=Object.entries(i).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let o=e?s.length>1?`since : 651`+s.map(fT).join(` 652`):" "+fT(s[0]):"as no adapter specified";throw new Qt("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return n},adapters:bC};function K5(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Pg(null,t)}function dT(t){return K5(t),t.headers=So.from(t.headers),t.data=V5.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),TB.getAdapter(t.adapter||zy.adapter)(t).then(function(n){return K5(t),n.data=V5.call(t,t.transformResponse,n),n.headers=So.from(n.headers),n},function(n){return CB(n)||(K5(t),n&&n.response&&(n.response.data=V5.call(t,t.transformResponse,n.response),n.response.headers=So.from(n.response.headers))),Promise.reject(n)})}const kB="1.10.0",rx={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{rx[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const hT={};rx.transitional=function(e,r,n){function i(s,o){return"[Axios v"+kB+"] Transitional option '"+s+"'"+o+(n?". "+n:"")}return(s,o,a)=>
vendor: 4,476 bytes, lines 652-653
652{if(e===!1)throw new Qt(i(o," has been removed"+(r?" in "+r:"")),Qt.ERR_DEPRECATED);return r&&!hT[o]&&(hT[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(s,o,a):!0}};rx.spelling=function(e){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function une(t,e,r){if(typeof t!="object")throw new Qt("options must be an object",Qt.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let i=n.length;for(;i-- >0;){const s=n[i],o=e[s];if(o){const a=t[s],c=a===void 0||o(a,s,t);if(c!==!0)throw new Qt("option "+s+" must be "+c,Qt.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Qt("Unknown option "+s,Qt.ERR_BAD_OPTION)}}const ov={assertOptions:une,validators:rx},Sc=ov.validators;let ch=class{constructor(e){this.defaults=e||{},this.interceptors={request:new iT,response:new iT}}async request(e,r){try{return await this._request(e,r)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=` 653`+s):n.stack=s}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=Ih(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:s}=r;n!==void 0&&ov.assertOptions(n,{silentJSONParsing:Sc.transitional(Sc.boolean),forcedJSONParsing:Sc.transitional(Sc.boolean),clarifyTimeoutError:Sc.transitional(Sc.boolean)},!1),i!=null&&(ge.isFunction(i)?r.paramsSerializer={serialize:i}:ov.assertOptions(i,{encode:Sc.function,serialize:Sc.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),ov.assertOptions(r,{baseUrl:Sc.spelling("baseURL"),withXsrfToken:Sc.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=s&&ge.merge(s.common,s[r.method]);s&&ge.forEach(["delete","get","head","post","put","patch","common"],h=>{delete s[h]}),r.headers=So.concat(o,s);const a=[];let c=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(r)===!1||(c=c&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const l=[];this.interceptors.response.forEach(function(g){l.push(g.fulfilled,g.rejected)});let u,f=0,d;if(!c){const h=[dT.bind(this),void 0];for(h.unshift.apply(h,a),h.push.apply(h,l),d=h.length,u=Promise.resolve(r);f<d;)u=u.then(h[f++],h[f++]);return u}d=a.length;let p=r;for(f=0;f<d;){const h=a[f++],g=a[f++];try{p=h(p)}catch(y){g.call(this,y);break}}try{u=dT.call(this,p)}catch(h){return Promise.reject(h)}for(f=0,d=l.length;f<d;)u=u.then(l[f++],l[f++]);return u}getUri(e){e=Ih(this.defaults,e);const r=AB(e.baseURL,e.url,e.allowAbsoluteUrls);return vB(r,e.params,e.paramsSerializer)}};ge.forEach(["delete","get","head","options"],function(e){ch.prototype[e]=function(r,n){return this.request(Ih(n||{},{method:e,url:r,data:(n||{}).data}))}});ge.forEach(["post","put","patch"],function(e){function r(n){return function(s,o,a){return this.request(Ih(a||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}ch.prototype[e]=r(),ch.prototype[e+"Form"]=r(!0)});let fne=class PB{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});const n=this;this.promise.then(i=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](i);n._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(a=>{n.subscribe(a),s=a}).then(i);return o.cancel=function(){n.unsubscribe(s)},o},e(function(s,o,a){n.reason||(n.reason=new Pg(s,o,a),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const e=new AbortController,r=n=>{e.abort(n)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new PB(function(i){e=i}),cancel:e}}};function dne(t){return function(r){return t.apply(null,r)}}function hne(t){return ge.isObject(t)&&t.isAxiosError===!0}const wC={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,Re
653setContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(wC).forEach(([t,e])=>{wC[e]=t});function RB(t){const e=new ch(t),r=cB(ch.prototype.request,e);return ge.extend(r,ch.prototype,e,{allOwnKeys:!0}),ge.extend(r,e,null,{allOwnKeys:!0}),r.create=function(i){return RB(Ih(t,i))},r}const qn=RB(zy);qn.Axios=ch;qn.CanceledError=Pg;qn.CancelToken=fne;qn.isCancel=CB;qn.VERSION=kB;qn.toFormData=ex;qn.AxiosError=Qt;qn.Cancel=qn.CanceledError;qn.all=function(e){return Promise.all(e)};qn.spread=dne;qn.isAxiosError=hne;qn.mergeConfig=Ih;qn.AxiosHeaders=So;qn.formToJSON=t=>EB(ge.isHTMLForm(t)?new FormData(t):t);qn.getAdapter=TB.getAdapter;qn.HttpStatusCode=wC;qn.default=qn;const{Axios:p$e,AxiosError:g$e,CanceledError:m$e,isCancel:y$e,CancelToken:b$e,VERSION:w$e,all:v$e,Cancel:x$e,isAxiosError:E$e,spread:C$e,toFormData:_$e,AxiosHeaders:A$e,HttpStatusCode:S$e,formToJSON:N$e,getAdapter:I$e,mergeConfig:T$e}=qn;let pne={data:""},gne=t=>typeof window=="object"?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||pne,mne=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,yne=/\/\*[^]*?\*\/| +/g,pT=/\n+/g,yf=(t,e)=>{let r="",n="",i="";for(let s in t){let o=t[s];s[0]=="@"?s[1]=="i"?r=s+" "+o+";":n+=s[1]=="f"?yf(o,s):s+"{"+yf(o,s[1]=="k"?"":e)+"}":typeof o=="object"?n+=yf(o,e?e.replace(/([^,])+/g,a=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,a):a?a+" "+c:c)):s):o!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=yf.p?yf.p(s,o):s+":"+o+";")}return r+(e&&i?e+"{"+i+"}":i)+n},Tl={},OB=t=>{if(typeof t=="object"){let e="";for(let r in t)e+=r+OB(t[r]);return e}return t},bne=(t,e,r,n,i)=>{let s=OB(t),o=Tl[s]||(Tl[s]=(c=>{let l=0,u=11;for(;l<c.length;)u=101*u+c.charCodeAt(l++)>>>0;return"go"+u})(s));if(!Tl[o]){let c=s!==t?t:(l=>{let u,f,d=[{}];for(;u=mne.exec(l.replace(yne,""));)u[4]?d.shift():u[3]?(f=u[3].replace(pT," ").trim(),d.unshift(d[0][f]=d[0][f]||{})):d[0][u[1]]=u[2].replace(pT," ").trim();return d[0]})(t);Tl[o]=yf(i?{["@keyframes "+o]:c}:c,r?"":"."+o)}let a=r&&Tl.g?Tl.g:null;return r&&(Tl.g=Tl[o]),((c,l,u,f)=>{f?l.data=l.data.replace(f,c):l.data.indexOf(c)===-1&&(l.data=u?c+l.data:l.data+c)})(Tl[o],e,n,a),o},wne=(t,e,r)=>t.reduce((n,i,s)=>{let o=e[s];if(o&&o.call){let a=o(r),c=a&&a.props&&a.props.className||/^go/.test(a)&&a;o=c?"."+c:a&&typeof a=="object"?a.props?"":yf(a,""):a===!1?"":a}return n+i+(o??"")},"");function nx(t){let e=this||{},r=t.call?t(e.p):t;return bne(r.unshift?r.raw?wne(r,[].slice.call(arguments,1),e.p):r.reduce((n,i)=>Object.assign(n,i&&i.call?i(e.p):i),{}):r,gne(e.target),e.g,e.o,e.k)}let DB,vC,xC;nx.bind({g:1});let mu=nx.bind({k:1});function vne(t,e,r,n){yf.p=e,DB=t,vC=r,xC=n}function md(t,e){let r=this||{};return function(){let n=arguments;function i(s,o){let a=Object.assign({},s),c=a.className||i.className;r.p=Object.assign({theme:vC&&vC()},a),r.o=/ *go\d+/.test(c),a.className=nx.apply(r,n)+(c?" "+c:"");let l=t;return t[0]&&(l=a.as||t,delete a.as),xC&&l[0]&&xC(a),DB(l,a)}return i}}var xne=t=>typeof t=="function",g3=(t,e)=>xne(t)?t(e):t,Ene=(()=>{let t=0;return()=>(++t).toString()})(),LB=(()=>{let t;return()=>{if(t===void 0&&typeof window<"u"){let e=matchMedia("(prefers-reduced-motion: reduce)");t=!e||e.matches}return t}})(),Cne=20,MB=(t,e)=>{switch(e.type){case 0:return{...t,toasts:[e.toast,...t.toasts].slice(0,Cne)};case 1:return{...t,toasts:t.toasts.map(s=>s.id===e.toast.id?{...s,...e.toast}:s)};case 2:let{toast:r}=e;return MB(t,{type:t.toasts.find(s=>s.id===r.id)?1:0,toast:r});case 3:let{toastId:n}=e;return{...t,toasts:t.toasts.map(s=>s.id===n||n===void 0?{...s,dismissed:!0,visible:!1}:s)};case 4:return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(s=>s.id!==e.toastId)};case 5:return{...t,pausedAt:e.time};case 6:let i=e.time-(t.pausedAt||0);return{...t,pausedAt:void 0,toasts:t.toasts.map(s=>({...s,pauseDuration:s.pauseDuration+i}))}}},av=[],Kd={toasts:[],pausedAt:void 0},Yh=t=>
653{Kd=MB(Kd,t),av.forEach(e=>{e(Kd)})},_ne={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Ane=(t={})=>{let[e,r]=se.useState(Kd),n=se.useRef(Kd);se.useEffect(()=>(n.current!==Kd&&r(Kd),av.push(r),()=>{let s=av.indexOf(r);s>-1&&av.splice(s,1)}),[]);let i=e.toasts.map(s=>{var o,a,c;return{...t,...t[s.type],...s,removeDelay:s.removeDelay||((o=t[s.type])==null?void 0:o.removeDelay)||(t==null?void 0:t.removeDelay),duration:s.duration||((a=t[s.type])==null?void 0:a.duration)||(t==null?void 0:t.duration)||_ne[s.type],style:{...t.style,...(c=t[s.type])==null?void 0:c.style,...s.style}}});return{...e,toasts:i}},Sne=(t,e="blank",r)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:e,ariaProps:{role:"status","aria-live":"polite"},message:t,pauseDuration:0,...r,id:(r==null?void 0:r.id)||Ene()}),Wy=t=>(e,r)=>{let n=Sne(e,t,r);return Yh({type:2,toast:n}),n.id},Us=(t,e)=>Wy("blank")(t,e);Us.error=Wy("error");Us.success=Wy("success");Us.loading=Wy("loading");Us.custom=Wy("custom");Us.dismiss=t=>{Yh({type:3,toastId:t})};Us.remove=t=>Yh({type:4,toastId:t});Us.promise=(t,e,r)=>{let n=Us.loading(e.loading,{...r,...r==null?void 0:r.loading});return typeof t=="function"&&(t=t()),t.then(i=>{let s=e.success?g3(e.success,i):void 0;return s?Us.success(s,{id:n,...r,...r==null?void 0:r.success}):Us.dismiss(n),i}).catch(i=>{let s=e.error?g3(e.error,i):void 0;s?Us.error(s,{id:n,...r,...r==null?void 0:r.error}):Us.dismiss(n)}),t};var Nne=(t,e)=>{Yh({type:1,toast:{id:t,height:e}})},Ine=()=>{Yh({type:5,time:Date.now()})},ym=new Map,Tne=1e3,kne=(t,e=Tne)=>{if(ym.has(t))return;let r=setTimeout(()=>{ym.delete(t),Yh({type:4,toastId:t})},e);ym.set(t,r)},Pne=t=>{let{toasts:e,pausedAt:r}=Ane(t);se.useEffect(()=>{if(r)return;let s=Date.now(),o=e.map(a=>{if(a.duration===1/0)return;let c=(a.duration||0)+a.pauseDuration-(s-a.createdAt);if(c<0){a.visible&&Us.dismiss(a.id);return}return setTimeout(()=>Us.dismiss(a.id),c)});return()=>{o.forEach(a=>a&&clearTimeout(a))}},[e,r]);let n=se.useCallback(()=>{r&&Yh({type:6,time:Date.now()})},[r]),i=se.useCallback((s,o)=>{let{reverseOrder:a=!1,gutter:c=8,defaultPosition:l}=o||{},u=e.filter(p=>(p.position||l)===(s.position||l)&&p.height),f=u.findIndex(p=>p.id===s.id),d=u.filter((p,h)=>h<f&&p.visible).length;return u.filter(p=>p.visible).slice(...a?[d+1]:[0,d]).reduce((p,h)=>p+(h.height||0)+c,0)},[e]);return se.useEffect(()=>{e.forEach(s=>{if(s.dismissed)kne(s.id,s.removeDelay);else{let o=ym.get(s.id);o&&(clearTimeout(o),ym.delete(s.id))}})},[e]),{toasts:e,handlers:{updateHeight:Nne,startPause:Ine,endPause:n,calculateOffset:i}}},Rne=mu` 654from { 655 transform: scale(0) rotate(45deg); 656 opacity: 0; 657} 658to { 659 transform: scale(1) rotate(45deg); 660 opacity: 1; 661}`,One=mu` 662from { 663 transform: scale(0); 664 opacity: 0; 665} 666to { 667 transform: scale(1); 668 opacity: 1; 669}`,Dne=mu` 670from { 671 transform: scale(0) rotate(90deg); 672 opacity: 0; 673} 674to { 675 transform: scale(1) rotate(90deg); 676 opacity: 1; 677}`,Lne=md("div")` 678 width: 20px; 679 opacity: 0; 680 height: 20px; 681 border-radius: 10px; 682 background: ${t=>t.primary||"#ff4b4b"}; 683 position: relative; 684 transform: rotate(45deg); 685 686 animation: ${Rne} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) 687 forwards; 688 animation-delay: 100ms; 689 690 &:after, 691 &:before { 692 content: ''; 693 animation: ${One} 0.15s ease-out forwards; 694 animation-delay: 150ms; 695 position: absolute; 696 border-radius: 3px; 697 opacity: 0; 698 background: ${t=>t.secondary||"#fff"}; 699 bottom: 9px; 700 left: 4px; 701 height: 2px; 702 width: 12px; 703 } 704 705 &:before { 706 animation: ${Dne} 0.15s ease-out forwards; 707 animation-delay: 180ms; 708 transform: rotate(90deg); 709 } 710`,Mne=mu` 711 from { 712 transform: rotate(0deg); 713 } 714 to { 715 transform: rotate(360deg); 716 } 717`,$ne=md("div")` 718 width: 12px; 719 height: 12px; 720 box-sizing: border-box; 721 border: 2px solid; 722 border-radius: 100%; 723 border-color: ${t=>t.secondary||"#e0e0e0"}; 724 border-right-color: ${t=>t.primary||"#616161"}; 725 animation: ${Mne} 1s linear infinite; 726`,Une=mu` 727from { 728 transform: scale(0) rotate(45deg); 729 opacity: 0; 730} 731to { 732 transform: scale(1) rotate(45deg); 733 opacity: 1; 734}`,Bne=mu` 7350% { 736 height: 0; 737 width: 0; 738 opacity: 0; 739} 74040% { 741 height: 0; 742 width: 6px; 743 opacity: 1; 744} 745100% { 746 opacity: 1; 747 height: 10px; 748}`,Fne=md("div")`
749 width: 20px; 750 opacity: 0; 751 height: 20px; 752 border-radius: 10px; 753 background: ${t=>t.primary||"#61d345"}; 754 position: relative; 755 transform: rotate(45deg); 756 757 animation: ${Une} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) 758 forwards; 759 animation-delay: 100ms; 760 &:after { 761 content: ''; 762 box-sizing: border-box; 763 animation: ${Bne} 0.2s ease-out forwards; 764 opacity: 0; 765 animation-delay: 200ms; 766 position: absolute; 767 border-right: 2px solid; 768 border-bottom: 2px solid; 769 border-color: ${t=>t.secondary||"#fff"}; 770 bottom: 6px; 771 left: 6px; 772 height: 10px; 773 width: 6px; 774 } 775`,jne=md("div")` 776 position: absolute; 777`,zne=md("div")` 778 position: relative; 779 display: flex; 780 justify-content: center; 781 align-items: center; 782 min-width: 20px; 783 min-height: 20px; 784`,Wne=mu` 785from { 786 transform: scale(0.6); 787 opacity: 0.4; 788} 789to { 790 transform: scale(1); 791 opacity: 1; 792}`,Hne=md("div")` 793 position: relative; 794 transform: scale(0.6); 795 opacity: 0.4; 796 min-width: 20px; 797 animation: ${Wne} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275) 798 forwards; 799`,qne=({toast:t})=>{let{icon:e,type:r,iconTheme:n}=t;return e!==void 0?typeof e=="string"?se.createElement(Hne,null,e):e:r==="blank"?null:se.createElement(zne,null,se.createElement($ne,{...n}),r!=="loading"&&se.createElement(jne,null,r==="error"?se.createElement(Lne,{...n}):se.createElement(Fne,{...n})))},Vne=t=>` 8000% {transform: translate3d(0,${t*-200}%,0) scale(.6); opacity:.5;} 801100% {transform: translate3d(0,0,0) scale(1); opacity:1;} 802`,Kne=t=>` 8030% {transform: translate3d(0,0,-1px) scale(1); opacity:1;} 804100% {transform: translate3d(0,${t*-150}%,-1px) scale(.6); opacity:0;} 805`,Gne="0%{opacity:0;} 100%{opacity:1;}",Yne="0%{opacity:1;} 100%{opacity:0;}",Zne=md("div")` 806 display: flex; 807 align-items: center; 808 background: #fff; 809 color: #363636; 810 line-height: 1.3; 811 will-change: transform; 812 box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05); 813 max-width: 350px; 814 pointer-events: auto; 815 padding: 8px 10px; 816 border-radius: 8px; 817`,Jne=md("div")` 818 display: flex; 819 justify-content: center; 820 margin: 4px 10px; 821 color: inherit; 822 flex: 1 1 auto; 823 white-space: pre-line; 824`,Qne=(t,e)=>{let r=t.includes("top")?1:-1,[n,i]=LB()?[Gne,Yne]:[Vne(r),Kne(r)];return{animation:e?`${mu(n)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${mu(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},Xne=se.memo(({toast:t,position:e,style:r,children:n})=>{let i=t.height?Qne(t.position||e||"top-center",t.visible):{opacity:0},s=se.createElement(qne,{toast:t}),o=se.createElement(Jne,{...t.ariaProps},g3(t.message,t));return se.createElement(Zne,{className:t.className,style:{...i,...r,...t.style}},typeof n=="function"?n({icon:s,message:o}):se.createElement(se.Fragment,null,s,o))});vne(se.createElement);var eie=({id:t,className:e,style:r,onHeightUpdate:n,children:i})=>{let s=se.useCallback(o=>{if(o){let a=()=>{let c=o.getBoundingClientRect().height;n(t,c)};a(),new MutationObserver(a).observe(o,{subtree:!0,childList:!0,characterData:!0})}},[t,n]);return se.createElement("div",{ref:s,className:e,style:r},i)},tie=(t,e)=>{let r=t.includes("top"),n=r?{top:0}:{bottom:0},i=t.includes("center")?{justifyContent:"center"}:t.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:LB()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${e*(r?1:-1)}px)`,...n,...i}},rie=nx` 825 z-index: 9999; 826 > * { 827 pointer-events: auto; 828 } 829`,qb=16,nie=({reverseOrder:t,position:e="top-center",toastOptions:r,gutter:n,children:i,containerStyle:s,containerClassName:o})=>{let{toasts:a,handlers:c}=Pne(r);return se.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:qb,left:qb,right:qb,bottom:qb,pointerEvents:"none",...s},className:o,onMouseEnter:c.startPause,onMouseLeave:c.endPause},a.map(l=>{let u=l.position||e,f=c.calculateOffset(l,{reverseOrder:t,gutter:n,defaultPosition:e}),d=tie(u,f);return se.createElement(eie,{id:l.id,key:l.id,onHeightUpdate:c.updateHeight,className:l.visible?rie:"",style:d},l.type==="custom"?g3(l.message,l):i?i(l):se.createElement(Xne,{toast:l,position:u}))}))},G5=Us;function iie(){const{t}=Zo("common"),[e,r]=se.useState(""),[n,i]=se.useState(!1),s=async o=>{var a,c;if(o.preventDefault(),e===""&&G5.error(t("messages.enterEmail")),e){i(!0);try{const l=await qn.post(`${hC}/api/subscribe`,{email:e,isSubscribe:!0},{headers:{"Content-Type":"application/json"}});r(""),G5.success(t("messages.thanksSubscription"),{style:{borderRadius:"3px",fontSize:"14px",fontWeight:"700",backgroundColor:"#16a34a",border:"1px solid #0abf3095",color:"#fff"}})}catch(l){console.error("Error:",((c=(a=l.response)==null?void 0:a.data)==null?void 0:c.message)||"Something went wrong"),G5.error(t("messages.subscriptionDone"),{style:{borderRadius:"3px",fontSize:"14px",fontWeight:"700",backgroundColor:"#B22222",border:"1px solid #B22222",color:"#fff"}})}finally{i(!1)}}};return w.jsx("div",{className:" font-gilroy ",children:w.jsxs("div",{className:"footer-blur rounded-t-lg backdrop-blur-md bg-[#8989890D] p-5 mt-10 text-white",children:[w.jsxs("div",{className:"flex flex-col md:flex-row gap-3 lg:gap-0 justify-between items-center px-5 pb-3 border-b border-white/20",children:[w.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0 ",children:[w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/assets/LOGO_Icon_GIF.gif",className:"w-20 h-20",alt:"logo"}),w.jsx("p",{style:{color:"transparent",backgroundClip:"text",WebkitBackgroun
829dClip:"text",backgroundImage:"linear-gradient( to right, #00E0FF, #061FA1 ) "},className:" uppercase font-semibold text-2xl font-zendots ",children:"Skilleareum"})]}),w.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-3",children:[w.jsx("h1",{children:t("footer.followUs")}),w.jsxs("div",{className:"flex items-center gap-3",children:[w.jsx("a",{href:"https://web.telegram.org/a/#1515760210",target:"_blank",children:w.jsx("button",{className:"p-[1px] text-lg rounded-full bg-gradient-to-r from-[#0285FF] to-[#1EEF32]",children:w.jsx("button",{className:"w-10 h-10 rounded-full bg-black",children:w.jsx("i",{class:"fa-brands fa-telegram"})})})}),w.jsxs("a",{href:"https://www.facebook.com/skilleareum/",target:"_blank",children:[" ",w.jsx("button",{className:"p-[1px] text-lg rounded-full bg-gradient-to-r from-[#0285FF] to-[#1EEF32]",children:w.jsx("button",{className:"w-10 h-10 rounded-full bg-black",children:w.jsx("i",{class:"fa-brands fa-square-facebook"})})})]}),w.jsxs("a",{href:"https://www.linkedin.com/company/skilleareum",target:"_blank",children:[" ",w.jsx("button",{className:"p-[1px] text-lg rounded-full bg-gradient-to-r from-[#0285FF] to-[#1EEF32]",children:w.jsx("button",{className:"w-10 h-10 rounded-full bg-black",children:w.jsx("i",{class:"fa-brands fa-linkedin-in"})})})]}),w.jsxs("a",{href:"https://www.instagram.com/skilleareum/",target:"_blank",children:[" ",w.jsx("button",{className:"p-[1px] text-lg rounded-full bg-gradient-to-r from-[#0285FF] to-[#1EEF32]",children:w.jsx("button",{className:"w-10 h-10 rounded-full bg-black",children:w.jsx("i",{class:"fa-brands fa-instagram"})})})]}),w.jsxs("a",{href:"https://x.com/Skilleareum",target:"_blank",children:[" ",w.jsx("button",{className:"p-[1px] text-lg rounded-full bg-gradient-to-r from-[#0285FF] to-[#1EEF32]",children:w.jsx("button",{className:"w-10 h-10 rounded-full bg-black",children:w.jsx("i",{class:"fa-brands fa-x-twitter"})})})]}),w.jsxs("a",{href:"https://www.youtube.com/channel/UCM_ThaIJyw6iTjWc7jubIgw",target:"_blank",children:[" ",w.jsx("button",{className:"p-[1px] text-lg rounded-full bg-gradient-to-r from-[#0285FF] to-[#1EEF32]",children:w.jsx("button",{className:"w-10 h-10 rounded-full bg-black",children:w.jsx("i",{class:"fa-brands fa-youtube"})})})]})]})]})]}),w.jsxs("div",{className:"flex flex-wrap justify-between gap-3 py-5 px-10 mx-auto text-sm text-white/50 border-b border-white/20",children:[w.jsxs("div",{className:"w-[47%] lg:w-auto",children:[w.jsx("h2",{className:"text-white font-semibold mb-3 text-base",children:t("footer.links.home")}),w.jsxs("ul",{className:"space-y-2",children:[w.jsx("li",{children:w.jsx(Oc,{to:"/#future-benefits",className:"hover:text-white",children:t("footer.subLinks.futureBenefits")})}),w.jsx("li",{children:w.jsx(Oc,{to:"/#learn-earn",className:"hover:text-white",children:t("footer.subLinks.learnEarn")})}),w.jsx("li",{children:w.jsx(Oc,{to:"/#features",className:"hover:text-white",children:t("footer.subLinks.features")})})]})]}),w.jsxs("div",{className:"w-[47%] lg:w-auto",children:[w.jsx("h2",{className:"text-white font-semibold mb-3 text-base",children:t("footer.links.aboutUs")}),w.jsxs("ul",{className:"space-y-2",children:[w.jsx("li",{children:w.jsx(Oc,{to:"/Aboutus#vision-mission",className:"hover:text-white",children:t("footer.subLinks.visionMission")})}),w.jsx("li",{children:w.jsx(Oc,{to:"/Aboutus#roadmap",className:"hover:text-white",children:t("footer.subLinks.roadmap")})}),w.jsx("li",{children:w.jsx(Oc,{to:"/Aboutus#tokenomics",className:"hover:text-white",children:t("footer.subLinks.tokenomics")})})]})]}),w.jsxs("div",{className:"w-[47%] lg:w-auto",children:[w.jsx("h2",{className:"text-white font-semibold mb-3 text-base",children:t("footer.links.community")}),w.jsxs("ul",{className:"space-y-2",children:[w.jsx("li",{children:w.jsx(Oc,{to:"/Community#explore-section",className:"hover:text-white",children:t("footer.subLinks.explore")})}),w.jsx("li",{children:w.jsx(Oc,{to:"/Community#partnership",className:"hover:text-white",children:t("footer.subLinks.partnership")})}),w.jsx("li",{children:w.jsx(Oc,{to:"/Community#affiliate-program",className:"hover:text-white",children:t("footer.subLinks.affiliateProgram")})})]})]})]}),w.jsxs("div",{className:"flex flex-col md:flex-row justify-between gap-3 md:gap-0 items-center px-5 py-3 border-b border-white/20",children:[w.jsxs("div",{className:"w-[100%] md:w-auto",children:[w.jsx("div",{className:"flex justify-start",children:w.jsx("h1",{className:"text-lg font-medium text-transparent bg-gradient-to-r from-[#0285FF] via-white to-[#1EEF32] bg-clip-text ",children:t("footer.newsletter.title")})}),w.jsx("p",{className:"text-white/50 text-xs mt-1",children:t("footer.newsletter.subt
829itle")})]}),w.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-end gap-2",children:[w.jsx("input",{type:"email",className:" focus:outline-none border border-white/20 bg-transparent px-3 py-1.5 rounded-md w-[100%] md:w-[50%]",placeholder:t("footer.newsletter.placeholder"),onChange:o=>r(o.target.value),value:e}),w.jsx("button",{disabled:n,onClick:o=>s(o),className:"px-6 py-1.5 rounded-md text-white bg-gradient-to-r from-[#0285FF] to-[#1EEF32] flex items-center gap-3 font-semibold",children:t(n?"footer.newsletter.subscribing":"footer.newsletter.subscribe")})]})]}),w.jsxs("div",{className:"flex flex-col lg:flex-row justify-between gap-3 text-center md:text-start lg:gap-0 pt-3 px-5 items-center text-sm",children:[w.jsx("p",{children:t("footer.rights",{year:2025})}),w.jsx("p",{children:t("footer.version",{version:"1.0"})}),w.jsxs("div",{className:"flex flex-wrap gap-3 justify-center lg:justify-end",children:[w.jsx("p",{children:t("footer.privacyPolicy")}),w.jsx("p",{children:t("footer.termsConditions")}),w.jsx("p",{children:t("footer.cookiePolicy")})]})]})]})})}const sie=()=>{const{t}=Zo("landing"),e=[{icon:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/section22.svg",title:t("section2_cards.play.title"),desc:t("section2_cards.play.desc")},{icon:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/section23.svg",title:t("section2_cards.learn.title"),desc:t("section2_cards.learn.desc")},{icon:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/section24.svg",title:t("section2_cards.earn.title"),desc:t("section2_cards.earn.desc")},{icon:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/section25.svg",title:t("section2_cards.grow.title"),desc:t("section2_cards.grow.desc")},{icon:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/section26.svg",title:t("section2_cards.repeat.title"),desc:t("section2_cards.repeat.desc")},{icon:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/section21.svg",title:t("section2_cards.whatsNext.title"),desc:t("section2_cards.whatsNext.desc")}];return w.jsx("div",{className:"pt-10 ",children:w.jsxs("div",{className:" relative overflow-hidden flex justify-center items-center",children:[w.jsxs("div",{className:"w-full h-full absolute top-0 ",children:[w.jsx("div",{className:"w-[80%] mx-auto h-10 absolute top-0 left-0 right-0 opacity-60 bg-[#727272] rounded-full "}),w.jsx("div",{className:" w-32 h-16 absolute top-20 -right-10 bg-[#00BA34] opacity-55 rounded-full "}),w.jsx("div",{className:" w-8 h-24 absolute top-16 -left-5 bg-[#00BA34] opacity-55 rounded-full "})]}),w.jsxs("div",{className:"w-[100%] mx-auto py-20 px-3 font-gilroy bg-[#8989890D] border border-white/5 backdrop-blur-3xl rounded-2xl ",children:[w.jsx("div",{children:w.jsxs("p",{className:" font-bold text-3xl text-center leading-10 ",children:[t("section2_title1"),w.jsx("span",{style:{backgroundClip:"text",color:"transparent",backgroundImage:"linear-gradient(to right, #0285FF, #1EEF32)",WebkitBackgroundClip:"text"},children:"Skilleareum"})," ",t("section2_title2")," ",w.jsx("br",{}),t("section2_title3")]})}),w.jsx("div",{className:"w-full mt-16 grid lg:grid-cols-3 md:grid-cols-2 grid-cols-1 place-content-center content-center gap-10 ",children:e.map((r,n)=>w.jsxs("div",{className:"w-[100%] mx-auto flex flex-col items-center justify-center ",children:[w.jsx("div",{className:"w-16 h-16 bg-gradient-to-r from-[#0285FF] to-[#1EEF32] rounded-full p-1.5 ",children:w.jsxs("div",{className:"w-full h-full flex justify-center items-center bg-black rounded-full relative ",children:[w.jsx("div",{className:"w-14 h-14 flex justify-center items-center rounded-full overflow-hidden",children:w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/AbstractDesign.svg",className:" w-14 h-14 mx-auto "})}),w.jsx("img",{src:r.icon,className:" absolute top-3.5 w-6 h-6 animate-zoomMove "})]})}),w.jsxs("div",{className:"mt-5",children:[w.jsx("p",{className:" font-bold text-white text-center",children:r.title}),w.jsx("p",{className:"w-[90%] mx-auto text-sm text-[#8C8C8C] text-center mt-4",children:r.desc})]}),w.jsx("div",{className:"mt-7",children:w.jsxs("a",{href:"/home",target:"_blank",children:[" ",w.jsxs("div",{className:"flex justify-center items-center gap-7 border border-[#1F1F1F] rounded-full py-3 px-5 ",children:[w.jsx("p",{className:" font-semibold text-sm ",children:t("getStarted")}),w.jsx("button",{className:"w-12 h-8 bg-[#1A1A1A] rounded-full ml-2 ",children:w.jsx(ni,{icon:Af,className:" text-white "})})]})]})})]},n))})]})]})})},oie=()=>{const{t}=Zo("landing");return w.jsxs("div",{className:" font-gilroy pt-14 ",children:[w.jsx("div",{"data-aos":"fade-right","data-aos-duration":"1000",className:" flex justify-start ",children:w.jsxs("p",{className:" text-4xl font-semibold ",style:{backgroundClip:"text",color:"transparent",backgroundImage:"linear-gradient(to right, #0285FF, #FFFFFF, #FFFFFF, #1EEF32)",WebkitBackgroun
829dClip:"text"},children:[" ",t("section3_title")," "]})}),w.jsxs("div",{"data-aos":"fade-up","data-aos-duration":"1500",className:" relative w-full ",children:[w.jsxs("div",{className:"w-full flex sm:flex-row flex-col justify-center items-center mt-10",children:[w.jsx("div",{className:" w-1/2 sm:block hidden",children:w.jsx("div",{className:" h-32 flex justify-center items-center ",style:{clipPath:"polygon(0% 0%, 75% 0%, 100% 50%, 75% 100%, 0% 100%)",background:"radial-gradient(100% 100% at 100% 49.78%, #0285FF 0%, rgba(22, 35, 46, 0) 100%)"},children:w.jsxs("div",{style:{border:"1px solid transparent",borderImage:"linear-gradient(to right, #0285FF, #1EEF32) 1",borderRadius:"8px"},className:" flex items-center gap-3 text-sm lg:w-[65%]",children:[w.jsx("div",{className:"px-2 py-3 bg-gradient-to-b from-[#0285FF] to-[#1EEF32] ",children:w.jsx("p",{className:" font-semibold",children:"1."})}),w.jsx("p",{className:" font-semibold pr-3",children:t("section3_benefits.1")})]})})}),w.jsx("div",{className:" w-full sm:hidden block ",children:w.jsx("div",{className:" flex justify-center items-center ",style:{background:"radial-gradient(100% 100% at 100% 49.78%, #0285FF 0%, rgba(22, 35, 46, 0) 100%)"},children:w.jsxs("div",{style:{border:"1px solid transparent",borderImage:"linear-gradient(to right, #0285FF, #1EEF32) 1",borderRadius:"8px"},className:" flex items-center gap-3 text-sm",children:[w.jsx("div",{className:"px-2 py-5 bg-gradient-to-b from-[#0285FF] to-[#1EEF32] ",children:w.jsx("p",{className:" font-semibold",children:"1."})}),w.jsx("p",{className:" font-semibold pr-3",children:t("section3_benefits.1")})]})})}),w.jsxs("div",{className:"w-1/2 sm:block hidden ",children:[w.jsxs("div",{className:" flex flex-col justify-center items-center h-64 ",style:{clipPath:"polygon(0 16%, 100% 16%, 100% 75%, 24% 75%, 0 100%)",background:"radial-gradient(100% 100% at 0% 100%, #0285FF 0%, rgba(22, 35, 46, 0) 100%)"},children:[w.jsxs("div",{style:{border:"1px solid transparent",borderImage:"linear-gradient(to right, #0285FF, #1EEF32) 1",borderRadius:"8px"},className:" w-[80%] flex items-center gap-3 text-sm mb-5",children:[w.jsx("div",{className:"px-2 py-3 bg-gradient-to-b from-[#0285FF] to-[#1EEF32] ",children:w.jsx("p",{className:" font-semibold",children:"2."})}),w.jsx("p",{className:" font-semibold pr-3",children:t("section3_benefits.2")})]}),w.jsxs("div",{style:{border:"1px solid transparent",borderImage:"linear-gradient(to right, #0285FF, #1EEF32) 1",borderRadius:"8px"},className:" w-[80%] flex items-center gap-3 text-sm mb-5",children:[w.jsx("div",{className:"px-2 py-3 bg-gradient-to-b from-[#0285FF] to-[#1EEF32] ",children:w.jsx("p",{className:" font-semibold",children:"3."})}),w.jsx("p",{className:" font-semibold pr-3",children:t("section3_benefits.3")})]})]}),w.jsxs("div",{className:" h-64 flex flex-col justify-center items-center gap-5",style:{clipPath:"polygon(0 0, 26% 20%, 100% 19%, 100% 100%, 0 100%)",background:"radial-gradient(100% 100% at 0% 0%, #0285FF 0%, rgba(22, 35, 46, 0) 100%)"},children:[w.jsxs("div",{style:{border:"1px solid transparent",borderImage:"linear-gradient(to right, #0285FF, #1EEF32) 1",borderRadius:"8px"},className:" flex items-center gap-3 text-sm lg:w-[80%]",children:[w.jsx("div",{className:"px-2 py-3 bg-gradient-to-b from-[#0285FF] to-[#1EEF32] ",children:w.jsx("p",{className:"font-semibold",children:"4."})}),w.jsx("p",{className:" font-semibold pr-3",children:t("section3_benefits.4")})]}),w.jsxs("div",{style:{border:"1px solid transparent",borderImage:"linear-gradient(to right, #0285FF, #1EEF32) 1",borderRadius:"8px"},className:" flex items-center gap-3 text-sm lg:w-[80%]",children:[w.jsx("div",{className:"px-2 py-3 bg-gradient-to-b from-[#0285FF] to-[#1EEF32] ",children:w.jsx("p",{className:" font-semibold",children:"5."})}),w.jsx("p",{className:" font-semibold pr-3",children:t("section3_benefits.5")})]})]})]}),w.jsxs("div",{className:" sm:hidden block mt-5 ",children:[w.jsx("div",{className:" flex justify-center items-center ",style:{background:"radial-gradient(100% 100% at 100% 49.78%, #0285FF 0%, rgba(22, 35, 46, 0) 100%)"},children:w.jsxs("div",{style:{border:"1px solid transparent",borderImage:"linear-gradient(to right, #0285FF, #1EEF32) 1",borderRadius:"8px"},className:" flex items-center gap-3 text-sm",children:[w.jsx("div",{className:"px-2 py-5 bg-gradient-to-b from-[#0285FF] to-[#1EEF32] ",children:w.jsx("p",{className:" font-semibold",children:"2."})}),w.jsx("p",{className:" font-semibold pr-3",children:t("section3_benefits.2")})]})}),w.jsx("div",{className:" flex justify-center items-center mt-5",style:{background:"radial-gradient(100% 100% at 100% 49.78%, #0285FF 0%, rgba(22, 35, 46, 0) 100%)"},children:w.jsxs("div",{style:{border:"1px solid transparent",borderImage:"linear-gradient(to right, #0285FF, #1EEF32) 1",borderRadius:"8px"},className:" flex items-center gap-3 text-sm",children:[w.jsx("div",{className:"px-2 py-5 bg-gradient-to-b from-[#0285FF] to-[#1EEF32] ",children:w.jsx("p",{className:" font-semibold",children:"3."})}),w.jsx("p",{className:" font-semibold pr-3",children:t("section3_benefits.3")})]})}),w.jsx("div",{className:" flex justify-center items-center mt-5",style:{background:"radial-gradient(100% 100% at 100% 49.78%, #0285FF 0%, rgba(22, 35, 46, 0) 100%)"},children:w.jsxs("div",{style:{border:"1px solid transparent",borderImage:"linear-gradient(to right, #0285FF, #1EEF32) 1",borderRadius:"8px"},className:" flex items-center gap-3 text-sm",children:[w.jsx("div",{className:"px-2 py-5 bg-gradient-to-b from-[#0285FF] to-[#1EEF32] ",children:w.jsx("p",{className:" font-semibold",children:"4."})}),w.jsx("p",{className:" font-semibold pr-3 text-sm ",children:t("section3_benefits.4")})]})}),w.jsx("div",{className:" flex justify-center items-center mt-5",style:{background:"radial-gradient(100% 100% at 100% 49.78%, #0285FF 0%, rgba(22, 35, 46, 0) 100%)"},children:w.jsxs("div",{style:{border:"1px solid transparent",borderImage:"linear-gradient(to right, #0285FF, #1EEF32) 1",borderRadius:"8px"},className:" flex items-center gap-3 text-sm",children:[w.jsx("div",{className:"px-2 py-5 bg-gradient-to-b from-[#0285FF] to-[#1EEF32] ",children:w.jsx("p",{className:" font-semibold",children:"5."})}),w.jsx("p",{className:" font-semibold pr-3 text-sm ",children:t("section3_benefits.5")})]})})]})]}),w.jsx("div",{className:"w-full sm:block hidden absolute top-44 -left-2 right-0",children:w.jsxs("div",{className:" relative flex justify-center items-center ",children:[w.jsx("div",{className:"w-[120px] h-[120px] z-0 mx-auto rounded-full absolute top-4 left-0 right-0 bg-[#111B24] "}),w.jsx("div",{className:"absolute top-7 left-0 right-0 z-40",children:w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/assets/Coin_Flip_256x256(1).gif",className:"md:w-24 w-14 mx-auto rounded-full z-40"})}),w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/Group2.svg",className:"w-48 h-48 mx-auto absolute -top-5 left-0 right-0 z-10"})]})})]})]})},aie=()=>{const{t}=Zo("landing");return w.jsxs("div",{children:[w.jsxs("div",{className:"lg:w-[90%] mx-auto font-gilroy py-20 flex md:flex-row flex-col justify-start gap-5 lg:gap-10 ",children:[w.jsxs("div",{className:"md:w-[40%] mx-auto relative overflow-hidden flex justify-center items-center",children:[w.jsxs("div",{className:"w-full h-full absolute top-0 ",children:[w.jsx("div",{className:"w-44 mx-auto h-10 absolute top-0 left-0 right-0 opacity-60 bg-[#727272] rounded-full "}),w.jsx("div",{className:" w-20 h-16 absolute top-10 -right-10 bg-[#00BA34] opacity-55 rounded-full "}),w.jsx("div",{className:" w-7 h-24 absolute top-16 -left-3 bg-[#00BA34] opacity-55 rounded-full "}),w.jsx("div",{className:"w-44 mx-auto h-10 absolute bottom-0 left-0 right-0 opacity-60 bg-[#3055E3] rounded-full "})]}),w.jsx("div",{className:"w-full h-full flex justify-center items-center bg-[#8989890D] border border-white/5 rounded-2xl backdrop-blur-3xl p-5 ",children:w.jsx("img",{src:"../assets/gamecontroller.png",className:"md:w-9/12 w-6/12"})})]}),w.jsxs("div",{className:" md:w-[50%] mx-auto ",children:[w.jsxs("div",{className:" mt-3 flex flex-col justify-start items-start",children:[w.jsx("p",{className:" md:text-6xl text-4xl font-medium ",style:{backgroundClip:"text",color:"transparent",backgroundImage:"linear-gradient(to right, #0285FF, #FFFFFF, #FFFFFF,#FFFFFF)",WebkitBackgroun
829dClip:"text"},children:t("section5.tasks.title1")}),w.jsx("div",{className:"flex items-end",children:w.jsx("p",{className:"mt-2 md:text-6xl text-4xl font-medium ",style:{backgroundClip:"text",color:"transparent",backgroundImage:"linear-gradient(to right, #FFFFFF,#FFFFFF, #1EEF32)",WebkitBackgroundClip:"text"},children:t("section5.tasks.title2")})}),w.jsx("p",{className:"mt-2 text-2xl font-medium ",style:{backgroundClip:"text",color:"transparent",backgroundImage:"linear-gradient(to right, #0285FF, #FFFFFF,#FFFFFF, #1EEF32)",WebkitBackgroundClip:"text"},children:t("section5.tasks.subtitle")})]}),w.jsxs("div",{className:" mt-5 w-[90%] ",children:[w.jsxs("p",{className:" leading-7 font-light text-sm ",children:[t("section5.tasks.desc")," ",w.jsx("span",{className:" font-semibold ",style:{backgroundClip:"text",color:"transparent",backgroundImage:"linear-gradient(to right, #0285FF, #1EEF32)",WebkitBackgroundClip:"text"},children:t("section5.tasks.games.spin")}),w.jsx("span",{className:" font-semibold ",style:{backgroundClip:"text",color:"transparent",backgroundImage:"linear-gradient(to right, #0285FF, #1EEF32)",WebkitBackgroundClip:"text"},children:t("section5.tasks.games.missing")})," ",w.jsx("span",{className:" font-semibold ",style:{backgroundClip:"text",color:"transparent",backgroundImage:"linear-gradient(to right, #0285FF, #1EEF32)",WebkitBackgroundClip:"text"},children:t("section5.tasks.games.jumble")})," ",w.jsx("span",{className:" font-semibold ",style:{backgroundClip:"text",color:"transparent",backgroundImage:"linear-gradient(to right, #0285FF, #1EEF32)",WebkitBackgroundClip:"text"},children:t("section5.tasks.games.match")}),w.jsxs("span",{className:" font-semibold ",style:{backgroundClip:"text",color:"transparent",backgroundImage:"linear-gradient(to right, #0285FF, #1EEF32)",WebkitBackgroundClip:"text"},children:[" ",t("section5.tasks.games.memory")," "]})]}),w.jsx("div",{className:" mt-5 ",children:w.jsxs("a",{href:"/home",target:"_blank",children:[" ",w.jsxs("button",{className:" font-semibold text-sm flex items-center gap-2 px-5 py-2 bg-gradient-to-r from-[#0285FF] to-[#1EEF32] rounded-full ",children:[t("section5.tasks.cta"),w.jsx("span",{className:" w-5 h-5 border border-white rounded-full flex justify-center items-center -rotate-45 text-sm ",children:w.jsx(ni,{icon:Af,size:"sm"})})]})]})})]})]})]}),w.jsxs("div",{className:"lg:w-[90%] mx-auto font-gilroy py-20 flex flex-col md:flex-row-reverse justify-start gap-5 lg:gap-10 ",children:[w.jsxs("div",{"data-aos":"fade-right","data-aos-duration":"2000",className:"md:w-[40%] mx-auto relative overflow-hidden flex justify-center items-center",children:[w.jsxs("div",{className:"w-full h-full absolute top-0 ",children:[w.jsx("div",{className:"w-44 mx-auto h-10 absolute top-0 left-0 right-0 opacity-60 bg-[#727272] rounded-full "}),w.jsx("div",{className:" w-20 h-16 absolute top-10 -right-10 bg-[#00BA34] opacity-55 rounded-full "}),w.jsx("div",{className:" w-7 h-24 absolute top-16 -left-3 bg-[#00BA34] opacity-55 rounded-full "}),w.jsx("div",{className:"w-44 mx-auto h-10 absolute bottom-0 left-0 right-0 opacity-60 bg-[#3055E3] rounded-full "})]}),w.jsx("div",{className:"w-full h-full flex justify-center items-center bg-[#8989890D] border border-white/5 rounded-2xl backdrop-blur-3xl p-5 ",children:w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/aimage.svg",className:"md:w-9/12 w-6/12"})})]}),w.jsxs("div",{"data-aos":"fade-up","data-aos-duration":"2000",className:" md:w-[50%] mx-auto ",children:[w.jsxs("div",{className:" mt-7 flex flex-col justify-start items-start",children:[w.jsx("p",{className:" md:text-6xl text-4xl font-medium ",style:{backgroundClip:"text",color:"transparent",backgroundImage:"linear-gradient(to right, #0285FF, #FFFFFF, #FFFFFF,#FFFFFF)",WebkitBackgroundClip:"text"},children:t("section5.skills.title1")}),w.jsx("p",{className:"mt-2 md:text-6xl text-4xl font-medium ",style:{backgroundClip:"text",color:"transparent",backgroundImage:"linear-gradient(to right, #FFFFFF,#FFFFFF, #1EEF32)",WebkitBackgroundClip:"text"},children:t("section5.skills.title2")})]}),w.jsxs("div",{className:" mt-5 w-[90%] ",children:[w.jsxs("p",{className:" leading-7 font-light text-sm ",children:[t("section5.skills.desc1"),w.jsx("br",{}),w.jsx("br",{}),t("section5.skills.desc2")," "]}),w.jsx("div",{className:" mt-5 ",children:w.jsxs("a",{href:"/home",target:"_blank",children:[" ",w.jsxs("button",{className:" font-semibold text-sm flex items-center gap-2 px-5 py-2 bg-gradient-to-r from-[#0285FF] to-[#1EEF32] rounded-full ",children:[t("section5.skills.cta"),w.jsx("span",{className:" w-5 h-5 border border-white rounded-full flex justify-center items-center -rotate-45 text-sm ",children:w.jsx(ni,{icon:Af,size:"sm"})})]})]})})]})]})]}),w.jsxs("div",{className:"lg:w-[90%] mx-auto font-gilroy py-20 flex md:flex-row flex-col justify-start gap-5 lg:gap-10 ",children:[w.jsxs("div",{"data-aos":"fade-right","data-aos-duration":"2000",className:"md:w-[40%] mx-auto relative overflow-hidden flex justify-center items-center",children:[w.jsxs("div",{className:"w-full h-full absolute top-0 ",children:[w.jsx("div",{className:"w-44 mx-auto h-10 absolute top-0 left-0 right-0 opacity-60 bg-[#727272] rounded-full "}),w.jsx("div",{className:" w-20 h-16 absolute top-10 -right-10 bg-[#00BA34] opacity-55 rounded-full "}),w.jsx("div",{className:" w-7 h-24 absolute top-16 -left-3 bg-[#00BA34] opacity-55 rounded-full "}),w.jsx("div",{className:"w-44 mx-auto h-10 absolute bottom-0 left-0 right-0 opacity-60 bg-[#3055E3] rounded-full "})]}),w.jsx("div",{className:"w-full h-full flex justify-center items-center bg-[#8989890D] border border-white/5 rounded-2xl backdrop-blur-3xl p-5 ",children:w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/premiumtrophy.svg",className:""})})]}),w.jsxs("div",{"data-aos":"fade-up","data-aos-duration":"2000",className:" md:w-[50%] mx-auto ",children:[w.jsxs("div",{className:" mt-3 flex flex-col justify-start items-start",children:[w.jsx("p",{className:" md:text-6xl text-4xl font-medium ",style:{backgroundClip:"text",color:"transparent",backgroundImage:"linear-gradient(to right, #0285FF, #FFFFFF, #FFFFFF,#FFFFFF)",WebkitBackgroun
829dClip:"text"},children:t("section5.rewards.title1")}),w.jsx("p",{className:"mt-2 md:text-6xl text-4xl font-medium ",style:{backgroundClip:"text",color:"transparent",backgroundImage:"linear-gradient(to right, #FFFFFF,#FFFFFF, #1EEF32)",WebkitBackgroundClip:"text"},children:t("section5.rewards.title2")})]}),w.jsxs("div",{className:" mt-5 w-[90%] ",children:[w.jsxs("p",{className:" leading-7 font-light text-sm ",children:[t("section5.rewards.desc1"),w.jsx("br",{}),w.jsx("br",{}),t("section5.rewards.desc2")," "]}),w.jsx("div",{className:" mt-5 ",children:w.jsxs("a",{href:"/home",target:"_blank",children:[" ",w.jsxs("button",{className:" font-semibold text-sm flex items-center gap-2 px-5 py-2 bg-gradient-to-r from-[#0285FF] to-[#1EEF32] rounded-full ",children:[t("section5.rewards.cta"),w.jsx("span",{className:" w-5 h-5 border border-white rounded-full flex justify-center items-center -rotate-45 text-sm ",children:w.jsx(ni,{icon:Af,size:"sm"})})]})]})})]})]})]}),w.jsxs("div",{className:"lg:w-[90%] mx-auto font-gilroy py-20 flex flex-col md:flex-row-reverse justify-start gap-5 lg:gap-10 ",children:[w.jsxs("div",{"data-aos":"fade-right","data-aos-duration":"2000",className:"md:w-[40%] mx-auto relative overflow-hidden flex justify-center items-center",children:[w.jsxs("div",{className:"w-full h-full absolute top-0 ",children:[w.jsx("div",{className:"w-44 mx-auto h-10 absolute top-0 left-0 right-0 opacity-60 bg-[#727272] rounded-full "}),w.jsx("div",{className:" w-20 h-16 absolute top-10 -right-10 bg-[#00BA34] opacity-55 rounded-full "}),w.jsx("div",{className:" w-7 h-24 absolute top-16 -left-3 bg-[#00BA34] opacity-55 rounded-full "}),w.jsx("div",{className:"w-44 mx-auto h-10 absolute bottom-0 left-0 right-0 opacity-60 bg-[#3055E3] rounded-full "})]}),w.jsx("div",{className:"w-full h-full flex justify-center items-center bg-[#8989890D] border border-white/5 rounded-2xl backdrop-blur-3xl ",children:w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/handshake.svg",className:""})})]}),w.jsxs("div",{"data-aos":"fade-up","data-aos-duration":"2000",className:" md:w-[50%] mx-auto ",children:[w.jsxs("div",{className:" mt-3 flex flex-col justify-start items-start",children:[w.jsxs("p",{className:" text-4xl md:text-6xl font-medium ",style:{backgroundClip:"text",color:"transparent",backgroundImage:"linear-gradient(to right, #0285FF, #FFFFFF, #FFFFFF,#FFFFFF)",WebkitBackgroundClip:"text"},children:[t("section5.referral.title1")," "]}),w.jsx("p",{className:"mt-2 text-4xl md:text-6xl font-medium ",style:{backgroundClip:"text",color:"transparent",backgroundImage:"linear-gradient(to right, #FFFFFF,#FFFFFF, #1EEF32)",WebkitBackgroundClip:"text"},children:t("section5.referral.title2")})]}),w.jsxs("div",{className:" mt-5 w-[90%] ",children:[w.jsxs("p",{className:" leading-7 font-light text-sm ",children:[t("section5.referral.desc1"),w.jsx("br",{}),w.jsx("br",{}),t("section5.referral.desc2")," "]}),w.jsx("div",{className:" mt-5 ",children:w.jsxs("a",{href:"/home",target:"_blank",children:[" ",w.jsxs("button",{className:" font-semibold text-sm flex items-center gap-2 px-5 py-2 bg-gradient-to-r from-[#0285FF] to-[#1EEF32] rounded-full ",children:[t("section5.referral.cta"),w.jsx("span",{className:" w-5 h-5 border border-white rounded-full flex justify-center items-center -rotate-45 text-sm ",children:w.jsx(ni,{icon:Af,size:"sm"})})]})]})})]})]})]})]})},cie=()=>{const{t}=Zo("landing");return w.jsxs("div",{className:" font-gilroy relative py-20",children:[w.jsx("div",{"data-aos":"fade-down","data-aos-duration":"1500",className:"flex flex-col items-center",children:w.jsx("h1",{className:" leading-10 text-2xl sm:text-4xl lg:text-5xl text-center tracking-wide font-semibold ",style:{backgroundClip:"text",color:"transparent",backgroundImage:"linear-gradient(to right, #0285FF, #FFFFFF, #FFFFFF, #1EEF32)",WebkitBackgroundClip:"text"},children:t("section6.title")})}),w.jsx("div",{className:" lg:block hidden absolute left-0 bottom-56 backdrop-blur-lg bg-[#0285FF] h-[10rem] rounded-full w-1/2 blur-[200px] z-0 "}),w.jsx("div",{className:" lg:block hidden absolute right-0 bottom-56 backdrop-blur-lg bg-[#1EEF32] h-[10rem] rounded-full w-1/2 blur-[200px] z-0 "}),w.jsx("div",{"data-aos":"fade-up","data-aos-duration":"2000",className:"mt-10 flex justify-center items-center z-20",children:w.jsxs("div",{className:"w-full max-w-lg bg-black rounded-3xl border-4 border-white z-20",children:[w.jsxs("div",{className:"relative h-[70%]",children:[w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/Maskgroup1.png",className:" rounded-3xl "}),w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/aigenesis.svg",className:" absolute top-0 w-10/12 mx-auto left-0 right-0 rounded-3xl "})]}),w.jsxs("div",{className:"flex flex-col justify-center items-center gap-5 -translate-y-10 ",children:[w.jsx("div",{className:"flex justify-center",children:w.jsx("p",{style:{backgroundClip:"text",color:"transparent",backgroundImage:"linear-gradient(to right, #0285FF, #FFFFFF, #FFFFFF, #1EEF32)",WebkitBackgroun
829dClip:"text"},className:" text-5xl font-semibold text-center ",children:t("section6.genesisTitle")})}),w.jsx("div",{children:w.jsx("div",{className:" w-12 h-12 border-2 border-white rounded-full flex justify-center items-center ",children:w.jsx(ni,{icon:uX,className:" text-[#1EEF32] text-xl"})})}),w.jsx("div",{className:" ",children:w.jsxs("a",{href:"/home",target:"_blank",children:[" ",w.jsxs("button",{className:"text-sm font-semibold flex items-center gap-2 px-5 py-2 bg-gradient-to-r from-[#0285FF] to-[#1EEF32] rounded-full ",children:[t("section6.subscriptionPrice"),w.jsx("span",{className:" w-5 h-5 border border-white rounded-full flex justify-center items-center -rotate-45 text-sm ",children:w.jsx(ni,{icon:Af,className:"text-sm"})})]})]})})]})]})})]})},lie=()=>{const{t}=Zo("landing");return w.jsx("div",{className:" font-poppins relative py-20",children:w.jsxs("div",{className:"flex lg:flex-row flex-col items-center gap-20",children:[w.jsxs("div",{"data-aos":"fade-right","data-aos-duration":"1500",className:" lg:w-1/2 flex gap-5 md:gap-10",children:[w.jsxs("div",{"data-aos":"fade-right","data-aos-duration":"2500",className:"w-1/2 flex flex-col gap-5",children:[w.jsxs("div",{className:" flex flex-col justify-center items-center",children:[w.jsx("img",{loading:"lazy",src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/assets/LOGO_Icon_GIF.gif",className:"w-14 h-14 z-30 mx-auto "}),w.jsx("p",{style:{backgroundClip:"text",WebkitBackgroundClip:"text",color:"transparent",backgroundImage:"linear-gradient( to right, #0285FF, #1EEF32)"},className:" font-zendots font-medium uppercase ",children:"Skilleareum.ai"})]}),w.jsxs("div",{className:" mx-auto mt-5 relative rounded-2xl overflow-hidden flex justify-center items-center",children:[w.jsxs("div",{className:"w-full h-full absolute top-0 rounded-2xl",children:[w.jsx("div",{className:"w-44 mx-auto h-10 absolute top-0 left-0 right-0 opacity-60 bg-[#727272] rounded-full "}),w.jsx("div",{className:" w-20 h-16 absolute top-10 -right-10 bg-[#00BA34] opacity-55 rounded-full "}),w.jsx("div",{className:" w-7 h-24 absolute top-16 -left-3 bg-[#00BA34] opacity-55 rounded-full "}),w.jsx("div",{className:"w-44 mx-auto h-10 absolute bottom-0 left-0 right-0 opacity-60 bg-[#3055E3] rounded-full "})]}),w.jsx("div",{className:"w-full h-full flex justify-center items-center bg-[#8989890D] border border-white/5 rounded-2xl backdrop-blur-2xl md:p-5 p-2 ",children:w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/assets/SKL_MAscot_Wave_Landscape.gif",className:" w-8/12 z-30 "})})]}),w.jsx("div",{className:" flex justify-end ",children:w.jsxs("div",{className:" border border-white rounded-xl py-3 sm:px-5 px-2",children:[w.jsx("div",{className:"flex flex-col justify-start text-sm sm:text-base ",children:w.jsxs("p",{style:{backgroundClip:"text",WebkitBackgroundClip:"text",color:"transparent",backgroundImage:"linear-gradient( to right, #0285FF, #1EEF32)"},className:"text-lg font-bold text-left",children:[t("section7.incentivizedGaming")," "]})}),w.jsxs("div",{className:"flex items-center gap-3 mt-5 overflow-hidden overflow-x-auto",children:[w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/ton_symbol.png",className:" w-5 "}),w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/assets/HamsterCoin1.png",className:" w-5 "}),w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/assets/dogs1.png",className:" w-5 "}),w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/assets/images(1)-Photoroom1.png",className:" w-5 "}),w.jsx("p",{style:{backgroundClip:"text",WebkitBackgroundClip:"text",color:"transparent",backgroundImage:"linear-gradient( to right, #0285FF, #1EEF32)"},className:"sm:text-xs text-[10px] font-semibold",children:t("section7.more")})]})]})})]}),w.jsxs("div",{"data-aos":"fade-up","data-aos-duration":"3000",className:" w-1/2 ",children:[w.jsxs("div",{className:"sm:w-[85%] w-[100%] rounded-lg border border-white pb-3 pt-5 sm:px-4 px-2 ",children:[w.jsxs("div",{className:" w-full flex items-center justify-between ",children:[w.jsx("p",{className:" sm:text-3xl text-lg font-bold ",style:{backgroundClip:"text",WebkitBackgroun
829dClip:"text",color:"transparent",backgroundImage:"linear-gradient( to right, #0285FF, #1EEF32)"},children:"2,000+"}),w.jsx(ni,{icon:mX,className:"text-[#1EEF32]"})]}),w.jsx("p",{className:"text-xs font-medium text-[#97918B] ",children:t("section7.earlyAdopters")}),w.jsx("div",{className:" py-4 border-b border-[#1EEF32] ",children:w.jsx("p",{className:"text-xs font-medium text-[#97918B] ",children:t("section7.adoptersDesc")})}),w.jsx("div",{className:"mt-2",children:w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/profiles.png",className:"w-full"})})]}),w.jsx("div",{className:" bg-gradient-to-b from-[#0285FF] to-[#1EEF32] py-3 px-10 rounded-xl flex justify-center mt-5 ",children:w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/dashboard.png"})})]})]}),w.jsxs("div",{"data-aos":"fade-up","data-aos-duration":"1500",className:"lg:w-1/2",children:[w.jsxs("div",{children:[w.jsx("h2",{style:{backgroundClip:"text",WebkitBackgroundClip:"text",color:"transparent",backgroundImage:"linear-gradient( to right, #0285FF, #1EEF32)"},className:" font-semibold uppercase",children:t("section7.telegramApp")}),w.jsx("h1",{style:{backgroundClip:"text",WebkitBackgroundClip:"text",color:"transparent",backgroundImage:"linear-gradient( to right, #0285FF, #1EEF32)"},className:" md:text-5xl text-4xl font-semibold mt-2 ",children:"SKILLEAREUM.AI"})]}),w.jsx("div",{className:"py-10",children:w.jsxs("p",{className:" text-[#97918B] font-poppins sm:text-base text-sm ",children:[t("section7.telegramDesc")," "]})}),w.jsxs("div",{children:[w.jsxs("a",{href:"/home",target:"_blank",children:[" ",w.jsxs("button",{className:" uppercase font-semibold text-center bg-gradient-to-r from-[#0285FF] to-[#1EEF32] rounded-full py-2 px-5 text-sm ",children:[t("section7.experienceNow")," "]})]}),w.jsx("p",{className:" text-[#97918B] font-poppins text-xs italic mt-3",children:t("section7.telegramFooter")})]})]})]})})},uie=()=>{const{t}=Zo("landing"),[e,r]=se.useState(0),[n,i]=se.useState(0),[s,o]=se.useState();return se.useEffect(()=>{qn.get(`${hC}/api/users/count`).then(a=>{i(a.data.userCount)}).catch(a=>{console.error("Error fetching user count:",a)}),qn.get(`${hC}/api/tokens/total`).then(a=>{o(a.data),r(a.data.totalTokenBalance)}).catch(a=>{console.error("Error fetching token balance:",a)})},[]),w.jsxs("div",{className:"w-full h-full relative rounded-xl ",children:[w.jsx("div",{className:"flex w-full h-full opacity-70",children:[...Array(27)].map((a,c)=>w.jsx("div",{className:"w-12 h-[95vh] md:h-[80vh] border-l border-white/10 backdrop-blur-lg opacity-55 ",style:{background:"linear-gradient(270deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 103.91%)"}},c))}),w.jsxs("div",{className:" w-full absolute top-0 h-full z-30 flex lg:flex-row flex-col overflow-hidden ",children:[w.jsxs("div",{className:" lg:w-[50%] z-30 h-full flex flex-col justify-center items-center ",children:[w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/assets/SKL_MAscot_Wave_Landscape.gif",className:" w-6/12 lg:w-8/12 xl:w-7/12 z-30 "}),w.jsx("p",{className:"section4 font-zendots text-4xl text-white font-semibold z-30 mt-7 ",children:"SKILLEAREUM.AI"}),w.jsx("div",{className:" absolute -bottom-20 bg-[#1EEF32] w-[40%] h-36 blur-3xl "})]}),w.jsxs("div",{className:"lg:w-[50%] overflow-hidden z-30 h-full relative flex flex-col justify-between ",children:[w.jsxs("div",{className:"relative flex justify-start items-center",children:[w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/Group3.svg",className:"w-full absolute top-0 opacity-35 "}),w.jsx("div",{className:" w-[100%] bg-[#0285FF] bg-blend-multiply blur-[200px] rounded-full h-40 z-0 "}),w.jsx("div",{className:"",children:w.jsx("img",{loading:"lazy",src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/assets/LOGO_Icon_GIF.gif",className:"w-24 h-24 z-30 mx-auto absolute top-4 left-3"})}),w.jsx("div",{className:"bg-[#0285FF] absolute top-5 md:-left-3 blur-lg -translate-x-6 -translate-y-10 w-44 h-44 rounded-full z-0 "})]}),w.jsx("div",{className:"z-40",children:w.jsxs("div",{className:"mb-5 px-3 z-40 font-gilroy ",children:[w.jsxs("div",{className:"flex items-center relative",children:[w.jsx("div",{className:" bg-gradient-to-r from-[#0285FF] to-[#1EEF32] rounded-full border-2 border-white p-1 ",children:w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/assets/SKLRM_DP_01.png",className:"w-8 rounded-full"})}),w.jsx("div",{className:" -translate-x-3 bg-gradient-to-r from-[#0285FF] to-[#1EEF32] rounded-full border-2 border-white p-1 ",children:w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/assets/SKLRM_DP_02.png",className:"w-8 rounded-full"})}),w.jsx("div",{className:" -translate-x-6 bg-gradient-to-r from-[#0285FF] to-[#1EEF32] rounded-full border-2 border-white p-1 ",children:w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/assets/SKLRM_DP_03.png",className:"w-8 rounded-full"})})]}),w.jsxs("div",{className:"mt-5 z-30",children:[w.jsx("p",{className:"z-40 text-white font-semibold text-2xl",children:t("section4.activeUsers",{count:n})}),w.jsx("p",{className:"z-40 font-semibold ",children:t("section4.rewardedText",{amount:e})})]})]})})]})]})]})},fie=()=>{const{t}=Zo(["faq","landing"]),e=se.useMemo(()=>{const l=t("questions",{returnObjects:!0,ns:"faq"});return Array.isArray(l)?l:[]},[t]),[r,n]=se.useState(0),[i,s]=se.useState(""),o=l=>{n(r===l?0:l)},a=l=>{s(l.target.value),n(-1)},c=se.useMemo(()=>e.filter(l=>l.q.toLowerCase().includes(i.toLowerCase())),[e,i]);return w.jsxs("div",{className:"font-gilroy py-20",children:[w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/fan.svg"}),w.jsxs("div",{className:" flex md:flex-row flex-col items-center md:items-start gap-10",children:[w.jsxs("div",{className:" md:w-[40%] ",children:[w.jsxs("div",{className:"mt-10 flex flex-col justify-center",children:[w.jsx("p",{style:{backgroundClip:"text",color:"transparent",backgroundImage:"linear-gradient(to right, #0285FF, #FFFFFF, #FFFFFF, #1EEF32)",WebkitBackgroun
829dClip:"text"},className:"text-3xl font-semibold",children:t("title",{ns:"faq"})}),w.jsxs("div",{className:" relative ",children:[w.jsx("input",{type:"text",className:"w-full focus:outline-none border border-white/20 bg-transparent px-3 py-1.5 rounded-md mt-5",placeholder:t("searchPlaceholder",{ns:"faq"}),value:i,onChange:a}),w.jsx("span",{className:" absolute top-7 right-3 text-white",children:w.jsx(ni,{icon:hX})})]})]}),w.jsx("div",{className:"mt-10 flex justify-center",children:w.jsxs("div",{className:"relative overflow-hidden flex justify-center items-center",children:[w.jsxs("div",{className:"w-full h-full absolute top-0 ",children:[w.jsx("div",{className:"w-44 mx-auto h-10 absolute top-0 left-0 right-0 opacity-60 bg-[#727272] rounded-full "}),w.jsx("div",{className:" w-20 h-16 absolute top-10 -right-10 bg-[#00BA34] opacity-55 rounded-full "}),w.jsx("div",{className:" w-7 h-24 absolute top-16 -left-3 bg-[#00BA34] opacity-55 rounded-full "}),w.jsx("div",{className:"w-44 mx-auto h-10 absolute bottom-0 left-0 right-0 opacity-60 bg-[#3055E3] rounded-full "})]}),w.jsx("div",{className:"w-full h-full flex justify-center items-center bg-[#8989890D] border border-white/5 rounded-2xl backdrop-blur-3xl p-5 ",children:w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/assets/SKL_MAscot_Wave_Landscape.gif",className:" w-10/12 z-30 "})})]})})]}),w.jsx("div",{className:" md:w-[60%] mx-auto ",children:w.jsx("div",{className:" text-black flex flex-col gap-5 mx-auto",children:c.slice(0,5).map((l,u)=>w.jsx("div",{className:` ${r===u?"bg-gradient-to-r from-[#17C969] to-[#0285FF] p-[0.9px] ":""} text-white cursor-pointer rounded-lg duration-500 `,children:w.jsxs("div",{onClick:()=>o(u),className:"bg-[#0A0A0A] rounded-lg duration-500 px-10 transform transition ease-in-out h-full",children:[w.jsxs("div",{className:"flex py-3",children:[w.jsx("div",{className:"w-[90%]",children:w.jsx("h1",{className:"font-medium py-2",children:l.q})}),w.jsx("div",{className:"w-[10%] flex items-center justify-center",children:w.jsx("button",{className:"font-bold",children:r===u?w.jsx(ni,{icon:fX,className:"transform transition-transform duration-500"}):w.jsx(ni,{icon:pX,className:"transform transition-transform duration-500 "})})})]}),w.jsx("div",{className:`duration-300 ease-in-out overflow-hidden ${r===u?"py-7 max-h-[300px] border-t border-[#F9F9F9] rounded-b-md":"max-h-0"}`,children:w.jsx("p",{className:"text-sm text-white duration-500",children:l.a})})]},u)}))})})]})]})},die=()=>{const{t}=Zo("landing"),e=[{img:"/assets/Landing/Profile/Manju.jpg",name:"Manjunath Vijay ",job:t("section9.team.manju.job"),desc:t("section9.team.manju.desc")},{img:"/assets/Hudson.png",name:"Hudson Daniel ",job:t("section9.team.hudson.job"),desc:t("section9.team.hudson.desc")},{img:"/assets/Landing/Profile/Sakthi.jpg",name:"Sakthi Visakan Rajaguru ",job:t("section9.team.sakthi.job"),desc:t("section9.team.sakthi.desc")},{img:"/assets/Landing/Profile/Anup2.png",name:"Anup Kumar",job:t("section9.team.anup.job"),desc:t("section9.team.anup.desc")},{img:"/assets/Landing/Profile/Dinesh.jpg",name:"Dinesh",job:t("section9.team.dinesh.job"),desc:t("section9.team.dinesh.desc")},{img:"/assets/Landing/Profile/Mani.jpg",name:"Mani ",job:t("section9.team.mani.job"),desc:t("section9.team.mani.desc")}];return w.jsxs("div",{className:"font-gilroy py-20",children:[w.jsx("div",{className:"flex flex-col items-center gap-5",children:w.jsx("h1",{style:{backgroundClip:"text",color:"transparent",backgroundImage:"linear-gradient(to right, #0285FF, #FFFFFF, #FFFFFF, #1EEF32)",WebkitBackgroundClip:"text"},className:"text-center font-medium text-5xl",children:t("section9.title")})}),w.jsx("div",{className:"mt-10",children:w.jsx("div",{className:" grid md:grid-cols-3 grid-cols-1 gap-5 h-full ",children:e.map((r,n)=>w.jsx("div",{className:"h-full bg-gradient-to-br from-white to-white/0 to-30% p-[1px] rounded-2xl ",children:w.jsxs("div",{className:"bg-[#0a0a0a] h-full hover:backdrop-blur-md hover:bg-[#0a0a0a]/80 cursor-pointer rounded-2xl p-5",children:[w.jsxs("div",{className:"flex justify-between",children:[w.jsxs("div",{className:"flex items-center gap-3",children:[w.jsx("img",{src:r.img,className:"w-12 h-12 rounded-full object-cover object-center "}),w.jsxs("div",{children:[w.jsx("p",{className:" font-medium ",children:r.name}),w.jsx("p",{className:"text-xs",children:r.job})]})]}),w.jsx("div",{className:" scale-150 ",children:w.jsx("i",{class:"fa-solid fa-quote-left "})})]}),w.jsx("div",{className:"mt-7",children:w.jsx("p",{className:"font-light text-sm",children:r.desc})})]})}
829,n))})})]})};var $B={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(li,function(){return function(r){function n(s){if(i[s])return i[s].exports;var o=i[s]={exports:{},id:s,loaded:!1};return r[s].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var i={};return n.m=r,n.c=i,n.p="dist/",n(0)}([function(r,n,i){function s(m){return m&&m.__esModule?m:{default:m}}var o=Object.assign||function(m){for(var b=1;b<arguments.length;b++){var E=arguments[b];for(var k in E)Object.prototype.hasOwnProperty.call(E,k)&&(m[k]=E[k])}return m},a=i(1),c=(s(a),i(6)),l=s(c),u=i(7),f=s(u),d=i(8),p=s(d),h=i(9),g=s(h),y=i(10),x=s(y),C=i(11),_=s(C),L=i(14),P=s(L),z=[],W=!1,B={offset:120,delay:0,easing:"ease",duration:400,disable:!1,once:!1,startEvent:"DOMContentLoaded",throttleDelay:99,debounceDelay:50,disableMutationObserver:!1},I=function(){var m=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(m&&(W=!0),W)return z=(0,_.default)(z,B),(0,x.default)(z,B.once),z},j=function(){z=(0,P.default)(),I()},D=function(){z.forEach(function(m,b){m.node.removeAttribute("data-aos"),m.node.removeAttribute("data-aos-easing"),m.node.removeAttribute("data-aos-duration"),m.node.removeAttribute("data-aos-delay")})},O=function(m){return m===!0||m==="mobile"&&g.default.mobile()||m==="phone"&&g.default.phone()||m==="tablet"&&g.default.tablet()||typeof m=="function"&&m()===!0},T=function(m){B=o(B,m),z=(0,P.default)();var b=document.all&&!window.atob;return O(B.disable)||b?D():(B.disableMutationObserver||p.default.isSupported()||(console.info(` 830 aos: MutationObserver is not supported on this browser, 831 code mutations observing has been disabled. 832 You may have to call "refreshHard()" by yourself. 833 `),B.disableMutationObserver=!0),document.querySelector("body").setAttribute("data-aos-easing",B.easing),document.querySelector("body").setAttribute("data-aos-duration",B.duration),document.querySelector("body").setAttribute("data-aos-delay",B.delay),B.startEvent==="DOMContentLoaded"&&["complete","interactive"].indexOf(document.readyState)>-1?I(!0):B.startEvent==="load"?window.addEventListener(B.startEvent,function(){I(!0)}):document.addEventListener(B.startEvent,function(){I(!0)}),window.addEventListener("resize",(0,f.default)(I,B.debounceDelay,!0)),window.addEventListener("orientationchange",(0,f.default)(I,B.debounceDelay,!0)),window.addEventListener("scroll",(0,l.default)(function(){(0,x.default)(z,B.once)},B.throttleDelay)),B.disableMutationObserver||p.default.ready("[data-aos]",j),z)};r.exports={init:T,refresh:I,refreshHard:j}},function(r,n){},,,,,function(r,n){(function(i){function s(O,T,m){function b(le){var ye=G,$t=S;return G=S=void 0,ee=le,ne=O.apply($t,ye)}function E(le){return ee=le,Z=setTimeout(M,T),re?b(le):ne}function k(le){var ye=le-Q,$t=le-ee,wt=T-ye;return ie?j(wt,J-$t):wt}function R(le){var ye=le-Q,$t=le-ee;return Q===void 0||ye>=T||ye<0||ie&&$t>=J}function M(){var le=D();return R(le)?H(le):void(Z=setTimeout(M,k(le)))}function H(le){return Z=void 0,me&&G?b(le):(G=S=void 0,ne)}function N(){Z!==void 0&&clearTimeout(Z),ee=0,G=Q=S=Z=void 0}function v(){return Z===void 0?ne:H(D())}function U(){var le=D(),ye=R(le);if(G=arguments,S=this,Q=le,ye){if(Z===void 0)return E(Q);if(ie)return Z=setTimeout(M,T),b(Q)}return Z===void 0&&(Z=setTimeout(M,T)),ne}var G,S,J,ne,Z,Q,ee=0,re=!1,ie=!1,me=!0;if(typeof O!="function")throw new TypeError(d);return T=u(T)||0,a(m)&&(re=!!m.leading,ie="maxWait"in m,J=ie?I(u(m.maxWait)||0,T):J,me="trailing"in m?!!m.trailing:me),U.cancel=N,U.flush=v,U}function o(O,T,m){var b=!0,E=!0;if(typeof O!="function")throw new TypeError(d);return a(m)&&(b="leading"in m?!!m.leading:b,E="trailing"in m?!!m.trailing:E),s(O,T,{leading:b,maxWait:T,trailing:E})}function a(O){var T=typeof O>"u"?"undefined":f(O);return!!O&&(T=="object"||T=="function")}function c(O){return!!O&&(typeof O>"u"?"undefined":f(O))=="object"}function l(O){return(typeof O>"u"?"undefined":f(O))=="symbol"||c(O)&&B.call(O)==h}function u(O){if(typeof O=="number")return O;if(l(O))return p;if(a(O)){var T=typeof O.valueOf=="function"?O.valueOf():O;O=a(T)?T+"":T}if(typeof O!="string")return O===0?O:+O;O=O.replace(g,"");var m=x.test(O);return m||C.test(O)?_(O.slice(2),m?2:8):y.test(O)?p:+O}var f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(O){return typeof O}:function(O){return O&&typeof Symbol=="function"&&O.constructor===Symbol&&O!==Symbol.prototype?"symbol":typeof O},d="Expected a function",p=NaN,h="[object Symbol]",g=/^\s+|\s+$/g,y=/^[-+]0x[0-9a-f]+$/i,x=/^0b[01]+$/i,C=/^0o[0-7]+$/i,_=parseInt,L=(typeof i>"u"?"undefined":f(i))=="object"&&i&&i.Object===Object&&i,P=(typeof self>"u"?"undefined":f(self))=="object"&&self&&self.Object===Object&&self,z=L||P||Function("return this")(),W=Object.prototype,B=W.toString,I=Math.max,j=Math.min,D=function(){return z.Date.now()};r.exports=o}).call(n,function(){return this}())},function(r,n){(function(i){function s(D,O,T){function m(me){var le=U,ye=G;return U=G=void 0,Q=me,J=D.apply(ye,le)}function b(me){return Q=me,ne=setTimeout(R,O),ee?m(me):J}function E(me){var le=me-Z,ye=me-Q,$t=O-le;return re?I($t,S-ye):$t}function k(me){var le=me-Z,ye=me-Q;return Z===void 0||le>=O||le<0||re&&ye>=S}function R(){var me=j();return k(me)?M(me):void(ne=setTimeout(R,E(me)))}function M(me){return ne=void 0,ie&&U?m(me):(U=G=void 0,J)}function H(){ne!==void 0&&clearTimeout(ne),Q=0,U=Z=G=ne=void 0}function N(){return ne===void 0?J:M(j())}function v(){var me=j(),le=k(me);if(U=arguments,G=this,Z=me,le){if(ne===void 0)return b(Z);if(re)return ne=setTimeout(R,O),m(Z)}return ne===void 0&&(ne=setTimeout(R,O)),J}var U,G,S,J,ne,Z,Q=0,ee=!1,re=!1,ie=!0;if(typeof D!="function")throw new TypeError(f);return O=l(O)||0,o(T)&&(ee=!!T.leading,re="maxWait"in T,S=re?B(l(T.maxWait)||0,O):S,ie="trailing"in T?!!T.trailing:ie),v.cancel=H,v.flush=N,v}function o(D){var O=typeof D>"u"?"undefined":u(D);return!!D&&(O=="object"||O=="function")}function a(D){return!!D&&(typeof D>"u"?"undefined":u(D))=="object"}function c(D){return(typeof D>"u"?"undefined":u(D))=="symbol"||a(D)&&W.call(D)==p}function l(D){if(typeof D=="number")return D;if(c(D))return d;if(o(D)){var O=typeof D.valueOf=="function"?D.valueOf():D;D=o(O)?O+"":O}if(typeof D!="string")return D===0?D:+D;D=D.replace(h,"");var T=y.test(D);return T||x.test(D)?C(D.slice(2),T?2:8):g.test(D)?d:+D}var u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(D){return typeof D}:function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},f="Expected a function",d=NaN,p="[object Symbol]",h=/^\s+|\s+$/g,g=/^[-+]0x[0-9a-f]+$/i,y=/^0b[01]+$/i,x=/^0o[0-7]+$/i,C=parseInt,_=(typeof i>"u"?"undefined":u(i))=="object"&&i&&i.Object===Object&&i,L=(typeof self>"u"?"undefined":u(self))=="object"&&self&&self.Object===Object&&self,P=_||L||Function("return this")(),z=Object.prototype,W=z.toString,B=Math.max,I=Math.min,j=function(){return P.Date.now()};r.exports=s}).call(n,function(){return this}())},function(r,n){function i(u){var f=void 0,d=void 0;for(f=0;f<u.length;f+=1)if(d=u[f],d.dataset&&d.dataset.aos||d.children&&i(d.children))return!0;return!1}function s(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function o(){return!!s()}function a(u,f){var d=window.document,p=s(),h=new p(c);l=f,h.observe(d.documentElement,{childList:!0,subtree:!0,removedNodes:!0})}function c(u){u&&u.forEach(function(f){var d=Array.prototype.slice.call(f.addedNodes),p=Array.prototype.slice.call(f.removedNodes
833),h=d.concat(p);if(i(h))return l()})}Object.defineProperty(n,"__esModule",{value:!0});var l=function(){};n.default={isSupported:o,ready:a}},function(r,n){function i(d,p){if(!(d instanceof p))throw new TypeError("Cannot call a class as a function")}function s(){return navigator.userAgent||navigator.vendor||window.opera||""}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function d(p,h){for(var g=0;g<h.length;g++){var y=h[g];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(p,y.key,y)}}return function(p,h,g){return h&&d(p.prototype,h),g&&d(p,g),p}}(),a=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,c=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,l=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i,u=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|
833sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,f=function(){function d(){i(this,d)}return o(d,[{key:"phone",value:function(){var p=s();return!(!a.test(p)&&!c.test(p.substr(0,4)))}},{key:"mobile",value:function(){var p=s();return!(!l.test(p)&&!u.test(p.substr(0,4)))}},{key:"tablet",value:function(){return this.mobile()&&!this.phone()}}]),d}();n.default=new f},function(r,n){Object.defineProperty(n,"__esModule",{value:!0});var i=function(o,a,c){var l=o.node.getAttribute("data-aos-once");a>o.position?o.node.classList.add("aos-animate"):typeof l<"u"&&(l==="false"||!c&&l!=="true")&&o.node.classList.remove("aos-animate")},s=function(o,a){var c=window.pageYOffset,l=window.innerHeight;o.forEach(function(u,f){i(u,l+c,a)})};n.default=s},function(r,n,i){function s(l){return l&&l.__esModule?l:{default:l}}Object.defineProperty(n,"__esModule",{value:!0});var o=i(12),a=s(o),c=function(l,u){return l.forEach(function(f,d){f.node.classList.add("aos-init"),f.position=(0,a.default)(f.node,u.offset)}),l};n.default=c},function(r,n,i){function s(l){return l&&l.__esModule?l:{default:l}}Object.defineProperty(n,"__esModule",{value:!0});var o=i(13),a=s(o),c=function(l,u){var f=0,d=0,p=window.innerHeight,h={offset:l.getAttribute("data-aos-offset"),anchor:l.getAttribute("data-aos-anchor"),anchorPlacement:l.getAttribute("data-aos-anchor-placement")};switch(h.offset&&!isNaN(h.offset)&&(d=parseInt(h.offset)),h.anchor&&document.querySelectorAll(h.anchor)&&(l=document.querySelectorAll(h.anchor)[0]),f=(0,a.default)(l).top,h.anchorPlacement){case"top-bottom":break;case"center-bottom":f+=l.offsetHeight/2;break;case"bottom-bottom":f+=l.offsetHeight;break;case"top-center":f+=p/2;break;case"bottom-center":f+=p/2+l.offsetHeight;break;case"center-center":f+=p/2+l.offsetHeight/2;break;case"top-top":f+=p;break;case"bottom-top":f+=l.offsetHeight+p;break;case"center-top":f+=l.offsetHeight/2+p}return h.anchorPlacement||h.offset||isNaN(u)||(d=u),f+d};n.default=c},function(r,n){Object.defineProperty(n,"__esModule",{value:!0});var i=function(s){for(var o=0,a=0;s&&!isNaN(s.offsetLeft)&&!isNaN(s.offsetTop);)o+=s.offsetLeft-(s.tagName!="BODY"?s.scrollLeft:0),a+=s.offsetTop-(s.tagName!="BODY"?s.scrollTop:0),s=s.offsetParent;return{top:a,left:o}};n.default=i},function(r,n){Object.defineProperty(n,"__esModule",{value:!0});var i=function(s){return s=s||document.querySelectorAll("[data-aos]"),Array.prototype.map.call(s,function(o){return{node:o}})};n.default=i}])})})($B);var hie=$B.exports;const pie=is(hie);function gie(){const{t}=Zo("landing"),[e,r]=se.useState([]),n=[1,2,3,4,5,6,7,8,9,10],i=1e3,s=2e3,o=10,[a,c]=se.useState(0);return se.useEffect(()=>{if(a>=o)return;let l=[];return(()=>
833{r([]),n.forEach((d,p)=>{const h=setTimeout(()=>{r(g=>[...g,d])},p*i);l.push(h)});const f=setTimeout(()=>{c(d=>d+1)},n.length*i+s);l.push(f)})(),()=>{l.forEach(clearTimeout)}},[a]),w.jsx("div",{className:" py-20 font-gilroy ",children:w.jsxs("div",{className:" relative overflow-hidden flex flex-col justify-center items-center",children:[w.jsxs("div",{className:"w-full h-full absolute top-0 ",children:[w.jsx("div",{className:" w-32 h-16 absolute top-20 -right-10 bg-[#00BA34] opacity-55 rounded-full "}),w.jsx("div",{className:" w-8 h-24 absolute top-16 -left-5 bg-[#00BA34] opacity-55 rounded-full "})]}),w.jsx("div",{className:"w-[100%] mx-auto flex flex-col justify-center items-center overflow-hidden overflow-x-auto py-10 font-gilroy bg-[#8989890D] border border-white/5 backdrop-blur-3xl rounded-2xl ",children:w.jsxs("div",{className:"w-[1280px] py-5 -translate-x-5 mx-auto overflow-hidden overflow-x-auto flex flex-col justify-center items-center ",children:[w.jsxs("div",{className:"w-[100%] -translate-x-14 flex justify-center items-center gap-3",children:[w.jsxs("div",{className:` translate-y-3 relative flex flex-col items-center ${e.includes(1)?"opacity-100":"opacity-30"}`,children:[w.jsxs("div",{className:" relative flex flex-col items-center justify-center",children:[w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/Group4.svg",className:" w-28 "}),w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/assets/LOGO_Icon_GIF.gif",className:" absolute w-10 "})]}),w.jsx("div",{className:"flex justify-center items-center",children:w.jsx("p",{className:" text-sm font-semibold w-[50%] text-center ",children:t("section10.learningHub")})}),w.jsxs("div",{children:[w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/Connectorline.svg",className:" size-24 absolute -top-7 translate-x-10 "}),w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/Connectorline.svg",className:" size-24 absolute bottom-0 translate-x-10 scale-y-[-1] "})]})]}),w.jsxs("div",{className:"w-[72%] -translate-x-10 relative border-2 border-dashed rounded-2xl border-white/30 px-5 flex justify-between items-center gap-5 ",children:[w.jsx("div",{className:" bg-[#080808] px-5 py-1 absolute -top-4 left-1/2 transform -translate-x-1/2 ",children:w.jsx("p",{style:{color:"transparent",backgroundClip:"text",WebkitBackgroundClip:"text",backgroundImage:"linear-gradient( to right, #0285FF, #1EEF32 )"},className:" font-medium text-white text-center uppercase text-lg ",children:t("section10.gamifiedLearning")})}),w.jsxs("div",{className:` relative flex flex-col justify-between items-center ${e.includes(2)?"opacity-100":"opacity-30"} `,children:[w.jsxs("div",{className:" relative -translate-y-3 ",children:[w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/repeat2.svg",alt:"Repeat",className:"w-36 h-36 object-cover"}),w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/robowbook.svg",alt:"Overlay",className:"w-9 rounded-full absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2"})]}),w.jsxs("div",{className:" relative translate-y-2",children:[w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/grow3.svg",alt:"Repeat",className:"w-36 h-36 object-cover"}),w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/handshake2.png",alt:"Overlay",className:"w-10 rounded-full absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2"})]}),w.jsxs("div",{children:[w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/Connectorline2.svg",className:" size-20 absolute top-12 -right-9 "}),w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/Connectorline2.svg",className:" size-20 absolute bottom-12 -right-9 scale-y-[-1] "})]})]}),w.jsxs("div",{className:`${e.includes(3)?"opacity-100":"opacity-30"} flex items-center `,children:[w.jsxs("div",{className:" bg-white/5 rounded-xl py-3 px-5 flex flex-col gap-8 ",children:[w.jsx("div",{className:" bg-gradient-to-r from-[#0285FF] to-[#1EEF32] rounded-lg p-[1px] ",children:w.jsx("div",{className:" bg-[#121212] rounded-lg ",children:w.jsx("div",{className:" w-full bg-gradient-to-r from-[#0285FF1A] to-[#0285FF00] px-3 py-1.5 rounded-lg ",children:w.jsx("p",{className:" font-semibold text-white text-center text-sm ",children:t("section10.learnerA")})})})}),w.jsx("div",{className:" bg-gradient-to-r from-[#0285FF] to-[#1EEF32] rounded-lg p-[1px] ",children:w.jsx("div",{className:" bg-[#121212] rounded-lg ",children:w.jsx("div",{className:" w-full bg-gradient-to-r from-[#0285FF1A] to-[#0285FF00] px-3 py-1.5 rounded-lg ",children:w.jsx("p",{className:" font-semibold text-white text-center text-sm ",children:t("section10.learnerB")})})})})]}),w.jsxs("div",{className:" flex items-center ",children:[w.jsx("div",{className:" w-14 h-0.5 bg-gradient-to-r from-[#0285FF] to-[#1EEF32] "}),w.jsx("div",{className:" w-3 h-3 bg-[#1EEF32] rotate-45 "})]})]}),w.jsxs("div",{className:` ${e.includes(4)?"opacity-100":"opacity-30"} flex items-center `,children:[w.jsxs("div",{className:" flex flex-col items-center ",children:[w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/userflow1.svg",className:" w-14 "}),w.jsxs("p",{className:" text-xs font-semibold text-center ",children:[t("section10.walletConnectivity")," "]})]}),w.jsxs("div",{className:" flex items-center ",children:[w.jsx("div",{className:" w-14 h-0.5 bg-gradient-to-r from-[#0285FF] to-[#1EEF32] "}),w.jsx("div",{className:" w-3 h-3 bg-[#1EEF32] rotate-45 "})]})]}),w.jsxs("div",{className:` ${e.includes(5)?"opacity-100":"opacity-30"} flex items-center `,children:[w.jsxs("div",{className:" flex flex-col items-center gap-1 ",children:[w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/assets/Coin_Flip_256x256(1).gif",className:" w-12 "}),w.jsxs("p",{className:" text-xs font-semibold text-center ",children:[t("section10.tokenPurchase")," "]})]}),w.jsxs("div",{className:" flex items-center ",children:[w.jsx("div",{className:" w-14 h-0.5 bg-gradient-to-r from-[#0285FF] to-[#1EEF32] "}),w.jsx("div",{className:" w-3 h-3 bg-[#1EEF32] rotate-45 "})]})]}),w.jsxs("div",{className:` ${e.includes(6)?"opacity-100":"opacity-30"} flex flex-col items-center mt-14 `,children:[w.jsxs("div",{className:" flex flex-col items-center gap-1 ",children:[w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/userflow2.svg",className:" w-12 "}),w.jsxs("p",{className:" text-xs font-semibold text-center ",children:[t("section10.subscribesPackages")," "]})]}),w.jsxs("div",{className:" flex flex-col items-center ",children:[w.jsx("div",{className:" w-0.5 h-10 bg-gradient-to-r from-[#0285FF] to-[#1EEF32] "}),w.jsx("div",{className:" w-3 h-3 bg-[#1EEF32] rotate-45 "})]}),w.jsx("div",{className:" translate-y-3 bg-gradient-to-r from-[#0285FF] to-[#1EEF32] rounded-lg p-[1px] ",children:w.jsx("div",{className:" bg-[#121212] rounded-lg ",children:w.jsx("div",{className:" w-full px-3 py-1.5 rounded-lg ",children:w.jsx("p",{style:{color:"transparent",backgroundClip:"text",WebkitBackgroun
833dClip:"text",backgroundImage:"linear-gradient( to right, #0285FF, #1EEF32 )"},className:" font-medium text-white text-center uppercase ",children:t("section10.playLearn")})})})})]})]})]}),w.jsx("div",{className:" w-[100%] flex justify-end my-7 pr-24 relative ",children:w.jsxs("div",{className:` ${e.includes(7)?"opacity-100":"opacity-30"} flex flex-col items-center `,children:[w.jsx("div",{className:" absolute -top-9 flex flex-col items-center ",children:w.jsx("div",{className:" w-0.5 h-8 bg-[#1EEF32] "})}),w.jsx("div",{className:" w-[70%] bg-gradient-to-r from-[#0285FF] to-[#1EEF32] rounded-lg p-[1px] ",children:w.jsx("div",{className:" bg-[#121212] rounded-lg ",children:w.jsx("div",{className:"w-full bg-gradient-to-r from-[#0285FF1A] to-[#0285FF00] px-3 py-1.5 rounded-lg ",children:w.jsx("p",{className:" font-semibold text-white text-center text-sm text-center ",children:t("section10.smartMinting")})})})}),w.jsxs("div",{className:" absolute -bottom-32 flex flex-col items-center ",children:[w.jsx("div",{className:" w-0.5 h-28 bg-gradient-to-r from-[#0285FF] to-[#1EEF32] "}),w.jsx("div",{className:" w-3 h-3 bg-[#1EEF32] rotate-45 "})]})]})}),w.jsxs("div",{className:" relative w-full flex justify-center items-center ",children:[w.jsx("div",{className:` absolute top-20 left-10 ${e.includes(10)?"opacity-100":"opacity-30"} `,children:w.jsxs("div",{className:" flex items-center relative ",children:[w.jsx("p",{style:{color:"transparent",backgroundClip:"text",WebkitBackgroundClip:"text",backgroundImage:"linear-gradient( to right, #0285FF, #1EEF32 )"},className:" font-medium text-white absolute top-0 left-8 text-center uppercase text-lg -rotate-90 ",children:t("section10.repeat")}),w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/Connectorline3.svg",className:" size-80 -translate-x-4 -translate-y-36 "})]})}),w.jsxs("div",{className:"w-[72%] relative border-2 border-dashed rounded-2xl border-white/30 py-12 px-5 flex items-center gap-2 ",children:[w.jsx("div",{className:" bg-[#080808] px-5 py-1 absolute -bottom-4 left-1/2 transform -translate-x-1/2 ",children:w.jsx("p",{style:{color:"transparent",backgroundClip:"text",WebkitBackgroundClip:"text",backgroundImage:"linear-gradient( to right, #0285FF, #1EEF32 )"},className:" font-medium text-white text-center uppercase text-lg ",children:t("section10.incentivizedEarning")})}),w.jsx("div",{className:` lg:w-[85%] w-[100%] relative flex flex-col justify-center items-center ${e.includes(9)?"opacity-100":"opacity-30"}`,children:w.jsxs("div",{className:"w-full mx-auto py-5 px-3 font-gilroy bg-[#8989890D] border border-white/5 backdrop-blur-3xl rounded-2xl relative ",children:[w.jsx("div",{className:" flex justify-center ",children:w.jsx("div",{className:" -translate-y-10 bg-gradient-to-r from-[#0285FF] to-[#1EEF32] rounded-lg p-[1px] ",children:w.jsx("div",{className:" bg-black rounded-lg px-10 ",children:w.jsx("div",{className:" w-full px-3 py-1.5 rounded-lg ",children:w.jsx("p",{className:" font-semibold text-white text-center ",children:t("section10.web3Contributors")})})})})}),w.jsx("div",{className:"w-[95%] left-3 absolute top-28 ",children:w.jsxs("div",{className:"w-full mx-auto flex justify-around",children:[w.jsxs("div",{className:"w-1/3 flex flex-col justify-center items-center ",children:[w.jsx("div",{className:" w-0.5 h-12 bg-gradient-to-r from-[#0285FF] to-[#1EEF32] "}),w.jsx("div",{className:" w-3 h-3 bg-[#1EEF32] rotate-45 "})]}),w.jsxs("div",{className:"w-1/3 flex flex-col justify-center items-center ",children:[w.jsx("div",{className:" w-0.5 h-12 bg-gradient-to-r from-[#0285FF] to-[#1EEF32] "}),w.jsx("div",{className:" w-3 h-3 bg-[#1EEF32] rotate-45 "})]}),w.jsxs("div",{className:"w-1/3 flex flex-col justify-center items-center ",children:[w.jsx("div",{className:" w-0.5 h-12 bg-gradient-to-r from-[#0285FF] to-[#1EEF32] "}),w.jsx("div",{className:" w-3 h-3 bg-[#1EEF32] rotate-45 "})]})]})}),w.jsx("div",{className:"w-full h-12 flex justify-between items-center border border-dashed border-[#1EEF32]/70 bg-[#004017] rounded-xl px-5 py-2",children:w.jsxs("div",{className:"w-full flex justify-around items-center ",children:[w.jsx("p",{className:"w-1/3 uppercase text-xs text-center ",children:t("section10.toolDeveloper")}),w.jsx("p",{className:"w-1/3 uppercase text-xs text-center ",children:t("section10.contentCreator")}),w.jsx("p",{className:"w-1/3 uppercase text-xs text-center ",children:t("section10.aiSme")})]})}),w.jsxs("div",{className:" py-5 flex justify-center items-center gap-32 ",children:[w.jsx("p",{className:"text-center text-2xl opacity-50 font-medium ",style:{color:"transparent",backgroundClip:"text",WebkitBackgroun
833dClip:"text",backgroundImage:"linear-gradient( to right, #0285FF, #1EEF32 )"},children:"OR"}),w.jsx("p",{className:"text-center text-2xl opacity-50 font-medium ",style:{color:"transparent",backgroundClip:"text",WebkitBackgroundClip:"text",backgroundImage:"linear-gradient( to right, #0285FF, #1EEF32 )"},children:"OR"})]}),w.jsx("div",{className:"w-full h-12 flex justify-between items-center border border-dashed border-[#1EEF32]/70 bg-[#004017] rounded-xl px-5 py-2",children:w.jsxs("div",{className:"w-full flex justify-around items-center ",children:[w.jsx("p",{className:"w-1/3 uppercase text-xs text-center ",children:t("section10.aiTool")}),w.jsx("p",{className:"w-1/3 uppercase text-xs text-center ",children:t("section10.aiCourse")}),w.jsx("p",{className:"w-1/3 uppercase text-xs text-center ",children:t("section10.mentorship")})]})})]})}),w.jsxs("div",{className:`flex items-start -translate-y-6 ${e.includes(8)?"opacity-100":"opacity-30"}`,children:[w.jsxs("div",{className:"",children:[w.jsx("p",{style:{color:"transparent",backgroundClip:"text",WebkitBackgroundClip:"text",backgroundImage:"linear-gradient( to right, #0285FF, #1EEF32 )"},className:" font-medium text-white text-center uppercase text-lg ",children:t("section10.grow")}),w.jsxs("div",{className:" flex items-center ",children:[w.jsx("div",{className:" w-3 h-3 bg-[#1EEF32] rotate-45 "}),w.jsx("div",{className:"w-[95%] h-0.5 bg-[#1EEF32] "})]}),w.jsx("p",{className:" w-[65%] mx-auto text-[11px] font-semibold text-center ",children:t("section10.contributorDesc")})]}),w.jsxs("div",{className:" flex flex-col items-center gap-3 ",children:[w.jsx("div",{className:"bg-gradient-to-r from-[#0285FF]/70 to-[#1EEF32]/70 rounded-lg border border-white/60 py-2 px-5 ",children:w.jsx("p",{className:" uppercase font-semibold text-center text-xs ",children:t("section10.claimRewards")})}),w.jsx("div",{children:w.jsx("p",{style:{color:"transparent",backgroundClip:"text",WebkitBackgroundClip:"text",backgroundImage:"linear-gradient( to right, #0285FF, #1EEF32 )"},className:" font-medium text-white text-center uppercase text-lg ",children:t("section10.earn")})})]})]})]}),w.jsx("div",{className:" absolute top-5 right-5 ",children:w.jsxs("div",{className:" flex items-center relative ",children:[w.jsx("p",{style:{color:"transparent",backgroundClip:"text",WebkitBackgroundClip:"text",backgroundImage:"linear-gradient( to right, #0285FF, #1EEF32 )"},className:" font-medium text-white absolute -top-5 right-14 text-center uppercase text-lg -rotate-90 ",children:t("section10.repeat")}),w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/New/Landing/Arrow 98.svg",className:" size-[295px] -translate-y-44 "})]})})]})]})})]})})}const mie=[{code:"en",name:"English",flag:"ð¬ð§"},{code:"ta",name:"Tamil",flag:"ð®ð³"},{code:"es",name:"Español",flag:"ðªð¸"},{code:"de",name:"Deutsch",flag:"ð©ðª"},{code:"hi",name:"हिनà¥à¤¦à¥",flag:"ð®ð³"},{code:"pa",name:"ਪੰà¨à¨¾à¨¬à©",flag:"ð®ð³"}],gT=()=>{const{i18n:t}=Zo(),e=r=>{t.changeLanguage(r),document.documentElement.lang=r};return w.jsx("div",{className:"relative inline-block text-left",children:w.jsx("select",{value:t.language,onChange:r=>e(r.target.value),className:"bg-black text-white border border-white/50 rounded-lg px-3 py-1 text-xs font-medium focus:outline-none focus:ring-2 focus:ring-[#0285FF] appearance-none cursor-pointer",style:{backgroundImage:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='Length 19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E")`,backgroundRepeat:"no-repeat",backgroundPosition:"right 0.5rem center",backgroundSize:"1rem",paddingRight:"2rem"},children:mie.map(r=>w.jsxs("option",{value:r.code,className:"bg-[#01000A] text-white",children:[r.flag," ",r.name]},r.code))})})};function Ro(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var yie=typeof Symbol=="function"&&Symbol.observable||"@@observable",mT=yie,yT=()=>Math.random().toString(36).substring(7).split("").join("."),bie={INIT:`@@redux/INIT${yT()}`,REPLACE:`@@redux/REPLACE${yT()}`},bT=bie;function wie(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function P9(t,e,r){if(typeof t!="function")throw new Error(Ro(2));if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ro(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ro(1));return r(P9)(t,e)}
833let n=t,i=e,s=new Map,o=s,a=0,c=!1;function l(){o===s&&(o=new Map,s.forEach((y,x)=>{o.set(x,y)}))}function u(){if(c)throw new Error(Ro(3));return i}function f(y){if(typeof y!="function")throw new Error(Ro(4));if(c)throw new Error(Ro(5));let x=!0;l();const C=a++;return o.set(C,y),function(){if(x){if(c)throw new Error(Ro(6));x=!1,l(),o.delete(C),s=null}}}function d(y){if(!wie(y))throw new Error(Ro(7));if(typeof y.type>"u")throw new Error(Ro(8));if(typeof y.type!="string")throw new Error(Ro(17));if(c)throw new Error(Ro(9));try{c=!0,i=n(i,y)}finally{c=!1}return(s=o).forEach(C=>{C()}),y}function p(y){if(typeof y!="function")throw new Error(Ro(10));n=y,d({type:bT.REPLACE})}function h(){const y=f;return{subscribe(x){if(typeof x!="object"||x===null)throw new Error(Ro(11));function C(){const L=x;L.next&&L.next(u())}return C(),{unsubscribe:y(C)}},[mT](){return this}}}return d({type:bT.INIT}),{dispatch:d,subscribe:f,getState:u,replaceReducer:p,[mT]:h}}function vie(t,e,r){return P9(t,e,r)}var R9="persist:",UB="persist/FLUSH",O9="persist/REHYDRATE",BB="persist/PAUSE",FB="persist/PERSIST",jB="persist/PURGE",zB="persist/REGISTER",xie=-1;function cv(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?cv=function(r){return typeof r}:cv=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},cv(t)}function wT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Eie(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?wT(r,!0).forEach(function(n){Cie(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):wT(r).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Cie(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _ie(t,e,r,n){n.debug;var i=Eie({},r);return t&&cv(t)==="object"&&Object.keys(t).forEach(function(s){s!=="_persist"&&e[s]===r[s]&&(i[s]=t[s])}),i}function Aie(t){var e=t.blacklist||null,r=t.whitelist||null,n=t.transforms||[],i=t.throttle||0,s="".concat(t.keyPrefix!==void 0?t.keyPrefix:R9).concat(t.key),o=t.storage,a;t.serialize===!1?a=function(P){return P}:typeof t.serialize=="function"?a=t.serialize:a=Sie;var c=t.writeFailHandler||null,l={},u={},f=[],d=null,p=null,h=function(P){Object.keys(P).forEach(function(z){x(z)&&l[z]!==P[z]&&f.indexOf(z)===-1&&f.push(z)}),Object.keys(l).forEach(function(z){P[z]===void 0&&x(z)&&f.indexOf(z)===-1&&l[z]!==void 0&&f.push(z)}),d===null&&(d=setInterval(g,i)),l=P};function g(){if(f.length===0){d&&clearInterval(d),d=null;return}var L=f.shift(),P=n.reduce(function(z,W){return W.in(z,L,l)},l[L]);if(P!==void 0)try{u[L]=a(P)}catch(z){console.error("redux-persist/createPersistoid: error serializing state",z)}else delete u[L];f.length===0&&y()}function y(){Object.keys(u).forEach(function(L){l[L]===void 0&&delete u[L]}),p=o.setItem(s,a(u)).catch(C)}function x(L){return!(r&&r.indexOf(L)===-1&&L!=="_persist"||e&&e.indexOf(L)!==-1)}function C(L){c&&c(L)}var _=function(){for(;f.length!==0;)g();return p||Promise.resolve()};return{update:h,flush:_}}function Sie(t){return JSON.stringify(t)}function Nie(t){var e=t.transforms||[],r="".concat(t.keyPrefix!==void 0?t.keyPrefix:R9).concat(t.key),n=t.storage;t.debug;var i;return t.deserialize===!1?i=function(o){return o}:typeof t.deserialize=="function"?i=t.deserialize:i=Iie,n.getItem(r).then(function(s){if(s)try{var o={},a=i(s);return Object.keys(a).forEach(function(c){o[c]=e.reduceRight(function(l,u){return u.out(l,c,a)},i(a[c]))}),o}catch(c){throw c}else return})}function Iie(t){return JSON.parse(t)}function Tie(t){var e=t.storage,r="".concat(t.keyPrefix!==void 0?t.keyPrefix:R9).concat(t.key);return e.removeItem(r,kie)}function kie(t){}function vT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function kl(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};
vendor: 4,218 bytes, line 833
833e%2?vT(r,!0).forEach(function(n){Pie(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vT(r).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Pie(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Rie(t,e){if(t==null)return{};var r=Oie(t,e),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)n=s[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Oie(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,s;for(s=0;s<n.length;s++)i=n[s],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}var Die=5e3;function Lie(t,e){var r=t.version!==void 0?t.version:xie;t.debug;var n=t.stateReconciler===void 0?_ie:t.stateReconciler,i=t.getStoredState||Nie,s=t.timeout!==void 0?t.timeout:Die,o=null,a=!1,c=!0,l=function(f){return f._persist.rehydrated&&o&&!c&&o.update(f),f};return function(u,f){var d=u||{},p=d._persist,h=Rie(d,["_persist"]),g=h;if(f.type===FB){var y=!1,x=function(B,I){y||(f.rehydrate(t.key,B,I),y=!0)};if(s&&setTimeout(function(){!y&&x(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(t.key,'"')))},s),c=!1,o||(o=Aie(t)),p)return kl({},e(g,f),{_persist:p});if(typeof f.rehydrate!="function"||typeof f.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return f.register(t.key),i(t).then(function(W){var B=t.migrate||function(I,j){return Promise.resolve(I)};B(W,r).then(function(I){x(I)},function(I){x(void 0,I)})},function(W){x(void 0,W)}),kl({},e(g,f),{_persist:{version:r,rehydrated:!1}})}else{if(f.type===jB)return a=!0,f.result(Tie(t)),kl({},e(g,f),{_persist:p});if(f.type===UB)return f.result(o&&o.flush()),kl({},e(g,f),{_persist:p});if(f.type===BB)c=!0;else if(f.type===O9){if(a)return kl({},g,{_persist:kl({},p,{rehydrated:!0})});if(f.key===t.key){var C=e(g,f),_=f.payload,L=n!==!1&&_!==void 0?n(_,u,C,t):C,P=kl({},L,{_persist:kl({},p,{rehydrated:!0})});return l(P)}}}if(!p)return e(u,f);var z=e(g,f);return z===g?u:l(kl({},z,{_persist:p}))}}function xT(t){return Uie(t)||$ie(t)||Mie()}function Mie(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function $ie(t){if(Symbol.iterator in Object(t)||Object.prototype.toString.call(t)==="[object Arguments]")return Array.from(t)}function Uie(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}function ET(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function EC(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ET(r,!0).forEach(function(n){Bie(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ET(r).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Bie(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var WB={registry:[],bootstrapped:!1},Fie=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:WB,r=arguments.length>1?arguments[1]:void 0;switch(r.type){case zB:return EC({},e,{registry:[].concat(xT(e.registry),[r.key])});case O9:var n=e.registry.indexOf(r.key),i=xT(e.registry);return i.splice(n,1),EC({},e,{registry:i,bootstrapped:i.length===0});default:return e}};function jie(t,e,r){var n=P9(Fie,WB,void 0),i=function(c){n.dispatch({type:zB,key:c})},s=function(c,l,u){var f={type:O9,payload:l,err:u,key:c};t.dispatch(f),n.dispatch(f)},o=EC({},n,{purge:function(){var c=[];return t.dispatch({type:jB,result:function(u){c.push(u)}}),Promise.all(c)},flush:function(){var c=[];return t.dispatch({type:UB,result:function(u){c.push(u)}}),Promise.all(c)},pause:function(){t.dispatch({type:BB})}
833,persist:function(){t.dispatch({type:FB,register:i,rehydrate:s})}});return o.persist(),o}var D9={},L9={};L9.__esModule=!0;L9.default=Hie;function lv(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?lv=function(r){return typeof r}:lv=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},lv(t)}function Y5(){}var zie={getItem:Y5,setItem:Y5,removeItem:Y5};function Wie(t){if((typeof self>"u"?"undefined":lv(self))!=="object"||!(t in self))return!1;try{var e=self[t],r="redux-persist ".concat(t," test");e.setItem(r,"test"),e.getItem(r),e.removeItem(r)}catch{return!1}return!0}function Hie(t){var e="".concat(t,"Storage");return Wie(e)?self[e]:zie}D9.__esModule=!0;D9.default=Kie;var qie=Vie(L9);function Vie(t){return t&&t.__esModule?t:{default:t}}function Kie(t){var e=(0,qie.default)(t);return{getItem:function(n){return new Promise(function(i,s){i(e.getItem(n))})},setItem:function(n,i){return new Promise(function(s,o){s(e.setItem(n,i))})},removeItem:function(n){return new Promise(function(i,s){i(e.removeItem(n))})}}}var HB=void 0,Gie=Yie(D9);function Yie(t){return t&&t.__esModule?t:{default:t}}var Zie=(0,Gie.default)("local");HB=Zie;const Jie={user_email:"",admin_email:"",admin:"",merchant:{name:"",email:"",token:"",role:"",id:"",merchantId:""}},Qie=(t=Jie,e)=>{switch(e.type){case"SET_user_email":return{...t,user_email:e.payload};case"SET_TOKEN":return{...t,token:e.payload};case"SET_ADMIN_EMAIL":return{...t,admin_email:e.payload};case"ADMIN_DETAIL":return{...t,admin:e.payload};case"SET_MERCHANT_DETAILS":return{...t,merchant:{name:e.payload.name,email:e.payload.email,token:e.payload.token,role:e.payload.role,id:e.payload.id,merchantId:e.payload.merchantId}};case"CLEAR_MERCHANT":return{...t,merchant:{name:"",email:"",token:"",role:"",id:"",merchantId:""}};default:return t}},Xie=t=>({type:"SET_user_email",payload:t}),ese=t=>({type:"SET_TOKEN",payload:t}),k$e=t=>({type:"ADMIN_DETAIL",payload:t}),P$e=t=>({type:"SET_MERCHANT_DETAILS",payload:{name:t.name,email:t.email,token:t.token,id:t.id,role:t.role,merchantId:t.merchantId}}),R$e=()=>({type:"CLEAR_MERCHANT"}),tse={key:"root",storage:HB},rse=Lie(tse,Qie),qB=vie(rse),O$e=jie(qB),nse=()=>{const{t}=Zo(),e=$y(),r=tX(),[n,i]=se.useState(!1),[s,o]=se.useState(!1),a=se.useRef(null);se.useEffect(()=>{const h=g=>{a.current&&!a.current.contains(g.target)&&o(!1)};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[]);const c=()=>{r(ese("")),r(Xie("")),localStorage.clear(),sessionStorage.clear(),e("/UserLogin")},l=Ah(h=>h.user_email),f=!!(Ah(h=>h.token)&&l&&l.id),d=(l==null?void 0:l.name)||(l==null?void 0:l.username)||(l==null?void 0:l.email)||"",p=()=>{i(!n)};return w.jsx("div",{className:" sticky top-0 z-50 font-gilroy border-b border-white/50 ",children:w.jsxs("div",{className:" mx-auto relative bg-black text-white py-3 px-10 text-sm ",children:[w.jsxs("div",{className:"flex justify-between items-center",children:[w.jsx(ps,{to:"/",children:w.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0 ",children:[w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/assets/LOGO_Icon_GIF.gif",className:"w-10 h-10",alt:"logo"}),w.jsx("p",{style:{color:"transparent",backgroundClip:"text",WebkitBackgroundClip:"text",backgroundImage:"linear-gradient( to right, #00E0FF, #061FA1 ) "},className:" uppercase font-medium text-xs font-zendots ",children:"Skilleareum"})]})}),w.jsxs("nav",{className:" hidden lg:flex uppercase gap-10 ",children:[w.jsx(ps,{to:"/",style:({isActive:h})=>({color:h?"transparent":"white",fontWeight:h?"bold":"500",backgroundClip:h?"text":"none",WebkitBackgroundClip:h?"text":"none",backgroundImage:h?"linear-gradient( to right, #0285FF, #1EEF32 )":"none",fontSize:"13px"}),children:t("home")}),w.jsx(ps,{to:"/Aboutus",style:({isActive:h})=>({color:h?"transparent":"white",fontWeight:h?"bold":"500",backgroundClip:h?"text":"none",WebkitBackgroundClip:h?"text":"none",backgroundImage:h?"linear-gradient( to right, #0285FF, #1EEF32 )":"none",fontSize:"13px"}),children:t("aboutUs")}),w.jsx(ps,{to:"/Community",style:({isActive:h})=>({color:h?"transparent":"white",fontWeight:h?"bold":"500",backgroundClip:h?"text":"none",WebkitBackgroun
833dClip:h?"text":"none",backgroundImage:h?"linear-gradient( to right, #0285FF, #1EEF32 )":"none",fontSize:"13px"}),children:t("community")}),w.jsx(ps,{to:"/Whitepaper",style:({isActive:h})=>({color:h?"transparent":"white",fontWeight:h?"bold":"500",backgroundClip:h?"text":"none",WebkitBackgroundClip:h?"text":"none",backgroundImage:h?"linear-gradient( to right, #0285FF, #1EEF32 )":"none",fontSize:"13px"}),children:t("whitepaper")}),w.jsx(ps,{to:"/Contactus",style:({isActive:h})=>({color:h?"transparent":"white",fontWeight:h?"bold":"500",backgroundClip:h?"text":"none",WebkitBackgroundClip:h?"text":"none",backgroundImage:h?"linear-gradient( to right, #0285FF, #1EEF32 )":"none",fontSize:"13px"}),children:t("contactUs")})]}),w.jsxs("div",{className:" hidden lg:flex items-center gap-5 ",children:[w.jsx(gT,{}),f?w.jsxs("div",{className:"relative",ref:a,children:[w.jsx("div",{onClick:()=>o(!s),className:"flex items-center gap-2 cursor-pointer",children:w.jsx("div",{className:"bg-gradient-to-r from-[#0285FF] to-[#1EEF32] p-[1.5px] rounded-full",children:w.jsxs("div",{className:"bg-black px-5 py-1.5 font-semibold rounded-full flex items-center gap-2",children:[w.jsx(ni,{icon:CI,className:"text-xs"}),w.jsx("span",{style:{color:"transparent",backgroundClip:"text",WebkitBackgroundClip:"text",backgroundImage:"linear-gradient( to right, #0285FF, #1EEF32 )"},children:d}),w.jsx(ni,{icon:_I,className:"text-xs text-white/70 ml-1"})]})})}),s&&w.jsxs("div",{className:"absolute right-0 mt-2 w-48 bg-[#111] border border-white/20 rounded-xl shadow-lg z-50 overflow-hidden",children:[w.jsx(ps,{to:"/ChallengeMap_7Days",onClick:()=>o(!1),className:"block px-4 py-3 text-sm text-white hover:bg-white/10 transition-colors border-b border-white/10",children:"Challenge Map"}),w.jsx(ps,{to:"/user-dashboard",className:"block px-4 py-3 text-sm text-white hover:bg-white/10 transition-colors border-b border-white/10",children:"Dashboard"}),w.jsxs("button",{onClick:c,className:"w-full text-left px-4 py-3 text-sm text-red-500 hover:bg-white/10 transition-colors",children:[w.jsx(ni,{icon:dX,className:"mr-3 w-4"}),"Logout"]})]})]}):w.jsx("div",{onClick:()=>e("/UserLogin"),className:" cursor-pointer bg-gradient-to-r from-[#0285FF] to-[#1EEF32] p-[1.5px] text-white rounded-full",children:w.jsxs("div",{className:" bg-black px-5 py-1.5 font-semibold rounded-full flex gap-3",children:[w.jsx("p",{className:" text-sm ",children:t("signIn")}),w.jsx("div",{className:" w-5 h-5 flex justify-center items-center rounded-full border border-white ",children:w.jsx(ni,{icon:Af,className:" text-xs -rotate-45 "})})]})})]}),w.jsx("div",{className:"lg:hidden md:flex flex-col justify-end ",children:w.jsx("button",{onClick:p,className:"text-white ",children:n?w.jsx(ni,{icon:gX}):w.jsx(ni,{icon:cX})})})]}),n&&w.jsxs("div",{className:"bg-black border border-white/50 rounded-xl fixed right-5 z-20 text-white p-7 uppercase lg:hidden",children:[w.jsxs("nav",{className:"flex flex-col justify-center items-center gap-5 text-sm ",children:[w.jsxs(ps,{to:"/",style:({isActive:h})=>({color:h?"transparent":"white",fontWeight:h?"bold":"500",backgroundClip:h?"text":"none",WebkitBackgroundClip:h?"text":"none",backgroundImage:h?"linear-gradient( to right, #0285FF, #1EEF32 )":"none"}),children:[" ",t("home")]}),w.jsxs(ps,{to:"/Aboutus",style:({isActive:h})=>({color:h?"transparent":"white",fontWeight:h?"bold":"500",backgroundClip:h?"text":"none",WebkitBackgroundClip:h?"text":"none",backgroundImage:h?"linear-gradient( to right, #0285FF, #1EEF32 )":"none"}),children:[" ",t("aboutUs")]}),w.jsxs(ps,{to:"/Community",style:({isActive:h})=>({color:h?"transparent":"white",fontWeight:h?"bold":"500",backgroundClip:h?"text":"none",WebkitBackgroundClip:h?"text":"none",backgroundImage:h?"linear-gradient( to right, #0285FF, #1EEF32 )":"none"}),children:[" ",t("community")]}),w.jsx(ps,{to:"/Whitepaper",style:({isActive:h})=>({color:h?"transparent":"white",fontWeight:h?"bold":"500",backgroundClip:h?"text":"none",WebkitBackgroundClip:h?"text":"none",backgroundImage:h?"linear-gradient( to right, #0285FF, #1EEF32 )":"none"}),children:t("whitepaper")}),w.jsx(ps,{to:"/Contactus",style:({isActive:h})=>({color:h?"transparent":"white",fontWeight:h?"bold":"500",backgroundClip:h?"text":"none",WebkitBackgroun
833dClip:h?"text":"none",backgroundImage:h?"linear-gradient( to right, #0285FF, #1EEF32 )":"none"}),children:t("contactUs")})]}),w.jsxs("div",{className:"mt-5 flex flex-col items-center gap-4",children:[w.jsx(gT,{}),f?w.jsx("div",{className:"w-full flex justify-center",children:w.jsxs("div",{className:"relative w-full max-w-[200px]",children:[w.jsx("div",{onClick:()=>o(!s),className:"bg-gradient-to-r from-[#0285FF] to-[#1EEF32] p-[1px] text-white rounded-full cursor-pointer",children:w.jsxs("div",{className:"bg-black px-5 py-2 font-semibold rounded-full flex items-center justify-center gap-2",children:[w.jsx(ni,{icon:CI,className:"text-xs"}),w.jsx("span",{style:{color:"transparent",backgroundClip:"text",WebkitBackgroundClip:"text",backgroundImage:"linear-gradient( to right, #0285FF, #1EEF32 )"},children:d}),w.jsx(ni,{icon:_I,className:"text-xs text-white/70 ml-1"})]})}),s&&w.jsxs("div",{className:"mt-2 w-full bg-[#111] border border-white/20 rounded-xl overflow-hidden flex flex-col items-center",children:[w.jsx(ps,{to:"/ChallengeMap_7Days",onClick:()=>o(!1),className:"w-full px-4 py-3 text-sm text-center text-white hover:bg-white/10 transition-colors border-b border-white/10",children:"Challenge Map"}),w.jsx(ps,{to:"/user-dashboard",className:"w-full px-4 py-3 text-sm text-center text-white hover:bg-white/10 transition-colors border-b border-white/10",children:"Dashboard"}),w.jsx("button",{onClick:c,className:"w-full px-4 py-3 text-sm text-center text-red-500 hover:bg-white/10 transition-colors",children:"Logout"})]})]})}):w.jsx(ps,{to:"/UserLogin",children:w.jsx("div",{className:"bg-gradient-to-r from-[#0285FF] to-[#1EEF32] p-[1px] text-white rounded-full",children:w.jsx("div",{className:"bg-black px-5 py-2 font-semibold rounded-full cursor-pointer",children:t("signIn")})})})]})]})]})})};pie.init();const ise=()=>{const t=se.useRef(null),e=se.useRef(null),r=se.useRef(null),n=Nu();return se.useEffect(()=>{var s;const i={"#future-benefits":t,"#learn-earn":e,"#features":r};i[n.hash]&&((s=i[n.hash].current)==null||s.scrollIntoView({behavior:"smooth"}))},[n]),w.jsxs("div",{className:"w-full h-full bg-black text-white ",children:[w.jsx(nse,{}),w.jsx("div",{className:"w-[90%] max-w-7xl mx-auto ",children:w.jsx($te,{})}),w.jsx("div",{ref:e,id:"learn-earn",className:"w-[90%] max-w-7xl mx-auto ",children:w.jsx(sie,{})}),w.jsx("div",{className:"w-[95%] max-w-7xl mx-auto ",children:w.jsx(gie,{})}),w.jsx("div",{ref:t,id:"future-benefits",className:"w-[90%] max-w-7xl mx-auto ",children:w.jsx(oie,{})}),w.jsx("div",{className:"w-full max-w-7xl py-24 mx-auto",children:w.jsx(uie,{})}),w.jsx("div",{ref:r,id:"features",className:"w-[90%] max-w-7xl mx-auto ",children:w.jsx(aie,{})}),w.jsx("div",{className:"w-[90%] max-w-7xl mx-auto ",children:w.jsx(cie,{})}),w.jsx("div",{className:" w-[95%] md:w-[90%] max-w-7xl mx-auto ",children:w.jsx(lie,{})}),w.jsx("div",{className:"w-[95%] max-w-7xl mx-auto ",children:w.jsx(fie,{})}),w.jsx("div",{className:"w-[90%] max-w-7xl mx-auto ",children:w.jsx(die,{})}),w.jsx(iie,{})]})},sse=Be.lazy(()=>Ie(()=>import("./Home-DZKL5aZN.js"),[])),ose=Be.lazy(()=>Ie(()=>import("./NotFound-DO0LQY0j.js"),__vite__mapDeps([0,1]))),CT=Be.lazy(()=>Ie(()=>import("./SKill_Login-C3J58QAU.js"),[])),Z5=Be.lazy(()=>Ie(()=>import("./Signup-Bz8Bzf_u.js"),__vite__mapDeps([2,3]))),ase=Be.lazy(()=>Ie(()=>import("./About_us-CQyLomZ9.js"),__vite__mapDeps([4,5,6,7]))),cse=Be.lazy(()=>Ie(()=>import("./Community-ScNJu7D6.js"),[])),lse=Be.lazy(()=>Ie(()=>import("./Contact_us-BBckeoN-.js"),__vite__mapDeps([8,9]))),use=Be.lazy(()=>Ie(()=>import("./White_paper-DpI0ZXeF.js"),[])),fse=Be.lazy(()=>Ie(()=>import("./Paperpdf-CBxO8TJP.js"),__vite__mapDeps([10,11,12]))),dse=Be.lazy(()=>Ie(()=>import("./ChallengeMap_7Days-XBRxAwMO.js"),__vite__mapDeps([13,6,14,15,16]))),hse=Be.lazy(()=>Ie(()=>import("./UserProfile-h_vkN02K.js"),__vite__mapDeps([17,14,6,15,18,5,7,19]))),pse=Be.lazy(()=>Ie(()=>import("./Leaderboard-DL2xBxn7.js"),__vite__mapDeps([20,14,6,15]))),gse=Be.lazy(()=>Ie(()=>import("./ChallengeMapWeb-CQDVe7X6.js"),__vite__mapDeps([21,22,16,14,6,15,23,24]))),mse=Be.lazy(()=>Ie(()=>import("./TaskWeb-B9sDHCeZ.js"),__vite__mapDeps([25,14,6,15]))),yse=Be.lazy(()=>Ie(()=>import("./DailyBonusWeb-6VL0ZSNr.js"),__vite__mapDeps([26,6,14,15,27,11,3]))),bse=Be.lazy(()=>Ie(()=>import("./DailyRewardWeb-Cc1oFoEi.js"),__vite__mapDeps([27,14,6,15]))),wse=Be.lazy(()=>Ie(()=>import("./InviteScreenWeb-DfMmHDBm.js"),__vite__mapDeps([28,14,6,15]))),vse=Be.lazy(()=>Ie(()=>import("./FarmingWeb-DHGsYjHu.js"),__vite__mapDeps([29,14,6,15,30,5,7,19,31]))),xse=Be.lazy(()=>Ie(()=>import("./AIFarmingWeb-OKJZd9sV.js").then(t=>t.a),__vite__mapDeps([32,14,6,15,31]))),Ese=Be.lazy(()=>Ie(()=>import("./MyRewardsWeb-CJbd2hJo.js"),__vite__mapDeps([33,34,22,14,6,15]))),Cse=Be.lazy(()=>Ie(()=>import("./AIGameWeb-D4VlwwJ4.js"),__vite__mapDeps([35,5,6,7,36,14,15,37,19]))),_se=Be.lazy(()=>Ie(()=>import("./TaptoLearnWeb-2f1_SfR_.js"),__vite__mapDeps([38,24,14,6,15,39,40]))),Ase=Be.lazy(()=>Ie(()=>
833import("./AILearningWeb-CS-0J3SL.js"),__vite__mapDeps([41,5,6,7,14,15,40,19]))),Sse=Be.lazy(()=>Ie(()=>import("./SpinWheelWeb-H3iwMGqS.js"),__vite__mapDeps([36,14,6,15]))),Nse=Be.lazy(()=>Ie(()=>import("./DailyBlogsWeb-Gdg_A05k.js"),__vite__mapDeps([42,6,22,14,15]))),Ise=Be.lazy(()=>Ie(()=>import("./AIFactVaultWeb-CMv-Jk3o.js"),__vite__mapDeps([43,5,6,7,24,14,15,40,19]))),Tse=Be.lazy(()=>Ie(()=>import("./AIEmojiWeb-BUgeZvPi.js"),__vite__mapDeps([37,6,14,15]))),kse=Be.lazy(()=>Ie(()=>import("./AISkillQuestWeb-BXhq-7rP.js"),__vite__mapDeps([44,14,6,15]))),Pse=Be.lazy(()=>Ie(()=>import("./AISpaceWeb-ERrGyy_4.js"),__vite__mapDeps([45,24,5,6,7,3,14,15,19]))),Rse=Be.lazy(()=>Ie(()=>import("./AIExplorerbadgeWeb-B_MApjA5.js"),__vite__mapDeps([46,14,6,15]))),Ose=Be.lazy(()=>Ie(()=>import("./AccomplishedWeb-ARIDWGAQ.js"),__vite__mapDeps([47,14,6,15]))),Dse=Be.lazy(()=>Ie(()=>import("./EarnedWeb-DSq8ltwM.js"),__vite__mapDeps([48,14,6,15]))),Lse=Be.lazy(()=>Ie(()=>import("./UnlockAIGenesisWeb-MZ9nABt1.js"),__vite__mapDeps([49,14,6,15]))),Mse=Be.lazy(()=>Ie(()=>import("./ChallengePathWeb-Bi3PzpqV.js"),__vite__mapDeps([50,14,6,15]))),$se=Be.lazy(()=>Ie(()=>import("./ChallengeMap_30Days-CMwYAfrc.js"),__vite__mapDeps([51,6,16,14,15]))),Use=Be.lazy(()=>Ie(()=>import("./TaskListWeb-PtSQjbdd.js"),__vite__mapDeps([52,24,16,14,6,15,23]))),Bse=Be.lazy(()=>Ie(()=>import("./UserDashboardWeb-D9tvh7Gp.js"),__vite__mapDeps([53,22,5,6,7,32,14,15,31,27,30,19,18,40]))),Fse=Be.lazy(()=>Ie(()=>import("./ConfirmSubscribeWeb-D-hLzFdI.js"),__vite__mapDeps([54,14,6,15,34]))),jse=Be.lazy(()=>Ie(()=>import("./PaymentConfirmWeb-DCWmG4x1.js"),__vite__mapDeps([55,14,6,15]))),zse=Be.lazy(()=>Ie(()=>import("./SubPackWeb-D-PyIesh.js"),__vite__mapDeps([56,14,6,15]))),Wse=Be.lazy(()=>Ie(()=>import("./SubscriptionWeb-BfVeBq6H.js"),__vite__mapDeps([57,5,6,7,14,15,19]))),Hse=Be.lazy(()=>Ie(()=>import("./ForgotPasswordWeb-hSOKUSms.js"),[])),qse=Be.lazy(()=>Ie(()=>import("./ResetPasswordWeb-Cn7Sa3z9.js"),[])),Vse=Be.lazy(()=>Ie(()=>import("./AdminDashboard-CNL9maG7.js"),__vite__mapDeps([58,3]))),Kse=Be.lazy(()=>Ie(()=>import("./AdminLogin-Fho5_qPQ.js"),[])),Gse=Be.lazy(()=>Ie(()=>import("./MerchantLogin-CYJqjSzx.js"),[])),Yse=Be.lazy(()=>Ie(()=>import("./MerchantForgotPassword-DU3azLT7.js"),[])),Zse=Be.lazy(()=>Ie(()=>import("./Dashboard--0MSTXFY.js"),__vite__mapDeps([59,60,61]))),Jse=Be.lazy(()=>Ie(()=>import("./UserPerformance-TW-iP5fr.js"),__vite__mapDeps([62,60,63]))),Qse=Be.lazy(()=>Ie(()=>import("./FinancialReports-BFM_UZSB.js"),__vite__mapDeps([64,60,63]))),Xse=Be.lazy(()=>Ie(()=>import("./ReportnAnalytics-vRf0xtvS.js"),__vite__mapDeps([65,61,60,66]))),eoe=Be.lazy(()=>Ie(()=>import("./Dashboard-CC7oZcQC.js"),__vite__mapDeps([67,68,61]))),toe=Be.lazy(()=>Ie(()=>import("./UserManagement-BoOe9C5r.js"),__vite__mapDeps([69,68]))),roe=Be.lazy(()=>Ie(()=>import("./SubscriptionTracking-BrfM3jzf.js"),__vite__mapDeps([70,68,61,71]))),noe=Be.lazy(()=>Ie(()=>import("./Activity-C1kVLlCP.js"),__vite__mapDeps([72,61,71,68]))),ioe=Be.lazy(()=>Ie(()=>import("./Sponsor-BMDoo_Tx.js"),__vite__mapDeps([73,61,71,68]))),soe=Be.lazy(()=>Ie(()=>import("./ProfileInfo-Cqex7Gtw.js"),__vite__mapDeps([74,24]))),ooe=Be.lazy(()=>Ie(()=>import("./Dashboard-CSU2M_xv.js"),__vite__mapDeps([75,61,76,74,24,77]))),aoe=Be.lazy(()=>Ie(()=>import("./Progress-DJbY1bqH.js"),__vite__mapDeps([78,76,24]))),coe=Be.lazy(()=>Ie(()=>import("./CurrentProgram-aul1cyr4.js"),__vite__mapDeps([79,61,76]))),loe=Be.lazy(()=>Ie(()=>import("./ReferralInformation-QGMny29K.js"),__vite__mapDeps([80,76,24]))),uoe=Be.lazy(()=>Ie(()=>import("./ReferralSubcription-Hd7jlbgb.js"),__vite__mapDeps([81,76]))),foe=Be.lazy(()=>Ie(()=>import("./SupportTicket-DYUkOu5J.js"),__vite__mapDeps([82,76]))),doe=Be.lazy(()=>Ie(()=>import("./VarkAssessment-Be56nrS_.js"),__vite__mapDeps([83,24,84]))),hoe=Be.lazy(()=>Ie(()=>import("./VarkJourneyStart-DXvOnZfb.js"),[])),poe=Be.lazy(()=>Ie(()=>import("./Type1-D6mYO0SQ.js"),[])),goe=Be.lazy(()=>Ie(()=>import("./AILearningRoadmap-AHPfOzvk.js"),__vite__mapDeps([85,24,84]))),moe=Be.lazy(()=>Ie(()=>import("./Roadmap-BD3956-w.js"),__vite__mapDeps([86,24,84]))),yoe=Be.lazy(()=>Ie(()=>import("./AssessmentIntroPage-D74dWIOo.js"),[])),boe=Be.lazy(()=>Ie(()=>import("./CspAssessment-BlYB81Vr.js"),__vite__mapDeps([87,12,24,84]))),woe=Be.lazy(()=>Ie(()=>import("./CspJourneyStart-CJ0SN_xw.js"),__vite__mapDeps([88,84]))),voe=Be.lazy(()=>Ie(()=>import("./AIJourneyStart-Ca5yfQ2H.js"),__vite__mapDeps([89,84]))),xoe=Be.lazy(()=>Ie(()=>import("./AIAssessment-CPmyno7f.js"),__vite__mapDeps([90,24,84]))),Eoe=Be.lazy(()=>Ie(()=>import("./WebUserguidance-W0mPWU-s.js"),__vite__mapDeps([91,84]))),_T=Be.lazy(()=>Ie(()=>import("./AIMythBreakerRules-eUAFuiZA.js"),__vite__mapDeps([92,93,24,14,6,15,84]))),AT=Be.lazy(()=>Ie(()=>import("./AIFailureFilesRules-qDQrigEe.js"),__vite__mapDeps([94,93,24,14,6,15,84]))),ST=Be.lazy(()=>Ie(()=>import("./AIToolArenaRules-CVbput-a.js"),__vite__mapDeps([95,93,24,14,6,15,84]))),Coe=Be.lazy(()=>Ie(()=>import("./AIValidationAssessmentWeb-Ctd5_m_Y.js"),__vite__mapDeps([96,24,16,14,6,15]))),_oe=Be.lazy(()=>Ie(()=>import("./AIValidationResultWeb-DILmnMoq.js"),__vite__mapDeps([97,24,16,14,6,15])));function Aoe(){const[t,e]=se.useState("");se.useEffect(()=>{const n=setInterval(()=>{e(i=>i==="..."?"":i+".")},500);return()=>clearInterval(n)},[]);const r=()=>w.jsx("div",{className:"flex items-center justify-center h-screen bg-black/90",children:w.jsxs("div",{children:[w.jsx("div",{className:"h-[8rem] w-[12.5rem]",children:w.jsx("img",{src:"https://skilleareumimages.s3.ap-south-1.amazonaws.com/assets/SKL_MAscot_Wave_Landscape.gif",className:"w-[75%] mx-auto",alt:"loading mascot"})}),w.jsxs("p",{className:"text-center text-sky-300 mt-5",children:["Loading ",t]})]})});return w.jsx("div",{className:"App",children:w.jsx(se.Suspense,{fallback:w.jsx(r,{}),children:w.jsxs(EJ,{children:[w.jsx(Re,{path:"/",element:w.jsx(ise,{})}),w.jsx(Re,{path:"/home",element:w.jsx(sse,{})}),w.jsx(Re,{path:"/UserLogin",element:w.jsx(CT,{})}),w.jsx(Re,{path:"/Login",element:w.jsx(CT,{})}),w.jsx(Re,{path:"/UserSignup",element:w.jsx(Z5,{})}),w.jsx(Re,{path:"/register",element:w.jsx(Z5,{})}),w.jsx(Re,{path:"/signup",element:w.jsx(Z5,{})}),w.jsx(Re,{path:"/Aboutus",element:w.jsx(ase,{})}),w.jsx(Re,{path:"/Community",element:w.jsx(cse,{})}),w.jsx(Re,{path:"/Contactus",element:w.jsx(lse,{})}),w.jsx(Re,{path:"/Whitepaper",element:w.jsx(use,{})}),w.jsx(Re,{path:"/Whitepaperpdf",element:w.jsx(fse,{})}),w.jsx(Re,{path:"/ForgotPasswordWeb",element:w.jsx(Hse,{})}),w.jsx(Re,{path:"/reset-password",element:w.jsx(qse,{})}),w.jsx(Re,{path:"/AdminDashboard",element:w.jsx(Vse,{})}),w.jsx(Re,{path:"/AdminLogin",element:w.jsx(Kse,{})}),w.jsx(Re,{path:"/merchant-login",element:w.jsx(Gse,{})}),w.jsx(Re,{path:"/merchant-forgotpassword",element:w.jsx(Yse,{})}),w.jsx(Re,{element:w.jsx(sX,{}),children:w.jsxs(Re,{element:w.jsx(iX,{}),children:[w.jsx(Re,{path:"/ChallengeMap_7Days",element:w.jsx(dse,{})}),w.jsx(Re,{path:"/UserProfile",element:w.jsx(hse,{})}),w.jsx(Re,{path:"/Leaderboard",element:w.jsx(pse,{})}),w.jsx(Re,{path:"/ChallengeMapWeb",element:w.jsx(gse,{})}),w.jsx(Re,{path:"/TaskWeb",element:w.jsx(mse,{})}),w.jsx(Re,{path:"/DailyBonusWeb",element:w.jsx(yse,{})}),w.jsx(Re,{path:"/DailyRewardWeb",element:w.jsx(bse,{})}),w.jsx(Re,{path:"/InvitescreenWeb",element:w.jsx(wse,{})}),w.jsx(Re,{path:"/FarmingWeb",element:w.jsx(vse,{})}),w.jsx(Re,{path:"/MyRewardsWeb",element:w.jsx(Ese,{})}),w.jsx(Re,{path:"/AIGameWeb",element:w.jsx(Cse,{})}),w.jsx(Re,{path:"/games/:gameType",element:w.jsx(_se,{})}),w.jsx(Re,{path:"/AILearningWeb",element:w.jsx(Ase,{})}),w.jsx(Re,{path:"/SpinWheelWeb",element:w.jsx(Sse,{})}),w.jsx(Re,{path:"/DailyBlogsWeb/:day",element:w.jsx(Nse,{})}),w.jsx(Re,{path:"/AIFactVaultWeb",element:w.jsx(Ise,{})}),w.jsx(Re,{path:"/AIEmojiWeb",element:w.jsx(Tse,{})}),w.jsx(Re,{path:"/AISkillQuestWeb",element:w.jsx(kse,{})}),w.jsx(Re,{path:"/AiSpaceWeb",element:w.jsx(Pse,{})}),w.jsx(Re,{path:"/AIExplorerbadgeWeb",element:w.jsx(Rse,{})}),w.jsx(Re,{path:"/AccomplishedWeb",element:w.jsx(Ose,{})}),w.jsx(Re,{path:"/EarnedWeb",element:w.jsx(Dse,{})}),w.jsx(Re,{path:"/UnlockAIGenesisWeb",element:w.jsx(Lse,{})}),w.jsx(Re,{path:"/ChallengePathWeb",element:w.jsx(Mse,{})}),w.jsx(Re,{path:"/ChallengeMap_30Days",element:w.jsx($se,{})}),w.jsx(Re,{path:"/TaskListWeb",element:w.jsx(Use,{})}),w.jsx(Re,{path:"/UserDashboardWeb",element:w.jsx(Bse,{})}),w.jsx(Re,{path:"/AIFarmingWeb",element:w.jsx(xse,{})}),w.jsx(Re,{path:"/ConfirmSubscribeWeb",element:w.jsx(Fse,{})}),w.jsx(Re,{path:"/SubPackWeb",element:w.jsx(zse,{})}),w.jsx(Re,{path:"/PaymentConfirmWeb",element:w.jsx(jse,{})}),w.jsx(Re,{path:"/SubscriptionWeb",element:w.jsx(Wse,{})}),w.jsx(Re,{path:"/profileInfo",element:w.jsx(soe,{})}),w.jsx(Re,{path:"/user-progress",element:w.jsx(aoe,{})}),w.jsx(Re,{path:"/user-dashboard",element:w.jsx(ooe,{})}),w.jsx(Re,{path:"/currentProgram",element:w.jsx(coe,{})}),w.jsx(Re,{path:"/referralInformation",element:w.jsx(loe,{})}),w.jsx(Re,{path:"/referralSubcription",element:w.jsx(uoe,{})}),w.jsx(Re,{path:"/supportTicket",element:w.jsx(foe,{})}),w.jsx(Re,{path:"/ai-mythbreaker-rules",element:w.jsx(_T,{})}),w.jsx(Re,{path:"/ai-failurefiles-rules",element:w.jsx(AT,{})}),w.jsx(Re,{path:"/ai-toolarena-rules",element:w.jsx(ST,{})}),w.jsx(Re,{path:"/AIValidationAssessmentWeb",element:w.jsx(Coe,{})}),w.jsx(Re,{path:"/AIValidationResultWeb",element:w.jsx(_oe,{})})]})}),w.jsxs(Re,{element:w.jsx(aX,{}),children:[w.jsx(Re,{path:"/merchant-dashboard",element:w.jsx(Zse,{})}),w.jsx(Re,{path:"/user-performance",element:w.jsx(Jse,{})}),w.jsx(Re,{path:"/financial-report",element:w.jsx(Qse,{})}),w.jsx(Re,{path:"/report-analytics",element:w.jsx(Xse,{})})]}),w.jsxs(Re,{element:w.jsx(oX,{}),children:[w.jsx(Re,{path:"/admin-dashboard",element:w.jsx(eoe,{})}),w.jsx(Re,{path:"/user-management",element:w.jsx(toe,{})}),w.jsx(Re,{path:"/subscription-tracking",element:w.jsx(roe,{})}),w.jsx(Re,{path:"/activity",element:w.jsx(noe,{})}),w.jsx(Re,{path:"/sponsor",element:w.jsx(ioe,{})})]}),w.jsx(Re,{path:"/assessment-intro",element:w.jsx(yoe,{})}),w.jsx(Re,{path:"/vark",element:w.jsx(doe,{})}),w.jsx(Re,{path:"/vark-start",element:w.jsx(hoe,{})}),w.jsx(Re,{path:"/res",element:w.jsx(poe,{})}),w.jsx(Re,{path:"/roadmap",element:w.jsx(moe,{})}),w.jsx(Re,{path:"/ai-roadmap",element:w.jsx(goe,{})}),w.jsx(Re,{path:"/csp",element:w.jsx(boe,{})}),w.jsx(Re,{path:"/csp-start",element:w.jsx(woe,{})}),w.jsx(Re,{path:"/ai",element:w.jsx(xoe,{})}),w.jsx(Re,{path:"/ai-start",element:w.jsx(voe,{})}),w.jsx(Re,{path:"/user-guidance",element:w.jsx(Eoe,{})}),w.jsx(Re,{path:"/ai-mythbreaker-rules",element:w.jsx(_T,{})}),w.jsx(Re,{path:"/ai-failurefiles-rules",element:w.jsx(AT,{})}),w.jsx(Re,{path:"/ai-toolarena-rules",element:w.jsx(ST,{})}),w.jsx(Re,{path:"*",element:w.jsx(ose,{})})]})})})}var VB={exports:{}};(function(t){(function(e,r){t.exports?t.exports=r():(e.nacl||(e.nacl={}),e.nacl.util=r())})(li,function(){var e={};function r(n){if(!/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(n))throw new TypeError("invalid encoding")}
833return e.decodeUTF8=function(n){if(typeof n!="string")throw new TypeError("expected string");var i,s=unescape(encodeURIComponent(n)),o=new Uint8Array(s.length);for(i=0;i<s.length;i++)o[i]=s.charCodeAt(i);return o},e.encodeUTF8=function(n){var i,s=[];for(i=0;i<n.length;i++)s.push(String.fromCharCode(n[i]));return decodeURIComponent(escape(s.join("")))},typeof atob>"u"?typeof Buffer.from<"u"?(e.encodeBase64=function(n){return Buffer.from(n).toString("base64")},e.decodeBase64=function(n){return r(n),new Uint8Array(Array.prototype.slice.call(Buffer.from(n,"base64"),0))}):(e.encodeBase64=function(n){return new Buffer(n).toString("base64")},e.decodeBase64=function(n){return r(n),new Uint8Array(Array.prototype.slice.call(new Buffer(n,"base64"),0))}):(e.encodeBase64=function(n){var i,s=[],o=n.length;for(i=0;i<o;i++)s.push(String.fromCharCode(n[i]));return btoa(s.join(""))},e.decodeBase64=function(n){r(n);var i,s=atob(n),o=new Uint8Array(s.length);for(i=0;i<s.length;i++)o[i]=s.charCodeAt(i);return o}),e})})(VB);var Soe=VB.exports;const v2=is(Soe);function Noe(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var KB={exports:{}};const Ioe={},Toe=Object.freeze(Object.defineProperty({__proto__:null,default:Ioe},Symbol.toStringTag,{value:"Module"})),GB=Vn(Toe);(function(t){(function(e){var r=function($){var q,K=new Float64Array(16);if($)for(q=0;q<$.length;q++)K[q]=$[q];return K},n=function(){throw new Error("no PRNG")},i=new Uint8Array(16),s=new Uint8Array(32);s[0]=9;var o=r(),a=r([1]),c=r([56129,1]),l=r([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),u=r([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),f=r([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),d=r([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),p=r([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function h($,q,K,A){$[q]=K>>24&255,$[q+1]=K>>16&255,$[q+2]=K>>8&255,$[q+3]=K&255,$[q+4]=A>>24&255,$[q+5]=A>>16&255,$[q+6]=A>>8&255,$[q+7]=A&255}function g($,q,K,A,Y){var ae,oe=0;for(ae=0;ae<Y;ae++)oe|=$[q+ae]^K[A+ae];return(1&oe-1>>>8)-1}function y($,q,K,A){return g($,q,K,A,16)}function x($,q,K,A){return g($,q,K,A,32)}function C($,q,K,A){for(var Y=A[0]&255|(A[1]&255)<<8|(A[2]&255)<<16|(A[3]&255)<<24,ae=K[0]&255|(K[1]&255)<<8|(K[2]&255)<<16|(K[3]&255)<<24,oe=K[4]&255|(K[5]&255)<<8|(K[6]&255)<<16|(K[7]&255)<<24,pe=K[8]&255|(K[9]&255)<<8|(K[10]&255)<<16|(K[11]&255)<<24,Ce=K[12]&255|(K[13]&255)<<8|(K[14]&255)<<16|(K[15]&255)<<24,Le=A[4]&255|(A[5]&255)<<8|(A[6]&255)<<16|(A[7]&255)<<24,_e=q[0]&255|(q[1]&255)<<8|(q[2]&255)<<16|(q[3]&255)<<24,Kt=q[4]&255|(q[5]&255)<<8|(q[6]&255)<<16|(q[7]&255)<<24,Ve=q[8]&255|(q[9]&255)<<8|(q[10]&255)<<16|(q[11]&255)<<24,Et=q[12]&255|(q[13]&255)<<8|(q[14]&255)<<16|(q[15]&255)<<24,Ct=A[8]&255|(A[9]&255)<<8|(A[10]&255)<<16|(A[11]&255)<<24,kt=K[16]&255|(K[17]&255)<<8|(K[18]&255)<<16|(K[19]&255)<<24,Ft=K[20]&255|(K[21]&255)<<8|(K[22]&255)<<16|(K[23]&255)<<24,Pt=K[24]&255|(K[25]&255)<<8|(K[26]&255)<<16|(K[27]&255)<<24,Ot=K[28]&255|(K[29]&255)<<8|(K[30]&255)<<16|(K[31]&255)<<24,Rt=A[12]&255|(A[13]&255)<<8|(A[14]&255)<<16|(A[15]&255)<<24,Qe=Y,dt=ae,Ke=oe,tt=pe,ot=Ce,He=Le,de=_e,he=Kt,xe=Ve,be=Et,ve=Ct,Ne=kt,It=Ft,Gt=Pt,er=Ot,Yt=Rt,te,lr=0;lr<20;lr+=2)te=Qe+It|0,ot^=te<<7|te>>>25,te=ot+Qe|0,xe^=te<<9|te>>>23,te=xe+ot|0,It^=te<<13|te>>>19,te=It+xe|0,Qe^=te<<18|te>>>14,te=He+dt|0,be^=te<<7|te>>>25,te=be+He|0,Gt^=te<<9|te>>>23,te=Gt+be|0,dt^=te<<13|te>>>19,te=dt+Gt|0,He^=te<<18|te>>>14,te=ve+de|0,er^=te<<7|te>>>25,te=er+ve|0,Ke^=te<<9|te>>>23,te=Ke+er|0,de^=te<<13|te>>>19,te=de+Ke|0,ve^=te<<18|te>>>14,te=Yt+Ne|0,tt^=te<<7|te>>>25,te=tt+Yt|0,he^=te<<9|te>>>23,te=he+tt|0,Ne^=te<<13|te>>>19,te=Ne+he|0,Yt^=te<<18|te>>>14,te=Qe+tt|0,dt^=te<<7|te>>>25,te=dt+Qe|0,Ke^=te<<9|te>>>23,te=Ke+dt|0,tt^=te<<13|te>>>19,te=tt+Ke|0,Qe^=te<<18|te>>>14,te=He+ot|0,de^=te<<7|te>>>25,te=de+He|0,he^=te<<9|te>>>23,te=he+de|0,ot^=te<<13|te>>>19,te=ot+he|0,He^=te<<18|te>>>14,te=ve+be|0,Ne^=te<<7|te>>>25,te=Ne+ve|0,xe^=te<<9|te>>>23,te=xe+Ne|0,be^=te<<13|te>>>19,te=be+xe|0,ve^=te<<18|te>>>14,te=Yt+er|0,It^=te<<7|te>>>25,te=It+Yt|0,Gt^=te<<9|te>>>23,te=Gt+It|0,er^=te<<13|te>>>19,te=er+Gt|0,Yt^=te<<18|te>>>14;Qe=Qe+Y|0,dt=dt+ae|0,Ke=Ke+oe|0,tt=tt+pe|0,ot=ot+Ce|0,He=He+Le|0,de=de+_e|0,he=he+Kt|0,xe=xe+Ve|0,be=be+Et|0,ve=ve+Ct|0,Ne=Ne+kt|0,It=It+Ft|0,Gt=Gt+Pt|0,er=er+Ot|0,Yt=Yt+Rt|0,$[0]=Qe>>>0&255,$[1]=Qe>>>8&255,$[2]=Qe>>>16&255,$[3]=Qe>>>24&255,$[4]=dt>>>0&255,$[5]=dt>>>8&255,$[6]=dt>>>16&255,$[7]=dt>>>24&255,$[8]=Ke>>>0&255,$[9]=Ke>>>8&255,$[10]=Ke>>>16&255,$[11]=Ke>>>24&255,$[12]=tt>>>0&255,$[13]=tt>>>8&255,$[14]=tt>>>16&255,$[15]=tt>>>24&255,$[16]=ot>>>0&255,$[17]=ot>>>8&255,$[18]=ot>>>16&255,$[19]=ot>>>24&255,$[20]=He>>>0&255,$[21]=He>>>8&255,$[22]=He>>>16&255,$[23]=He>>>24&255,$[24]=de>>>0&255,$[25]=de>>>8&255,$[26]=de>>>16&255,$[27]=de>>>24&255,$[28]=he>>>0&255,$[29]=he>>>8&255,$[30]=he>>>16&255,$[31]=he>>>24&255,$[32]=xe>>>0&255,$[33]=xe>>>8&255,$[34]=xe>>>16&255,$[35]=xe>>>24&255,$[36]=be>>>0&255,$[37]=be>>>8&255,$[38]=be>>>16&255,$[39]=be>>>24&255,$[40]=ve>>>0&255,$[41]=ve>>>8&255,$[42]=ve>>>16&255,$[43]=ve>>>24&255,$[44]=Ne>>>0&255,$[45]=Ne>>>8&255,$[46]=Ne>>>16&255,$[47]=Ne>>>24&255,$[48]=It>>>0&255,$[49]=It>>>8&255,$[50]=It>>>16&255,$[51]=It>>>24&255,$[52]=Gt>>>0&255,$[53]=Gt>>>8&255,$[54]=Gt>>>16&255,$[55]=Gt>>>24&255,$[56]=er>>>0&255,$[57]=er>>>8&255,$[58]=er>>>16&255,$[59]=er>>>24&255,$[60]=Yt>>>0&255,$[61]=Yt>>>8&255,$[62]=Yt>>>16&255,$[63]=Yt>>>24&255}function _($,q,K,A){for(var Y=A[0]&255|(A[1]&255)<<8|(A[2]&255)<<16|(A[3]&255)<<24,ae=K[0]&255|(K[1]&255)<<8|(K[2]&255)<<16|(K[3]&255)<<24,oe=K[4]&255|(K[5]&255)<<8|(K[6]&255)<<16|(K[7]&255)<<24,pe=K[8]&255|(K[9]&255)<<8|(K[10]&255)<<16|(K[11]&255)<<24,Ce=K[12]&255|(K[13]&255)<<8|(K[14]&255)<<16|(K[15]&255)<<24,Le=A[4]&255|(A[5]&255)<<8|(A[6]&255)<<16|(A[7]&255)<<24,_e=q[0]&255|(q[1]&255)<<8|(q[2]&255)<<16|(q[3]&255)<<24,Kt=q[4]&255|(q[5]&255)<<8|(q[6]&255)<<16|(q[7]&255)<<24,Ve=q[8]&255|(q[9]&255)<<8|(q[10]&255)<<16|(q[11]&255)<<24,Et=q[12]&255|(q[13]&255)<<8|(q[14]&255)<<16|(q[15]&255)<<24,Ct=A[8]&255|(A[9]&255)<<8|(A[10]&255)<<16|(A[11]&255)<<24,kt=K[16]&255|(K[17]&255)<<8|(K[18]&255)<<16|(K[19]&255)<<24,Ft=K[20]&255|(K[21]&255)<<8|(K[22]&255)<<16|(K[23]&255)<<24,Pt=K[24]&255|(K[25]&255)<<8|(K[26]&255)<<16|(K[27]&255)<<24,Ot=K[28]&255|(K[29]&255)<<8|(K[30]&255)<<16|(K[31]&255)<<24,Rt=A[12]&255|(A[13]&255)<<8|(A[14]&255)<<16|(A[15]&255)<<24,Qe=Y,dt=ae,Ke=oe,tt=pe,ot=Ce,He=Le,de=_e,he=Kt,xe=Ve,be=Et,ve=Ct,Ne=kt,It=Ft,Gt=Pt,er=Ot,Yt=Rt,te,lr=0;lr<20;lr+=2)te=Qe+It|0,ot^=te<<7|te>>>25,te=ot+Qe|0,xe^=te<<9|te>>>23,te=xe+ot|0,It^=te<<13|te>>>19,te=It+xe|0,Qe^=te<<18|te>>>14,te=He+dt|0,be^=te<<7|te>>>25,te=be+He|0,Gt^=te<<9|te>>>23,te=Gt+be|0,dt^=te<<13|te>>>19,te=dt+Gt|0,He^=te<<18|te>>>14,te=ve+de|0,er^=te<<7|te>>>25,te=er+ve|0,Ke^=te<<9|te>>>23,te=Ke+er|0,de^=te<<13|te>>>19,te=de+Ke|0,ve^=te<<18|te>>>14,te=Yt+Ne|0,tt^=te<<7|te>>>25,te=tt+Yt|0,he^=te<<9|te>>>23,te=he+tt|0,Ne^=te<<13|te>>>19,te=Ne+he|0,Yt^=te<<18|te>>>14,te=Qe+tt|0,dt^=te<<7|te>>>25,te=dt+Qe|0,Ke^=te<<9|te>>>23,te=Ke+dt|0,tt^=te<<13|te>>>19,te=tt+Ke|0,Qe^=te<<18|te>>>14,te=He+ot|0,de^=te<<7|te>>>25,te=de+He|0,he^=te<<9|te>>>23,te=he+de|0,ot^=te<<13|te>>>19,te=ot+he|0,He^=te<<18|te>>>14,te=ve+be|0,Ne^=te<<7|te>>>25,te=Ne+ve|0,xe^=te<<9|te>>>23,te=xe+Ne|0,be^=te<<13|te>>>19,te=be+xe|0,ve^=te<<18|te>>>14,te=Yt+er|0,It^=te<<7|te>>>25,te=It+Yt|0,Gt^=te<<9|te>>>23,te=Gt+It|0,er^=te<<13|te>>>19,te=er+Gt|0,Yt^=te<<18|te>>>14;$[0]=Qe>>>0&255,$[1]=Qe>>>8&255,$[2]=Qe>>>16&255,$[3]=Qe>>>24&255,$[4]=He>>>0&255,$[5]=He>>>8&255,$[6]=He>>>16&255,$[7]=He>>>24&255,$[8]=ve>>>0&255,$[9]=ve>>>8&255,$[10]=ve>>>16&255,$[11]=ve>>>24&255,$[12]=Yt>>>0&255,$[13]=Yt>>>8&255,$[14]=Yt>>>16&255,$[15]=Yt>>>24&255,$[16]=de>>>0&255,$[17]=de>>>8&255,$[18]=de>>>16&255,$[19]=de>>>24&255,$[20]=he>>>0&255,$[21]=he>>>8&255,$[22]=he>>>16&255,$[23]=he>>>24&255,$[24]=xe>>>0&255,$[25]=xe>>>8&255,$[26]=xe>>>16&255,$[27]=xe>>>24&255,$[28]=be>>>0&255,$[29]=be>>>8&255,$[30]=be>>>16&255,$[31]=be>>>24&255}function L($,q,K,A){C($,q,K,A)}function P($,q,K,A){_($,q,K,A)}var z=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);
vendor: 22,513 bytes, line 833
833function W($,q,K,A,Y,ae,oe){var pe=new Uint8Array(16),Ce=new Uint8Array(64),Le,_e;for(_e=0;_e<16;_e++)pe[_e]=0;for(_e=0;_e<8;_e++)pe[_e]=ae[_e];for(;Y>=64;){for(L(Ce,pe,oe,z),_e=0;_e<64;_e++)$[q+_e]=K[A+_e]^Ce[_e];for(Le=1,_e=8;_e<16;_e++)Le=Le+(pe[_e]&255)|0,pe[_e]=Le&255,Le>>>=8;Y-=64,q+=64,A+=64}if(Y>0)for(L(Ce,pe,oe,z),_e=0;_e<Y;_e++)$[q+_e]=K[A+_e]^Ce[_e];return 0}function B($,q,K,A,Y){var ae=new Uint8Array(16),oe=new Uint8Array(64),pe,Ce;for(Ce=0;Ce<16;Ce++)ae[Ce]=0;for(Ce=0;Ce<8;Ce++)ae[Ce]=A[Ce];for(;K>=64;){for(L(oe,ae,Y,z),Ce=0;Ce<64;Ce++)$[q+Ce]=oe[Ce];for(pe=1,Ce=8;Ce<16;Ce++)pe=pe+(ae[Ce]&255)|0,ae[Ce]=pe&255,pe>>>=8;K-=64,q+=64}if(K>0)for(L(oe,ae,Y,z),Ce=0;Ce<K;Ce++)$[q+Ce]=oe[Ce];return 0}function I($,q,K,A,Y){var ae=new Uint8Array(32);P(ae,A,Y,z);for(var oe=new Uint8Array(8),pe=0;pe<8;pe++)oe[pe]=A[pe+16];return B($,q,K,oe,ae)}function j($,q,K,A,Y,ae,oe){var pe=new Uint8Array(32);P(pe,ae,oe,z);for(var Ce=new Uint8Array(8),Le=0;Le<8;Le++)Ce[Le]=ae[Le+16];return W($,q,K,A,Y,Ce,pe)}var D=function($){this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0;var q,K,A,Y,ae,oe,pe,Ce;q=$[0]&255|($[1]&255)<<8,this.r[0]=q&8191,K=$[2]&255|($[3]&255)<<8,this.r[1]=(q>>>13|K<<3)&8191,A=$[4]&255|($[5]&255)<<8,this.r[2]=(K>>>10|A<<6)&7939,Y=$[6]&255|($[7]&255)<<8,this.r[3]=(A>>>7|Y<<9)&8191,ae=$[8]&255|($[9]&255)<<8,this.r[4]=(Y>>>4|ae<<12)&255,this.r[5]=ae>>>1&8190,oe=$[10]&255|($[11]&255)<<8,this.r[6]=(ae>>>14|oe<<2)&8191,pe=$[12]&255|($[13]&255)<<8,this.r[7]=(oe>>>11|pe<<5)&8065,Ce=$[14]&255|($[15]&255)<<8,this.r[8]=(pe>>>8|Ce<<8)&8191,this.r[9]=Ce>>>5&127,this.pad[0]=$[16]&255|($[17]&255)<<8,this.pad[1]=$[18]&255|($[19]&255)<<8,this.pad[2]=$[20]&255|($[21]&255)<<8,this.pad[3]=$[22]&255|($[23]&255)<<8,this.pad[4]=$[24]&255|($[25]&255)<<8,this.pad[5]=$[26]&255|($[27]&255)<<8,this.pad[6]=$[28]&255|($[29]&255)<<8,this.pad[7]=$[30]&255|($[31]&255)<<8};D.prototype.blocks=function($,q,K){for(var A=this.fin?0:2048,Y,ae,oe,pe,Ce,Le,_e,Kt,Ve,Et,Ct,kt,Ft,Pt,Ot,Rt,Qe,dt,Ke,tt=this.h[0],ot=this.h[1],He=this.h[2],de=this.h[3],he=this.h[4],xe=this.h[5],be=this.h[6],ve=this.h[7],Ne=this.h[8],It=this.h[9],Gt=this.r[0],er=this.r[1],Yt=this.r[2],te=this.r[3],lr=this.r[4],Pr=this.r[5],Rr=this.r[6],rr=this.r[7],Sr=this.r[8],Nr=this.r[9];K>=16;)Y=$[q+0]&255|($[q+1]&255)<<8,tt+=Y&8191,ae=$[q+2]&255|($[q+3]&255)<<8,ot+=(Y>>>13|ae<<3)&8191,oe=$[q+4]&255|($[q+5]&255)<<8,He+=(ae>>>10|oe<<6)&8191,pe=$[q+6]&255|($[q+7]&255)<<8,de+=(oe>>>7|pe<<9)&8191,Ce=$[q+8]&255|($[q+9]&255)<<8,he+=(pe>>>4|Ce<<12)&8191,xe+=Ce>>>1&8191,Le=$[q+10]&255|($[q+11]&255)<<8,be+=(Ce>>>14|Le<<2)&8191,_e=$[q+12]&255|($[q+13]&255)<<8,ve+=(Le>>>11|_e<<5)&8191,Kt=$[q+14]&255|($[q+15]&255)<<8,Ne+=(_e>>>8|Kt<<8)&8191,It+=Kt>>>5|A,Ve=0,Et=Ve,Et+=tt*Gt,Et+=ot*(5*Nr),Et+=He*(5*Sr),Et+=de*(5*rr),Et+=he*(5*Rr),Ve=Et>>>13,Et&=8191,Et+=xe*(5*Pr),Et+=be*(5*lr),Et+=ve*(5*te),Et+=Ne*(5*Yt),Et+=It*(5*er),Ve+=Et>>>13,Et&=8191,Ct=Ve,Ct+=tt*er,Ct+=ot*Gt,Ct+=He*(5*Nr),Ct+=de*(5*Sr),Ct+=he*(5*rr),Ve=Ct>>>13,Ct&=8191,Ct+=xe*(5*Rr),Ct+=be*(5*Pr),Ct+=ve*(5*lr),Ct+=Ne*(5*te),Ct+=It*(5*Yt),Ve+=Ct>>>13,Ct&=8191,kt=Ve,kt+=tt*Yt,kt+=ot*er,kt+=He*Gt,kt+=de*(5*Nr),kt+=he*(5*Sr),Ve=kt>>>13,kt&=8191,kt+=xe*(5*rr),kt+=be*(5*Rr),kt+=ve*(5*Pr),kt+=Ne*(5*lr),kt+=It*(5*te),Ve+=kt>>>13,kt&=8191,Ft=Ve,Ft+=tt*te,Ft+=ot*Yt,Ft+=He*er,Ft+=de*Gt,Ft+=he*(5*Nr),Ve=Ft>>>13,Ft&=8191,Ft+=xe*(5*Sr),Ft+=be*(5*rr),Ft+=ve*(5*Rr),Ft+=Ne*(5*Pr),Ft+=It*(5*lr),Ve+=Ft>>>13,Ft&=8191,Pt=Ve,Pt+=tt*lr,Pt+=ot*te,Pt+=He*Yt,Pt+=de*er,Pt+=he*Gt,Ve=Pt>>>13,Pt&=8191,Pt+=xe*(5*Nr),Pt+=be*(5*Sr),Pt+=ve*(5*rr),Pt+=Ne*(5*Rr),Pt+=It*(5*Pr),Ve+=Pt>>>13,Pt&=8191,Ot=Ve,Ot+=tt*Pr,Ot+=ot*lr,Ot+=He*te,Ot+=de*Yt,Ot+=he*er,Ve=Ot>>>13,Ot&=8191,Ot+=xe*Gt,Ot+=be*(5*Nr),Ot+=ve*(5*Sr),Ot+=Ne*(5*rr),Ot+=It*(5*Rr),Ve+=Ot>>>13,Ot&=8191,Rt=Ve,Rt+=tt*Rr,Rt+=ot*Pr,Rt+=He*lr,Rt+=de*te,Rt+=he*Yt,Ve=Rt>>>13,Rt&=8191,Rt+=xe*er,Rt+=be*Gt,Rt+=ve*(5*Nr),Rt+=Ne*(5*Sr),Rt+=It*(5*rr),Ve+=Rt>>>13,Rt&=8191,Qe=Ve,Qe+=tt*rr,Qe+=ot*Rr,Qe+=He*Pr,Qe+=de*lr,Qe+=he*te,Ve=Qe>>>13,Qe&=8191,Qe+=xe*Yt,Qe+=be*er,Qe+=ve*Gt,Qe+=Ne*(5*Nr),Qe+=It*(5*Sr),Ve+=Qe>>>13,Qe&=8191,dt=Ve,dt+=tt*Sr,dt+=ot*rr,dt+=He*Rr,dt+=de*Pr,dt+=he*lr,Ve=dt>>>13,dt&=8191,dt+=xe*te,dt+=be*Yt,dt+=ve*er,dt+=Ne*Gt,dt+=It*(5*Nr),Ve+=dt>>>13,dt&=8191,Ke=Ve,Ke+=tt*Nr,Ke+=ot*Sr,Ke+=He*rr,Ke+=de*Rr,Ke+=he*Pr,Ve=Ke>>>13,Ke&=8191,Ke+=xe*lr,Ke+=be*te,Ke+=ve*Yt,Ke+=Ne*er,Ke+=It*Gt,Ve+=Ke>>>13,Ke&=8191,Ve=(Ve<<2)+Ve|0,Ve=Ve+Et|0,Et=Ve&8191,Ve=Ve>>>13,Ct+=Ve,tt=Et,ot=Ct,He=kt,de=Ft,he=Pt,xe=Ot,be=Rt,ve=Qe,Ne=dt,It=Ke,q+=16,K-=16;this.h[0]=tt,this.h[1]=ot,this.h[2]=He,this.h[3]=de,this.h[4]=he,this.h[5]=xe,this.h[6]=be,this.h[7]=ve,this.h[8]=Ne,this.h[9]=It},D.prototype.finish=function($,q){var K=new Uint16Array(10),A,Y,ae,oe;if(this.leftover){for(oe=this.leftover,this.buffer[oe++]=1;oe<16;oe++)this.buffer[oe]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(A=this.h[1]>>>13,this.h[1]&=8191,oe=2;oe<10;oe++)this.h[oe]+=A,A=this.h[oe]>>>13,this.h[oe]&=8191;for(this.h[0]+=A*5,A=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=A,A=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=A,K[0]=this.h[0]+5,A=K[0]>>>13,K[0]&=8191,oe=1;oe<10;oe++)K[oe]=this.h[oe]+A,A=K[oe]>>>13,K[oe]&=8191;for(K[9]-=8192,Y=(A^1)-1,oe=0;oe<10;oe++)K[oe]&=Y;for(Y=~Y,oe=0;oe<10;oe++)this.h[oe]=this.h[oe]&Y|K[oe];for(this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535,ae=this.h[0]+this.pad[0],this.h[0]=ae&65535,oe=1;oe<8;oe++)ae=(this.h[oe]+this.pad[oe]|0)+(ae>>>16)|0,this.h[oe]=ae&65535;$[q+0]=this.h[0]>>>0&255,$[q+1]=this.h[0]>>>8&255,$[q+2]=this.h[1]>>>0&255,$[q+3]=this.h[1]>>>8&255,$[q+4]=this.h[2]>>>0&255,$[q+5]=this.h[2]>>>8&255,$[q+6]=this.h[3]>>>0&255,$[q+7]=this.h[3]>>>8&255,$[q+8]=this.h[4]>>>0&255,$[q+9]=this.h[4]>>>8&255,$[q+10]=this.h[5]>>>0&255,$[q+11]=this.h[5]>>>8&255,$[q+12]=this.h[6]>>>0&255,$[q+13]=this.h[6]>>>8&255,$[q+14]=this.h[7]>>>0&255,$[q+15]=this.h[7]>>>8&255},D.prototype.update=function($,q,K){var A,Y;if(this.leftover){for(Y=16-this.leftover,Y>K&&(Y=K),A=0;A<Y;A++)this.buffer[this.leftover+A]=$[q+A];if(K-=Y,q+=Y,this.leftover+=Y,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(K>=16&&(Y=K-K%16,this.blocks($,q,Y),q+=Y,K-=Y),K){for(A=0;A<K;A++)this.buffer[this.leftover+A]=$[q+A];this.leftover+=K}};function O($,q,K,A,Y,ae){var oe=new D(ae);return oe.update(K,A,Y),oe.finish($,q),0}function T($,q,K,A,Y,ae){var oe=new Uint8Array(16);return O(oe,0,K,A,Y,ae),y($,q,oe,0)}function m($,q,K,A,Y){var ae;if(K<32)return-1;for(j($,0,q,0,K,A,Y),O($,16,$,32,K-32,$),ae=0;ae<16;ae++)$[ae]=0;return 0}function b($,q,K,A,Y){var ae,oe=new Uint8Array(32);if(K<32||(I(oe,0,32,A,Y),T(q,16,q,32,K-32,oe)!==0))return-1;for(j($,0,q,0,K,A,Y),ae=0;ae<32;ae++)$[ae]=0;return 0}function E($,q){var K;for(K=0;K<16;K++)$[K]=q[K]|0}function k($){var q,K,A=1;for(q=0;q<16;q++)K=$[q]+A+65535,A=Math.floor(K/65536),$[q]=K-A*65536;$[0]+=A-1+37*(A-1)}function R($,q,K){for(var A,Y=~(K-1),ae=0;ae<16;ae++)A=Y&($[ae]^q[ae]),$[ae]^=A,q[ae]^=A}function M($,q){var K,A,Y,ae=r(),oe=r();for(K=0;K<16;K++)oe[K]=q[K];for(k(oe),k(oe),k(oe),A=0;A<2;A++){for(ae[0]=oe[0]-65517,K=1;K<15;K++)ae[K]=oe[K]-65535-(ae[K-1]>>16&1),ae[K-1]&=65535;ae[15]=oe[15]-32767-(ae[14]>>16&1),Y=ae[15]>>16&1,ae[14]&=65535,R(oe,ae,1-Y)}for(K=0;K<16;K++)$[2*K]=oe[K]&255,$[2*K+1]=oe[K]>>8}function H($,q){var K=new Uint8Array(32),A=new Uint8Array(32);return M(K,$),M(A,q),x(K,0,A,0)}function N($){var q=new Uint8Array(32);return M(q,$),q[0]&1}function v($,q){var K;for(K=0;K<16;K++)$[K]=q[2*K]+(q[2*K+1]<<8);$[15]&=32767}function U($,q,K){for(var A=0;A<16;A++)$[A]=q[A]+K[A]}function G($,q,K){for(var A=0;A<16;A++)$[A]=q[A]-K[A]}function S($,q,K){var A,Y,ae=0,oe=0,pe=0,Ce=0,Le=0,_e=0,Kt=0,Ve=0,Et=0,Ct=0,kt=0,Ft=0,Pt=0,Ot=0,Rt=0,Qe=0,dt=0,Ke=0,tt=0,ot=0,He=0,de=0,he=0,xe=0,be=0,ve=0,Ne=0,It=0,Gt=0,er=0,Yt=0,te=K[0],lr=K[1],Pr=K[2],Rr=K[3],rr=K[4],Sr=K[5],Nr=K[6],si=K[7],rn=K[8],Gn=K[9],Yn=K[10],Zn=K[11],wi=K[12],ls=K[13],us=K[14],fs=K[15];A=q[0],ae+=A*te,oe+=A*lr,pe+=A*Pr,Ce+=A*Rr,Le+=A*rr,_e+=A*Sr,Kt+=A*Nr,Ve+=A*si,Et+=A*rn,Ct+=A*Gn,kt+=A*Yn,Ft+=A*Zn,Pt+=A*wi,Ot+=A*ls,Rt+=A*us,Qe+=A*fs,A=q[1],oe+=A*te,pe+=A*lr,Ce+=A*Pr,Le+=A*Rr,_e+=A*rr,Kt+=A*Sr,Ve+=A*Nr,Et+=A*si,Ct+=A*rn,kt+=A*Gn,Ft+=A*Yn,Pt+=A*Zn,Ot+=A*wi,Rt+=A*ls,Qe+=A*us,dt+=A*fs,A=q[2],pe+=A*te,Ce+=A*lr,Le+=A*Pr,_e+=A*Rr,Kt+=A*rr,Ve+=A*Sr,Et+=A*Nr,Ct+=A*si,kt+=A*rn,Ft+=A*Gn,Pt+=A*Yn,Ot+=A*Zn,Rt+=A*wi,Qe+=A*ls,dt+=A*us,Ke+=A*fs,A=q[3],Ce+=A*te,Le+=A*lr,_e+=A*Pr,Kt+=A*Rr,Ve+=A*rr,Et+=A*Sr,Ct+=A*Nr,kt+=A*si,Ft+=A*rn,Pt+=A*Gn,Ot+=A*Yn,Rt+=A*Zn,Qe+=A*wi,dt+=A*ls,Ke+=A*us,tt+=A*fs,A=q[4],Le+=A*te,_e+=A*lr,Kt+=A*Pr,Ve+=A*Rr,Et+=A*rr,Ct+=A*Sr,kt+=A*Nr,Ft+=A*si,Pt+=A*rn,Ot+=A*Gn,Rt+=A*Yn,Qe+=A*Zn,dt+=A*wi,Ke+=A*ls,tt+=A*us,ot+=A*fs,A=q[5],_e+=A*te,Kt+=A*lr,Ve+=A*Pr,Et+=A*Rr,Ct+=A*rr,kt+=A*Sr,Ft+=A*Nr,Pt+=A*si,Ot+=A*rn,Rt+=A*Gn,Qe+=A*Yn,dt+=A*Zn,Ke+=A*wi,tt+=A*ls,ot+=A*us,He+=A*fs,A=q[6],Kt+=A*te,Ve+=A*lr,Et+=A*Pr,Ct+=A*Rr,kt+=A*rr,Ft+=A*Sr,Pt+=A*Nr,Ot+=A*si,Rt+=A*rn,Qe+=A*Gn,dt+=A*Yn,Ke+=A*Zn,tt+=A*wi,ot+=A*ls,He+=A*us,de+=A*fs,A=q[7],Ve+=A*te,Et+=A*lr,Ct+=A*Pr,kt+=A*Rr,Ft+=A*rr,Pt+=A*Sr,Ot+=A*Nr,Rt+=A*si,Qe+=A*rn,dt+=A*Gn,Ke+=A*Yn,tt+=A*Zn,ot+=A*wi,He+=A*ls,de+=A*us,he+=A*fs,A=q[8],Et+=A*te,Ct+=A*lr,kt+=A*Pr,Ft+=A*Rr,Pt+=A*rr,Ot+=A*Sr,Rt+=A*Nr,Qe+=A*si,dt+=A*rn,Ke+=A*Gn,tt+=A*Yn,ot+=A*Zn,He+=A*wi,de+=A*ls,he+=A*us,xe+=A*fs,A=q[9],Ct+=A*te,kt+=A*lr,Ft+=A*Pr,Pt+=A*Rr,Ot+=A*rr,Rt+=A*Sr,Qe+=A*Nr,dt+=A*si,Ke+=A*rn,tt+=A*Gn,ot+=A*Yn,He+=A*Zn,de+=A*wi,he+=A*ls,xe+=A*us,be+=A*fs,A=q[10],kt+=A*te,Ft+=A*lr,Pt+=A*Pr,Ot+=A*Rr,Rt+=A*rr,Qe+=A*Sr,dt+=A*Nr,Ke+=A*si,tt+=A*rn,ot+=A*Gn,He+=A*Yn,de+=A*Zn,he+=A*wi,xe+=A*ls,be+=A*us,ve+=A*fs,A=q[11],Ft+=A*te,Pt+=A*lr,Ot+=A*Pr,Rt+=A*Rr,Qe+=A*rr,dt+=A*Sr,Ke+=A*Nr,tt+=A*si,ot+=A*rn,He+=A*Gn,de+=A*Yn,he+=A*Zn,xe+=A*wi,be+=A*ls,ve+=A*us,Ne+=A*fs,A=q[12],Pt+=A*te,Ot+=A*lr,Rt+=A*Pr,Qe+=A*Rr,dt+=A*rr,Ke+=A*Sr,tt+=A*Nr,ot+=A*si,He+=A*rn,de+=A*Gn,he+=A*Yn,xe+=A*Zn,be+=A*wi,ve+=A*ls,Ne+=A*us,It+=A*fs,A=q[13],Ot+=A*te,Rt+=A*lr,Qe+=A*Pr,dt+=A*Rr,Ke+=A*rr,tt+=A*Sr,ot+=A*Nr,He+=A*si,de+=A*rn,he+=A*Gn,xe+=A*Yn,be+=A*Zn,ve+=A*wi,Ne+=A*ls,It+=A*us,Gt+=A*fs,A=q[14],Rt+=A*te,Qe+=A*lr,dt+=A*Pr,Ke+=A*Rr,tt+=A*rr,ot+=A*Sr,He+=A*Nr,de+=A*si,he+=A*rn,xe+=A*Gn,be+=A*Yn,ve+=A*Zn,Ne+=A*wi,It+=A*ls,Gt+=A*us,er+=A*fs,A=q[15],Qe+=A*te,dt+=A*lr,Ke+=A*Pr,tt+=A*Rr,ot+=A*rr,He+=A*Sr,de+=A*Nr,he+=A*si,xe+=A*rn,be+=A*Gn,ve+=A*Yn,Ne+=A*Zn,It+=A*wi,Gt+=A*ls,er+=A*us,Yt+=A*fs,ae+=38*dt,oe+=38*Ke,pe+=38*tt,Ce+=38*ot,Le+=38*He,_e+=38*de,Kt+=38*he,Ve+=38*xe,Et+=38*be,Ct+=38*ve,kt+=38*Ne,Ft+=38*It,Pt+=38*Gt,Ot+=38*er,Rt+=38*Yt,Y=1,A=ae+Y+65535,Y=Math.floor(A/65536),ae=A-Y*65536,A=oe+Y+65535,Y=Math.floor(A/65536),oe=A-Y*65536,A=pe+Y+65535,Y=Math.floor(A/65536),pe=A-Y*65536,A=Ce+Y+65535,Y=Math.floor(A/65536),Ce=A-Y*65536,A=Le+Y+65535,Y=Math.floor(A/65536),Le=A-Y*65536,A=_e+Y+65535,Y=Math.floor(A/65536),_e=A-Y*65536,A=Kt+Y+65535,Y=Math.floor(A/65536),Kt=A-Y*65536,A=Ve+Y+65535,Y=Math.floor(A/65536),Ve=A-Y*65536,A=Et+Y+65535,Y=Math.floor(A/65536),Et=A-Y*65536,A=Ct+Y+65535,Y=Math.floor(A/65536),Ct=A-Y*65536,A=kt+Y+65535,Y=Math.floor(A/65536),kt=A-Y*65536,A=Ft+Y+65535,Y=Math.floor(A/65536),Ft=A-Y*65536,A=Pt+Y+65535,Y=Math.floor(A/65536),Pt=A-Y*65536,A=Ot+Y+65535,Y=Math.floor(A/65536),Ot=A-Y*65536,A=Rt+Y+65535,Y=Math.floor(A/65536),Rt=A-Y*65536,A=Qe+Y+65535,Y=Math.floor(A/65536),Qe=A-Y*65536,ae+=Y-1+37*(Y-1),Y=1,A=ae+Y+65535,Y=Math.floor(A/65536),ae=A-Y*65536,A=oe+Y+65535,Y=Math.floor(A/65536),oe=A-Y*65536,A=pe+Y+65535,Y=Math.floor(A/65536),pe=A-Y*65536,A=Ce+Y+65535,Y=Math.floor(A/65536),Ce=A-Y*65536,A=Le+Y+65535,Y=Math.floor(A/65536),Le=A-Y*65536,A=_e+Y+65535,Y=Math.floor(A/65536),_e=A-Y*65536,A=Kt+Y+65535,Y=Math.floor(A/65536),Kt=A-Y*65536,A=Ve+Y+65535,Y=Math.floor(A/65536),Ve=A-Y*65536,A=Et+Y+65535,Y=Math.floor(A/65536),Et=A-Y*65536,A=Ct+Y+65535,Y=Math.floor(A/65536),Ct=A-Y*65536,A=kt+Y+65535,Y=Math.floor(A/65536),kt=A-Y*65536,A=Ft+Y+65535,Y=Math.floor(A/65536),Ft=A-Y*65536,A=Pt+Y+65535,Y=Math.floor(A/65536),Pt=A-Y*65536,A=Ot+Y+65535,Y=Math.floor(A/65536),Ot=A-Y*65536,A=Rt+Y+65535,Y=Math.floor(A/65536),Rt=A-Y*65536,A=Qe+Y+65535,Y=Math.floor(A/65536),Qe=A-Y*65536,ae+=Y-1+37*(Y-1),$[0]=ae,$[1]=oe,$[2]=pe,$[3]=Ce,$[4]=Le,$[5]=_e,$[6]=Kt,$[7]=Ve,$[8]=Et,$[9]=Ct,$[10]=kt,$[11]=Ft,$[12]=Pt,$[13]=Ot,$[14]=Rt,$[15]=Qe}function J($,q){S($,q,q)}function ne($,q){var K=r(),A;for(A=0;A<16;A++)K[A]=q[A];for(A=253;A>=0;A--)J(K,K),A!==2&&A!==4&&S(K,K,q);for(A=0;A<16;A++)$[A]=K[A]}function Z($,q){var K=r(),A;for(A=0;A<16;A++)K[A]=q[A];for(A=250;A>=0;A--)J(K,K),A!==1&&S(K,K,q);for(A=0;A<16;A++)$[A]=K[A]}function Q($,q,K){var A=new Uint8Array(32),Y=new Float64Array(80),ae,oe,pe=r(),Ce=r(),Le=r(),_e=r(),Kt=r(),Ve=r();for(oe=0;oe<31;oe++)A[oe]=q[oe];for(A[31]=q[31]&127|64,A[0]&=248,v(Y,K),oe=0;oe<16;oe++)Ce[oe]=Y[oe],_e[oe]=pe[oe]=Le[oe]=0;for(pe[0]=_e[0]=1,oe=254;oe>=0;--oe)ae=A[oe>>>3]>>>(oe&7)&1,R(pe,Ce,ae),R(Le,_e,ae),U(Kt,pe,Le),G(pe,pe,Le),U(Le,Ce,_e),G(Ce,Ce,_e),J(_e,Kt),J(Ve,pe),S(pe,Le,pe),S(Le,Ce,Kt),U(Kt,pe,Le),G(pe,pe,Le),J(Ce,pe),G(Le,_e,Ve),S(pe,Le,c),U(pe,pe,_e),S(Le,Le,pe),S(pe,_e,Ve),S(_e,Ce,Y),J(Ce,Kt),R(pe,Ce,ae),R(Le,_e,ae);for(oe=0;oe<16;oe++)Y[oe+16]=pe[oe],Y[oe+32]=Le[oe],Y[oe+48]=Ce[oe],Y[oe+64]=_e[oe];var Et=Y.subarray(32),Ct=Y.subarray(16);return ne(Et,Et),S(Ct,Ct,Et),M($,Ct),0}function ee($,q){return Q($,q,s)}function re($,q){return n(q,32),ee($,q)}function ie($,q,K){var A=new Uint8Array(32);return Q(A,K,q),P($,i,A,z)}var me=m,le=b;function ye($,q,K,A,Y,ae){var oe=new Uint8Array(32);return ie(oe,Y,ae),me($,q,K,A,oe)}function $t($,q,K,A,Y,ae){var oe=new Uint8Array(32);return ie(oe,Y,ae),le($,q,K,A,oe)}var wt=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function ze($,q,K,A){for(var Y=new Int32Array(16),ae=new Int32Array(16),oe,pe,Ce,Le,_e,Kt,Ve,Et,Ct,kt,Ft,Pt,Ot,Rt,Qe,dt,Ke,tt,ot,He,de,he,xe,be,ve,Ne,It=$[0],Gt=$[1],er=$[2],Yt=$[3],te=$[4],lr=$[5],Pr=$[6],Rr=$[7],rr=q[0],Sr=q[1],Nr=q[2],si=q[3],rn=q[4],Gn=q[5],Yn=q[6],Zn=q[7],wi=0;A>=128;){for(ot=0;ot<16;ot++)He=8*ot+wi,Y[ot]=K[He+0]<<24|K[He+1]<<16|K[He+2]<<8|K[He+3],ae[ot]=K[He+4]<<24|K[He+5]<<16|K[He+6]<<8|K[He+7];for(ot=0;ot<80;ot++)if(oe=It,pe=Gt,Ce=er,Le=Yt,_e=te,Kt=lr,Ve=Pr,Et=Rr,Ct=rr,kt=Sr,Ft=Nr,Pt=si,Ot=rn,Rt=Gn,Qe=Yn,dt=Zn,de=Rr,he=Zn,xe=he&65535,be=he>>>16,ve=de&65535,Ne=de>>>16,de=(te>>>14|rn<<18)^(te>>>18|rn<<14)^(rn>>>9|te<<23),he=(rn>>>14|te<<18)^(rn>>>18|te<<14)^(te>>>9|rn<<23),xe+=he&65535,be+=he>>>16,ve+=de&65535,Ne+=de>>>16,de=te&lr^~te&Pr,he=rn&Gn^~rn&Yn,xe+=he&65535,be+=he>>>16,ve+=de&65535,Ne+=de>>>16,de=wt[ot*2],he=wt[ot*2+1],xe+=he&65535,be+=he>>>16,ve+=de&65535,Ne+=de>>>16,de=Y[ot%16],he=ae[ot%16],xe+=he&65535,be+=he>>>16,ve+=de&65535,Ne+=de>>>16,be+=xe>>>16,ve+=be>>>16,Ne+=ve>>>16,Ke=ve&65535|Ne<<16,tt=xe&65535|be<<16,de=Ke,he=tt,xe=he&65535,be=he>>>16,ve=de&65535,Ne=de>>>16,de=(It>>>28|rr<<4)^(rr>>>2|It<<30)^(rr>>>7|It<<25),he=(rr>>>28|It<<4)^(It>>>2|rr<<30)^(It>>>7|rr<<25),xe+=he&65535,be+=he>>>16,ve+=de&65535,Ne+=de>>>16,de=It&Gt^It&er^Gt&er,he=rr&Sr^rr&Nr^Sr&Nr,xe+=he&65535,be+=he>>>16,ve+=de&65535,Ne+=de>>>16,be+=xe>>>16,ve+=be>>>16,Ne+=ve>>>16,Et=ve&65535|Ne<<16,dt=xe&65535|be<<16,de=Le,he=Pt,xe=he&65535,be=he>>>16,ve=de&65535,Ne=de>>>16,de=Ke,he=tt,xe+=he&65535,be+=he>>>16,ve+=de&65535,Ne+=de>>>16,be+=xe>>>16,ve+=be>>>16,Ne+=ve>>>16,Le=ve&65535|Ne<<16,Pt=xe&65535|be<<16,Gt=oe,er=pe,Yt=Ce,te=Le,lr=_e,Pr=Kt,Rr=Ve,It=Et,Sr=Ct,Nr=kt,si=Ft,rn=Pt,Gn=Ot,Yn=Rt,Zn=Qe,rr=dt,ot%16===15)for(He=0;He<16;He++)de=Y[He],he=ae[He],xe=he&65535,be=he>>>16,ve=de&65535,Ne=de>>>16,de=Y[(He+9)%16],he=ae[(He+9)%16],xe+=he&65535,be+=he>>>16,ve+=de&65535,Ne+=de>>>16,Ke=Y[(He+1)%16],tt=ae[(He+1)%16],de=(Ke>>>1|tt<<31)^(Ke>>>8|tt<<24)^Ke>>>7,he=(tt>>>1|Ke<<31)^(tt>>>8|Ke<<24)^(tt>>>7|Ke<<25),xe+=he&65535,be+=he>>>16,ve+=de&65535,Ne+=de>>>16,Ke=Y[(He+14)%16],tt=ae[(He+14)%16],de=(Ke>>>19|tt<<13)^(tt>>>29|Ke<<3)^Ke>>>6,he=(tt>>>19|Ke<<13)^(Ke>>>29|tt<<3)^(tt>>>6|Ke<<26),xe+=he&65535,be+=he>>>16,ve+=de&65535,Ne+=de>>>16,be+=xe>>>16,ve+=be>>>16,Ne+=ve>>>16,Y[He]=ve&65535|Ne<<16,ae[He]=xe&65535|be<<16;de=It,he=rr,xe=he&65535,be=he>>>16,ve=de&65535,Ne=de>>>16,de=$[0],he=q[0],xe+=he&65535,be+=he>>>16,ve+=de&65535,Ne+=de>>>16,be+=xe>>>16,ve+=be>>>16,Ne+=ve>>>16,$[0]=It=ve&65535|Ne<<16,q[0]=rr=xe&65535|be<<16,de=Gt,he=Sr,xe=he&65535,be=he>>>16,ve=de&65535,Ne=de>>>16,de=$[1],he=q[1],xe+=he&65535,be+=he>>>16,ve+=de&65535,Ne+=de>>>16,be+=xe>>>16,ve+=be>>>16,Ne+=ve>>>16,$[1]=Gt=ve&65535|Ne<<16,q[1]=Sr=xe&65535|be<<16,de=er,he=Nr,xe=he&65535,be=he>>>16,ve=de&65535,Ne=de>>>16,de=$[2],he=q[2],xe+=he&65535,be+=he>>>16,ve+=de&65535,Ne+=de>>>16,be+=xe>>>16,ve+=be>>>16,Ne+=ve>>>16,$[2]=er=ve&65535|Ne<<16,q[2]=Nr=xe&65535|be<<16,de=Yt,he=si,xe=he&65535,be=he>>>16,ve=de&65535,Ne=de>>>16,de=$[3],he=q[3],xe+=he&65535,be+=he>>>16,ve+=de&65535,Ne+=de>>>16,be+=xe>>>16,ve+=be>>>16,Ne+=ve>>>16,$[3]=Yt=ve&65535|Ne<<16,q[3]=si=xe&65535|be<<16,de=te,he=rn,xe=he&65535,be=he>>>16,ve=de&65535,Ne=de>>>16,de=$[4],he=q[4],xe+=he&65535,be+=he>>>16,ve+=de&65535,Ne+=de>>>16,be+=xe>>>16,ve+=be>>>16,Ne+=ve>>>16,$[4]=te=ve&65535|Ne<<16,q[4]=rn=xe&65535|be<<16,de=lr,he=Gn,xe=he&65535,be=he>>>16,ve=de&65535,Ne=de>>>16,de=$[5],he=q[5],xe+=he&65535,be+=he>>>16,ve+=de&65535,Ne+=de>>>16,be+=xe>>>16,ve+=be>>>16,Ne+=ve>>>16,$[5]=lr=ve&65535|Ne<<16,q[5]=Gn=xe&65535|be<<16,de=Pr,he=Yn,xe=he&65535,be=he>>>16,ve=de&65535,Ne=de>>>16,de=$[6],he=q[6],xe+=he&65535,be+=he>>>16,ve+=de&65535,Ne+=de>>>16,be+=xe>>>16,ve+=be>>>16,Ne+=ve>>>16,$[6]=Pr=ve&65535|Ne<<16,q[6]=Yn=xe&65535|be<<16,de=Rr,he=Zn,xe=he&65535,be=he>>>16,ve=de&65535,Ne=de>>>16,de=$[7],he=q[7],xe+=he&65535,be+=he>>>16,ve+=de&65535,Ne+=de>>>16,be+=xe>>>16,ve+=be>>>16,Ne+=ve>>>16,$[7]=Rr=ve&65535|Ne<<16,q[7]=Zn=xe&65535|be<<16,wi+=128,A-=128}return A}function gr($,q,K){var A=new Int32Array(8),Y=new Int32Array(8),ae=new Uint8Array(256),oe,pe=K;for(A[0]=1779033703,A[1]=3144134277,A[2]=1013904242,A[3]=2773480762,A[4]=1359893119,A[5]=2600822924,A[6]=528734635,A[7]=1541459225,Y[0]=4089235720,Y[1]=2227873595,Y[2]=4271175723,Y[3]=1595750129,Y[4]=2917565137,Y[5]=725511199,Y[6]=4215389547,Y[7]=327033209,ze(A,Y,q,K),K%=128,oe=0;oe<K;oe++)ae[oe]=q[pe-K+oe];for(ae[K]=128,K=256-128*(K<112?1:0),ae[K-9]=0,h(ae,K-8,pe/536870912|0,pe<<3),ze(A,Y,ae,K),oe=0;oe<8;oe++)h($,8*oe,A[oe],Y[oe]);return 0}function Ut($,q){var K=r(),A=r(),Y=r(),ae=r(),oe=r(),pe=r(),Ce=r(),Le=r(),_e=r();G(K,$[1],$[0]),G(_e,q[1],q[0]),S(K,K,_e),U(A,$[0],$[1]),U(_e,q[0],q[1]),S(A,A,_e),S(Y,$[3],q[3]),S(Y,Y,u),S(ae,$[2],q[2]),U(ae,ae,ae),G(oe,A,K),G(pe,ae,Y),U(Ce,ae,Y),U(Le,A,K),S($[0],oe,pe),S($[1],Le,Ce),S($[2],Ce,pe),S($[3],oe,Le)}function ur($,q,K){var A;for(A=0;A<4;A++)R($[A],q[A],K)}function hi($,q){var K=r(),A=r(),Y=r();ne(Y,q[2]),S(K,q[0],Y),S(A,q[1],Y),M($,A),$[31]^=N(K)<<7}function Bt($,q,K){var A,Y;for(E($[0],o),E($[1],a),E($[2],a),E($[3],o),Y=255;Y>=0;--Y)A=K[Y/8|0]>>(Y&7)&1,ur($,q,A),Ut(q,$),Ut($,$),ur($,q,A)}function Ht($,q){var K=[r(),r(),r(),r()];E(K[0],f),E(K[1],d),E(K[2],a),S(K[3],f,d),Bt($,K,q)}function Pn($,q,K){var A=new Uint8Array(64),Y=[r(),r(),r(),r()],ae;for(K||n(q,32),gr(A,q,32),A[0]&=248,A[31]&=127,A[31]|=64,Ht(Y,A),hi($,Y),ae=0;ae<32;ae++)q[ae+32]=$[ae];return 0}var Je=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function ut($,q){var K,A,Y,ae;for(A=63;A>=32;--A){for(K=0,Y=A-32,ae=A-12;Y<ae;++Y)q[Y]+=K-16*q[A]*Je[Y-(A-32)],K=Math.floor((q[Y]+128)/256),q[Y]-=K*256;q[Y]+=K,q[A]=0}for(K=0,Y=0;Y<32;Y++)q[Y]+=K-(q[31]>>4)*Je[Y],K=q[Y]>>8,q[Y]&=255;for(Y=0;Y<32;Y++)q[Y]-=K*Je[Y];for(A=0;A<32;A++)q[A+1]+=q[A]>>8,$[A]=q[A]&255}function xt($){var q=new Float64Array(64),K;for(K=0;K<64;K++)q[K]=$[K];for(K=0;K<64;K++)$[K]=0;ut($,q)}function vt($,q,K,A){var Y=new Uint8Array(64),ae=new Uint8Array(64),oe=new Uint8Array(64),pe,Ce,Le=new Float64Array(64),_e=[r(),r(),r(),r()];gr(Y,A,32),Y[0]&=248,Y[31]&=127,Y[31]|=64;var Kt=K+64;for(pe=0;pe<K;pe++)$[64+pe]=q[pe];for(pe=0;pe<32;pe++)$[32+pe]=Y[32+pe];for(gr(oe,$.subarray(32),K+32),xt(oe),Ht(_e,oe),hi($,_e),pe=32;pe<64;pe++)$[pe]=A[pe];for(gr(ae,$,K+64),xt(ae),pe=0;pe<64;pe++)Le[pe]=0;for(pe=0;pe<32;pe++)Le[pe]=oe[pe];for(pe=0;pe<32;pe++)for(Ce=0;Ce<32;Ce++)Le[pe+Ce]+=ae[pe]*Y[Ce];return ut($.subarray(32),Le),Kt}function ar($,q){var K=r(),A=r(),Y=r(),ae=r(),oe=r(),pe=r(),Ce=r();return E($[2],a),v($[1],q),J(Y,$[1]),S(ae,Y,l),G(Y,Y,$[2]),U(ae,$[2],ae),J(oe,ae),J(pe,oe),S(Ce,pe,oe),S(K,Ce,Y),S(K,K,ae),Z(K,K),S(K,K,Y),S(K,K,ae),S(K,K,ae),S($[0],K,ae),J(A,$[0]),S(A,A,ae),H(A,Y)&&S($[0],$[0],p),J(A,$[0]),S(A,A,ae),H(A,Y)?-1:(N($[0])===q[31]>>7&&G($[0],o,$[0]),S($[3],$[0],$[1]),0)}
833function Kn($,q,K,A){var Y,ae=new Uint8Array(32),oe=new Uint8Array(64),pe=[r(),r(),r(),r()],Ce=[r(),r(),r(),r()];if(K<64||ar(Ce,A))return-1;for(Y=0;Y<K;Y++)$[Y]=q[Y];for(Y=0;Y<32;Y++)$[Y+32]=A[Y];if(gr(oe,$,K),xt(oe),Bt(pe,Ce,oe),Ht(Ce,q.subarray(32)),Ut(pe,Ce),hi(ae,pe),K-=64,x(q,0,ae,0)){for(Y=0;Y<K;Y++)$[Y]=0;return-1}for(Y=0;Y<K;Y++)$[Y]=q[Y+64];return K}var pt=32,qe=24,Rn=32,mr=16,Ar=32,na=32,Vr=32,Kr=32,La=32,un=qe,pn=Rn,Il=mr,vr=64,kr=32,Js=64,en=32,tn=64;e.lowlevel={crypto_core_hsalsa20:P,crypto_stream_xor:j,crypto_stream:I,crypto_stream_salsa20_xor:W,crypto_stream_salsa20:B,crypto_onetimeauth:O,crypto_onetimeauth_verify:T,crypto_verify_16:y,crypto_verify_32:x,crypto_secretbox:m,crypto_secretbox_open:b,crypto_scalarmult:Q,crypto_scalarmult_base:ee,crypto_box_beforenm:ie,crypto_box_afternm:me,crypto_box:ye,crypto_box_open:$t,crypto_box_keypair:re,crypto_hash:gr,crypto_sign:vt,crypto_sign_keypair:Pn,crypto_sign_open:Kn,crypto_secretbox_KEYBYTES:pt,crypto_secretbox_NONCEBYTES:qe,crypto_secretbox_ZEROBYTES:Rn,crypto_secretbox_BOXZEROBYTES:mr,crypto_scalarmult_BYTES:Ar,crypto_scalarmult_SCALARBYTES:na,crypto_box_PUBLICKEYBYTES:Vr,crypto_box_SECRETKEYBYTES:Kr,crypto_box_BEFORENMBYTES:La,crypto_box_NONCEBYTES:un,crypto_box_ZEROBYTES:pn,crypto_box_BOXZEROBYTES:Il,crypto_sign_BYTES:vr,crypto_sign_PUBLICKEYBYTES:kr,crypto_sign_SECRETKEYBYTES:Js,crypto_sign_SEEDBYTES:en,crypto_hash_BYTES:tn,gf:r,D:l,L:Je,pack25519:M,unpack25519:v,M:S,A:U,S:J,Z:G,pow2523:Z,add:Ut,set25519:E,modL:ut,scalarmult:Bt,scalarbase:Ht};function Cc($,q){if($.length!==pt)throw new Error("bad key size");if(q.length!==qe)throw new Error("bad nonce size")}function gn($,q){if($.length!==Vr)throw new Error("bad public key size");if(q.length!==Kr)throw new Error("bad secret key size")}function cr(){for(var $=0;$<arguments.length;$++)if(!(arguments[$]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function _c($){for(var q=0;q<$.length;q++)$[q]=0}e.randomBytes=function($){var q=new Uint8Array($);return n(q,$),q},e.secretbox=function($,q,K){cr($,q,K),Cc(K,q);for(var A=new Uint8Array(Rn+$.length),Y=new Uint8Array(A.length),ae=0;ae<$.length;ae++)A[ae+Rn]=$[ae];return m(Y,A,A.length,q,K),Y.subarray(mr)},e.secretbox.open=function($,q,K){cr($,q,K),Cc(K,q);for(var A=new Uint8Array(mr+$.length),Y=new Uint8Array(A.length),ae=0;ae<$.length;ae++)A[ae+mr]=$[ae];return A.length<32||b(Y,A,A.length,q,K)!==0?null:Y.subarray(Rn)},e.secretbox.keyLength=pt,e.secretbox.nonceLength=qe,e.secretbox.overheadLength=mr,e.scalarMult=function($,q){if(cr($,q),$.length!==na)throw new Error("bad n size");if(q.length!==Ar)throw new Error("bad p size");var K=new Uint8Array(Ar);return Q(K,$,q),K},e.scalarMult.base=function($){if(cr($),$.length!==na)throw new Error("bad n size");var q=new Uint8Array(Ar);return ee(q,$),q},e.scalarMult.scalarLength=na,e.scalarMult.groupElementLength=Ar,e.box=function($,q,K,A){var Y=e.box.before(K,A);return e.secretbox($,q,Y)},e.box.before=function($,q){cr($,q),gn($,q);var K=new Uint8Array(La);return ie(K,$,q),K},e.box.after=e.secretbox,e.box.open=function($,q,K,A){var Y=e.box.before(K,A);return e.secretbox.open($,q,Y)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var $=new Uint8Array(Vr),q=new Uint8Array(Kr);return re($,q),{publicKey:$,secretKey:q}},e.box.keyPair.fromSecretKey=function($){if(cr($),$.length!==Kr)throw new Error("bad secret key size");var q=new Uint8Array(Vr);return ee(q,$),{publicKey:q,secretKey:new Uint8Array($)}},e.box.publicKeyLength=Vr,e.box.secretKeyLength=Kr,e.box.sharedKeyLength=La,e.box.nonceLength=un,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function($,q){if(cr($,q),q.length!==Js)throw new Error("bad secret key size");var K=new Uint8Array(vr+$.length);return vt(K,$,$.length,q),K},e.sign.open=function($,q){if(cr($,q),q.length!==kr)throw new Error("bad public key size");var K=new Uint8Array($.length),A=Kn(K,$,$.length,q);if(A<0)return null;for(var Y=new Uint8Array(A),ae=0;ae<Y.length;ae++)Y[ae]=K[ae];return Y},e.sign.detached=function($,q){for(var K=e.sign($,q),A=new Uint8Array(vr),Y=0;Y<A.length;Y++)A[Y]=K[Y];return A},e.sign.detached.verify=function($,q,K){if(cr($,q,K),q.length!==vr)throw new Error("bad signature size");if(K.length!==kr)throw new Error("bad public key size");
833var A=new Uint8Array(vr+$.length),Y=new Uint8Array(vr+$.length),ae;for(ae=0;ae<vr;ae++)A[ae]=q[ae];for(ae=0;ae<$.length;ae++)A[ae+vr]=$[ae];return Kn(Y,A,A.length,K)>=0},e.sign.keyPair=function(){var $=new Uint8Array(kr),q=new Uint8Array(Js);return Pn($,q),{publicKey:$,secretKey:q}},e.sign.keyPair.fromSecretKey=function($){if(cr($),$.length!==Js)throw new Error("bad secret key size");for(var q=new Uint8Array(kr),K=0;K<q.length;K++)q[K]=$[32+K];return{publicKey:q,secretKey:new Uint8Array($)}},e.sign.keyPair.fromSeed=function($){if(cr($),$.length!==en)throw new Error("bad seed size");for(var q=new Uint8Array(kr),K=new Uint8Array(Js),A=0;A<32;A++)K[A]=$[A];return Pn(q,K,!0),{publicKey:q,secretKey:K}},e.sign.publicKeyLength=kr,e.sign.secretKeyLength=Js,e.sign.seedLength=en,e.sign.signatureLength=vr,e.hash=function($){cr($);var q=new Uint8Array(tn);return gr(q,$,$.length),q},e.hash.hashLength=tn,e.verify=function($,q){return cr($,q),$.length===0||q.length===0||$.length!==q.length?!1:g($,0,q,0,$.length)===0},e.setPRNG=function($){n=$},function(){var $=typeof self<"u"?self.crypto||self.msCrypto:null;if($&&$.getRandomValues){var q=65536;e.setPRNG(function(K,A){var Y,ae=new Uint8Array(A);for(Y=0;Y<A;Y+=q)$.getRandomValues(ae.subarray(Y,Y+Math.min(A-Y,q)));for(Y=0;Y<A;Y++)K[Y]=ae[Y];_c(ae)})}else typeof Noe<"u"&&($=GB,$&&$.randomBytes&&e.setPRNG(function(K,A){var Y,ae=$.randomBytes(A);for(Y=0;Y<A;Y++)K[Y]=ae[Y];_c(ae)}))}()})(t.exports?t.exports:self.nacl=self.nacl||{})})(KB);var koe=KB.exports;const Vb=is(koe);var af;(function(t){t[t.UNKNOWN_ERROR=0]="UNKNOWN_ERROR",t[t.BAD_REQUEST_ERROR=1]="BAD_REQUEST_ERROR",t[t.MANIFEST_NOT_FOUND_ERROR=2]="MANIFEST_NOT_FOUND_ERROR",t[t.MANIFEST_CONTENT_ERROR=3]="MANIFEST_CONTENT_ERROR",t[t.UNKNOWN_APP_ERROR=100]="UNKNOWN_APP_ERROR",t[t.USER_REJECTS_ERROR=300]="USER_REJECTS_ERROR",t[t.METHOD_NOT_SUPPORTED=400]="METHOD_NOT_SUPPORTED"})(af||(af={}));var CC;(function(t){t[t.UNKNOWN_ERROR=0]="UNKNOWN_ERROR",t[t.METHOD_NOT_SUPPORTED=400]="METHOD_NOT_SUPPORTED"})(CC||(CC={}));var dp;(function(t){t[t.UNKNOWN_ERROR=0]="UNKNOWN_ERROR",t[t.BAD_REQUEST_ERROR=1]="BAD_REQUEST_ERROR",t[t.UNKNOWN_APP_ERROR=100]="UNKNOWN_APP_ERROR",t[t.USER_REJECTS_ERROR=300]="USER_REJECTS_ERROR",t[t.METHOD_NOT_SUPPORTED=400]="METHOD_NOT_SUPPORTED"})(dp||(dp={}));var hp;(function(t){t[t.UNKNOWN_ERROR=0]="UNKNOWN_ERROR",t[t.BAD_REQUEST_ERROR=1]="BAD_REQUEST_ERROR",t[t.UNKNOWN_APP_ERROR=100]="UNKNOWN_APP_ERROR",t[t.USER_REJECTS_ERROR=300]="USER_REJECTS_ERROR",t[t.METHOD_NOT_SUPPORTED=400]="METHOD_NOT_SUPPORTED"})(hp||(hp={}));var NT;(function(t){t[t.UNKNOWN_ERROR=0]="UNKNOWN_ERROR",t[t.BAD_REQUEST_ERROR=1]="BAD_REQUEST_ERROR",t[t.UNKNOWN_APP_ERROR=100]="UNKNOWN_APP_ERROR",t[t.METHOD_NOT_SUPPORTED=400]="METHOD_NOT_SUPPORTED"})(NT||(NT={}));var m3;(function(t){t.MAINNET="-239",t.TESTNET="-3"})(m3||(m3={}));function Poe(t,e){const r=v2.encodeBase64(t);return e?encodeURIComponent(r):r}function Roe(t,e){return e&&(t=decodeURIComponent(t)),v2.decodeBase64(t)}function Ooe(t,e=!1){let r;return t instanceof Uint8Array?r=t:(typeof t!="string"&&(t=JSON.stringify(t)),r=v2.decodeUTF8(t)),Poe(r,e)}function Doe(t,e=!1){const r=Roe(t,e);return{toString(){return v2.encodeUTF8(r)},toObject(){try{return JSON.parse(v2.encodeUTF8(r))}catch{return null}},toUint8Array(){return r}}}const M9={encode:Ooe,decode:Doe};function Loe(t,e){const r=new Uint8Array(t.length+e.length);return r.set(t),r.set(e,t.length),r}function Moe(t,e){if(e>=t.length)throw new Error("Index is out of buffer");const r=t.slice(0,e),n=t.slice(e);return[r,n]}function J5(t){let e="";return t.forEach(r=>{e+=("0"+(r&255).toString(16)).slice(-2)}),e}function y3(t){if(t.length%2!==0)throw new Error(`Cannot convert ${t} to bytesArray`);const e=new Uint8Array(t.length/2);for(let r=0;r<t.length;r+=2)e[r/2]=parseInt(t.slice(r,r+2),16);return e}class _C{constructor(e){this.nonceLength=24,this.keyPair=e?this.createKeypairFromString(e):this.createKeypair(),this.sessionId=J5(this.keyPair.publicKey)}createKeypair(){return Vb.box.keyPair()}createKeypairFromString(e){return{publicKey:y3(e.publicKey),secretKey:y3(e.secretKey)}}createNonce(){return Vb.randomBytes(this.nonceLength)}encrypt(e,r){const n=new TextEncoder().encode(e),i=this.createNonce(),s=Vb.box(n,i,r,this.keyPair.secretKey);return Loe(i,s)}decrypt(e,r){const[n,i]=Moe(e,this.nonceLength),s=Vb.box.open(i,n,r,this.keyPair.secretKey);if(!s)throw new Error(`Decryption error: 834 message: ${e.toString()} 835 sender pubkey: ${r.toString()} 836 keypair pubkey: ${this.keyPair.publicKey.toString()} 837 keypair secretkey: ${this.keyPair.secretKey.toString()}`);return new TextDecoder().decode(s)}stringifyKeypair(){return{publicKey:J5(this.keyPair.publicKey),secretKey:J5(this.keyPair.secretKey)}}}/*! ***************************************************************************** 838Copyright (c) Microsoft Corporation. 839 840Permission to use, copy, modify, and/or distribute this software for any 841purpose with or without fee is hereby granted. 842 843THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 844REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 845AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 846INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 847LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 848OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 849PERFORMANCE OF THIS SOFTWARE. 850***************************************************************************** */function IT(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function et(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,[])).next())})}
850class ht extends Error{constructor(e,r){super(e,r),this.message=`${ht.prefix} ${this.constructor.name}${this.info?": "+this.info:""}${e?` 851`+e:""}`,Object.setPrototypeOf(this,ht.prototype)}get info(){return""}}ht.prefix="[TON_CONNECT_SDK_ERROR]";class $9 extends ht{get info(){return"Passed DappMetadata is in incorrect format."}constructor(...e){super(...e),Object.setPrototypeOf(this,$9.prototype)}}class ix extends ht{get info(){return"Passed `tonconnect-manifest.json` contains errors. Check format of your manifest. See more https://github.com/ton-connect/docs/blob/main/requests-responses.md#app-manifest"}constructor(...e){super(...e),Object.setPrototypeOf(this,ix.prototype)}}class sx extends ht{get info(){return"Manifest not found. Make sure you added `tonconnect-manifest.json` to the root of your app or passed correct manifestUrl. See more https://github.com/ton-connect/docs/blob/main/requests-responses.md#app-manifest"}constructor(...e){super(...e),Object.setPrototypeOf(this,sx.prototype)}}class U9 extends ht{get info(){return"Wallet connection called but wallet already connected. To avoid the error, disconnect the wallet before doing a new connection."}constructor(...e){super(...e),Object.setPrototypeOf(this,U9.prototype)}}class b3 extends ht{get info(){return"Send transaction or other protocol methods called while wallet is not connected."}constructor(...e){super(...e),Object.setPrototypeOf(this,b3.prototype)}}class B9 extends ht{get info(){return"There is an attempt to connect to the injected wallet while it is not exists in the webpage."}constructor(...e){super(...e),Object.setPrototypeOf(this,B9.prototype)}}class iu extends ht{get info(){return"Wallet doesn't support requested feature method."}constructor(e,r){super(e,r),Object.setPrototypeOf(this,iu.prototype)}}class Hy extends ht{get info(){return"Missing required features. You need to update your wallet."}constructor(e,r){super(e,r),Object.setPrototypeOf(this,Hy.prototype)}}function $oe(t){return"jsBridgeKey"in t}class qy extends ht{get info(){return"User rejects the action in the wallet."}constructor(...e){super(...e),Object.setPrototypeOf(this,qy.prototype)}}class Vy extends ht{get info(){return"Request to the wallet contains errors."}constructor(...e){super(...e),Object.setPrototypeOf(this,Vy.prototype)}}class Ky extends ht{get info(){return"App tries to send rpc request to the injected wallet while not connected."}constructor(...e){super(...e),Object.setPrototypeOf(this,Ky.prototype)}}class F9 extends ht{get info(){return"An error occurred while fetching the wallets list."}constructor(...e){super(...e),Object.setPrototypeOf(this,F9.prototype)}}class pp extends ht{get info(){return"Passed address is in incorrect format."}constructor(...e){super(...e),Object.setPrototypeOf(this,pp.prototype)}}class w3 extends ht{get info(){return"Passed hex is in incorrect format."}constructor(...e){super(...e),Object.setPrototypeOf(this,w3.prototype)}}class pc extends ht{constructor(...e){super(...e),Object.setPrototypeOf(this,pc.prototype)}}const TT={[af.UNKNOWN_ERROR]:pc,[af.USER_REJECTS_ERROR]:qy,[af.BAD_REQUEST_ERROR]:Vy,[af.UNKNOWN_APP_ERROR]:Ky,[af.MANIFEST_NOT_FOUND_ERROR]:sx,[af.MANIFEST_CONTENT_ERROR]:ix};class Uoe{parseError(e){let r=pc;return e.code in TT&&(r=TT[e.code]||pc),new r(e.message)}}const Boe=new Uoe;class YB{isError(e){return"error"in e}}const kT={[dp.UNKNOWN_ERROR]:pc,[dp.USER_REJECTS_ERROR]:qy,[dp.BAD_REQUEST_ERROR]:Vy,[dp.UNKNOWN_APP_ERROR]:Ky};class Foe extends YB{convertToRpcRequest(e){return{method:"sendTransaction",params:[JSON.stringify(e)]}}parseAndThrowError(e){let r=pc;throw e.error.code in kT&&(r=kT[e.error.code]||pc),new r(e.error.message)}convertFromRpcResponse(e){return{boc:e.result}}}const Kb=new Foe,PT={[hp.UNKNOWN_ERROR]:pc,[hp.USER_REJECTS_ERROR]:qy,[hp.BAD_REQUEST_ERROR]:Vy,[hp.UNKNOWN_APP_ERROR]:Ky};class joe extends YB{convertToRpcRequest(e){return{method:"signData",params:[JSON.stringify(e)]}}parseAndThrowError(e){let r=pc;throw e.error.code in PT&&(r=PT[e.error.code]||pc),new r(e.error.message)}convertFromRpcResponse(e){return e.result}}const Gb=new joe;
851class zoe{constructor(e,r){this.storage=e,this.storeKey="ton-connect-storage_http-bridge-gateway::"+r}storeLastEventId(e){return et(this,void 0,void 0,function*(){return this.storage.setItem(this.storeKey,e)})}removeLastEventId(){return et(this,void 0,void 0,function*(){return this.storage.removeItem(this.storeKey)})}getLastEventId(){return et(this,void 0,void 0,function*(){const e=yield this.storage.getItem(this.storeKey);return e||null})}}function Woe(t){return t.slice(-1)==="/"?t.slice(0,-1):t}function ZB(t,e){return Woe(t)+"/"+e}function Ff(t){if(!t)return!1;const e=new URL(t);return e.protocol==="tg:"||e.hostname==="t.me"}function JB(t){return t.replaceAll(".","%2E").replaceAll("-","%2D").replaceAll("_","%5F").replaceAll("&","-").replaceAll("=","__").replaceAll("%","--")}function QB(t,e){return et(this,void 0,void 0,function*(){return new Promise((r,n)=>{var i,s;if(!((i=void 0)===null||i===void 0)&&i.aborted){n(new ht("Delay aborted"));return}const o=setTimeout(()=>r(),t);(s=void 0)===null||s===void 0||s.addEventListener("abort",()=>{clearTimeout(o),n(new ht("Delay aborted"))})})})}function ba(t){const e=new AbortController;return t!=null&&t.aborted?e.abort():t==null||t.addEventListener("abort",()=>e.abort(),{once:!0}),e}function bm(t,e){var r,n;return et(this,void 0,void 0,function*(){const i=(r=e==null?void 0:e.attempts)!==null&&r!==void 0?r:10,s=(n=e==null?void 0:e.delayMs)!==null&&n!==void 0?n:200,o=ba(e==null?void 0:e.signal);if(typeof t!="function")throw new ht(`Expected a function, got ${typeof t}`);let a=0,c;for(;a<i;){if(o.signal.aborted)throw new ht(`Aborted after attempts ${a}`);try{return yield t({signal:o.signal})}catch(l){c=l,a++,a<i&&(yield QB(s))}}throw c})}function Ai(...t){try{console.debug("[TON_CONNECT_SDK]",...t)}catch{}}function su(...t){try{console.error("[TON_CONNECT_SDK]",...t)}catch{}}function Hoe(...t){try{console.warn("[TON_CONNECT_SDK]",...t)}catch{}}function qoe(t,e){let r=null,n=null,i=null,s=null,o=null;const a=(f,...d)=>et(this,void 0,void 0,function*(){if(s=f??null,o==null||o.abort(),o=ba(f),o.signal.aborted)throw new ht("Resource creation was aborted");n=d??null;const p=t(o.signal,...d);i=p;const h=yield p;if(i!==p&&h!==r)throw yield e(h),new ht("Resource creation was aborted by a new resource creation");return r=h,r});return{create:a,current:()=>r??null,dispose:()=>et(this,void 0,void 0,function*(){try{const f=r;r=null;const d=i;i=null;try{o==null||o.abort()}catch{}yield Promise.allSettled([f?e(f):Promise.resolve(),d?e(yield d):Promise.resolve()])}catch{}}),recreate:f=>et(this,void 0,void 0,function*(){const d=r,p=i,h=n,g=s;if(yield QB(f),d===r&&p===i&&h===n&&g===s)return yield a(s,...h??[]);throw new ht("Resource recreation was aborted by a new resource creation")})}}function Voe(t,e){const r=e==null?void 0:e.timeout,n=e==null?void 0:e.signal,i=ba(n);return new Promise((s,o)=>et(this,void 0,void 0,function*(){if(i.signal.aborted){o(new ht("Operation aborted"));return}let a;typeof r<"u"&&(a=setTimeout(()=>{i.abort(),o(new ht(`Timeout after ${r}ms`))},r)),i.signal.addEventListener("abort",()=>{clearTimeout(a),o(new ht("Operation aborted"))},{once:!0});const c={timeout:r,abort:i.signal};yield t((...l)=>{clearTimeout(a),s(...l)},()=>{clearTimeout(a),o()},c)}))}class Q5{constructor(e,r,n,i,s){this.bridgeUrl=r,this.sessionId=n,this.listener=i,this.errorsListener=s,this.ssePath="events",this.postPath="message",this.heartbeatMessage="heartbeat",this.defaultTtl=300,this.defaultReconnectDelay=2e3,this.defaultResendDelay=5e3,this.eventSource=qoe((o,a)=>et(this,void 0,void 0,function*(){const c={bridgeUrl:this.bridgeUrl,ssePath:this.ssePath,sessionId:this.sessionId,bridgeGatewayStorage:this.bridgeGatewayStorage,errorHandler:this.errorsHandler.bind(this),messageHandler:this.messagesHandler.bind(this),signal:o,openingDeadlineMS:a};return yield Koe(c)}),o=>et(this,void 0,void 0,function*(){o.close()})),this.bridgeGatewayStorage=new zoe(e,r)}get isReady(){const e=this.eventSource.current();return(e==null?void 0:e.readyState)===EventSource.OPEN}get isClosed(){const e=this.eventSource.current();return(e==null?void 0:e.readyState)!==EventSource.OPEN}get isConnecting(){const e=this.eventSource.current();return(e==null?void 0:e.readyState)===EventSource.CONNECTING}registerSession(e){return et(this,void 0,void 0,function*(){yield this.eventSource.create(e==null?void 0:e.signal,e==null?void 0:e.openingDeadlineMS)})}send(e,r,n,i){var s;return et(this,void 0,void 0,function*(){const o={};typeof i=="number"?o.ttl=i:(o.ttl=i==null?void 0:i.ttl,o.signal=i==null?void 0:i.signal,o.attempts=i==null?void 0:i.attempts);const a=new URL(ZB(this.bridgeUrl,this.postPath));a.searchParams.append("client_id",this.sessionId),a.searchParams.append("to",r),a.searchParams.append("ttl",((o==null?void 0:o.ttl)||this.defaultTtl).toString()),a.searchParams.append("topic",n);const c=M9.encode(e);yield bm(l=>et(this,void 0,void 0,function*(){const u=yield this.post(a,c,l.signal);if(!u.ok)throw new ht(`Bridge send failed, status ${u.status}`)}),{attempts:(s=o==null?void 0:o.attempts)!==null&&s!==void 0?s:Number.MAX_SAFE_INTEGER,delayMs:this.defaultResendDelay,signal:o==null?void 0:o.signal})})}pause(){this.eventSource.dispose().catch(e=>su(`Bridge pause failed, ${e}`))}unPause(){return et(this,void 0,void 0,function*(){yield this.eventSource.recreate(0)})}close(){return et(this,void 0,void 0,function*(){yield this.eventSource.dispose().catch(e=>su(`Bridge close failed, ${e}`))})}setListener(e){this.listener=e}setErrorsListener(e){this.errorsListener=e}post(e,r,n){return et(this,void 0,void 0,function*(){const i=yield fetch(e,{method:"post",body:r,signal:n});if(!i.ok)throw new ht(`Bridge send failed, status ${i.status}`);return i})}errorsHandler(e,r){return et(this,void 0,void 0,function*(){if(this.isConnecting)throw e.close(),new ht("Bridge error, failed to connect");
851if(this.isReady){try{this.errorsListener(r)}catch{}return}if(this.isClosed)return e.close(),Ai(`Bridge reconnecting, ${this.defaultReconnectDelay}ms delay`),yield this.eventSource.recreate(this.defaultReconnectDelay);throw new ht("Bridge error, unknown state")})}messagesHandler(e){return et(this,void 0,void 0,function*(){if(e.data===this.heartbeatMessage||(yield this.bridgeGatewayStorage.storeLastEventId(e.lastEventId),this.isClosed))return;let r;try{r=JSON.parse(e.data)}catch{throw new ht(`Bridge message parse failed, message ${e.data}`)}this.listener(r)})}}function Koe(t){return et(this,void 0,void 0,function*(){return yield Voe((e,r,n)=>et(this,void 0,void 0,function*(){var i;const o=ba(n.signal).signal;if(o.aborted){r(new ht("Bridge connection aborted"));return}const a=new URL(ZB(t.bridgeUrl,t.ssePath));a.searchParams.append("client_id",t.sessionId);const c=yield t.bridgeGatewayStorage.getLastEventId();if(c&&a.searchParams.append("last_event_id",c),o.aborted){r(new ht("Bridge connection aborted"));return}const l=new EventSource(a.toString());l.onerror=u=>et(this,void 0,void 0,function*(){if(o.aborted){l.close(),r(new ht("Bridge connection aborted"));return}try{const f=yield t.errorHandler(l,u);f!==l&&l.close(),f&&f!==l&&e(f)}catch(f){l.close(),r(f)}}),l.onopen=()=>{if(o.aborted){l.close(),r(new ht("Bridge connection aborted"));return}e(l)},l.onmessage=u=>{if(o.aborted){l.close(),r(new ht("Bridge connection aborted"));return}t.messageHandler(u)},(i=t.signal)===null||i===void 0||i.addEventListener("abort",()=>{l.close(),r(new ht("Bridge connection aborted"))})}),{timeout:t.openingDeadlineMS,signal:t.signal})})}const Goe=5*60*1e3;function wm(t){return!("connectEvent"in t)}function Yoe(t){return!("connectEvent"in t)}function Zoe(t){var e;return Date.now()-((e=t.createdAt)!==null&&e!==void 0?e:0)>Goe}class x2{constructor(e){this.storage=e,this.storeKey="ton-connect-storage_bridge-connection"}storeConnection(e){return et(this,void 0,void 0,function*(){if(e.type==="injected")return this.storage.setItem(this.storeKey,JSON.stringify(e));if(!wm(e)){const n={sessionKeyPair:e.session.sessionCrypto.stringifyKeypair(),walletPublicKey:e.session.walletPublicKey,bridgeUrl:e.session.bridgeUrl},i={type:"http",connectEvent:e.connectEvent,session:n,lastWalletEventId:e.lastWalletEventId,nextRpcRequestId:e.nextRpcRequestId};return this.storage.setItem(this.storeKey,JSON.stringify(i))}const r={type:"http",connectionSource:e.connectionSource,sessionCrypto:e.sessionCrypto.stringifyKeypair(),createdAt:Date.now()};return this.storage.setItem(this.storeKey,JSON.stringify(r))})}removeConnection(){return et(this,void 0,void 0,function*(){return this.storage.removeItem(this.storeKey)})}getConnection(){return et(this,void 0,void 0,function*(){const e=yield this.storage.getItem(this.storeKey);if(!e)return null;const r=JSON.parse(e);if(r.type==="injected")return r;if(!Yoe(r)){const n=new _C(r.session.sessionKeyPair);return{type:"http",connectEvent:r.connectEvent,lastWalletEventId:r.lastWalletEventId,nextRpcRequestId:r.nextRpcRequestId,session:{sessionCrypto:n,bridgeUrl:r.session.bridgeUrl,walletPublicKey:r.session.walletPublicKey}}}return Zoe(r)?(yield this.removeConnection(),null):{type:"http",sessionCrypto:new _C(r.sessionCrypto),connectionSource:r.connectionSource}})}getHttpConnection(){return et(this,void 0,void 0,function*(){const e=yield this.getConnection();if(!e)throw new ht("Trying to read HTTP connection source while nothing is stored");if(e.type==="injected")throw new ht("Trying to read HTTP connection source while injected connection is stored");return e})}getHttpPendingConnection(){return et(this,void 0,void 0,function*(){const e=yield this.getConnection();if(!e)throw new ht("Trying to read HTTP connection source while nothing is stored");if(e.type==="injected")throw new ht("Trying to read HTTP connection source while injected connection is stored");if(!wm(e))throw new ht("Trying to read HTTP-pending connection while http connection is stored");return e})}getInjectedConnection(){return et(this,void 0,void 0,function*(){const e=yield this.getConnection();if(!e)throw new ht("Trying to read Injected bridge connection source while nothing is stored");if((e==null?void 0:e.type)==="http")throw new ht("Trying to read Injected bridge connection source while HTTP connection is stored");return e})}storedConnectionType(){return et(this,void 0,void 0,function*(){const e=yield this.storage.getItem(this.storeKey);return e?JSON.parse(e).type:null})}storeLastWalletEventId(e){return et(this,void 0,void 0,function*(){const r=yield this.getConnection();if(r&&r.type==="http"&&!wm(r))return r.lastWalletEventId=e,this.storeConnection(r)})}getLastWalletEventId(){return et(this,void 0,void 0,function*(){const e=yield this.getConnection();if(e&&"lastWalletEventId"in e)return e.lastWalletEventId})}increaseNextRpcRequestId(){return et(this,void 0,void 0,function*(){const e=yield this.getConnection();if(e&&"nextRpcRequestId"in e){const r=e.nextRpcRequestId||0;return e.nextRpcRequestId=r+1,this.storeConnection(e)}})}getNextRpcRequestId(){return et(this,void 0,void 0,function*(){const e=yield this.getConnection();return e&&"nextRpcRequestId"in e&&e.nextRpcRequestId||0})}}const XB=2;class E2{constructor(e,r){this.storage=e,this.walletConnectionSource=r,this.type="http",this.standardUniversalLink="tc://",this.pendingRequests=new Map,this.session=null,this.gateway=null,this.pendingGateways=[],this.listeners=[],this.defaultOpeningDeadlineMS=12e3,this.defaultRetryTimeoutMS=2e3,this.connectionStorage=new x2(e)}static fromStorage(e){return et(this,void 0,void 0,function*(){const n=yield new x2(e).getHttpConnection();return wm(n)?new E2(e,n.connectionSource):new E2(e,{bridgeUrl:n.session.bridgeUrl})})}connect(e,r){var n;const i=ba(r==null?void 0:r.signal);(n=this.abortController)===null||n===void 0||n.abort(),this.abortController=i,this.closeGateways();const s=new _C;this.session={sessionCrypto:s,bridgeUrl:"bridgeUrl"in this.walletConnectionSource?this.walletConnectionSource.bridgeUrl:""},this.connectionStorage.storeConnection({type:"http",connectionSource:this.walletConnectionSource,sessionCrypto:s}).then(()=>et(this,void 0,void 0,function*(){i.signal.aborted||(yield bm(a=>{var c;return this.openGateways(s,{openingDeadlineMS:(c=r==null?void 0:r.openingDeadlineMS)!==null&&c!==void 0?c:this.defaultOpeningDeadlineMS,signal:a==null?void 0:a.signal})},{attempts:Number.MAX_SAFE_INTEGER,delayMs:this.defaultRetryTimeoutMS,signal:i.signal}))}));const o="universalLink"in this.walletConnectionSource&&this.walletConnectionSource.universalLink?this.walletConnectionSource.universalLink:this.standardUniversalLink;return this.generateUniversalLink(o,e)}restoreConnection(e){var r,n;return et(this,void 0,void 0,function*(){const i=ba(e==null?void 0:e.signal);if((r=this.abortController)===null||r===void 0||r.abort(),this.abortController=i,i.signal.aborted)return;this.closeGateways();const s=yield this.connectionStorage.getHttpConnection();if(!s||i.signal.aborted)return;const o=(n=e==null?void 0:e.openingDeadlineMS)!==null&&n!==void 0?n:this.defaultOpeningDeadlineMS;
851if(wm(s))return this.session={sessionCrypto:s.sessionCrypto,bridgeUrl:"bridgeUrl"in this.walletConnectionSource?this.walletConnectionSource.bridgeUrl:""},yield this.openGateways(s.sessionCrypto,{openingDeadlineMS:o,signal:i==null?void 0:i.signal});if(Array.isArray(this.walletConnectionSource))throw new ht("Internal error. Connection source is array while WalletConnectionSourceHTTP was expected.");if(this.session=s.session,this.gateway&&(Ai("Gateway is already opened, closing previous gateway"),yield this.gateway.close()),this.gateway=new Q5(this.storage,this.walletConnectionSource.bridgeUrl,s.session.sessionCrypto.sessionId,this.gatewayListener.bind(this),this.gatewayErrorsListener.bind(this)),!i.signal.aborted){this.listeners.forEach(a=>a(s.connectEvent));try{yield bm(a=>this.gateway.registerSession({openingDeadlineMS:o,signal:a.signal}),{attempts:Number.MAX_SAFE_INTEGER,delayMs:this.defaultRetryTimeoutMS,signal:i.signal})}catch{yield this.disconnect({signal:i.signal});return}}})}sendRequest(e,r){const n={};return typeof r=="function"?n.onRequestSent=r:(n.onRequestSent=r==null?void 0:r.onRequestSent,n.signal=r==null?void 0:r.signal,n.attempts=r==null?void 0:r.attempts),new Promise((i,s)=>et(this,void 0,void 0,function*(){var o;if(!this.gateway||!this.session||!("walletPublicKey"in this.session))throw new ht("Trying to send bridge request without session");const a=(yield this.connectionStorage.getNextRpcRequestId()).toString();yield this.connectionStorage.increaseNextRpcRequestId(),Ai("Send http-bridge request:",Object.assign(Object.assign({},e),{id:a}));const c=this.session.sessionCrypto.encrypt(JSON.stringify(Object.assign(Object.assign({},e),{id:a})),y3(this.session.walletPublicKey));try{yield this.gateway.send(c,this.session.walletPublicKey,e.method,{attempts:n==null?void 0:n.attempts,signal:n==null?void 0:n.signal}),(o=n==null?void 0:n.onRequestSent)===null||o===void 0||o.call(n),this.pendingRequests.set(a.toString(),i)}catch(l){s(l)}}))}closeConnection(){this.closeGateways(),this.listeners=[],this.session=null,this.gateway=null}disconnect(e){return et(this,void 0,void 0,function*(){return new Promise(r=>et(this,void 0,void 0,function*(){let n=!1,i=null;const s=()=>{n||(n=!0,this.removeBridgeAndSession().then(r))};try{this.closeGateways();const o=ba(e==null?void 0:e.signal);i=setTimeout(()=>{o.abort()},this.defaultOpeningDeadlineMS),yield this.sendRequest({method:"disconnect",params:[]},{onRequestSent:s,signal:o.signal,attempts:1})}catch(o){Ai("Disconnect error:",o),n||this.removeBridgeAndSession().then(r)}finally{i&&clearTimeout(i),s()}}))})}listen(e){return this.listeners.push(e),()=>this.listeners=this.listeners.filter(r=>r!==e)}pause(){var e;(e=this.gateway)===null||e===void 0||e.pause(),this.pendingGateways.forEach(r=>r.pause())}unPause(){return et(this,void 0,void 0,function*(){const e=this.pendingGateways.map(r=>r.unPause());this.gateway&&e.push(this.gateway.unPause()),yield Promise.all(e)})}pendingGatewaysListener(e,r,n){return et(this,void 0,void 0,function*(){if(!this.pendingGateways.includes(e)){yield e.close();return}return this.closeGateways({except:e}),this.gateway&&(Ai("Gateway is already opened, closing previous gateway"),yield this.gateway.close()),this.session.bridgeUrl=r,this.gateway=e,this.gateway.setErrorsListener(this.gatewayErrorsListener.bind(this)),this.gateway.setListener(this.gatewayListener.bind(this)),this.gatewayListener(n)})}gatewayListener(e){return et(this,void 0,void 0,function*(){const r=JSON.parse(this.session.sessionCrypto.decrypt(M9.decode(e.message).toUint8Array(),y3(e.from)));if(Ai("Wallet message received:",r),!("event"in r)){const i=r.id.toString(),s=this.pendingRequests.get(i);if(!s){Ai(`Response id ${i} doesn't match any request's id`);return}s(r),this.pendingRequests.delete(i);return}if(r.id!==void 0){const i=yield this.connectionStorage.getLastWalletEventId();if(i!==void 0&&r.id<=i){su(`Received event id (=${r.id}) must be greater than stored last wallet event id (=${i}) `);return}r.event!=="connect"&&(yield this.connectionStorage.storeLastWalletEventId(r.id))}const n=this.listeners;r.event==="connect"&&(yield this.updateSession(r,e.from)),r.event==="disconnect"&&(Ai("Removing bridge and session: received disconnect event"),yield this.removeBridgeAndSession()),n.forEac
851h(i=>i(r))})}gatewayErrorsListener(e){return et(this,void 0,void 0,function*(){throw new ht(`Bridge error ${JSON.stringify(e)}`)})}updateSession(e,r){return et(this,void 0,void 0,function*(){this.session=Object.assign(Object.assign({},this.session),{walletPublicKey:r});const n=e.payload.items.find(s=>s.name==="ton_addr"),i=Object.assign(Object.assign({},e),{payload:Object.assign(Object.assign({},e.payload),{items:[n]})});yield this.connectionStorage.storeConnection({type:"http",session:this.session,lastWalletEventId:e.id,connectEvent:i,nextRpcRequestId:0})})}removeBridgeAndSession(){return et(this,void 0,void 0,function*(){this.closeConnection(),yield this.connectionStorage.removeConnection()})}generateUniversalLink(e,r){return Ff(e)?this.generateTGUniversalLink(e,r):this.generateRegularUniversalLink(e,r)}generateRegularUniversalLink(e,r){const n=new URL(e);return n.searchParams.append("v",XB.toString()),n.searchParams.append("id",this.session.sessionCrypto.sessionId),n.searchParams.append("r",JSON.stringify(r)),n.toString()}generateTGUniversalLink(e,r){const i=this.generateRegularUniversalLink("about:blank",r).split("?")[1],s="tonconnect-"+JB(i),o=this.convertToDirectLink(e),a=new URL(o);return a.searchParams.append("startapp",s),a.toString()}convertToDirectLink(e){const r=new URL(e);return r.searchParams.has("attach")&&(r.searchParams.delete("attach"),r.pathname+="/start"),r.toString()}openGateways(e,r){return et(this,void 0,void 0,function*(){if(Array.isArray(this.walletConnectionSource)){this.pendingGateways.map(n=>n.close().catch()),this.pendingGateways=this.walletConnectionSource.map(n=>{const i=new Q5(this.storage,n.bridgeUrl,e.sessionId,()=>{},()=>{});return i.setListener(s=>this.pendingGatewaysListener(i,n.bridgeUrl,s)),i}),yield Promise.allSettled(this.pendingGateways.map(n=>bm(i=>{var s;return this.pendingGateways.some(o=>o===n)?n.registerSession({openingDeadlineMS:(s=r==null?void 0:r.openingDeadlineMS)!==null&&s!==void 0?s:this.defaultOpeningDeadlineMS,signal:i.signal}):n.close()},{attempts:Number.MAX_SAFE_INTEGER,delayMs:this.defaultRetryTimeoutMS,signal:r==null?void 0:r.signal})));return}else return this.gateway&&(Ai("Gateway is already opened, closing previous gateway"),yield this.gateway.close()),this.gateway=new Q5(this.storage,this.walletConnectionSource.bridgeUrl,e.sessionId,this.gatewayListener.bind(this),this.gatewayErrorsListener.bind(this)),yield this.gateway.registerSession({openingDeadlineMS:r==null?void 0:r.openingDeadlineMS,signal:r==null?void 0:r.signal})})}closeGateways(e){var r;(r=this.gateway)===null||r===void 0||r.close(),this.pendingGateways.filter(n=>n!==(e==null?void 0:e.except)).forEach(n=>n.close()),this.pendingGateways=[]}}function RT(t,e){return eF(t,[e])}function eF(t,e){return!t||typeof t!="object"?!1:e.every(r=>r in t)}function Joe(t){try{return!RT(t,"tonconnect")||!RT(t.tonconnect,"walletInfo")?!1:eF(t.tonconnect.walletInfo,["name","app_name","image","about_url","platforms"])}catch{return!1}}let Qoe=class z1{constructor(){this.storage={}}static getInstance(){return z1.instance||(z1.instance=new z1),z1.instance}get length(){return Object.keys(this.storage).length}clear(){this.storage={}}getItem(e){var r;return(r=this.storage[e])!==null&&r!==void 0?r:null}key(e){var r;const n=Object.keys(this.storage);return e<0||e>=n.length?null:(r=n[e])!==null&&r!==void 0?r:null}removeItem(e){delete this.storage[e]}setItem(e,r){this.storage[e]=r}};function ox(){if(!(typeof window>"u"))return window}function Xoe(){const t=ox();if(!t)return[];try{return Object.keys(t)}catch{return[]}}function eae(){if(!(typeof document>"u"))return document}function tae(){var t;const e=(t=ox())===null||t===void 0?void 0:t.location.origin;return e?e+"/tonconnect-manifest.json":""}function rae(){if(nae())return localStorage;if(iae())throw new ht("`localStorage` is unavailable, but it is required for TonConnect. For more details, see https://github.com/ton-connect/sdk/tree/main/packages/sdk#init-connector");return Qoe.getInstance()}function nae(){try{return typeof localStorage<"u"}catch{return!1}}function iae(){return typeof process<"u"&&process.versions!=null&&process.versions.node!=null}class yo{constructor(e,r){this.injectedWalletKey=r,this.type="injected",this.unsubscribeCallback=null,this.listenSubscriptions=!1,this.listeners=[];const n=yo.window;if(!yo.isWindowContainsWallet(n,r))throw new B9;this.connectionStorage=new x2(e),this.injectedWallet=n[r].tonconnect}static fromStorage(e){return et(this,void 0,void 0,function*(){const n=yield new x2(e).getInjectedConnection();return new yo(e,n.jsBridgeKey)})}static isWalletInjected(e){return yo.isWindowContainsWallet(this.window,e)}static isInsideWalletBrowser(e){return yo.isWindowContainsWallet(this.window,e)?this.window[e].tonconnect.isWalletBrowser:!1}static getCurrentlyInjectedWallets(){return this.window?Xoe().filter(([n,i])=>Joe(i)).map(([n,i])=>({name:i.tonconnect.walletInfo.name,appName:i.tonconnect.walletInfo.app_name,aboutUrl:i.tonconnect.walletInfo.about_url,imageUrl:i.tonconnect.walletInfo.image,tondns:i.tonconnect.walletInfo.tondns,jsBridgeKey:n,injected:!0,embedded:i.tonconnect.isWalletBrowser,platforms:i.tonconnect.walletInfo.platforms,features:i.tonconnect.walletInfo.features})):[]}static isWindowContainsWallet(e,r){return!!e&&r in e&&typeof e[r]=="object"&&"tonconnect"in e[r]}connect(e){this._connect(XB,e)}restoreConnection(){return et(this,void 0,void 0,function*(){try{Ai("Injected Provider restoring connection...");const e=yield this.injectedWallet.restoreConnection();Ai("Injected Provider restoring connection response",e),e.event==="connect"?(this.makeSubscriptions(),this.listeners.forEac
851h(r=>r(e))):yield this.connectionStorage.removeConnection()}catch(e){yield this.connectionStorage.removeConnection(),console.error(e)}})}closeConnection(){this.listenSubscriptions&&this.injectedWallet.disconnect(),this.closeAllListeners()}disconnect(){return et(this,void 0,void 0,function*(){return new Promise(e=>{const r=()=>{this.closeAllListeners(),this.connectionStorage.removeConnection().then(e)};try{this.injectedWallet.disconnect(),r()}catch(n){Ai(n),this.sendRequest({method:"disconnect",params:[]},r)}})})}closeAllListeners(){var e;this.listenSubscriptions=!1,this.listeners=[],(e=this.unsubscribeCallback)===null||e===void 0||e.call(this)}listen(e){return this.listeners.push(e),()=>this.listeners=this.listeners.filter(r=>r!==e)}sendRequest(e,r){var n;return et(this,void 0,void 0,function*(){const i={};typeof r=="function"?i.onRequestSent=r:(i.onRequestSent=r==null?void 0:r.onRequestSent,i.signal=r==null?void 0:r.signal);const s=(yield this.connectionStorage.getNextRpcRequestId()).toString();yield this.connectionStorage.increaseNextRpcRequestId(),Ai("Send injected-bridge request:",Object.assign(Object.assign({},e),{id:s}));const o=this.injectedWallet.send(Object.assign(Object.assign({},e),{id:s}));return o.then(a=>Ai("Wallet message received:",a)),(n=i==null?void 0:i.onRequestSent)===null||n===void 0||n.call(i),o})}_connect(e,r){return et(this,void 0,void 0,function*(){try{Ai(`Injected Provider connect request: protocolVersion: ${e}, message:`,r);const n=yield this.injectedWallet.connect(e,r);Ai("Injected Provider connect response:",n),n.event==="connect"&&(yield this.updateSession(),this.makeSubscriptions()),this.listeners.forEach(i=>i(n))}catch(n){Ai("Injected Provider connect error:",n);const i={event:"connect_error",payload:{code:0,message:n==null?void 0:n.toString()}};this.listeners.forEach(s=>s(i))}})}makeSubscriptions(){this.listenSubscriptions=!0,this.unsubscribeCallback=this.injectedWallet.listen(e=>{Ai("Wallet message received:",e),this.listenSubscriptions&&this.listeners.forEach(r=>r(e)),e.event==="disconnect"&&this.disconnect()})}updateSession(){return this.connectionStorage.storeConnection({type:"injected",jsBridgeKey:this.injectedWalletKey,nextRpcRequestId:0})}}yo.window=ox();class sae{constructor(){this.localStorage=rae()}getItem(e){return et(this,void 0,void 0,function*(){return this.localStorage.getItem(e)})}removeItem(e){return et(this,void 0,void 0,function*(){this.localStorage.removeItem(e)})}setItem(e,r){return et(this,void 0,void 0,function*(){this.localStorage.setItem(e,r)})}}function lh(t){return oae(t)&&t.injected}function ax(t){return lh(t)&&t.embedded}function oae(t){return"jsBridgeKey"in t}function j9(t){return"bridgeUrl"in t}const aae=[{app_name:"telegram-wallet",name:"Wallet",image:"https://wallet.tg/images/logo-288.png",about_url:"https://wallet.tg/",universal_url:"https://t.me/wallet?attach=wallet",bridge:[{type:"sse",url:"https://walletbot.me/tonconnect-bridge/bridge"}],platforms:["ios","android","macos","windows","linux"]},{app_name:"tonkeeper",name:"Tonkeeper",image:"https://tonkeeper.com/assets/tonconnect-icon.png",tondns:"tonkeeper.ton",about_url:"https://tonkeeper.com",universal_url:"https://app.tonkeeper.com/ton-connect",deepLink:"tonkeeper-tc://",bridge:[{type:"sse",url:"https://bridge.tonapi.io/bridge"},{type:"js",key:"tonkeeper"}],platforms:["ios","android","chrome","firefox","macos"]},{app_name:"mytonwallet",name:"MyTonWallet",image:"https://static.mytonwallet.io/icon-256.png",about_url:"https://mytonwallet.io",universal_url:"https://connect.mytonwallet.org",bridge:[{type:"js",key:"mytonwallet"},{type:"sse",url:"https://tonconnectbridge.mytonwallet.org/bridge/"}],platforms:["chrome","windows","macos","linux","ios","android","firefox"]},{app_name:"tonhub",name:"Tonhub",image:"https://tonhub.com/tonconnect_logo.png",about_url:"https://tonhub.com",universal_url:"https://tonhub.com/ton-connect",bridge:[{type:"js",key:"tonhub"},{type:"sse",url:"https://connect.tonhubapi.com/tonconnect"}],platforms:["ios","android"]},{app_name:"bitgetTonWallet",name:"Bitget Wallet",image:"https://raw.githubusercontent.com/bitgetwallet/download/refs/heads/main/logo/png/bitget_wallet_logo_288_mini.png",about_url:"https://web3.bitget.com",deepLink:"bitkeep://",bridge:[{type:"js",key:"bitgetTonWallet"},{type:"sse",url:"https://ton-connect-bridge.bgwapi.io/bridge"}],platforms:["ios","android","chrome"],universal_url:"https://bkcode.vip/ton-connect"},{app_name:"okxMiniWallet",name:"OKX Mini Wallet",image:"https://static.okx.com/cdn/assets/imgs/2411/8BE1A4A434D8F58A.png",about_url:"https://www.okx.com/web3",universal_url:"https://t.me/OKX_WALLET_BOT?attach=wallet",bridge:[{type:"sse",url:"https://www.okx.com/tonbridge/discover/rpc/bridge"}],platforms:["ios","android","macos","windows","linux"]},{app_name:"binanceWeb3TonWallet",name:"Binance Web3 Wallet",image:"https://public.bnbstatic.com/static/binance-w3w/ton-provider/binancew3w.png",about_url:"https://www.binance.com/en/web3wallet",deepLink:"bnc://app.binance.com/cedefi/ton-connect",bridge:[{type:"js",key:"binancew3w"}
851,{type:"sse",url:"https://wallet.binance.com/tonbridge/bridge"}],platforms:["ios","android","macos","windows","linux"],universal_url:"https://app.binance.com/cedefi/ton-connect"},{app_name:"fintopio-tg",name:"Fintopio",image:"https://fintopio.com/tonconnect-icon.png",about_url:"https://fintopio.com",universal_url:"https://t.me/fintopio?attach=wallet",bridge:[{type:"sse",url:"https://wallet-bridge.fintopio.com/bridge"}],platforms:["ios","android","macos","windows","linux"]},{app_name:"okxTonWallet",name:"OKX Wallet",image:"https://static.okx.com/cdn/assets/imgs/247/58E63FEA47A2B7D7.png",about_url:"https://www.okx.com/web3",universal_url:"https://www.okx.com/download?appendQuery=true&deeplink=okx://web3/wallet/tonconnect",bridge:[{type:"js",key:"okxTonWallet"},{type:"sse",url:"https://www.okx.com/tonbridge/discover/rpc/bridge"}],platforms:["chrome","safari","firefox","ios","android"]},{app_name:"hot",name:"HOT",image:"https://raw.githubusercontent.com/hot-dao/media/main/logo.png",about_url:"https://hot-labs.org/",universal_url:"https://t.me/herewalletbot?attach=wallet",bridge:[{type:"sse",url:"https://sse-bridge.hot-labs.org"},{type:"js",key:"hotWallet"}],platforms:["ios","android","macos","windows","linux"]},{app_name:"bybitTonWallet",name:"Bybit Wallet",image:"https://raw.githubusercontent.com/bybit-web3/bybit-web3.github.io/main/docs/images/bybit-logo.png",about_url:"https://www.bybit.com/web3",universal_url:"https://app.bybit.com/ton-connect",deepLink:"bybitapp://",bridge:[{type:"js",key:"bybitTonWallet"},{type:"sse",url:"https://api-node.bybit.com/spot/api/web3/bridge/ton/bridge"}],platforms:["ios","android","chrome"]},{app_name:"dewallet",name:"DeWallet",image:"https://raw.githubusercontent.com/delab-team/manifests-images/main/WalletAvatar.png",about_url:"https://delabwallet.com",universal_url:"https://t.me/dewallet?attach=wallet",bridge:[{type:"sse",url:"https://bridge.dewallet.pro/bridge"}],platforms:["ios","android","macos","windows","linux"]},{app_name:"safepalwallet",name:"SafePal",image:"https://s.pvcliping.com/web/public_image/SafePal_x288.png",tondns:"",about_url:"https://www.safepal.com",universal_url:"https://link.safepal.io/ton-connect",deepLink:"safepal-tc://",bridge:[{type:"sse",url:"https://ton-bridge.safepal.com/tonbridge/v1/bridge"},{type:"js",key:"safepalwallet"}],platforms:["ios","android","chrome","firefox"]},{app_name:"GateWallet",name:"GateWallet",image:"https://img.gatedataimg.com/prd-ordinal-imgs/036f07bb8730716e/gateio-0925.png",about_url:"https://www.gate.io/",bridge:[{type:"js",key:"gatetonwallet"},{type:"sse",url:"https://dapp.gateio.services/tonbridge_api/bridge/v1"}],platforms:["ios","android"],universal_url:"https://gateio.go.link/gateio/web3?adj_t=1ff8khdw_1fu4ccc7"},{app_name:"openmask",name:"OpenMask",image:"https://raw.githubusercontent.com/OpenProduct/openmask-extension/main/public/openmask-logo-288.png",about_url:"https://www.openmask.app/",bridge:[{type:"js",key:"openmask"}],platforms:["chrome"]},{app_name:"BitgetWeb3",name:"BitgetWeb3",image:"https://img.bitgetimg.com/image/third/1731638059795.png",about_url:"âhttps://www.bitget.com",universal_url:"https://t.me/BitgetOfficialBot?attach=wallet",bridge:[{type:"sse",url:"https://ton-connect-bridge.bgwapi.io/bridge"}],platforms:["ios","android","windows","macos","linux"]},{app_name:"tobi",name:"Tobi",image:"https://app.tobiwallet.app/icons/logo-288.png",about_url:"https://tobi.fun",universal_url:"https://t.me/TobiCopilotBot?attach=wallet",bridge:[{type:"sse",url:"https://ton-bridge.tobiwallet.app/bridge"}],platforms:["ios","android","macos","windows","linux"]},{app_name:"xtonwallet",name:"XTONWallet",image:"https://xtonwallet.com/assets/img/icon-256-back.png",about_url:"https://xtonwallet.com",bridge:[{type:"js",key:"xtonwallet"}],platforms:["chrome","firefox"]},{app_name:"tonwallet",name:"TON Wallet",image:"https://wallet.ton.org/assets/ui/qr-logo.png",about_url:"https://chrome.google.com/webstore/detail/ton-wallet/nphplpgoakhhjchkkhmiggakijnkhfnd",bridge:[{type:"js",key:"tonwallet"}],platforms:["chrome"]}];class AC{constructor(e){var r;this.walletsListCache=null,this.walletsListCacheCreationTimestamp=null,this.walletsListSource=(r=e==null?void 0:e.walletsListSource)!==null&&r!==void 0?r:"https://raw.githubusercontent.com/ton-blockchain/wallets-list/main/wallets-v2.json",this.cacheTTLMs=e==null?void 0:e.cacheTTLMs}getWallets(){return et(this,void 0,void 0,function*(){return this.cacheTTLMs&&this.walletsListCacheCreationTimestamp&&Date.now()>this.walletsListCacheCreationTimestamp+this.cacheTTLMs&&(this.walletsListCache=null),this.walletsListCache||(this.walletsListCache=this.fetchWalletsList(),this.walletsListCache.then(()=>{this.walletsListCacheCreationTimestamp=Date.now()}).catch(()=>{this.walletsListCache=null,this.walletsListCacheCreationTimestamp=null})),this.walletsListCache})}getEmbeddedWallet(){return et(this,void 0,void 0,function*(){const r=(yield this.getWallets()).filter(ax);return r.length===1?r[0]:null})}fetchWalletsList(){return et(this,void 0,void 0,function*(){let e=[];try{if(e=yield(yield fetch(this.walletsListSource)).json(),!Array.isArray(e))throw new F9("Wrong wallets list format, wallets list must be an array.");const i=e.filter(s=>!this.isCorrectWalletConfigDTO(s));i.length&&(su(`Wallet(s) ${i.map(s=>(s==null?void 0:s.name)||"unknown").join(", ")} config format is wrong. They were removed from the wallets list.`),e=e.filter(s=>this.isCorrectWalletConfigDTO(s)))}catch(n){su(n),e=aae}let r=[];try{r=yo.getCurrentlyInjectedWallets()}catch(n){su(n)}return this.mergeWalletsLists(this.walletConfigDTOListToWalletConfigList(e),r)})}walletConfigDTOListToWalletConfigList(e){return e.map(r=>{const n={name:r.name,appName:r.app_name,imageUrl:r.image,aboutUrl:r.about_url,tondns:r.tondns,platforms:r.platforms,features:r.features};return r.bridge.forEach(i=>
851{if(i.type==="sse"&&(n.bridgeUrl=i.url,n.universalLink=r.universal_url,n.deepLink=r.deepLink),i.type==="js"){const s=i.key;n.jsBridgeKey=s,n.injected=yo.isWalletInjected(s),n.embedded=yo.isInsideWalletBrowser(s)}}),n})}mergeWalletsLists(e,r){return[...new Set(e.concat(r).map(i=>i.name)).values()].map(i=>{const s=e.find(a=>a.name===i),o=r.find(a=>a.name===i);return Object.assign(Object.assign({},s&&Object.assign({},s)),o&&Object.assign({},o))})}isCorrectWalletConfigDTO(e){if(!e||typeof e!="object")return!1;const r="name"in e,n="app_name"in e,i="image"in e,s="about_url"in e,o="platforms"in e;if(!r||!i||!s||!o||!n||!e.platforms||!Array.isArray(e.platforms)||!e.platforms.length||!("bridge"in e)||!Array.isArray(e.bridge)||!e.bridge.length)return!1;const a=e.bridge;if(a.some(u=>!u||typeof u!="object"||!("type"in u)))return!1;const c=a.find(u=>u.type==="sse");if(c&&(!(typeof c=="object"&&"url"in c)||!c.url||!e.universal_url))return!1;const l=a.find(u=>u.type==="js");return!(l&&(typeof l!="object"||!("key"in l)||!l.key))}}function cae(t,e){const r=t.includes("SendTransaction"),n=SC(t,"SendTransaction"),i={minMessages:e.requiredMessagesNumber,extraCurrencyRequired:e.requireExtraCurrencies};if(!r&&!n)throw new iu("Wallet doesn't support SendTransaction feature.",{cause:{requiredFeature:{featureName:"SendTransaction",value:i}}});if(e.requireExtraCurrencies&&(!n||!n.extraCurrencySupported))throw new iu("Wallet is not able to handle such SendTransaction request. Extra currencies support is required.",{cause:{requiredFeature:{featureName:"SendTransaction",value:i}}});if(n&&n.maxMessages!==void 0){if(n.maxMessages<e.requiredMessagesNumber)throw new iu(`Wallet is not able to handle such SendTransaction request. Max support messages number is ${n.maxMessages}, but ${e.requiredMessagesNumber} is required.`,{cause:{requiredFeature:{featureName:"SendTransaction",value:i}}});return}Hoe("Connected wallet didn't provide information about max allowed messages in the SendTransaction request. Request may be rejected by the wallet.")}function lae(t,e){const r=t.find(i=>i&&typeof i=="object"&&i.name==="SignData");if(!r)throw new iu("Wallet doesn't support SignData feature.",{cause:{requiredFeature:{featureName:"SignData",value:{types:e.requiredTypes}}}});const n=e.requiredTypes.filter(i=>!r.types.includes(i));if(n.length)throw new iu(`Wallet doesn't support required SignData types: ${n.join(", ")}.`,{cause:{requiredFeature:{featureName:"SignData",value:{types:n}}}})}function v3(t,e){if(typeof e!="object")return!0;const{sendTransaction:r,signData:n}=e;if(r){const i=SC(t,"SendTransaction");if(!i||!uae(i,r))return!1}if(n){const i=SC(t,"SignData");if(!i||!fae(i,n))return!1}return!0}function SC(t,e){return t.find(r=>r&&typeof r=="object"&&r.name===e)}function uae(t,e){const r=e.minMessages===void 0||e.minMessages<=t.maxMessages,n=!e.extraCurrencyRequired||t.extraCurrencySupported;return!!(r&&n)}function fae(t,e){return e.types.every(r=>t.types.includes(r))}function tF(){return{type:"request-version"}}function rF(t){return{type:"response-version",version:t}}function Zh(t){return{ton_connect_sdk_lib:t.ton_connect_sdk_lib,ton_connect_ui_lib:t.ton_connect_ui_lib}}function Tu(t,e){var r,n,i,s,o,a,c,l;const f=((r=e==null?void 0:e.connectItems)===null||r===void 0?void 0:r.tonProof)&&"proof"in e.connectItems.tonProof?"ton_proof":"ton_addr";return{wallet_address:(i=(n=e==null?void 0:e.account)===null||n===void 0?void 0:n.address)!==null&&i!==void 0?i:null,wallet_type:(s=e==null?void 0:e.device.appName)!==null&&s!==void 0?s:null,wallet_version:(o=e==null?void 0:e.device.appVersion)!==null&&o!==void 0?o:null,auth_type:f,custom_data:Object.assign({chain_id:(c=(a=e==null?void 0:e.account)===null||a===void 0?void 0:a.chain)!==null&&c!==void 0?c:null,provider:(l=e==null?void 0:e.provider)!==null&&l!==void 0?l:null},Zh(t))}}function nF(t){return{type:"connection-started",custom_data:Zh(t)}}function iF(t,e){return Object.assign({type:"connection-completed",is_success:!0},Tu(t,e))}function sF(t,e,r){return{type:"connection-error",is_success:!1,error_message:e,error_code:r??null,custom_data:Zh(t)}}function oF(t){return{type:"connection-restoring-started",custom_data:Zh(t)}}function aF(t,e){return Object.assign({type:"connection-restoring-completed",is_success:!0},Tu(t,e))}function cF(t,e){return{type:"connection-restoring-error",is_success:!1,error_message:e,custom_data:Zh(t)}}function z9(t,e){var r,n,i,s;return{valid_until:(r=String(e.validUntil))!==null&&r!==void 0?r:null,from:(s=(n=e.from)!==null&&n!==void 0?n:(i=t==null?void 0:t.account)===null||i===void 0?void 0:i.address)!==null&&s!==void 0?s:null,messages:e.messages.map(o=>{var a,c;return{address:(a=o.address)!==null&&a!==void 0?a:null,amount:(c=o.amount)!==null&&c!==void 0?c:null}})}}function lF(t,e,r){return Object.assign(Object.assign({type:"transaction-sent-for-signature"},Tu(t,e)),z9(e,r))}function uF(t,e,r,n){return Object.assign(Object.assign({type:"transaction-signed",is_success:!0,signed_transaction:n.boc},Tu(t,e)),z9(e,r))}function fF(t,e,r,n,i){return Object.assign(Object.assign({type:"transaction-signing-failed",is_success:!1,error_message:n,error_code:i??null},Tu(t,e)),z9(e,r))}function dF(t,e,r){return Object.assign({type:"sign-data-request-initiated",data:r},Tu(t,e))}function hF(t,e,r,n){return Object.assign({type:"sign-data-request-completed",is_success:!0,data:r,signed_data:n},Tu(t,e))}function pF(t,e,r,n,i){return Object.assign({type:"sign-data-request-failed",is_success:!1,data:r,error_message:n,error_code:i??null},Tu(t,e))}function gF(t,e,r){return Object.assign({type:"disconnection",scope:r},Tu(t,e))}class mF{constructor(){this.window=ox()}dispatchEvent(e,r){var n;return et(this,void 0,void 0,function*(){const i=new CustomEvent(e,{detail:r});(n=this.window)===null||n===void 0||n.dispatchEvent(i)})}addEventListener(e,r,n){var i;return et(this,void 0,void 0,function*(){return(i=this.window)===null||i===void 0||i.addEventListener(e,r,n),(
851)=>{var s;return(s=this.window)===null||s===void 0?void 0:s.removeEventListener(e,r)}})}}class dae{constructor(e){var r;this.eventPrefix="ton-connect-",this.tonConnectUiVersion=null,this.eventDispatcher=(r=e==null?void 0:e.eventDispatcher)!==null&&r!==void 0?r:new mF,this.tonConnectSdkVersion=e.tonConnectSdkVersion,this.init().catch()}get version(){return Zh({ton_connect_sdk_lib:this.tonConnectSdkVersion,ton_connect_ui_lib:this.tonConnectUiVersion})}init(){return et(this,void 0,void 0,function*(){try{yield this.setRequestVersionHandler(),this.tonConnectUiVersion=yield this.requestTonConnectUiVersion()}catch{}})}setRequestVersionHandler(){return et(this,void 0,void 0,function*(){yield this.eventDispatcher.addEventListener("ton-connect-request-version",()=>et(this,void 0,void 0,function*(){yield this.eventDispatcher.dispatchEvent("ton-connect-response-version",rF(this.tonConnectSdkVersion))}))})}requestTonConnectUiVersion(){return et(this,void 0,void 0,function*(){return new Promise((e,r)=>et(this,void 0,void 0,function*(){try{yield this.eventDispatcher.addEventListener("ton-connect-ui-response-version",n=>{e(n.detail.version)},{once:!0}),yield this.eventDispatcher.dispatchEvent("ton-connect-ui-request-version",tF())}catch(n){r(n)}}))})}dispatchUserActionEvent(e){try{this.eventDispatcher.dispatchEvent(`${this.eventPrefix}${e.type}`,e).catch()}catch{}}trackConnectionStarted(...e){try{const r=nF(this.version,...e);this.dispatchUserActionEvent(r)}catch{}}trackConnectionCompleted(...e){try{const r=iF(this.version,...e);this.dispatchUserActionEvent(r)}catch{}}trackConnectionError(...e){try{const r=sF(this.version,...e);this.dispatchUserActionEvent(r)}catch{}}trackConnectionRestoringStarted(...e){try{const r=oF(this.version,...e);this.dispatchUserActionEvent(r)}catch{}}trackConnectionRestoringCompleted(...e){try{const r=aF(this.version,...e);this.dispatchUserActionEvent(r)}catch{}}trackConnectionRestoringError(...e){try{const r=cF(this.version,...e);this.dispatchUserActionEvent(r)}catch{}}trackDisconnection(...e){try{const r=gF(this.version,...e);this.dispatchUserActionEvent(r)}catch{}}trackTransactionSentForSignature(...e){try{const r=lF(this.version,...e);this.dispatchUserActionEvent(r)}catch{}}trackTransactionSigned(...e){try{const r=uF(this.version,...e);this.dispatchUserActionEvent(r)}catch{}}trackTransactionSigningFailed(...e){try{const r=fF(this.version,...e);this.dispatchUserActionEvent(r)}catch{}}trackDataSentForSignature(...e){try{const r=dF(this.version,...e);this.dispatchUserActionEvent(r)}catch{}}trackDataSigned(...e){try{const r=hF(this.version,...e);this.dispatchUserActionEvent(r)}catch{}}trackDataSigningFailed(...e){try{const r=pF(this.version,...e);this.dispatchUserActionEvent(r)}catch{}}}const hae="3.2.0";class Th{constructor(e){if(this.walletsList=new AC,this._wallet=null,this.provider=null,this.statusChangeSubscriptions=[],this.statusChangeErrorSubscriptions=[],this.dappSettings={manifestUrl:(e==null?void 0:e.manifestUrl)||tae(),storage:(e==null?void 0:e.storage)||new sae},this.walletsRequiredFeatures=e==null?void 0:e.walletsRequiredFeatures,this.walletsList=new AC({walletsListSource:e==null?void 0:e.walletsListSource,cacheTTLMs:e==null?void 0:e.walletsListCacheTTLMs}),this.tracker=new dae({eventDispatcher:e==null?void 0:e.eventDispatcher,tonConnectSdkVersion:hae}),!this.dappSettings.manifestUrl)throw new $9("Dapp tonconnect-manifest.json must be specified if window.location.origin is undefined. See more https://github.com/ton-connect/docs/blob/main/requests-responses.md#app-manifest");this.bridgeConnectionStorage=new x2(this.dappSettings.storage),e!=null&&e.disableAutoPauseConnection||this.addWindowFocusAndBlurSubscriptions()}static getWallets(){return this.walletsList.getWallets()}get connected(){return this._wallet!==null}get account(){var e;return((e=this._wallet)===null||e===void 0?void 0:e.account)||null}get wallet(){return this._wallet}set wallet(e){this._wallet=e,this.statusChangeSubscriptions.forEach(r=>r(this._wallet))}getWallets(){return this.walletsList.getWallets()}onStatusChange(e,r){return this.statusChangeSubscriptions.push(e),r&&this.statusChangeErrorSubscriptions.push(r),()=>{this.statusChangeSubscriptions=this.statusChangeSubscriptions.filter(n=>n!==e),r&&(this.statusChangeErrorSubscriptions=this.statusChangeErrorSubscriptions.filter(n=>n!==r))}}connect(e,r){var n,i;const s={};if(typeof r=="object"&&"tonProof"in r&&(s.request=r),typeof r=="object"&&("openingDeadlineMS"in r||"signal"in r||"request"in r)&&(s.request=r==null?void 0:r.request,s.openingDeadlineMS=r==null?void 0:r.openingDeadlineMS,s.signal=r==null?void 0:r.signal),this.connected)throw new U9;const o=ba(s==null?void 0:s.signal);if((n=this.abortController)===null||n===void 0||n.abort(),this.abortController=o,o.signal.aborted)throw new ht("Connection was aborted");return(i=this.provider)===null||i===void 0||i.closeConnection(),this.provider=this.createProvider(e),o.signal.addEventListener("abort",()=>{var a;(a=this.provider)===null||a===void 0||a.closeConnection(),this.provider=null}),this.tracker.trackConnectionStarted(),this.provider.connect(this.createConnectRequest(s==null?void 0:s.request),{openingDeadlineMS:s==null?void 0:s.openingDeadlineMS,signal:o.signal})}restoreConnection(e){var r,n;return et(this,void 0,void 0,function*(){this.tracker.trackConnectionRestoringStarted();const i=ba(e==null?void 0:e.signal);if((r=this.abortController)===null||r===void 0||r.abort(),this.abortController=i,i.signal.aborted){this.tracker.trackConnectionRestoringError("Connection restoring was aborted");return}const[s,o]=yield Promise.all([this.bridgeConnectionStorage.storedConnectionType(),this.walletsList.getEmbeddedWallet()]);if(i.signal.aborted){this.tracker.trackConnectionRestoringError("Connection restoring was aborted");return}let a=null;try{switch(s){case"http":a=yield E2.fromStorage(this.dappSettings.storage);break;case"injected":a=yield yo.fromStorage(this.dappSettings.storage);break;default:if(o)a=this.createProvider(o);else return}}catch{this.tracker.trackConnectionRestoringError("Provider is not restored"),yield this.bridgeConnectionStorage.removeConnection(),a==null||a.closeConnection(),a=null;return}if(i.signal.aborted){a==null||a.closeConnection(),this.tracker.trackConnectionRestoringError("Connection restoring was aborted");return}if(!a){su("Provider is not restored"),this.tracker.trackConnectionRestoringError("Provider is not restored");return}(n=this.provider)===null||n===void 0||n.closeConnection(),this.provider=a,a.listen(this.walletEventsListener.bind(this));const c=()=>{this.tracker.trackConnectionRestoringError("Connection restoring was aborted"),a==null||a.closeConnection(),a=null};i.signal.addEventListener("abort",c);const l=bm(f=>et(this,void 0,void 0,function*(){yield a==null?void 0:a.restoreConnection({openingDeadlineMS:e==null?void 0:e.openingDeadlineMS,signal:f.
851signal}),i.signal.removeEventListener("abort",c),this.connected?this.tracker.trackConnectionRestoringCompleted(this.wallet):this.tracker.trackConnectionRestoringError("Connection restoring failed")}),{attempts:Number.MAX_SAFE_INTEGER,delayMs:2e3,signal:e==null?void 0:e.signal}),u=new Promise(f=>setTimeout(()=>f(),12e3));return Promise.race([l,u])})}sendTransaction(e,r){return et(this,void 0,void 0,function*(){const n={};typeof r=="function"?n.onRequestSent=r:(n.onRequestSent=r==null?void 0:r.onRequestSent,n.signal=r==null?void 0:r.signal);const i=ba(n==null?void 0:n.signal);if(i.signal.aborted)throw new ht("Transaction sending was aborted");this.checkConnection();const s=e.messages.length,o=e.messages.some(h=>h.extraCurrency&&Object.keys(h.extraCurrency).length>0);cae(this.wallet.device.features,{requiredMessagesNumber:s,requireExtraCurrencies:o}),this.tracker.trackTransactionSentForSignature(this.wallet,e);const{validUntil:a,messages:c}=e,l=IT(e,["validUntil","messages"]),u=e.from||this.account.address,f=e.network||this.account.chain,d=yield this.provider.sendRequest(Kb.convertToRpcRequest(Object.assign(Object.assign({},l),{from:u,network:f,valid_until:a,messages:c.map(h=>{var{extraCurrency:g}=h,y=IT(h,["extraCurrency"]);return Object.assign(Object.assign({},y),{extra_currency:g})})})),{onRequestSent:n.onRequestSent,signal:i.signal});if(Kb.isError(d))return this.tracker.trackTransactionSigningFailed(this.wallet,e,d.error.message,d.error.code),Kb.parseAndThrowError(d);const p=Kb.convertFromRpcResponse(d);return this.tracker.trackTransactionSigned(this.wallet,e,p),p})}signData(e,r){return et(this,void 0,void 0,function*(){const n=ba(r==null?void 0:r.signal);if(n.signal.aborted)throw new ht("data sending was aborted");this.checkConnection(),lae(this.wallet.device.features,{requiredTypes:[e.type]}),this.tracker.trackDataSentForSignature(this.wallet,e);const i=e.from||this.account.address,s=e.network||this.account.chain,o=yield this.provider.sendRequest(Gb.convertToRpcRequest(Object.assign(Object.assign({},e),{from:i,network:s})),{onRequestSent:r==null?void 0:r.onRequestSent,signal:n.signal});if(Gb.isError(o))return this.tracker.trackDataSigningFailed(this.wallet,e,o.error.message,o.error.code),Gb.parseAndThrowError(o);const a=Gb.convertFromRpcResponse(o);return this.tracker.trackDataSigned(this.wallet,e,a),a})}disconnect(e){var r;return et(this,void 0,void 0,function*(){if(!this.connected)throw new b3;const n=ba(e==null?void 0:e.signal),i=this.abortController;if(this.abortController=n,n.signal.aborted)throw new ht("Disconnect was aborted");this.onWalletDisconnected("dapp"),yield(r=this.provider)===null||r===void 0?void 0:r.disconnect({signal:n.signal}),i==null||i.abort()})}pauseConnection(){var e;((e=this.provider)===null||e===void 0?void 0:e.type)==="http"&&this.provider.pause()}unPauseConnection(){var e;return((e=this.provider)===null||e===void 0?void 0:e.type)!=="http"?Promise.resolve():this.provider.unPause()}addWindowFocusAndBlurSubscriptions(){const e=eae();if(e)try{e.addEventListener("visibilitychange",()=>{e.hidden?this.pauseConnection():this.unPauseConnection().catch()})}catch(r){su("Cannot subscribe to the document.visibilitychange: ",r)}}createProvider(e){let r;return!Array.isArray(e)&&$oe(e)?r=new yo(this.dappSettings.storage,e.
851jsBridgeKey):r=new E2(this.dappSettings.storage,e),r.listen(this.walletEventsListener.bind(this)),r}walletEventsListener(e){switch(e.event){case"connect":this.onWalletConnected(e.payload);break;case"connect_error":this.tracker.trackConnectionError(e.payload.message,e.payload.code);const r=Boe.parseError(e.payload);this.onWalletConnectError(r);break;case"disconnect":this.onWalletDisconnected("wallet")}}onWalletConnected(e){var r;const n=e.items.find(a=>a.name==="ton_addr"),i=e.items.find(a=>a.name==="ton_proof");if(!n)throw new ht("ton_addr connection item was not found");if(!v3(e.device.features,this.walletsRequiredFeatures)){(r=this.provider)===null||r===void 0||r.disconnect(),this.onWalletConnectError(new Hy("Wallet does not support required features",{cause:{connectEvent:e}}));return}const o={device:e.device,provider:this.provider.type,account:{address:n.address,chain:n.network,walletStateInit:n.walletStateInit,publicKey:n.publicKey}};if(i){let a;try{if("proof"in i)a={name:"ton_proof",proof:{timestamp:i.proof.timestamp,domain:{lengthBytes:i.proof.domain.lengthBytes,value:i.proof.domain.value},payload:i.proof.payload,signature:i.proof.signature}};else if("error"in i)a={name:"ton_proof",error:{code:i.error.code,message:i.error.message}};else throw new ht("Invalid data format")}catch{a={name:"ton_proof",error:{code:CC.UNKNOWN_ERROR,message:"Invalid data format"}}}o.connectItems={tonProof:a}}this.wallet=o,this.tracker.trackConnectionCompleted(o)}onWalletConnectError(e){if(this.statusChangeErrorSubscriptions.forEach(r=>r(e)),Ai(e),e instanceof sx||e instanceof ix)throw su(e),e}onWalletDisconnected(e){this.tracker.trackDisconnection(this.wallet,e),this.wallet=null}checkConnection(){if(!this.connected)throw new b3}createConnectRequest(e){const r=[{name:"ton_addr"}];return e!=null&&e.tonProof&&r.push({name:"ton_proof",payload:e.tonProof}),{manifestUrl:this.dappSettings.manifestUrl,items:r}}}Th.walletsList=new AC;Th.isWalletInjected=t=>yo.isWalletInjected(t);Th.isInsideWalletBrowser=t=>yo.isInsideWalletBrowser(t);const pae=81,gae=128;function yF(t,e=!1){const{wc:r,hex:n}=mae(t);let i=pae;e&&(i|=gae);const s=new Int8Array(34);s[0]=i,s[1]=r,s.set(n,2);const o=new Uint8Array(36);return o.set(s),o.set(yae(s),34),M9.encode(o).replace(/\+/g,"-").replace(/\//g,"_")}function mae(t){if(!t.includes(":"))throw new pp(`Wrong address ${t}. Address must include ":".`);const e=t.split(":");if(e.length!==2)throw new pp(`Wrong address ${t}. Address must include ":" only once.`);const r=parseInt(e[0]);if(r!==0&&r!==-1)throw new pp(`Wrong address ${t}. WC must be eq 0 or -1, but ${r} received.`);const n=e[1];if((n==null?void 0:n.length)!==64)throw new pp(`Wrong address ${t}. Hex part must be 64bytes length, but ${n==null?void 0:n.length} received.`);return{wc:r,hex:bae(n)}}function yae(t){let r=0;const n=new Uint8Array(t.length+2);n.set(t);for(let i of n){let s=128;for(;s>0;)r<<=1,i&s&&(r+=1),s>>=1,r>65535&&(r&=65535,r^=4129)}return new Uint8Array([Math.floor(r/256),r%256])}const NC={};for(let t=0;t<=255;t++){let e=t.toString(16);e.length<2&&(e="0"+e),NC[e]=t}function bae(t){t=t.toLowerCase();const e=t.length;if(e%2!==0)throw new w3("Hex string must have length a multiple of 2: "+t);const r=e/2,n=new Uint8Array(r);for(let i=0;i<r;i++){const s=i*2,o=t.substring(s,s+2);if(!NC.hasOwnProperty(o))throw new w3("Invalid hex character: "+o);n[i]=NC[o]}return n}var IC={exports:{}};(function(t,e){(function(r,n){var i="1.0.40",s="",o="?",a="function",c="undefined",l="object",u="string",f="major",d="model",p="name",h="type",g="vendor",y="version",x="architecture",C="console",_="mobile",L="tablet",P="smarttv",z="wearable",W="embedded",B=500,I="Amazon",j="Apple",D="ASUS",O="BlackBerry",T="Browser",m="Chrome",b="Edge",E="Firefox",k="Google",R="Huawei",M="LG",H="Microsoft",N="Motorola",v="Opera",U="Samsung",G="Sharp",S="Sony",J="Xiaomi",ne="Zebra",Z="Facebook",Q="Chromium OS",ee="Mac OS",re=" Browser",ie=function(Je,ut){var xt={};for(var vt in Je)ut[vt]&&ut[vt].length%2===0?xt[vt]=ut[vt].concat(Je[vt]):xt[vt]=Je[vt];return xt},me=function(Je){for(var ut={},xt=0;xt<Je.length;xt++)ut[Je[xt].toUpperCase()]=Je[xt];return ut},le=function(Je,ut){return typeof Je===u?ye(ut).indexOf(ye(Je))!==-1:!1},ye=function(Je){return Je.toLowerCase()},$t=function(Je){return typeof Je===u?Je.replace(/[^\d\.]/g,s).split(".")[0]:n},wt=function(Je,ut){if(typeof Je===u)return Je=Je.replace(/^\s\s*/,s),typeof ut===c?Je:Je.substring(0,B)},ze=function(Je,ut){for(var xt=0,vt,ar,Kn,pt,qe,Rn;xt<ut.length&&!qe;){var mr=ut[xt],Ar=ut[xt+1];for(vt=ar=0;vt<mr.length&&!qe&&mr[vt];)if(qe=mr[vt++].exec(Je),qe)for(Kn=0;Kn<Ar.length;Kn++)Rn=qe[++ar],pt=Ar[Kn],typeof pt===l&&pt.length>0?pt.length===2?typeof pt[1]==a?this[pt[0]]=pt[1].call(this,Rn):this[pt[0]]=pt[1]:pt.length===3?typeof pt[1]===a&&!(pt[1].exec&&pt[1].test)?this[pt[0]]=Rn?pt[1].call(this,Rn,pt[2]):n:this[pt[0]]=Rn?Rn.replace(pt[1],pt[2]):n:pt.length===4&&(this[pt[0]]=Rn?pt[3].call(this,Rn.replace(pt[1],pt[2])):n):this[pt]=Rn||n;xt+=2}},gr=function(Je,ut){for(var xt in ut)if(typeof ut[xt]===l&&ut[xt].length>0){for(var vt=0;vt<ut[xt].length;vt++)if(le(ut[xt][vt],Je))return xt===o?n:xt}else if(le(ut[xt],Je))return xt===o?n:xt;return ut.hasOwnProperty("*")?ut["*"]:Je},Ut={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},ur={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},hi={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[y,[p,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[y,[p,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[p,y],[/opios[\/ ]+([\w\.]+)/i],[y,[p,v+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[y,[p,v+" GX"]],[/\bopr\/([\w\.]+)/i],[y,[p,v]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[y,[p,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[y,[p,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[p,y],[/quark(?:pc)?\/([-\w\.]+)/i],[y,[p,"Quark"]],[/\bddg\/([\w\.]+)/i],[y,[p,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[y,[p,"UC"+T]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[y,[p,"WeChat"]],[/konqueror\/([\w\.]+)/i],[y,[p,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[y,[p,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[y,[p,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[y,[p,"Smart Lenovo "+T]],[/(avast|avg)\/([\w\.]+)/i],[[p,/(.+)/,"$1 Secure "+T],y],[/\bfocus\/([\w\.]+)/i],[y,[p,E+" Focus"]],[/\bopt\/([\w\.]+)/i],[y,[p,v+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[y,[p,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[y,[p,"Dolphin"]],[/coast\/([\w\.]+)/i],[y,[p,v+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[y,[p,"MIUI"+re]],[/fxios\/([\w\.-]+)/i],[y,[p,E]],[/\bqihoobrowser\/?([\w\.]*)/i],[y,[p,"360"]],[/\b(qq)\/([\w\.]+)/i],[[p,/(.+)/,"$1Browser"],y],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[p,/(.+)/,"$1"+re],y],[/samsungbrowser\/([\w\.]+)/i],[y,[p,U+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[y,[p,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[p,"Sogou Mobile"],y],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[p,y],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[p],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[y,p],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[p,Z],y],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[p,y],[/\bgsa\/([\w\.]+) .*safari\//i],[y,[p,"GSA"]],[/musical_ly(?:.
vendor: 5,882 bytes, line 851
851+app_?version\/|_)([\w\.]+)/i],[y,[p,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[y,[p,m+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[p,m+" WebView"],y],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[y,[p,"Android "+T]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[p,y],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[y,[p,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[y,p],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[p,[y,gr,Ut]],[/(webkit|khtml)\/([\w\.]+)/i],[p,y],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[p,"Netscape"],y],[/(wolvic|librewolf)\/([\w\.]+)/i],[p,y],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[y,[p,E+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[p,[y,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[p,[y,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[x,"amd64"]],[/(ia32(?=;))/i],[[x,ye]],[/((?:i[346]|x)86)[;\)]/i],[[x,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[x,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[x,"armhf"]],[/windows (ce|mobile); ppc;/i],[[x,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[x,/ower/,s,ye]],[/(sun4\w)[;\)]/i],[[x,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[x,ye]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[d,[g,U],[h,L]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[d,[g,U],[h,_]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[d,[g,j],[h,_]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[d,[g,j],[h,L]],[/(macintosh);/i],[d,[g,j]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[d,[g,G],[h,_]],[/(?:honor)([-\w ]+)[;\)]/i],[d,[g,"Honor"],[h,_]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[d,[g,R],[h,L]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[d,[g,R],[h,_]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[d,/_/g," "],[g,J],[h,_]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[d,/_/g," "],[g,J],[h,L]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[d,[g,"OPPO"],[h,_]],[/\b(opd2\d{3}a?) bui/i],[d,[g,"OPPO"],[h,L]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[d,[g,"Vivo"],[h,_]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[d,[g,"Realme"],[h,_]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[d,[g,N],[h,_]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[d,[g,N],[h,L]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[d,[g,M],[h,L]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[d,[g,M],[h,_]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[d,[g,"Lenovo"],[h,L]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[d,/_/g," "],[g,"Nokia"],[h,_]],[/(pixel c)\b/i],[d,[g,k],[h,L]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[d,[g,k],[h,_]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[d,[g,S],[h,_]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[d,"Xperia Tablet"],[g,S],[h,L]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[d,[g,"OnePlus"],[h,_]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[d,[g,I],[h,L]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[d,/(.+)/g,"Fire Phone $1"],[g,I],[h,_]],[/(playbook);[-\w\),; ]+(rim)/i],[d,g,[h,L]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[d,[g,O],[h,_]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[d,[g,D],[h,L]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[d,[g,D],[h,_]],[/(nexus 9)/i],[d,[g,"HTC"],[h,L]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[g,[d,/_/g," "],[h,_]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[d,[g,"TCL"],[h,L]],[/(itel) ((\w+))/i],[[g,ye],d,[h,gr,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[d,[g,"Acer"],[h,L]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[d,[g,"Meizu"],[h,_]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[d,[g,"Ulefone"],[h,_]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[d,[g,"Energizer"],[h,_]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[d,[g,"Cat"],[h,_]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[d,[g,"Smartfren"],[h,_]],[/droid.+; (a(?:015|06[35]|142p?))/i],[d,[g,"Nothing"],[h,_]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/;
851 (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[g,d,[h,_]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[g,d,[h,L]],[/(surface duo)/i],[d,[g,H],[h,L]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[d,[g,"Fairphone"],[h,_]],[/(u304aa)/i],[d,[g,"AT&T"],[h,_]],[/\bsie-(\w*)/i],[d,[g,"Siemens"],[h,_]],[/\b(rct\w+) b/i],[d,[g,"RCA"],[h,L]],[/\b(venue[\d ]{2,7}) b/i],[d,[g,"Dell"],[h,L]],[/\b(q(?:mv|ta)\w+) b/i],[d,[g,"Verizon"],[h,L]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[d,[g,"Barnes & Noble"],[h,L]],[/\b(tm\d{3}\w+) b/i],[d,[g,"NuVision"],[h,L]],[/\b(k88) b/i],[d,[g,"ZTE"],[h,L]],[/\b(nx\d{3}j) b/i],[d,[g,"ZTE"],[h,_]],[/\b(gen\d{3}) b.+49h/i],[d,[g,"Swiss"],[h,_]],[/\b(zur\d{3}) b/i],[d,[g,"Swiss"],[h,L]],[/\b((zeki)?tb.*\b) b/i],[d,[g,"Zeki"],[h,L]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[g,"Dragon Touch"],d,[h,L]],[/\b(ns-?\w{0,9}) b/i],[d,[g,"Insignia"],[h,L]],[/\b((nxa|next)-?\w{0,9}) b/i],[d,[g,"NextBook"],[h,L]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[g,"Voice"],d,[h,_]],[/\b(lvtel\-)?(v1[12]) b/i],[[g,"LvTel"],d,[h,_]],[/\b(ph-1) /i],[d,[g,"Essential"],[h,_]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[d,[g,"Envizen"],[h,L]],[/\b(trio[-\w\. ]+) b/i],[d,[g,"MachSpeed"],[h,L]],[/\btu_(1491) b/i],[d,[g,"Rotor"],[h,L]],[/(shield[\w ]+) b/i],[d,[g,"Nvidia"],[h,L]],[/(sprint) (\w+)/i],[g,d,[h,_]],[/(kin\.[onetw]{3})/i],[[d,/\./g," "],[g,H],[h,_]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[d,[g,ne],[h,L]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[d,[g,ne],[h,_]],[/smart-tv.+(samsung)/i],[g,[h,P]],[/hbbtv.+maple;(\d+)/i],[[d,/^/,"SmartTV"],[g,U],[h,P]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[g,M],[h,P]],[/(apple) ?tv/i],[g,[d,j+" TV"],[h,P]],[/crkey/i],[[d,m+"cast"],[g,k],[h,P]],[/droid.+aft(\w+)( bui|\))/i],[d,[g,I],[h,P]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[d,[g,G],[h,P]],[/(bravia[\w ]+)( bui|\))/i],[d,[g,S],[h,P]],[/(mitv-\w{5}) bui/i],[d,[g,J],[h,P]],[/Hbbtv.*(technisat) (.*);/i],[g,d,[h,P]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[g,wt],[d,wt],[h,P]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[h,P]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[g,d,[h,C]],[/droid.+; (shield) bui/i],[d,[g,"Nvidia"],[h,C]],[/(playstation [345portablevi]+)/i],[d,[g,S],[h,C]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[d,[g,H],[h,C]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[d,[g,U],[h,z]],[/((pebble))app/i],[g,d,[h,z]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[d,[g,j],[h,z]],[/droid.+; (glass) \d/i],[d,[g,k],[h,z]],[/droid.+; (wt63?0{2,3})\)/i],[d,[g,ne],[h,z]],[/droid.+; (glass) \d/i],[d,[g,k],[h,z]],[/(pico) (4|neo3(?: link|pro)?)/i],[g,d,[h,z]],[/; (quest( \d| pro)?)/i],[d,[g,Z],[h,z]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[g,[h,W]],[/(aeobc)\b/i],[d,[g,I],[h,W]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[d,[h,_]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[d,[h,L]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[h,L]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[h,_]],[/(android[-\w\. ]{0,9});.+buil/i],[d,[g,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[y,[p,b+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[p,y],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[y,[p,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[p,y],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[y,p]],os:[[/microsoft (windows) (vista|xp)/i],[p,y],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[p,[y,gr,ur]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[y,gr,ur],[p,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[y,/_/g,"."],[p,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[p,ee],[y,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[y,p],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[p,y],[/\(bb(10);/i],[y,[p,O]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[y,[p,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+);
vendor: 2,935 bytes, line 851
851 rv:.+ gecko\/([\w\.]+)/i],[y,[p,E+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[y,[p,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[y,[p,"watchOS"]],[/crkey\/([\d\.]+)/i],[y,[p,m+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[p,Q],y],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[p,y],[/(sunos) ?([\w\.\d]*)/i],[[p,"Solaris"],y],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[p,y]]},Bt=function(Je,ut){if(typeof Je===l&&(ut=Je,Je=n),!(this instanceof Bt))return new Bt(Je,ut).getResult();var xt=typeof r!==c&&r.navigator?r.navigator:n,vt=Je||(xt&&xt.userAgent?xt.userAgent:s),ar=xt&&xt.userAgentData?xt.userAgentData:n,Kn=ut?ie(hi,ut):hi,pt=xt&&xt.userAgent==vt;return this.getBrowser=function(){var qe={};return qe[p]=n,qe[y]=n,ze.call(qe,vt,Kn.browser),qe[f]=$t(qe[y]),pt&&xt&&xt.brave&&typeof xt.brave.isBrave==a&&(qe[p]="Brave"),qe},this.getCPU=function(){var qe={};return qe[x]=n,ze.call(qe,vt,Kn.cpu),qe},this.getDevice=function(){var qe={};return qe[g]=n,qe[d]=n,qe[h]=n,ze.call(qe,vt,Kn.device),pt&&!qe[h]&&ar&&ar.mobile&&(qe[h]=_),pt&&qe[d]=="Macintosh"&&xt&&typeof xt.standalone!==c&&xt.maxTouchPoints&&xt.maxTouchPoints>2&&(qe[d]="iPad",qe[h]=L),qe},this.getEngine=function(){var qe={};return qe[p]=n,qe[y]=n,ze.call(qe,vt,Kn.engine),qe},this.getOS=function(){var qe={};return qe[p]=n,qe[y]=n,ze.call(qe,vt,Kn.os),pt&&!qe[p]&&ar&&ar.platform&&ar.platform!="Unknown"&&(qe[p]=ar.platform.replace(/chrome os/i,Q).replace(/macos/i,ee)),qe},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return vt},this.setUA=function(qe){return vt=typeof qe===u&&qe.length>B?wt(qe,B):qe,this},this.setUA(vt),this};Bt.VERSION=i,Bt.BROWSER=me([p,y,f]),Bt.CPU=me([x]),Bt.DEVICE=me([d,g,h,C,_,P,L,z,W]),Bt.ENGINE=Bt.OS=me([p,y]),t.exports&&(e=t.exports=Bt),e.UAParser=Bt;var Ht=typeof r!==c&&(r.jQuery||r.Zepto);if(Ht&&!Ht.ua){var Pn=new Bt;Ht.ua=Pn.getResult(),Ht.ua.get=function(){return Pn.getUA()},Ht.ua.set=function(Je){Pn.setUA(Je);var ut=Pn.getResult();for(var xt in ut)Ht.ua[xt]=ut[xt]}}})(typeof window=="object"?window:li)}
851)(IC,IC.exports);var wae=IC.exports;const vae=is(wae);var xae=function(e){return Eae(e)&&!Cae(e)};function Eae(t){return!!t&&typeof t=="object"}function Cae(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||Sae(t)}var _ae=typeof Symbol=="function"&&Symbol.for,Aae=_ae?Symbol.for("react.element"):60103;function Sae(t){return t.$$typeof===Aae}function Nae(t){return Array.isArray(t)?[]:{}}function C2(t,e){return e.clone!==!1&&e.isMergeableObject(t)?Jp(Nae(t),t,e):t}function Iae(t,e,r){return t.concat(e).map(function(n){return C2(n,r)})}function Tae(t,e){if(!e.customMerge)return Jp;var r=e.customMerge(t);return typeof r=="function"?r:Jp}function kae(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]}function OT(t){return Object.keys(t).concat(kae(t))}function bF(t,e){try{return e in t}catch{return!1}}function Pae(t,e){return bF(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function Rae(t,e,r){var n={};return r.isMergeableObject(t)&&OT(t).forEach(function(i){n[i]=C2(t[i],r)}),OT(e).forEach(function(i){Pae(t,i)||(bF(t,i)&&r.isMergeableObject(e[i])?n[i]=Tae(i,r)(t[i],e[i],r):n[i]=C2(e[i],r))}),n}function Jp(t,e,r){r=r||{},r.arrayMerge=r.arrayMerge||Iae,r.isMergeableObject=r.isMergeableObject||xae,r.cloneUnlessOtherwiseSpecified=C2;var n=Array.isArray(e),i=Array.isArray(t),s=n===i;return s?n?r.arrayMerge(t,e,r):Rae(t,e,r):C2(e,r)}Jp.all=function(e,r){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(n,i){return Jp(n,i,r)},{})};var Oae=Jp,Dae=Oae;const Lae=is(Dae);var wF={exports:{}};/*! 852 Copyright (c) 2018 Jed Watson. 853 Licensed under the MIT License (MIT), see 854 http://jedwatson.github.io/classnames 855*/(function(t){(function(){var e={}.hasOwnProperty;function r(){for(var s="",o=0;o<arguments.length;o++){var a=arguments[o];a&&(s=i(s,n(a)))}return s}function n(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return r.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var o="";for(var a in s)e.call(s,a)&&s[a]&&(o=i(o,a));return o}function i(s,o){return o?s?s+" "+o:s+o:s}t.exports?(r.default=r,t.exports=r):window.classNames=r})()})(wF);var Mae=wF.exports;const uv=is(Mae);var $ae=Object.defineProperty,Uae=Object.defineProperties,Bae=Object.getOwnPropertyDescriptors,DT=Object.getOwnPropertySymbols,Fae=Object.prototype.hasOwnProperty,jae=Object.prototype.propertyIsEnumerable,TC=(t,e,r)=>e in t?$ae(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,zr=(t,e)=>{for(var r in e||(e={}))Fae.call(e,r)&&TC(t,r,e[r]);if(DT)for(var r of DT(e))jae.call(e,r)&&TC(t,r,e[r]);return t},wo=(t,e)=>Uae(t,Bae(e)),_t=(t,e,r)=>(TC(t,typeof e!="symbol"?e+"":e,r),r),hr=(t,e,r)=>new Promise((n,i)=>{var s=c=>{try{a(r.next(c))}catch(l){i(l)}},o=c=>{try{a(r.throw(c))}catch(l){i(l)}},a=c=>c.done?n(c.value):Promise.resolve(c.value).then(s,o);a((r=r.apply(t,e)).next())}),LT,MT,$T,UT,BT,FT,jT,zT;const Ln={};function zae(t){Ln.context=t}const Wae=(t,e)=>t===e,gc=Symbol("solid-proxy"),kC=Symbol("solid-track"),x3={equals:Wae};let vF=NF;const ku=1,E3=2,xF={owned:null,cleanups:null,context:null,owner:null},X5={};var Ti=null;let uh=null,Un=null,Is=null,ou=null,W9=0;function vm(t,e){const r=Un,n=Ti,i=t.length===0,s=i?xF:{owned:null,cleanups:null,context:null,owner:e===void 0?n:e},o=i?t:()=>t(()=>zi(()=>fx(s)));Ti=s,Un=null;try{return td(o,!0)}finally{Un=r,Ti=n}}function yt(t,e){e=e?Object.assign({},x3,e):x3;const r={value:t,observers:null,observerSlots:null,comparator:e.equals||void 0},n=i=>(typeof i=="function"&&(i=i(r.value)),SF(r,i));return[AF.bind(r),n]}function H9(t,e,r){const n=ux(t,e,!0,ku);Rg(n)}function ir(t,e,r){const n=ux(t,e,!1,ku);Rg(n)}function di(t,e,r){vF=Zae;const n=ux(t,e,!1,ku);n.user=!0,ou?ou.push(n):Rg(n)}function Pe(t,e,r){r=r?Object.assign({},x3,r):x3;const n=ux(t,e,!0,0);return n.observers=null,n.observerSlots=null,n.comparator=r.equals||void 0,Rg(n),AF.bind(n)}function Hae(t,e,r){let n,i,s;arguments.length===1?(n=!0,i=t,s={}):(n=t,i=e,s={});let o=null,a=X5,c=null,l=!1,u="initialValue"in s,f=typeof n=="function"&&Pe(n);const d=new Set,[p,h]=(s.storage||yt)(s.initialValue),[g,y]=yt(void 0),[x,C]=yt(void 0,{equals:!1}),[_,L]=yt(u?"ready":"unresolved");
855if(Ln.context){c=`${Ln.context.id}${Ln.context.count++}`;let I;s.ssrLoadFrom==="initial"?a=s.initialValue:Ln.load&&(I=Ln.load(c))&&(a=I[0])}function P(I,j,D,O){return o===I&&(o=null,u=!0,(I===a||j===a)&&s.onHydrated&&queueMicrotask(()=>s.onHydrated(O,{value:j})),a=X5,z(j,D)),j}function z(I,j){td(()=>{j===void 0&&h(()=>I),L(j!==void 0?"errored":"ready"),y(j);for(const D of d.keys())D.decrement();d.clear()},!1)}function W(){const I=Kae,j=p(),D=g();if(D!==void 0&&!o)throw D;return Un&&Un.user,j}function B(I=!0){if(I!==!1&&l)return;l=!1;const j=f?f():n;if(j==null||j===!1){P(o,zi(p));return}const D=a!==X5?a:zi(()=>i(j,{value:p(),refetching:I}));return typeof D!="object"||!(D&&"then"in D)?(P(o,D,void 0,j),D):(o=D,l=!0,queueMicrotask(()=>l=!1),td(()=>{L(u?"refreshing":"pending"),C()},!1),D.then(O=>P(D,O,void 0,j),O=>P(D,void 0,TF(O),j)))}return Object.defineProperties(W,{state:{get:()=>_()},error:{get:()=>g()},loading:{get(){const I=_();return I==="pending"||I==="refreshing"}},latest:{get(){if(!u)return W();const I=g();if(I&&!o)throw I;return p()}}}),f?H9(()=>B(!1)):B(!1),[W,{refetch:B,mutate:h}]}function EF(t){return td(t,!1)}function zi(t){if(Un===null)return t();const e=Un;Un=null;try{return t()}finally{Un=e}}function qae(t,e,r){const n=Array.isArray(t);let i;return s=>{let o;if(n){o=Array(t.length);for(let c=0;c<t.length;c++)o[c]=t[c]()}else o=t();const a=zi(()=>e(o,i,s));return i=o,a}}function CF(t){di(()=>zi(t))}function Vs(t){return Ti===null||(Ti.cleanups===null?Ti.cleanups=[t]:Ti.cleanups.push(t)),t}function _F(){return Un}function Vae(){return Ti}function cx(t,e){const r=Symbol("context");return{id:r,Provider:Jae(r),defaultValue:t}}function Rs(t){let e;return(e=PF(Ti,t.id))!==void 0?e:t.defaultValue}function lx(t){const e=Pe(t),r=Pe(()=>PC(e()));return r.toArray=()=>{const n=r();return Array.isArray(n)?n:n!=null?[n]:[]},r}let Kae;function AF(){const t=uh;if(this.sources&&(this.state||t))if(this.state===ku||t)Rg(this);else{const e=Is;Is=null,td(()=>_3(this),!1),Is=e}if(Un){const e=this.observers?this.observers.length:0;Un.sources?(Un.sources.push(this),Un.sourceSlots.push(e)):(Un.sources=[this],Un.sourceSlots=[e]),this.observers?(this.observers.push(Un),this.observerSlots.push(Un.sources.length-1)):(this.observers=[Un],this.observerSlots=[Un.sources.length-1])}return this.value}function SF(t,e,r){let n=t.value;return(!t.comparator||!t.comparator(n,e))&&(t.value=e,t.observers&&t.observers.length&&td(()=>{for(let i=0;i<t.observers.length;i+=1){const s=t.observers[i],o=uh&&uh.running;o&&uh.disposed.has(s),(o&&!s.tState||!o&&!s.state)&&(s.pure?Is.push(s):ou.push(s),s.observers&&IF(s)),o||(s.state=ku)}if(Is.length>1e6)throw Is=[],new Error},!1)),e}function Rg(t){if(!t.fn)return;fx(t);const e=Ti,r=Un,n=W9;Un=Ti=t,Gae(t,t.value,n),Un=r,Ti=e}function Gae(t,e,r){let n;try{n=t.fn(e)}catch(i){t.pure&&(t.state=ku,t.owned&&t.owned.forEach(fx),t.owned=null),kF(i)}(!t.updatedAt||t.updatedAt<=r)&&(t.updatedAt!=null&&"observers"in t?SF(t,n):t.value=n,t.updatedAt=r)}function ux(t,e,r,n=ku,i){const s={fn:t,state:n,updatedAt:null,owned:null,sources:null,
855sourceSlots:null,cleanups:null,value:e,owner:Ti,context:null,pure:r};return Ti===null||Ti!==xF&&(Ti.owned?Ti.owned.push(s):Ti.owned=[s]),s}function C3(t){const e=uh;if(t.state===0||e)return;if(t.state===E3||e)return _3(t);if(t.suspense&&zi(t.suspense.inFallback))return t.suspense.effects.push(t);const r=[t];for(;(t=t.owner)&&(!t.updatedAt||t.updatedAt<W9);)(t.state||e)&&r.push(t);for(let n=r.length-1;n>=0;n--)if(t=r[n],t.state===ku||e)Rg(t);else if(t.state===E3||e){const i=Is;Is=null,td(()=>_3(t,r[0]),!1),Is=i}}function td(t,e){if(Is)return t();let r=!1;e||(Is=[]),ou?r=!0:ou=[],W9++;try{const n=t();return Yae(r),n}catch(n){r||(ou=null),Is=null,kF(n)}}function Yae(t){if(Is&&(NF(Is),Is=null),t)return;const e=ou;ou=null,e.length&&td(()=>vF(e),!1)}function NF(t){for(let e=0;e<t.length;e++)C3(t[e])}function Zae(t){let e,r=0;for(e=0;e<t.length;e++){const n=t[e];n.user?t[r++]=n:C3(n)}for(Ln.context&&zae(),e=0;e<r;e++)C3(t[e])}function _3(t,e){const r=uh;t.state=0;for(let n=0;n<t.sources.length;n+=1){const i=t.sources[n];i.sources&&(i.state===ku||r?i!==e&&C3(i):(i.state===E3||r)&&_3(i,e))}}function IF(t){const e=uh;for(let r=0;r<t.observers.length;r+=1){const n=t.observers[r];(!n.state||e)&&(n.state=E3,n.pure?Is.push(n):ou.push(n),n.observers&&IF(n))}}function fx(t){let e;if(t.sources)for(;t.sources.length;){const r=t.sources.pop(),n=t.sourceSlots.pop(),i=r.observers;if(i&&i.length){const s=i.pop(),o=r.observerSlots.pop();n<i.length&&(s.sourceSlots[o]=n,i[n]=s,r.observerSlots[n]=o)}}if(t.owned){for(e=0;e<t.owned.length;e++)fx(t.owned[e]);t.owned=null}if(t.cleanups){for(e=0;e<t.cleanups.length;e++)t.cleanups[e]();t.cleanups=null}t.state=0,t.context=null}function TF(t){return t instanceof Error||typeof t=="string"?t:new Error("Unknown error")}function kF(t){throw t=TF(t),t}function PF(t,e){return t?t.context&&t.context[e]!==void 0?t.context[e]:PF(t.owner,e):void 0}function PC(t){if(typeof t=="function"&&!t.length)return PC(t());if(Array.isArray(t)){const e=[];for(let r=0;r<t.length;r++){const n=PC(t[r]);Array.isArray(n)?e.push.apply(e,n):e.push(n)}return e}return t}function Jae(t,e){return function(n){let i;return ir(()=>i=zi(()=>(Ti.context={[t]:n.value},lx(()=>n.children))),void 0),i}}const Qae=Symbol("fallback");function WT(t){for(let e=0;e<t.length;e++)t[e]()}function Xae(t,e,r={}){let n=[],i=[],s=[],o=0,a=e.length>1?[]:null;return Vs(()=>WT(s)),()=>{let c=t()||[],l,u;return c[kC],zi(()=>{let d=c.length,p,h,g,y,x,C,_,L,P;if(d===0)o!==0&&(WT(s),s=[],n=[],i=[],o=0,a&&(a=[])),r.fallback&&(n=[Qae],i[0]=vm(z=>(s[0]=z,r.fallback())),o=1);else if(o===0){for(i=new Array(d),u=0;u<d;u++)n[u]=c[u],i[u]=vm(f);o=d}else{for(g=new Array(d),y=new Array(d),a&&(x=new Array(d)),C=0,_=Math.min(o,d);C<_&&n[C]===c[C];C++);for(_=o-1,L=d-1;_>=C&&L>=C&&n[_]===c[L];_--,L--)g[L]=i[_],y[L]=s[_],a&&(x[L]=a[_]);for(p=new Map,h=new Array(L+1),u=L;u>=C;u--)P=c[u],l=p.get(P),h[u]=l===void 0?-1:l,p.set(P,u);for(l=C;l<=_;l++)P=n[l],u=p.get(P),u!==void 0&&u!==-1?(g[u]=i[l],y[u]=s[l],a&&(x[u]=a[l]),u=h[u],p.set(P,u)):s[l]();for(u=C;u<d;u++)u in g?(i[u]=g[u],s[u]=y[u],a&&(a[u]=x[u],a[u](u))):i[u]=vm(f);i=i.slice(0,o=d),n=c.slice(0)}return i});function f(d){if(s[u]=d,a){const[p,h]=yt(u);return a[u]=h,e(c[u],p)}return e(c[u])}}}function F(t,e){return zi(()=>t(e||{}))}function Yb(){return!0}const RC={get(t,e,r){return e===gc?r:t.get(e)},has(t,e){return e===gc?!0:t.has(e)},set:Yb,deleteProperty:Yb,getOwnPropertyDescriptor(t,e){return{configurable:!0,enumerable:!0,get(){return t.get(e)},set:Yb,deleteProperty:Yb}},ownKeys(t){return t.keys()}};function eE(t){return(t=typeof t=="function"?t():t)?t:{}}function rl(...t){let e=!1;for(let n=0;n<t.length;n++){const i=t[n];e=e||!!i&&gc in i,t[n]=typeof i=="function"?(e=!0,Pe(i)):i}if(e)return new Proxy({get(n){for(let i=t.length-1;i>=0;i--){const s=eE(t[i])[n];if(s!==void 0)return s}},has(n){for(let i=t.length-1;i>=0;i--)if(n in eE(t[i]))return!0;return!1},keys(){const n=[];for(let i=0;i<t.length;i++)n.push(...Object.keys(eE(t[i])));return[...new Set(n)]}},RC);const r={};for(let n=t.length-1;n>=0;n--)if(t[n]){const i=Object.getOwnPropertyDescriptors(t[n]);for(const s in i)s in r||Object.defineProperty(r,s,{enumerable:!0,get(){for(let o=t.length-1;o>=0;o--){const a=(t[o]||{})[s];if(a!==void 0)return a}}})}return r}function q9(t,...e){const r=new Set(e.flat());if(gc in t){const i=e.map(s=>new Proxy({get(o){return s.includes(o)?t[o]:void 0},has(o){return s.includes(o)&&o in t},keys(){return s.filter(o=>o in t)}},RC));return i.push(new Proxy({get(s){return r.has(s)?void 0:t[s]},has(s){return r.has(s)?!1:s in t},keys(){return Object.keys(t).filter(s=>!r.has(s))}},RC)),i}const n=Object.getOwnPropertyDescriptors(t);return e.push(Object.keys(n).filter(i=>!r.has(i))),e.map(i=>{const s={};for(let o=0;o<i.length;o++){const a=i[o];a in t&&Object.defineProperty(s,a,n[a]?n[a]:{get(){return t[a]},set(){return!0},enumerable:!0})}return s})}function Qp(t){const e="fallback"in t&&{fallback:()=>t.fallback};return Pe(Xae(()=>t.each,t.children,e||void 0))}function Nt(t){let e=!1;const r=t.keyed,n=Pe(()=>t.when,void 0,{equals:(i,s)=>e?i===s:!i==!s});return Pe(()=>{const i=n();if(i){const s=t.children,o=typeof s=="function"&&s.length>0;return e=r||o,o?zi(()=>s(i)):s}return t.fallback},void 0,void 0)}function yu(t){let e=!1,r=!1;const n=(o,a)=>o[0]===a[0]&&(e?o[1]===a[1]:!o[1]==!a[1])&&o[2]===a[2],i=lx(()=>t.children),s=Pe(()=>{let o=i();Array.isArray(o)||(o=[o]);for(let a=0;a<o.length;a++){const c=o[a].when;if(c)return r=!!o[a].keyed,[a,c,o[a]]}return[-1]},void 0,{equals:n});return Pe(()=>{const[o,a,c]=s();if(o<0)return t.fallback;const l=c.children,u=typeof l=="function"&&l.length>0;return e=r||u,u?zi(()=>l(a)):l},void 0,void 0)}function br(t){return t}
855const ece=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],tce=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...ece]),rce=new Set(["innerHTML","textContent","innerText","children"]),nce=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),HT=Object.assign(Object.create(null),{class:"className",formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly"}),ice=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),sce=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),oce={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function ace(t,e,r){let n=r.length,i=e.length,s=n,o=0,a=0,c=e[i-1].nextSibling,l=null;for(;o<i||a<s;){if(e[o]===r[a]){o++,a++;continue}for(;e[i-1]===r[s-1];)i--,s--;if(i===o){const u=s<n?a?r[a-1].nextSibling:r[s-a]:c;for(;a<s;)t.insertBefore(r[a++],u)}else if(s===a)for(;o<i;)(!l||!l.has(e[o]))&&e[o].remove(),o++;else if(e[o]===r[s-1]&&r[a]===e[i-1]){const u=e[--i].nextSibling;t.insertBefore(r[a++],e[o++].nextSibling),t.insertBefore(r[--s],u),e[i]=r[s]}else{if(!l){l=new Map;let f=a;for(;f<s;)l.set(r[f],f++)}const u=l.get(e[o]);if(u!=null)if(a<u&&u<s){let f=o,d=1,p;for(;++f<i&&f<s&&!((p=l.get(e[f]))==null||p!==u+d);)d++;if(d>u-a){const h=e[o];for(;a<u;)t.insertBefore(r[a++],h)}else t.replaceChild(r[a++],e[o++])}else o++;else e[o++].remove()}}}const qT="_$DX_DELEGATE";function cce(t,e,r,n={}){let i;return vm(s=>{i=s,e===document?t():Bi(e,t(),e.firstChild?null:void 0,r)},n.owner),()=>{i(),e.textContent=""}}function or(t,e,r){if(typeof window>"u")return null;const n=document.createElement("template");n.innerHTML=t;let i=n.content.firstChild;return r&&(i=i.firstChild),i}function lce(t,e=window.document){const r=e[qT]||(e[qT]=new Set);for(let n=0,i=t.length;n<i;n++){const s=t[n];r.has(s)||(r.add(s),e.addEventListener(s,yce))}}function gt(t,e,r){r==null?t.removeAttribute(e):t.setAttribute(e,r)}function uce(t,e,r,n){n==null?t.removeAttributeNS(e,r):t.setAttributeNS(e,r,n)}function V9(t,e){e==null?t.removeAttribute("class"):t.className=e}function fce(t,e,r,n){if(n)Array.isArray(r)?(t[`$$${e}`]=r[0],t[`$$${e}Data`]=r[1]):t[`$$${e}`]=r;else if(Array.isArray(r)){const i=r[0];t.addEventListener(e,r[0]=s=>i.call(t,r[1],s))}else t.addEventListener(e,r)}function dce(t,e,r={}){const n=Object.keys(e||{}),i=Object.keys(r);let s,o;for(s=0,o=i.length;s<o;s++){const a=i[s];!a||a==="undefined"||e[a]||(VT(t,a,!1),delete r[a])}for(s=0,o=n.length;s<o;s++){const a=n[s],c=!!e[a];!a||a==="undefined"||r[a]===c||!c||(VT(t,a,!0),r[a]=c)}return r}function hce(t,e,r){if(!e)return r?gt(t,"style"):e;const n=t.style;if(typeof e=="string")return n.cssText=e;typeof r=="string"&&(n.cssText=r=void 0),r||(r={}),e||(e={});let i,s;for(s in r)e[s]==null&&n.removeProperty(s),delete r[s];for(s in e)i=e[s],i!==r[s]&&(n.setProperty(s,i),r[s]=i);return r}function RF(t,e={},r,n){const i={};return ir(()=>i.children=_2(t,e.children,i.children)),ir(()=>e.ref&&e.ref(t)),ir(()=>pce(t,e,r,!0,i,!0)),i}function Ip(t,e,r){return zi(()=>t(e,r))}function Bi(t,e,r,n){if(r!==void 0&&!n&&(n=[]),typeof e!="function")return _2(t,e,n,r);ir(i=>_2(t,e(),i,r),n)}function pce(t,e,r,n,i={},s=!1){e||(e={});for(const o in i)if(!(o in e)){if(o==="children")continue;i[o]=KT(t,o,null,i[o],r,s)}for(const o in e){if(o==="children")continue;const a=e[o];i[o]=KT(t,o,a,i[o],r,s)}}function gce(t){let e,r;return!Ln.context||!(e=Ln.registry.get(r=bce()))?t.cloneNode(!0):(Ln.completed&&Ln.completed.add(e),Ln.registry.delete(r),e)}function mce(t){return t.toLowerCase().replace(/-([a-z])/g,(e,r)=>r.toUpperCase())}function VT(t,e,r){const n=e.trim().split(/\s+/);for(let i=0,s=n.length;i<s;i++)t.classList.toggle(n[i],r)}function KT(t,e,r,n,i,s){let o,a,c;if(e==="style")return hce(t,r,n);if(e==="classList")return dce(t,r,n);if(r===n)return n;if(e==="ref")s||r(t);else if(e.slice(0,3)==="on:"){const l=e.slice(3);n&&t.removeEventListener(l,n),r&&t.addEventListener(l,r)}else if(e.slice(0,10)==="oncapture:"){const l=e.slice(10);n&&t.removeEventListener(l,n,!0),r&&t.addEventListener(l,r,!0)}else if(e.slice(0,2)==="on"){const l=e.slice(2).toLowerCase(),u=ice.has(l);if(!u&&n){const f=Array.isArray(n)?n[0]:n;t.removeEventListener(l,f)}(u||r)&&(fce(t,l,r,u),u&&lce([l]))}else if((c=rce.has(e))||!i&&(HT[e]||(a=tce.has(e)))||(o=t.nodeName.includes("-")))e==="class"||e==="className"?V9(t,r):o&&!a&&!c?t[mce(e)]=r:t[HT[e]||e]=r;else{const l=i&&e.indexOf(":")>-1&&oce[e.split(":")[0]];l?uce(t,l,e,r):gt(t,nce[e]||e,r)}return r}function yce(t){const e=`$$${t.type}`;let r=t.composedPath&&t.composedPath()[0]||t.target;for(t.target!==r&&Object.defineProperty(t,"target",{configurable:!0,value:r}),Object.defineProperty(t,"currentTarget",{configurable:!0,get(){return r||document}}),Ln.registry&&!Ln.done&&(Ln.done=!0,document.querySelectorAll("[id^=pl-]").forEach(n=>{for(;n&&n.nodeType!==8&&n.nodeValue!=="pl-"+t;){let i=n.nextSibling;n.remove(),n=i}n&&n.remove()}));r;){const n=r[e];if(n&&!r.disabled){const i=r[`${e}Data`];if(i!==void 0?n.call(r,i,t):n.call(r,t),t.cancelBubble)return}r=r._$host||r.parentNode||r.host}}function _2(t,e,r,n,i){for(Ln.context&&!r&&(r=[...t.childNodes]);typeof r=="function";)r=r();if(e===r)return r;const s=typeof e,o=n!==void 0;
855if(t=o&&r[0]&&r[0].parentNode||t,s==="string"||s==="number"){if(Ln.context)return r;if(s==="number"&&(e=e.toString()),o){let a=r[0];a&&a.nodeType===3?a.data=e:a=document.createTextNode(e),r=h0(t,r,n,a)}else r!==""&&typeof r=="string"?r=t.firstChild.data=e:r=t.textContent=e}else if(e==null||s==="boolean"){if(Ln.context)return r;r=h0(t,r,n)}else{if(s==="function")return ir(()=>{let a=e();for(;typeof a=="function";)a=a();r=_2(t,a,r,n)}),()=>r;if(Array.isArray(e)){const a=[],c=r&&Array.isArray(r);if(OC(a,e,r,i))return ir(()=>r=_2(t,a,r,n,!0)),()=>r;if(Ln.context){if(!a.length)return r;for(let l=0;l<a.length;l++)if(a[l].parentNode)return r=a}if(a.length===0){if(r=h0(t,r,n),o)return r}else c?r.length===0?GT(t,a,n):ace(t,r,a):(r&&h0(t),GT(t,a));r=a}else if(e instanceof Node){if(Ln.context&&e.parentNode)return r=o?[e]:e;if(Array.isArray(r)){if(o)return r=h0(t,r,n,e);h0(t,r,null,e)}else r==null||r===""||!t.firstChild?t.appendChild(e):t.replaceChild(e,t.firstChild);r=e}}return r}function OC(t,e,r,n){let i=!1;for(let s=0,o=e.length;s<o;s++){let a=e[s],c=r&&r[s];if(a instanceof Node)t.push(a);else if(!(a==null||a===!0||a===!1))if(Array.isArray(a))i=OC(t,a,c)||i;else if(typeof a=="function")if(n){for(;typeof a=="function";)a=a();i=OC(t,Array.isArray(a)?a:[a],Array.isArray(c)?c:[c])||i}else t.push(a),i=!0;else{const l=String(a);c&&c.nodeType===3&&c.data===l?t.push(c):t.push(document.createTextNode(l))}}return i}function GT(t,e,r=null){for(let n=0,i=e.length;n<i;n++)t.insertBefore(e[n],r)}function h0(t,e,r,n){if(r===void 0)return t.textContent="";const i=n||document.createTextNode("");if(e.length){let s=!1;for(let o=e.length-1;o>=0;o--){const a=e[o];if(i!==a){const c=a.parentNode===t;!s&&!o?c?t.replaceChild(i,a):t.insertBefore(i,r):c&&a.remove()}else s=!0}}else t.insertBefore(i,r);return[i]}function bce(){const t=Ln.context;return`${t.id}${t.count++}`}const wce="http://www.w3.org/2000/svg";function OF(t,e=!1){return e?document.createElementNS(wce,t):document.createElement(t)}function DF(t){const{useShadow:e}=t,r=document.createTextNode(""),n=t.mount||document.body;function i(){if(Ln.context){const[s,o]=yt(!1);return queueMicrotask(()=>o(!0)),()=>s()&&t.children}else return()=>t.children}if(n instanceof HTMLHeadElement){const[s,o]=yt(!1),a=()=>o(!0);vm(c=>Bi(n,()=>s()?c():i()(),null)),Vs(()=>{Ln.context?queueMicrotask(a):a()})}else{const s=OF(t.isSVG?"g":"div",t.isSVG),o=e&&s.attachShadow?s.attachShadow({mode:"open"}):s;Object.defineProperty(s,"_$host",{get(){return r.parentNode},configurable:!0}),Bi(o,i()),n.appendChild(s),t.ref&&t.ref(s),Vs(()=>n.removeChild(s))}return r}function Xp(t){const[e,r]=q9(t,["component"]),n=Pe(()=>e.component);return Pe(()=>{const i=n();switch(typeof i){case"function":return zi(()=>i(r));case"string":const s=sce.has(i),o=Ln.context?gce():OF(i,s);return RF(o,r,s),o}})}var jn=(t=>(t.DARK="DARK",t.LIGHT="LIGHT",t))(jn||{});let vce={data:""},xce=t=>typeof window=="object"?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||vce,Ece=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Cce=/\/\*[^]*?\*\/| +/g,YT=/\n+/g,Md=(t,e)=>{let r="",n="",i="";for(let s in t){let o=t[s];s[0]=="@"?s[1]=="i"?r=s+" "+o+";":n+=s[1]=="f"?Md(o,s):s+"{"+Md(o,s[1]=="k"?"":e)+"}":typeof o=="object"?n+=Md(o,e?e.replace(/([^,])+/g,a=>s.replace(/(^:.*)|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,a):a?a+" "+c:c)):s):o!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=Md.p?Md.p(s,o):s+":"+o+";")}return r+(e&&i?e+"{"+i+"}":i)+n},Pl={},LF=t=>{if(typeof t=="object"){let e="";for(let r in t)e+=r+LF(t[r]);return e}return t},_ce=(t,e,r,n,i)=>{let s=LF(t),o=Pl[s]||(Pl[s]=(c=>{let l=0,u=11;for(;l<c.length;)u=101*u+c.charCodeAt(l++)>>>0;return"go"+u})(s));if(!Pl[o]){let c=s!==t?t:(l=>{let u,f,d=[{}];for(;u=Ece.exec(l.replace(Cce,""));)u[4]?d.shift():u[3]?(f=u[3].replace(YT," ").trim(),d.unshift(d[0][f]=d[0][f]||{})):d[0][u[1]]=u[2].replace(YT," ").trim();return d[0]})(t);Pl[o]=Md(i?{["@keyframes "+o]:c}:c,r?"":"."+o)}let a=r&&Pl.g?Pl.g:null;return r&&(Pl.g=Pl[o]),((c,l,u,f)=>{f?l.data=l.data.replace(f,c):l.data.indexOf(c)===-1&&(l.data=u?c+l.data:l.data+c)})(Pl[o],e,n,a),o},Ace=(t,e,r)=>t.reduce((n,i,s)=>{let o=e[s];if(o&&o.call){let a=o(r),c=a&&a.props&&a.props.className||/^go/.test(a)&&a;o=c?"."+c:a&&typeof a=="object"?a.props?"":Md(a,""):a===!1?"":a}return n+i+(o??"")},"");function bu(t){let e=this||{},r=t.call?t(e.p):t;
855return _ce(r.unshift?r.raw?Ace(r,[].slice.call(arguments,1),e.p):r.reduce((n,i)=>Object.assign(n,i&&i.call?i(e.p):i),{}):r,xce(e.target),e.g,e.o,e.k)}bu.bind({g:1});let Sce=bu.bind({k:1});const K9=cx();function Nce(t){return F(K9.Provider,{value:t.theme,get children(){return t.children}})}function wn(){return Rs(K9)}function MF(t){let e=this||{};return(...r)=>{const n=i=>{const s=Rs(K9),o=rl(i,{theme:s}),a=rl(o,{get class(){const p=o.class,h="class"in o&&/^go[0-9]+/.test(p);let g=bu.apply({target:e.target,o:h,p:o,g:e.g},r);return[p,g].filter(Boolean).join(" ")}}),[c,l]=q9(a,["as","theme"]),u=l,f=c.as||t;let d;return typeof f=="function"?d=f(u):e.g==1?(d=document.createElement(f),RF(d,u)):d=Xp(rl({component:f},u)),d};return n.class=i=>zi(()=>bu.apply({target:e.target,p:i,g:e.g},r)),n}}const ue=new Proxy(MF,{get(t,e){return t(e)}});function Ice(){const t=MF.call({g:1},"div").apply(null,arguments);return function(r){return t(r),null}}const Yl="tc-root",G9="tc-disable-scroll",tE="tc-using-mouse",Tce=()=>{document.body.addEventListener("mousedown",()=>document.body.classList.add(tE)),document.body.addEventListener("keydown",e=>{e.key==="Tab"&&document.body.classList.remove(tE)});const t=Ice` 856 ${Yl} * { 857 margin: 0; 858 padding: 0; 859 box-sizing: border-box; 860 861 font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, Tahoma, Verdana, sans-serif; 862 -webkit-font-smoothing: antialiased; 863 -moz-osx-font-smoothing: grayscale; 864 -webkit-tap-highlight-color: transparent; 865 } 866 867 ${Yl} img { 868 -webkit-user-select: none; 869 -webkit-touch-callout: none; 870 } 871 872 ${Yl} *:focus { 873 outline: #08f auto 2px; 874 } 875 876 ${Yl} li { 877 list-style: none; 878 } 879 880 ${Yl} button { 881 outline: none; 882 } 883 884 body.${G9} { 885 position: fixed; 886 overflow-y: scroll; 887 right: 0; 888 left: 0; 889 } 890 891 body.${tE} ${Yl} *:focus { 892 outline: none; 893 } 894`;return F(t,{})};function kce(t){t[0]==="#"&&(t=t.slice(1));const e=parseInt(t,16),r=e>>16&255,n=e>>8&255,i=e&255;return[r,n,i].join(",")}function Jh(t,e){return t[0]==="#"&&(t=kce(t)),`rgba(${t}, ${e})`}function nl(t){return t.toString()+"px"}const W1=class{constructor(){_t(this,"storage",{})}static getInstance(){return W1.instance||(W1.instance=new W1),W1.instance}get length(){return Object.keys(this.storage).length}clear(){this.storage={}}getItem(t){var e;return(e=this.storage[t])!=null?e:null}key(t){var e;const r=Object.keys(this.storage);return t<0||t>=r.length?null:(e=r[t])!=null?e:null}removeItem(t){delete this.storage[t]}setItem(t,e){this.storage[t]=e}};let $F=W1;_t($F,"instance");class In extends ht{constructor(...e){super(...e),Object.setPrototypeOf(this,In.prototype)}}function fv(...t){try{console.debug("[TON_CONNECT_UI]",...t)}catch{}}function Pce(...t){try{console.error("[TON_CONNECT_UI]",...t)}catch{}}function Rce(...t){try{console.warn("[TON_CONNECT_UI]",...t)}catch{}}function xm(t,e="_self"){fv("openLink",t,e),window.open(t,e,"noopener noreferrer")}function yn(t){xm(t,"_blank")}function Sf(t,e){const r=()=>{tr("safari")||Xa("android")&&tr("firefox")||e()},n=setTimeout(()=>r(),200);window.addEventListener("blur",()=>clearTimeout(n),{once:!0}),xm(t,"_self")}function Oce(){return window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches?jn.LIGHT:jn.DARK}function Dce(t){const e=r=>t(r.matches?jn.DARK:jn.LIGHT);return window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",e),()=>window.matchMedia("(prefers-color-scheme: dark)").removeEventListener("change",e)}function Lce(){document.documentElement.scrollHeight!==document.documentElement.clientHeight&&(document.body.style.top=nl(-document.documentElement.scrollTop),document.body.classList.add(G9))}function Mce(){document.body.classList.remove(G9),document.documentElement.scrollTo({top:-parseFloat(getComputedStyle(document.body).top)}),document.body.style.top="auto"}function $ce(){document.body.hasAttribute("ontouchstart")||document.body.setAttribute("ontouchstart","")}function Uce(){customElements.define(Yl,class extends HTMLElement{})}function UF(t){return hr(this,null,function*(){yield new Promise(e=>requestAnimationFrame(e)),t()})}function Bce(t){return hr(this,null,function*(){return yield new Promise(e=>requestAnimationFrame(e)),t()})}function BF(t){document.readyState!=="complete"?window.addEventListener("load",()=>UF(()=>BF(t)),{once:!0}
894):t.forEach(e=>{const r=new window.Image;r.src=e})}function _l(){if(typeof window<"u")return window}function Y9(){if(Fce())return localStorage;if(jce())throw new In("`localStorage` is unavailable, but it is required for TonConnect. For more details, see https://github.com/ton-connect/sdk/tree/main/packages/sdk#init-connector");return $F.getInstance()}function Fce(){try{return typeof localStorage<"u"}catch{return!1}}function jce(){return typeof process<"u"&&process.versions!=null&&process.versions.node!=null}function Z9(){var t,e,r;const n=new vae().getResult(),i=(t=n.os.name)==null?void 0:t.toLowerCase(),s=(e=n.device.model)==null?void 0:e.toLowerCase();let o;switch(!0){case s==="ipad":o="ipad";break;case i==="ios":o="ios";break;case i==="android":o="android";break;case i==="mac os":o="macos";break;case i==="linux":o="linux";break;case(i==null?void 0:i.includes("windows")):o="windows";break}const a=(r=n.browser.name)==null?void 0:r.toLowerCase();let c;switch(!0){case a==="chrome":c="chrome";break;case a==="firefox":c="firefox";break;case(a==null?void 0:a.includes("safari")):c="safari";break;case(a==null?void 0:a.includes("opera")):c="opera";break}return{os:o,browser:c}}function Xa(...t){return t.includes(Z9().os)}function tr(...t){return t.includes(Z9().browser)}function Zb(t,e){const r=new URL(t);return e+r.search}class zce{constructor(){_t(this,"localStorage"),_t(this,"storageKey","ton-connect-ui_wallet-info"),this.localStorage=Y9()}setWalletInfo(e){this.localStorage.setItem(this.storageKey,JSON.stringify(e))}getWalletInfo(){const e=this.localStorage.getItem(this.storageKey);return e?JSON.parse(e):null}removeWalletInfo(){this.localStorage.removeItem(this.storageKey)}}class Wce{constructor(){_t(this,"localStorage"),_t(this,"storageKey","ton-connect-ui_preferred-wallet"),this.localStorage=Y9()}setPreferredWalletAppName(e){this.localStorage.setItem(this.storageKey,e)}getPreferredWalletAppName(){return this.localStorage.getItem(this.storageKey)||void 0}}class FF{constructor(){_t(this,"localStorage"),_t(this,"storageKey","ton-connect-ui_last-selected-wallet-info"),this.localStorage=Y9()}setLastSelectedWalletInfo(e){this.localStorage.setItem(this.storageKey,JSON.stringify(e))}getLastSelectedWalletInfo(){const e=this.localStorage.getItem(this.storageKey);return e?JSON.parse(e):null}removeLastSelectedWalletInfo(){this.localStorage.removeItem(this.storageKey)}}const[A2,rE]=yt({status:"closed",closeReason:null}),ZT=Pe(()=>A2().status==="opened"),[A3,JT]=yt({status:"closed",closeReason:null}),QT=Pe(()=>A3().status==="opened"),Hce=Pe(()=>{const t=A3();return t.status==="opened"?t.walletInfo:null});let gp=typeof window<"u"?new FF:void 0;const[qce,Vce]=yt((gp==null?void 0:gp.getLastSelectedWalletInfo())||null),ts=t=>{gp||(gp=new FF),t?gp.setLastSelectedWalletInfo(t):gp.removeLastSelectedWalletInfo(),Vce(t)},[fa,ql]=yt(null),Kce={close:"Close",openWallet:"Open wallet",copyLink:"Copy Link",linkCopied:"Link Copied",copied:"Copied",yourWallet:"Your Wallet",retry:"Retry",get:"GET",mobile:"Mobile",browserExtension:"Browser Extension",desktop:"Desktop"},Gce={connectWallet:"Connect Wallet",dropdown:{copy:"Copy address",copied:"Address copied!",disconnect:"Disconnect"}},Yce={confirm:{header:"Open {{ name }} to confirm the transaction."},transactionSent:{header:"Transaction sent",text:"Your transaction will be processed in a few seconds."},transactionCanceled:{header:"Transaction canceled",text:"There will be no changes to your account."},dataSigned:{header:"Data signed"},signDataCanceled:{header:"Sign data canceled"}},Zce={walletOn:"Wallet in",recent:"Recent",installed:"Installed",popular:"Popular"},Jce={loading:"Loading wallets",wallets:"Wallets",mobileUniversalModal:{connectYourWallet:"Connect your TON wallet",openWalletOnTelegramOrSelect:"Use Wallet in Telegram or choose other application",openWalletOnTelegram:"Connect Wallet in Telegram",chooseOtherApplication:"Choose other application",openLink:"Open Link",scan:"Scan with your mobile wallet"},desktopUniversalModal:{connectYourWallet:"Connect your TON wallet",scan:"Scan with your mobile wallet",availableWallets:"Available wallets"},mobileConnectionModal:{showQR:"Show QR Code",scanQR:"Scan the QR code below with your phoneâs or {{ name }}âs camera",missingFeatures:"Please update {{ name }}, your version does not support required features for this dApp",notSupportedWallet:"{{ name }} doesnât support the requested action. Please connect another wallet that supports it",continueIn:"Continue in {{ name }}â¦",updateWallet:"Update {{ name }}",chooseAnotherWallet:"Choose Another Wallet",connectionDeclined:"Connection declined"},desktopConnectionModal:{scanQR:"Scan the QR code below with your phoneâs or {{ name }}âs camera",continueInExtension:"Continue in {{ name }} browser extensionâ¦",dontHaveExtension:"Seems you don't have installed {{ name }} browser extension",missingFeatures:"Please update {{ name }}, your version does not support required features for this dApp",notSupportedWallet:"{{ name }} doesnât support the requested action. Please connect another wallet that supports it",getWallet:"Get {{ name }}",updateWallet:"Update {{ name }}",chooseAnotherWallet:"Choose Another Wallet",continueOnDesktop:"Continue in {{ name }} on desktopâ¦",openWalletOnTelegram:"Connect Wallet in Telegram on desktop",connectionDeclined:"Connection declined"},infoModal:{whatIsAWallet:"What is a wallet",secureDigitalAssets:"Secure digital assets storage",walletProtects:"A wallet protects and manages your digital assets including TON, tokens and collectables.",controlIdentity:"Control your Web3 identity",manageIdentity:"Manage your digital identity and access decentralized applications with ease. Maintain control over your data and engage securely in the blockchain ecosystem.",effortlessCryptoTransactions:"Effortless crypto transactions",easilySend:"Easily send, receive, monitor your cryptocurrencies. Streamline your operations with decentralized applications.",getAWallet:"Get a Wallet"},restoreModal:{title:"Restore",step1:{title:"Find your current recovery phrase",text:"Open your wallet settings and locate the recovery phrase"},step2:{title:"Copy your recovery phrase",text:"Write it down or copy it to a safe place"},step3:{title:"Restore in a supported wallet",text:"Enter the recovery phrase to access your wallet"}},allWallets:{walletsBelowNotSupported:"The wallets below donât support all features of the connected service. You can use your recovery phrase in one of the supported wallets above.",walletNotSupportService:"{{ name }} doesnât support connected service"}
894,featureNotSupported:{wallet:{title:"{{ name }} doesnât support the requested action",description:"Install a supported wallet from the list below, restore it with your recovery phrase, then connect it and try again.",info:"Learn how to restore your wallet"},version:{description:"Your current version of {{ name }} or wallet contract type doesn't support the required features. Please update it to continue.",updateButton:"Update {{ name }}",aboutW5:"About W5"},disconnect:{title:"Confirm Disconnect",description:"You will be disconnected from your current wallet and redirected to connect {{ name }}.",button:"Disconnect"}}},Qce={confirmTransaction:{header:"Confirm the transaction in {{ name }}",text:"It will only take a moment."},signData:{header:"Sign the data in {{ name }}",text:"It will only take a moment."},transactionSent:"$notifications.transactionSent",transactionCanceled:"$notifications.transactionCanceled",dataSigned:"$notifications.dataSigned",signDataCanceled:"$notifications.signDataCanceled"},Xce={common:Kce,button:Gce,notifications:Yce,walletItem:Zce,walletModal:Jce,actionModal:Qce},ele={close:"ÐакÑÑÑÑ",openWallet:"ÐÑкÑÑÑÑ ÐºÐ¾ÑелÑк",copyLink:"СкопиÑоваÑÑ",linkCopied:"СÑÑлка ÑкопиÑована",copied:"СкопиÑовано",yourWallet:"ÐÐ°Ñ ÐºÐ¾ÑелÑк",retry:"ÐовÑоÑиÑÑ",get:"СкаÑаÑÑ",mobile:"ÐобилÑнÑй",browserExtension:"РаÑÑиÑение",desktop:"ÐеÑкÑоп"},tle={connectWallet:"ÐодклÑÑиÑÑ ÐºÐ¾ÑелÑк",dropdown:{copy:"СкопиÑоваÑÑ Ð°Ð´ÑеÑ",copied:"ÐдÑÐµÑ ÑкопиÑован!",disconnect:"ÐÑклÑÑиÑÑ ÐºÐ¾ÑелÑк"}},rle={confirm:{header:"ÐÑкÑойÑе {{ name }}, ÑÑобÑ подÑвеÑдиÑÑ ÑÑанзакÑиÑ."},transactionSent:{header:"ТÑанзакÑÐ¸Ñ Ð¾ÑпÑавлена",text:"ÐаÑа ÑÑанзакÑиÑ бÑÐ´ÐµÑ Ð¾Ð±ÑабоÑана ÑеÑез неÑколÑко ÑекÑнд."},transactionCanceled:{header:"ТÑанзакÑÐ¸Ñ Ð¾Ñменена",text:"СоÑÑоÑние ваÑего ÑÑÑÑа не измениÑÑÑ."},dataSigned:{header:"ÐаннÑе подпиÑанÑ"},signDataCanceled:{header:"ÐодпиÑÑ Ð´Ð°Ð½Ð½ÑÑ
оÑменена"}},nle={walletOn:"Wallet в",recent:"Ðедавний",installed:"УÑÑановлен",popular:"ÐопÑлÑÑен"},ile={loading:"ÐоÑелÑки загÑÑжаÑÑÑÑ",wallets:"ÐоÑелÑки",mobileUniversalModal:{connectYourWallet:"ÐодклÑÑиÑе TON коÑелÑк",openWalletOnTelegramOrSelect:"ÐодклÑÑиÑе Wallet в Telegram или вÑбеÑеÑе дÑÑгое пÑиложение",openWalletOnTelegram:"ÐÑкÑÑÑÑ Wallet в Telegram",chooseOtherApplication:"ÐÑбеÑиÑе дÑÑгое пÑиложение",openLink:"ÐÑкÑÑÑÑ",scan:"ÐÑÑканиÑÑйÑе камеÑой ваÑего ÑелеÑона"},desktopUniversalModal:{connectYourWallet:"ÐодклÑÑиÑе TON коÑелÑк",scan:"ÐÑÑканиÑÑйÑе QR-код камеÑой ваÑего ÑелеÑона",availableWallets:"ÐоÑÑÑпнÑе коÑелÑки"},mobileConnectionModal:{showQR:"ÐоказаÑÑ QR-код",scanQR:"ÐÑÑканиÑÑйÑе QR-код ниже камеÑой в пÑиложении {{ name }}, или камеÑой ÑелеÑона",missingFeatures:"ÐбновиÑе {{ name }}, ваÑа веÑÑÐ¸Ñ Ð½Ðµ поддеÑÐ¶Ð¸Ð²Ð°ÐµÑ Ð½ÐµÐ¾Ð±Ñ
одимÑе ÑÑнкÑии Ð´Ð»Ñ ÑÑого dApp",notSupportedWallet:"{{ name }} не поддеÑÐ¶Ð¸Ð²Ð°ÐµÑ Ð·Ð°Ð¿ÑоÑенное дейÑÑвие. ÐожалÑйÑÑа, подклÑÑиÑе дÑÑгой коÑелÑк, коÑоÑÑй поддеÑÐ¶Ð¸Ð²Ð°ÐµÑ ÑÑо",continueIn:"ÐÑодолжиÑе в {{ name }}â¦",updateWallet:"ÐбновиÑÑ {{ name }}",chooseAnotherWallet:"ÐÑбÑаÑÑ Ð´ÑÑгой коÑелÑк",connectionDeclined:"ÐодклÑÑение оÑклонено"},desktopConnectionModal:{scanQR:"ÐÑÑканиÑÑйÑе QR-код ниже камеÑой в пÑиложении {{ name }}, или камеÑой ÑелеÑона",continueInExtension:"ÐÑкÑойÑе бÑаÑзеÑное ÑаÑÑиÑение {{ name }}",dontHaveExtension:"ÐоÑ
оже, Ñ Ð²Ð°Ñ Ð½ÐµÂ ÑÑÑановлено бÑаÑзеÑное ÑаÑÑиÑение {{ name }}",missingFeatures:"ÐбновиÑе {{ name }}, ваÑа веÑÑÐ¸Ñ Ð½Ðµ поддеÑÐ¶Ð¸Ð²Ð°ÐµÑ Ð½ÐµÐ¾Ð±Ñ
одимÑе ÑÑнкÑии Ð´Ð»Ñ ÑÑого dApp",notSupportedWallet:"{{ name }} не поддеÑÐ¶Ð¸Ð²Ð°ÐµÑ Ð·Ð°Ð¿ÑоÑенное дейÑÑвие. ÐожалÑйÑÑа, подклÑÑиÑе дÑÑгой коÑелÑк, коÑоÑÑй поддеÑÐ¶Ð¸Ð²Ð°ÐµÑ ÑÑо",getWallet:"СкаÑаÑÑ {{ name }}",updateWallet:"ÐбновиÑÑ {{ name }}",chooseAnotherWallet:"ÐÑбÑаÑÑ Ð´ÑÑгой коÑелÑк",continueOnDesktop:"ÐÑкÑойÑе {{ name }} на компÑÑÑеÑеâ¦",openWalletOnTelegram:"ÐÑкÑÑÑÑ Wallet в Telegram",connectionDeclined:"ÐодклÑÑение оÑклонено"},infoModal:{whatIsAWallet:"ЧÑо Ñакое коÑелÑк?",secureDigitalAssets:"Ðадежное Ñ
ÑанилиÑе ÑиÑÑовÑÑ
акÑивов",walletProtects:"ÐоÑелÑк заÑиÑÐ°ÐµÑ Ð²Ð°Ñи ÑиÑÑовÑе акÑивÑ, вклÑÑÐ°Ñ TON, ÑÐ¾ÐºÐµÐ½Ñ Ð¸Â Ð¿ÑедмеÑÑ ÐºÐ¾Ð»Ð»ÐµÐºÑиониÑованиÑ, и ÑпÑавлÑÐµÑ Ð¸Ð¼Ð¸.",controlIdentity:"ÐонÑÑÐ¾Ð»Ñ Ñвоей лиÑноÑÑи Web3",manageIdentity:"УпÑавлÑйÑе Ñвоей ÑиÑÑовой иденÑиÑикаÑией и Ñ легкоÑÑÑÑ Ð¿Ð¾Ð»ÑÑайÑе доÑÑÑп к деÑенÑÑализованнÑм пÑиложениÑм. СоÑ
ÑанÑйÑе конÑÑÐ¾Ð»Ñ Ð½Ð°Ð´Â Ñвоими даннÑми и безопаÑно ÑÑаÑÑвÑйÑе в ÑкоÑиÑÑеме блокÑейна.",effortlessCryptoTransactions:"ÐÑоÑÑÑе кÑипÑоÑÑанзакÑии",easilySend:"Ðегко оÑпÑавлÑйÑе, полÑÑайÑе и оÑÑлеживайÑе Ñвои кÑипÑовалÑÑÑ. ÐпÑимизиÑÑйÑе Ñвои опеÑаÑии Ñ помоÑÑÑ Ð´ÐµÑенÑÑализованнÑÑ
пÑиложений.",getAWallet:"СкаÑаÑÑ ÐºÐ¾ÑелÑк"},restoreModal:{title:"ÐоÑÑÑановление",step1:{title:"ÐайдиÑе ваÑÑ ÑекÑÑÑÑ ÑÑÐ°Ð·Ñ Ð²Ð¾ÑÑÑановлениÑ",text:"ÐÑкÑойÑе наÑÑÑойки коÑелÑка и найдиÑе ÑÑазÑ воÑÑÑановлениÑ"},step2:{title:"СкопиÑÑйÑе ваÑÑ ÑÑÐ°Ð·Ñ Ð²Ð¾ÑÑÑановлениÑ",text:"ÐапиÑиÑе ÐµÑ Ð¸Ð»Ð¸ ÑоÑ
ÑаниÑе в безопаÑном меÑÑе"},step3:{title:"ÐоÑÑÑановиÑе в поддеÑживаемом коÑелÑке",text:"ÐведиÑе ÑÑÐ°Ð·Ñ Ð²Ð¾ÑÑÑÐ°Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð´Ð»Ñ Ð´Ð¾ÑÑÑпа к ваÑемÑ коÑелÑкÑ"}},allWallets:{walletsBelowNotSupported:"ÐоÑелÑки ниже не поддеÑживаÑÑ Ð²Ñе ÑÑнкÑии подклÑÑÑнного ÑеÑвиÑа. ÐÑ Ð¼Ð¾Ð¶ÐµÑе иÑполÑзоваÑÑ ÑÐ²Ð¾Ñ ÑÑÐ°Ð·Ñ Ð²Ð¾ÑÑÑÐ°Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð² одном из поддеÑживаемÑÑ
вÑÑе коÑелÑков.",walletNotSupportService:"{{ name }} не поддеÑÐ¶Ð¸Ð²Ð°ÐµÑ Ð¿Ð¾Ð´ÐºÐ»ÑÑÑннÑй ÑеÑвиÑ"}
894,featureNotSupported:{wallet:{title:"{{ name }} не поддеÑÐ¶Ð¸Ð²Ð°ÐµÑ Ð·Ð°Ð¿ÑоÑенное дейÑÑвие",description:"УÑÑановиÑе поддеÑживаемÑй коÑелÑк из ÑпиÑка ниже, воÑÑÑановиÑе его Ñ Ð¿Ð¾Ð¼Ð¾ÑÑÑ ÑÑÐ°Ð·Ñ Ð²Ð¾ÑÑÑановлениÑ, заÑем подклÑÑиÑеÑÑ Ð¸ попÑобÑйÑе Ñнова.",info:"УзнаÑÑ, как воÑÑÑановиÑÑ ÐºÐ¾ÑелÑк"},version:{description:"ТекÑÑÐ°Ñ Ð²ÐµÑÑÐ¸Ñ {{ name }} или Ñип конÑÑакÑа коÑелÑка не поддеÑÐ¶Ð¸Ð²Ð°ÐµÑ Ð½ÐµÐ¾Ð±Ñ
одимÑе ÑÑнкÑии. ÐбновиÑе коÑелÑк, ÑÑÐ¾Ð±Ñ Ð¿ÑодолжиÑÑ.",updateButton:"ÐбновиÑÑ {{ name }}",aboutW5:"ÐÑо W5"},disconnect:{title:"ÐодÑвеÑдиÑе оÑклÑÑение",description:"ÐÑ Ð±ÑдеÑе оÑклÑÑÐµÐ½Ñ Ð¾Ñ ÑекÑÑего коÑелÑка и пеÑенапÑÐ°Ð²Ð»ÐµÐ½Ñ Ð½Ð° подклÑÑение {{ name }}.",button:"ÐÑклÑÑиÑÑÑÑ"}}},sle={confirmTransaction:{header:"ÐодÑвеÑдиÑе дейÑÑвие в {{ name }}",text:"ÐÑо Ð·Ð°Ð¹Ð¼ÐµÑ Ð¿Ð°ÑÑ ÑекÑнд."},signData:{header:"ÐодпиÑиÑе даннÑе в {{ name }}",text:"ÐÑо Ð·Ð°Ð¹Ð¼ÐµÑ Ð¿Ð°ÑÑ ÑекÑнд."},transactionSent:"$notifications.transactionSent",transactionCanceled:"$notifications.transactionCanceled",dataSigned:"$notifications.dataSigned",signDataCanceled:"$notifications.signDataCanceled"},ole={common:ele,button:tle,notifications:rle,walletItem:nle,walletModal:ile,actionModal:sle},ale={en:XT(Xce),ru:XT(ole)};function XT(t){const e="$",r=n=>{Object.entries(n).forEach(([i,s])=>{if(typeof s=="object"&&s)return r(s);if(typeof s=="string"){if(s[0]===e){const o=s.slice(1).split(".");let a=t;o.forEach(c=>{if(c in a)a=a[c];else throw new Error(`Cannot parse translations: there is no property ${c} in translation`)}),n[i]=a}s.slice(0,2)===`\\${e}`&&(n[i]=s.slice(1))}})};return r(t),t}const Og=cx(),DC=Symbol("store-raw"),S2=Symbol("store-node"),cle=Symbol("store-name");function jF(t,e){let r=t[gc];if(!r&&(Object.defineProperty(t,gc,{value:r=new Proxy(t,fle)}),!Array.isArray(t))){const n=Object.keys(t),i=Object.getOwnPropertyDescriptors(t);for(let s=0,o=n.length;s<o;s++){const a=n[s];i[a].get&&Object.defineProperty(t,a,{enumerable:i[a].enumerable,get:i[a].get.bind(r)})}}return r}function S3(t){let e;return t!=null&&typeof t=="object"&&(t[gc]||!(e=Object.getPrototypeOf(t))||e===Object.prototype||Array.isArray(t))}function eg(t,e=new Set){let r,n,i,s;if(r=t!=null&&t[DC])return r;if(!S3(t)||e.has(t))return t;if(Array.isArray(t)){Object.isFrozen(t)?t=t.slice(0):e.add(t);for(let o=0,a=t.length;o<a;o++)i=t[o],(n=eg(i,e))!==i&&(t[o]=n)}else{Object.isFrozen(t)?t=Object.assign({},t):e.add(t);const o=Object.keys(t),a=Object.getOwnPropertyDescriptors(t);for(let c=0,l=o.length;c<l;c++)s=o[c],!a[s].get&&(i=t[s],(n=eg(i,e))!==i&&(t[s]=n))}return t}function J9(t){let e=t[S2];return e||Object.defineProperty(t,S2,{value:e={}}),e}function LC(t,e,r){return t[e]||(t[e]=WF(r))}function lle(t,e){const r=Reflect.getOwnPropertyDescriptor(t,e);return!r||r.get||!r.configurable||e===gc||e===S2||e===cle||(delete r.value,delete r.writable,r.get=()=>t[gc][e]),r}function zF(t){if(_F()){const e=J9(t);(e._||(e._=WF()))()}}function ule(t){return zF(t),Reflect.ownKeys(t)}function WF(t){const[e,r]=yt(t,{equals:!1,internal:!0});return e.$=r,e}const fle={get(t,e,r){if(e===DC)return t;if(e===gc)return r;if(e===kC)return zF(t),r;const n=J9(t),i=n.hasOwnProperty(e);let s=i?n[e]():t[e];if(e===S2||e==="__proto__")return s;if(!i){const o=Object.getOwnPropertyDescriptor(t,e);_F()&&(typeof s!="function"||t.hasOwnProperty(e))&&!(o&&o.get)&&(s=LC(n,e,s)())}return S3(s)?jF(s):s},has(t,e){return e===DC||e===gc||e===kC||e===S2||e==="__proto__"?!0:(this.get(t,e,t),e in t)},set(){return!0},deleteProperty(){return!0},ownKeys:ule,getOwnPropertyDescriptor:lle};function N3(t,e,r,n=!1){if(!n&&t[e]===r)return;const i=t[e],s=t.length;r===void 0?delete t[e]:t[e]=r;let o=J9(t),a;(a=LC(o,e,i))&&a.$(()=>r),Array.isArray(t)&&t.length!==s&&(a=LC(o,"length",s))&&a.$(t.length),(a=o._)&&a.$()}function HF(t,e){const r=Object.keys(e);for(let n=0;n<r.length;n+=1){const i=r[n];N3(t,i,e[i])}}function dle(t,e){if(typeof e=="function"&&(e=e(t)),e=eg(e),Array.isArray(e)){if(t===e)return;let r=0,n=e.length;for(;r<n;r++){const i=e[r];t[r]!==i&&N3(t,r,i)}N3(t,"length",n)}else HF(t,e)}function H1(t,e,r=[]){let n,i=t;if(e.length>1){n=e.shift();const o=typeof n,a=Array.isArray(t);if(Array.isArray(n)){for(let c=0;c<n.length;c++)H1(t,[n[c]].concat(e),r);return}else if(a&&o==="function"){for(let c=0;c<t.length;c++)n(t[c],c)&&H1(t,[c].concat(e),r);return}else if(a&&o==="object"){const{from:c=0,to:l=t.length-1,by:u=1}=n;for(let f=c;f<=l;f+=u)H1(t,[f].concat(e),r);return}else if(e.length>1){H1(t[n],e,[n].concat(r));return}i=t[n],r=[n].concat(r)}let s=e[0];typeof s=="function"&&(s=s(i,r),s===i)||n===void 0&&s==null||(s=eg(s),n===void 0||S3(i)&&S3(s)&&!Array.isArray(s)?HF(i,s):N3(t,n,s))}function Q9(...[t,e]){const r=eg(t||{}),n=Array.isArray(r),i=jF(r);function s(...o){EF(()=>{n&&o.length===1?dle(r,o[0]):H1(r,o)})}return[i,s]}const qF={constant:{black:"#000000",white:"#FFFFFF"},connectButton:{background:"#0098EA",foreground:"#FFFFFF"},accent:"#0098EA",telegramButton:"#0098EA",icon:{primary:"#0F0F0F",secondary:"#7A8999",tertiary:"#C1CAD2",success:"#29CC6A",error:"#F5A73B"},background:{primary:"#FFFFFF",secondary:"#F1F3F5",segment:"#FFFFFF",tint:"#F1F3F5",qr:"#F1F3F5"},text:{primary:"#0F0F0F",secondary:"#6A7785"}},hle={constant:{black:"#000000",white:"#FFFFFF"},connectButton:{background:"#0098EA",foreground:"#FFFFFF"},accent:"#E5E5EA",telegramButton:"#31A6F5",icon:{primary:"#E5E5EA",secondary:"#909099",tertiary:"#434347",success:"#29CC6A",error:"#F5A73B"},background:{primary:"#121214",secondary:"#18181A",segment:"#262629",tint:"#222224",qr
894:"#FFFFFF"},text:{primary:"#E5E5EA",secondary:"#7D7D85"}};/*! 895 * is-plain-object <https://github.com/jonschlinkert/is-plain-object> 896 * 897 * Copyright (c) 2014-2017, Jon Schlinkert. 898 * Released under the MIT License. 899 */function ek(t){return Object.prototype.toString.call(t)==="[object Object]"}function ple(t){var e,r;return ek(t)===!1?!1:(e=t.constructor,e===void 0?!0:(r=e.prototype,!(ek(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}function jf(t,e){return t?Lae(e,t,{arrayMerge:(n,i,s)=>i,isMergeableObject:ple}):e}const[gle,X9]=Q9({theme:jn.LIGHT,colors:qF,borderRadius:"m"}),VF={[jn.LIGHT]:qF,[jn.DARK]:hle},qc={[jn.LIGHT]:void 0,[jn.DARK]:void 0};function nE(t,e){e&&(qc[jn.DARK]=jf(e[jn.DARK],qc[jn.DARK]),qc[jn.LIGHT]=jf(e[jn.LIGHT],qc[jn.LIGHT])),X9({theme:t,colors:jf(qc[t],VF[t])})}function mle(t){X9({borderRadius:t})}function yle(t){qc[jn.DARK]=jf(t[jn.DARK],qc[jn.DARK]),qc[jn.LIGHT]=jf(t[jn.LIGHT],qc[jn.LIGHT]),X9(e=>({colors:jf(qc[e.theme],VF[e.theme])}))}const ble=ue.div` 900 background-color: ${t=>t.theme.colors.background.secondary}; 901`,Qh=t=>{let e;const[r,n]=yt(null);return di(()=>{const i=new window.Image;return i.src=t.src,i.alt=t.alt||"",i.setAttribute("draggable","false"),t.class&&i.classList.add(t.class),i.complete?n(i):(i.addEventListener("load",()=>n(i)),()=>i.removeEventListener("load",()=>n(i)))}),[F(Nt,{get when(){return r()},get children(){return r()}}),F(Nt,{get when(){return!r()},get children(){return F(ble,{get class(){return t.class},ref(i){const s=e;typeof s=="function"?s(i):e=i}})}})]};let fh={};try{let t=location.hash.toString();fh=wle(t)}catch{}let tg="unknown";fh!=null&&fh.tgWebAppPlatform&&(tg=(LT=fh.tgWebAppPlatform)!=null?LT:"unknown");if(tg==="unknown"){const t=_l();tg=(UT=($T=(MT=t==null?void 0:t.Telegram)==null?void 0:MT.WebApp)==null?void 0:$T.platform)!=null?UT:"unknown"}let I3="6.0";fh!=null&&fh.tgWebAppVersion&&(I3=fh.tgWebAppVersion);if(!I3){const t=_l();I3=(jT=(FT=(BT=t==null?void 0:t.Telegram)==null?void 0:BT.WebApp)==null?void 0:FT.version)!=null?jT:"6.0"}function Gd(...t){return t.includes(tg)}function cc(){var t;return tg!=="unknown"||!!((t=_l())!=null&&t.TelegramWebviewProxy)}function KF(){var t;const e=!!((t=_l())!=null&&t.TelegramWebview);return(cc()||e)&&tg==="unknown"}function T3(){YF("web_app_expand",{})}function MC(t,e){const r=new URL(t);if(r.protocol!=="http:"&&r.protocol!=="https:"){if(e)return e();throw new In(`Url protocol is not supported: ${r}`)}if(r.hostname!=="t.me"){if(e)return e();throw new In(`Url host is not supported: ${r}`)}const n=r.pathname+r.search;GF()||Ele("6.1")?YF("web_app_open_tg_link",{path_full:n}):yn("https://t.me"+n)}function GF(){try{const t=_l();return t?t.parent!=null&&t!==t.parent:!1}catch{return!1}}function YF(t,e){try{const r=_l();if(!r)throw new In("Can't post event to parent window: window is not defined");if(r.TelegramWebviewProxy!==void 0)fv("postEvent",t,e),r.TelegramWebviewProxy.postEvent(t,JSON.stringify(e));else if(r.external&&"notify"in r.external)fv("postEvent",t,e),r.external.notify(JSON.stringify({eventType:t,eventData:e}));else if(GF()){const n="*",i=JSON.stringify({eventType:t,eventData:e});fv("postEvent",t,e),r.parent.postMessage(i,n)}else throw new In("Can't post event to TMA")}catch(r){Pce(`Can't post event to parent window: ${r}`)}}function wle(t){t=t.replace(/^#/,"");let e={};if(!t.length)return e;if(t.indexOf("=")<0&&t.indexOf("?")<0)return e._path=k3(t),e;let r=t.indexOf("?");if(r>=0){let i=t.substr(0,r);e._path=k3(i),t=t.substr(r+1)}let n=vle(t);for(let i in n)e[i]=n[i];return e}function k3(t){try{return t=t.replace(/\+/g,"%20"),decodeURIComponent(t)}catch{return t}}function vle(t){let e={};if(!t.length)return e;let r=t.split("&"),n,i,s,o;for(n=0;n<r.length;n++)i=r[n].split("="),s=k3(i[0]),o=i[1]==null?null:k3(i[1]),e[s]=o;return e}function xle(t,e){typeof t!="string"&&(t="");let r=t.replace(/^\s+|\s+$/g,"").split("."),n=e.replace(/^\s+|\s+$/g,"").split("."),i,s,o,a;for(i=Math.max(r.length,n.length),s=0;s<i;s++)if(o=parseInt(r[s])||0,a=parseInt(n[s])||0,o!==a)return o>a?1:-1;return 0}function Ele(t){return xle(I3,t)>=0}const Yd={mobile:440,tablet:1020};function mp(t){const e=_l();if(!e)return t==="desktop";if(Gd("weba"))return!0;const r=e.innerWidth;
901switch(t){case"desktop":return r>Yd.tablet;case"tablet":return r>Yd.mobile;default:case"mobile":return r<=Yd.mobile||Xa("ios","android","ipad")}}function Qo(t){switch(t){case"mobile":return`@media (max-width: ${Yd.mobile}px)`;case"tablet":return`@media (max-width: ${Yd.tablet}px) (min-width: ${Yd.mobile}px)`;default:case"desktop":return`@media (min-width: ${Yd.tablet}px)`}}const Gy="@media (hover: none)",Yy="@media not all and (hover: none)",Cle={m:"100vh",s:"8px",none:"0"},iE={s:.02,m:.04},_le=ue.button` 902 display: ${t=>t.leftIcon||t.rightIcon?"flex":"inline-block"}; 903 gap: ${t=>t.leftIcon||t.rightIcon?"6px":"unset"}; 904 align-items: ${t=>t.leftIcon||t.rightIcon?"center":"unset"}; 905 justify-content: ${t=>t.leftIcon||t.rightIcon?"space-between":"unset"}; 906 background-color: ${t=>t.appearance==="flat"?"transparent":t.appearance==="secondary"?t.theme.colors.background.tint:Jh(t.theme.colors.accent,.12)}; 907 color: ${t=>t.appearance==="secondary"?t.theme.colors.text.primary:t.theme.colors.accent}; 908 909 padding: ${t=>t.appearance==="flat"?"0":"9px 16px"}; 910 padding-left: ${t=>t.leftIcon&&t.appearance!=="flat"?"12px":"16px"}; 911 padding-right: ${t=>t.rightIcon&&t.appearance!=="flat"?"12px":"16px"}; 912 border: none; 913 border-radius: ${t=>Cle[t.theme.borderRadius]}; 914 cursor: ${t=>t.disabled?"not-allowed":"pointer"}; 915 916 font-size: 14px; 917 font-weight: 510; 918 line-height: 18px; 919 920 transition: transform 0.125s ease-in-out; 921 922 ${Yy} { 923 &:hover { 924 transform: ${t=>t.disabled?"unset":`scale(${1+iE[t.scale]})`}; 925 } 926 } 927 928 &:active { 929 transform: ${t=>t.disabled?"unset":`scale(${1-iE[t.scale]})`}; 930 } 931 932 ${Gy} { 933 &:active { 934 transform: ${t=>t.disabled?"unset":`scale(${1-iE[t.scale]*2})`}; 935 } 936 } 937`;function Zy(t){const e=zi(()=>Object.keys(t).filter(n=>n.startsWith("data-"))),[r]=q9(t,e);return r}const Jr=t=>{const e=Zy(t);return F(_le,rl({get appearance(){return t.appearance||"primary"},get class(){return t.class},onClick:r=>{var n;return(n=t.onClick)==null?void 0:n.call(t,r)},onMouseEnter:r=>{var n;return(n=t.onMouseEnter)==null?void 0:n.call(t,r)},onMouseLeave:r=>{var n;return(n=t.onMouseLeave)==null?void 0:n.call(t,r)},ref(r){const n=t.ref;typeof n=="function"?n(r):t.ref=r},get disabled(){return t.disabled},get scale(){return t.scale||"m"},get leftIcon(){return!!t.leftIcon},get rightIcon(){return!!t.rightIcon},"data-tc-button":"true"},e,{get children(){return[Pe(()=>t.leftIcon),Pe(()=>t.children),Pe(()=>t.rightIcon)]}}))};function P3(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}const dx=t=>{let e,r=!0;const[n,i]=yt(),[s,o]=yt(),a=lx(()=>t.children),{onBeforeEnter:c,onEnter:l,onAfterEnter:u,onBeforeExit:f,onExit:d,onAfterExit:p}=t,h=Pe(()=>{const x=t.name||"s";
vendor: 1,908 bytes, line 937
937return{enterActiveClass:t.enterActiveClass||x+"-enter-active",enterClass:t.enterClass||x+"-enter",enterToClass:t.enterToClass||x+"-enter-to",exitActiveClass:t.exitActiveClass||x+"-exit-active",exitClass:t.exitClass||x+"-exit",exitToClass:t.exitToClass||x+"-exit-to"}});function g(x,C){if(!r||t.appear){let _=function(W){x&&(!W||W.target===x)&&(x.removeEventListener("transitionend",_),x.removeEventListener("animationend",_),x.classList.remove(...P),x.classList.remove(...z),EF(()=>{n()!==x&&i(x),s()===x&&o(void 0)}),u&&u(x),t.mode==="inout"&&y(x,C))};const L=h().enterClass.split(" "),P=h().enterActiveClass.split(" "),z=h().enterToClass.split(" ");c&&c(x),x.classList.add(...L),x.classList.add(...P),P3(()=>{x.classList.remove(...L),x.classList.add(...z),l&&l(x,()=>_()),(!l||l.length<2)&&(x.addEventListener("transitionend",_),x.addEventListener("animationend",_))})}C&&!t.mode?o(x):i(x)}function y(x,C){const _=h().exitClass.split(" "),L=h().exitActiveClass.split(" "),P=h().exitToClass.split(" ");if(!C.parentNode)return z();f&&f(C),C.classList.add(..._),C.classList.add(...L),P3(()=>{C.classList.remove(..._),C.classList.add(...P)}),d&&d(C,()=>z()),(!d||d.length<2)&&(C.addEventListener("transitionend",z),C.addEventListener("animationend",z));function z(W){(!W||W.target===C)&&(C.removeEventListener("transitionend",z),C.removeEventListener("animationend",z),C.classList.remove(...L),C.classList.remove(...P),n()===C&&i(void 0),p&&p(C),t.mode==="outin"&&g(x,C))}}return H9(x=>{for(e=a();typeof e=="function";)e=e();return zi(()=>(e&&e!==x&&(t.mode!=="outin"?g(e,x):r&&i(e)),x&&x!==e&&t.mode!=="inout"&&y(e,x),r=!1,e))}),[n,s]};function Jb(t){const{top:e,bottom:r,left:n,right:i,width:s,height:o}=t.getBoundingClientRect(),a=t.parentNode.getBoundingClientRect();return{top:e-a.top,bottom:r,left:n-a.left,right:i,width:s,height:o}}const Ale=t=>{const e=lx(()=>t.children),r=Pe(()=>{const p=t.name||"s";
937return{enterActiveClass:t.enterActiveClass||p+"-enter-active",enterClass:t.enterClass||p+"-enter",enterToClass:t.enterToClass||p+"-enter-to",exitActiveClass:t.exitActiveClass||p+"-exit-active",exitClass:t.exitClass||p+"-exit",exitToClass:t.exitToClass||p+"-exit-to",moveClass:t.moveClass||p+"-move"}}),{onBeforeEnter:n,onEnter:i,onAfterEnter:s,onBeforeExit:o,onExit:a,onAfterExit:c}=t,[l,u]=yt();let f=[],d=!0;return H9(()=>{const p=e(),h=[...p],g=new Set(p),y=new Set(f),x=r().enterClass.split(" "),C=r().enterActiveClass.split(" "),_=r().enterToClass.split(" "),L=r().exitClass.split(" "),P=r().exitActiveClass.split(" "),z=r().exitToClass.split(" ");for(let W=0;W<p.length;W++){const B=p[W];if(!d&&!y.has(B)){let I=function(j){B&&(!j||j.target===B)&&(B.removeEventListener("transitionend",I),B.removeEventListener("animationend",I),B.classList.remove(...C),B.classList.remove(..._),s&&s(B))};n&&n(B),B.classList.add(...x),B.classList.add(...C),P3(()=>{B.classList.remove(...x),B.classList.add(..._),i&&i(B,()=>I()),(!i||i.length<2)&&(B.addEventListener("transitionend",I),B.addEventListener("animationend",I))})}}for(let W=0;W<f.length;W++){const B=f[W];if(!g.has(B)&&B.parentNode){let I=function(j){(!j||j.target===B)&&(B.removeEventListener("transitionend",I),B.removeEventListener("animationend",I),B.classList.remove(...P),B.classList.remove(...z),c&&c(B),f=f.filter(D=>D!==B),u(f))};h.splice(W,0,B),o&&o(B),B.classList.add(...L),B.classList.add(...P),P3(()=>{B.classList.remove(...L),B.classList.add(...z)}),a&&a(B,()=>I()),(!a||a.length<2)&&(B.addEventListener("transitionend",I),B.addEventListener("animationend",I))}}f=h,u(h)}),di(p=>{const h=l();return h.forEach(g=>{let y;(y=p.get(g))?y.new&&(y.new=!1,y.newPos=Jb(g)):p.set(g,y={pos:Jb(g),new:!d}),y.new&&g.addEventListener("transitionend",()=>{y.new=!1,g.parentNode&&(y.newPos=Jb(g))},{once:!0}),y.newPos&&(y.pos=y.newPos),y.newPos=Jb(g)}),d?(d=!1,p):(h.forEach(g=>{const y=p.get(g),x=y.pos,C=y.newPos,_=x.left-C.left,L=x.top-C.top;if(_||L){y.moved=!0;const P=g.style;P.transform=`translate(${_}px,${L}px)`,P.transitionDuration="0s"}}),document.body.offsetHeight,h.forEach(g=>{const y=p.get(g);if(y.moved){let x=function(L){L&&L.target!==g||!g.parentNode||(!L||/transform$/.test(L.propertyName))&&(g.removeEventListener("transitionend",x),g.classList.remove(..._))};y.moved=!1;const C=g.style,_=r().moveClass.split(" ");g.classList.add(..._),C.transform=C.transitionDuration="",g.addEventListener("transitionend",x)}}),p)},new Map),l};function Sle(t,e){const r=n=>{var i;return!t.contains(n.target)&&((i=e())==null?void 0:i())};document.body.addEventListener("click",r),Vs(()=>document.body.removeEventListener("click",r))}function Nle(t,e){const r=n=>{var i,s;n.key==="Escape"&&((i=document.activeElement)==null||i.blur(),(s=e())==null||s())};document.body.addEventListener("keydown",r),Vs(()=>document.body.removeEventListener("keydown",r))}function Ile(t,e){const{isEnabled:r,onClose:n}=e();if(!r||!(Z9().os==="android"))return;window.history.pushState(Tle,"");const s=o=>{o.preventDefault(),n()};window.addEventListener("popstate",s,{once:!0}),Vs(()=>{window.removeEventListener("popstate",s),UF(()=>{var o;((o=window.history.state)==null?void 0:o[ZF])===!0&&window.history.back()})})}const ZF="androidBackHandler",Tle={[ZF]:!0},kle=or('<svg><path fill-rule="evenodd" clip-rule="evenodd" d="M10.2122 14.3407C10.5384 14.0854 10.5959 13.614 10.3406 13.2878L6.20237 8.00003L10.3406 2.71227C10.5959 2.38607 10.5384 1.91469 10.2122 1.6594C9.88604 1.40412 9.41465 1.46161 9.15937 1.7878L4.65937 7.5378C4.44688 7.80932 4.44688 8.19074 4.65937 8.46226L9.15937 14.2123C9.41465 14.5385 9.88604 14.5959 10.2122 14.3407Z"></path></svg>',4,!0),Ple={left:0,top:90,right:180,bottom:270},JF=t=>{const e=wn(),r=()=>t.fill||e.colors.icon.secondary,n=()=>t.direction||"left",i=ue("svg")` 938 transform: rotate(${s=>Ple[s.svgDirection]}deg); 939 transition: transform 0.1s ease-in-out; 940 `;return F(i,{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",get svgDirection(){return n()},get children(){const s=kle.cloneNode(!0);return ir(()=>gt(s,"fill",r())),s}})},Rle=or('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewB
940ox="0 0 16 16" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M2.71966 2.71968C3.01255 2.42678 3.48743 2.42677 3.78032 2.71966L8.00002 6.93925L12.2197 2.71967C12.5126 2.42677 12.9874 2.42678 13.2803 2.71967C13.5732 3.01257 13.5732 3.48744 13.2803 3.78033L9.06068 7.99991L13.2803 12.2197C13.5732 12.5126 13.5732 12.9874 13.2803 13.2803C12.9874 13.5732 12.5126 13.5732 12.2197 13.2803L8.00002 9.06057L3.78033 13.2803C3.48744 13.5732 3.01257 13.5732 2.71967 13.2803C2.42678 12.9874 2.42677 12.5126 2.71967 12.2197L6.93936 7.99991L2.71968 3.78034C2.42678 3.48745 2.42677 3.01257 2.71966 2.71968Z"></path></svg>'),Ole=t=>{const e=wn(),r=()=>t.fill||e.colors.icon.secondary;return(()=>{const n=Rle.cloneNode(!0),i=n.firstChild;return ir(()=>gt(i,"fill",r())),n})()},Dle=ue.button` 941 padding: 0; 942 display: flex; 943 justify-content: center; 944 align-items: center; 945 width: 32px; 946 height: 32px; 947 border-radius: 50%; 948 background-color: ${t=>t.theme.colors.background.tint}; 949 border: none; 950 cursor: pointer; 951 952 transition: transform 0.125s ease-in-out; 953 954 ${Yy} { 955 &:hover { 956 transform: scale(1.04); 957 } 958 } 959 960 &:active { 961 transform: scale(0.96); 962 } 963 964 ${Gy} { 965 &:active { 966 transform: scale(0.92); 967 } 968 } 969`,Pu=t=>{const e=Zy(t),r=()=>t.icon||"close";return F(Dle,rl({get class(){return t.class},onClick:()=>t.onClick(),"data-tc-icon-button":"true"},e,{get children(){return[F(Nt,{get when(){return!!t.children},get children(){return t.children}}),F(Nt,{get when(){return!t.children},get children(){return F(yu,{get children(){return[F(br,{get when(){return r()==="close"},get children(){return F(Ole,{get fill(){return t.fill}})}}),F(br,{get when(){return r()==="arrow"},get children(){return F(JF,{get fill(){return t.fill}})}}),F(br,{get when(){return r()==="question"},get children(){return F(Uue,{get fill(){return t.fill}})}}),F(br,{get when(){return typeof r()!="string"},get children(){return r()}})]}})}})]}}))},Tp={m:"24px",s:"16px",none:"0"},Lle=ue.div` 970 display: flex; 971 position: fixed; 972 z-index: 1000; 973 left: 0; 974 top: 0; 975 width: 100%; 976 height: 100%; 977 background-color: rgba(0, 0, 0, 0.4); 978 padding: 20px 0; 979 overflow-y: auto; 980 981 ${Qo("mobile")} { 982 padding-bottom: 0; 983 } 984`,Mle=bu` 985 box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 16px 64px rgba(0, 0, 0, 0.16); 986 width: fit-content; 987 margin: auto; 988 989 ${Qo("mobile")} { 990 width: 100%; 991 height: fit-content; 992 margin: auto 0 0 0; 993 } 994`,$le=ue.div` 995 position: relative; 996 min-height: 100px; 997 width: 416px; 998 padding: 44px 56px 24px; 999 1000 box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.04); 1001 1002 background-color: ${t=>t.theme.colors.background.primary}; 1003 border-radius: ${t=>Tp[t.theme.borderRadius]}; 1004 1005 ${Qo("mobile")} { 1006 width: 100%; 1007 } 1008`,Ule=ue(Pu)` 1009 position: absolute; 1010 right: 16px; 1011 top: 16px; 1012`,Ble=ue.div` 1013 display: flex; 1014 justify-content: space-between; 1015 align-items: center; 1016 padding: 16px 16px 16px 18px; 1017 border-radius: 0 0 ${t=>Tp[t.theme.borderRadius]} 1018 ${t=>Tp[t.theme.borderRadius]}; 1019`,Fle=ue(Pu)` 1020 background-color: ${t=>Jh(t.theme.colors.icon.secondary,.12)}; 1021`;class jle{constructor(){_t(this,"currentTime",0)}}const q1=class{constructor(){_t(this,"currentTime",0),_t(this,"playbackRate",1),_t(this,"startTime",null),_t(this,"timeline",new jle),_t(this,"finished",Promise.resolve(this)),_t(this,"effect",null),_t(this,"id",""),_t(this,"pending",!1),_t(this,"playState","finished"),_t(this,"replaceState","active"),_t(this,"ready",Promise.resolve(this)),_t(this,"oncancel",null),_t(this,"onfinish",null),_t(this,"onremove",null)}static create(){return q1._instance||(Rce("Animation is not supported in this environment: please consider using the `web-animations-js` polyfill to provide a fallback implementation of the Web Animations API."),q1._instance=new q1),q1._instance}cancel(){}finish(){}pause(){}play(){}reverse(){}addEventListener(t,e,r){}dispatchEvent(t){return!1}removeEventListener(t,e,r){}updatePlaybackRate(t){}commitStyles(){}persist(){}};let QF=q1;_t(QF,"_instance",null);function va(t,e,r){return"animate"in t?t.animate(e,r):QF.create()}const zle=or("<div></div>"),Wle=Sle,Hle=Nle,qle=Ile,XF=t=>{const e=wn(),r=Zy(t);return di(()=>{t.opened?Lce():Mce()}),F(dx,{onBeforeEnter:n=>{const i=mp("mobile")?200:100;va(n,[{opacity:0}
1021,{opacity:1}],{duration:i}),mp("mobile")&&va(n.firstElementChild,[{transform:"translateY(390px)"},{transform:"translateY(0)"}],{duration:i})},onExit:(n,i)=>{const s=mp("mobile")?200:100,o=va(n,[{opacity:1},{opacity:0}],{duration:s});if(mp("mobile")){const a=va(n.firstElementChild,[{transform:"translateY(0)"},{transform:"translateY(390px)"}],{duration:s});Promise.all([o.finished,a.finished]).then(i)}else o.finished.then(i)},get children(){return F(Nt,{get when(){return t.opened},get children(){return F(Lle,rl({"data-tc-modal":"true"},r,{get children(){const n=zle.cloneNode(!0);return Ip(qle,n,()=>({isEnabled:t.enableAndroidBackHandler,onClose:()=>t.onClose()})),Ip(Hle,n,()=>()=>t.onClose()),Ip(Wle,n,()=>()=>t.onClose()),Bi(n,F($le,{get class(){return t.class},get children(){return[F(Ule,{icon:"close",onClick:()=>t.onClose()}),Pe(()=>t.children)]}}),null),Bi(n,F(Nt,{get when(){return t.onClickQuestion&&t.showFooter},get children(){return F(Ble,{get children(){return[F(Mue,{}),F(Fle,{get onClick(){return t.onClickQuestion},icon:"question"})]}})}}),null),ir(()=>V9(n,uv(Mle,bu` 1022 border-radius: ${Tp[e.borderRadius]}; 1023 background-color: ${e.colors.background.tint}; 1024 1025 ${Qo("mobile")} { 1026 border-radius: ${Tp[e.borderRadius]} 1027 ${Tp[e.borderRadius]} 0 0; 1028 } 1029 `))),n}}))}})}})},Vle={m:"22px",s:"12px",none:"0"},Kle={m:"18px",s:"8px",none:"0"},Gle=ue.div` 1030 display: grid; 1031 grid-template: 1fr / 1fr 1fr; 1032 width: fit-content; 1033 justify-items: center; 1034 gap: 4px; 1035 1036 position: relative; 1037 padding: 4px; 1038 border-radius: ${t=>Vle[t.theme.borderRadius]}; 1039 1040 background-color: ${t=>t.theme.colors.background.secondary}; 1041`,Yle=ue.div` 1042 position: absolute; 1043 top: 4px; 1044 left: 4px; 1045 1046 height: calc(100% - 8px); 1047 width: calc(50% - 4px); 1048 1049 border-radius: ${t=>Kle[t.theme.borderRadius]}; 1050 background-color: ${t=>t.theme.colors.background.segment}; 1051 1052 transform: ${t=>t.right?"translateX(100%)":"translateX(0)"}; 1053 1054 transition: transform 0.13s ease-in-out; 1055`,tk=ue.input` 1056 display: none; 1057`,rk=ue.label` 1058 padding: 9px 12px; 1059 z-index: 1; 1060 1061 cursor: ${t=>t.isActive?"default":"pointer"}; 1062 1063 transition: transform 0.13s ease-in-out; 1064 1065 &:hover { 1066 transform: ${t=>t.isActive?"none":"scale(1.025)"}; 1067 } 1068 1069 > * { 1070 ${t=>t.isActive?"":`color: ${t.theme.colors.text.secondary};`} 1071 } 1072`,Zle=t=>{const e="tabBar"+Math.floor(Math.random()*1e4);return F(Gle,{get class(){return t.class},"data-tc-tab-bar":"true",get children(){return[F(Yle,{get right(){return t.selectedTabIndex===1}}),F(rk,{get isActive(){return t.selectedTabIndex===0},get children(){return[F(tk,{type:"radio",name:e,get checked(){return t.selectedTabIndex===0},onInput:()=>{var r;return(r=t.onSelectedTabIndexChange)==null?void 0:r.call(t,0)}}),Pe(()=>t.tab1)]}}),F(rk,{get isActive(){return t.selectedTabIndex===1},get children(){return[F(tk,{type:"radio",get checked(){return t.selectedTabIndex===1},name:e,onInput:()=>{var r;return(r=t.onSelectedTabIndexChange)==null?void 0:r.call(t,1)}}),Pe(()=>t.tab2)]}})]}})},Jle={m:"16px",s:"12px",none:"0"},Qle={m:"12px",s:"8px",none:"0"},ej=256,$C=60,nk=48,ik=24,dv=ue.div` 1073 width: 52px; 1074 height: 52px; 1075 background: transparent; 1076 position: absolute; 1077 right: 0; 1078 bottom: 0; 1079 1080 display: flex; 1081 align-items: center; 1082 justify-content: center; 1083 transition: transform 0.125s ease-in-out; 1084`,Xle=ue.button` 1085 display: flex; 1086 align-items: center; 1087 justify-content: center; 1088 position: relative; 1089 background-color: ${t=>t.theme.colors.background.qr}; 1090 border-radius: ${t=>Jle[t.theme.borderRadius]}; 1091 padding: ${nl(ik)} 0; 1092 height: ${nl(ej+ik*2)}; 1093 width: 100%; 1094 1095 overflow: hidden; 1096 cursor: pointer; 1097 border: none; 1098 1099 ${Yy} { 1100 &:hover { 1101 ${dv.class} { 1102 transform: scale(1.04); 1103 } 1104 } 1105 } 1106 1107 &:active { 1108 ${dv.class} { 1109 transform: scale(0.96); 1110 } 1111 } 1112 1113 ${Gy} { 1114 &:active { 1115 ${dv.class} { 1116 transform: scale(0.92); 1117 } 1118 } 1119 } 1120`,eue=ue.div` 1121 position: relative; 1122 display: flex; 1123 justify-content: center;
1124 align-items: center; 1125 margin: 0 auto; 1126 1127 > div:first-child { 1128 display: flex; 1129 align-items: center; 1130 justify-content: center; 1131 } 1132 1133 rect { 1134 fill: transparent; 1135 } 1136 1137 path { 1138 fill: ${t=>t.theme.colors.constant.black}; 1139 } 1140`,tue=ue.div` 1141 position: absolute; 1142 width: ${nl($C)}; 1143 height: ${nl($C)}; 1144 background: ${t=>t.theme.colors.background.qr}; 1145 1146 display: flex; 1147 align-items: center; 1148 justify-content: center; 1149`,rue=ue(Qh)` 1150 width: ${t=>nl(t.size)}; 1151 height: ${t=>nl(t.size)}; 1152 border-radius: ${t=>Qle[t.theme.borderRadius]}; 1153 background-color: ${t=>t.theme.colors.background.qr}; 1154`,nue=ue.div` 1155 position: absolute; 1156 bottom: 14px; 1157 left: 50%; 1158 transform: translate(-50%, 0); 1159 1160 display: flex; 1161 gap: 6px; 1162 align-items: center; 1163 border-radius: 18px; 1164 min-width: 126px; 1165 padding: 9px 16px 9px 10px; 1166 1167 filter: drop-shadow(0px 2px 8px rgba(0, 0, 0, 0.08)); 1168 background-color: ${t=>t.theme.colors.background.segment}; 1169`;var tj={exports:{}};(function(t,e){var r=function(){var n=function(P,z){var W=236,B=17,I=P,j=s[z],D=null,O=0,T=null,m=[],b={},E=function(Z,Q){O=I*4+17,D=function(ee){for(var re=new Array(ee),ie=0;ie<ee;ie+=1){re[ie]=new Array(ee);for(var me=0;me<ee;me+=1)re[ie][me]=null}return re}(O),k(0,0),k(O-7,0),k(0,O-7),H(),M(),v(Z,Q),I>=7&&N(Z),T==null&&(T=S(I,j,m)),U(T,Q)},k=function(Z,Q){for(var ee=-1;ee<=7;ee+=1)if(!(Z+ee<=-1||O<=Z+ee))for(var re=-1;re<=7;re+=1)Q+re<=-1||O<=Q+re||(0<=ee&&ee<=6&&(re==0||re==6)||0<=re&&re<=6&&(ee==0||ee==6)||2<=ee&&ee<=4&&2<=re&&re<=4?D[Z+ee][Q+re]=!0:D[Z+ee][Q+re]=!1)},R=function(){for(var Z=0,Q=0,ee=0;ee<8;ee+=1){E(!0,ee);var re=a.getLostPoint(b);(ee==0||Z>re)&&(Z=re,Q=ee)}return Q},M=function(){for(var Z=8;Z<O-8;Z+=1)D[Z][6]==null&&(D[Z][6]=Z%2==0);for(var Q=8;Q<O-8;Q+=1)D[6][Q]==null&&(D[6][Q]=Q%2==0)},H=function(){for(var Z=a.getPatternPosition(I),Q=0;Q<Z.length;Q+=1)for(var ee=0;ee<Z.length;ee+=1){var re=Z[Q],ie=Z[ee];if(D[re][ie]==null)for(var me=-2;me<=2;me+=1)for(var le=-2;le<=2;le+=1)me==-2||me==2||le==-2||le==2||me==0&&le==0?D[re+me][ie+le]=!0:D[re+me][ie+le]=!1}},N=function(Z){for(var Q=a.getBCHTypeNumber(I),ee=0;ee<18;ee+=1){var re=!Z&&(Q>>ee&1)==1;D[Math.floor(ee/3)][ee%3+O-8-3]=re}for(var ee=0;ee<18;ee+=1){var re=!Z&&(Q>>ee&1)==1;D[ee%3+O-8-3][Math.floor(ee/3)]=re}},v=function(Z,Q){for(var ee=j<<3|Q,re=a.getBCHTypeInfo(ee),ie=0;ie<15;ie+=1){var me=!Z&&(re>>ie&1)==1;ie<6?D[ie][8]=me:ie<8?D[ie+1][8]=me:D[O-15+ie][8]=me}for(var ie=0;ie<15;ie+=1){var me=!Z&&(re>>ie&1)==1;ie<8?D[8][O-ie-1]=me:ie<9?D[8][15-ie-1+1]=me:D[8][15-ie-1]=me}D[O-8][8]=!Z},U=function(Z,Q){for(var ee=-1,re=O-1,ie=7,me=0,le=a.getMaskFunction(Q),ye=O-1;ye>0;ye-=2)for(ye==6&&(ye-=1);;){for(var $t=0;$t<2;$t+=1)if(D[re][ye-$t]==null){var wt=!1;me<Z.length&&(wt=(Z[me]>>>ie&1)==1);var ze=le(re,ye-$t);ze&&(wt=!wt),D[re][ye-$t]=wt,ie-=1,ie==-1&&(me+=1,ie=7)}if(re+=ee,re<0||O<=re){re-=ee,ee=-ee;break}}},G=function(Z,Q){for(var ee=0,re=0,ie=0,me=new Array(Q.length),le=new Array(Q.length),ye=0;ye<Q.length;ye+=1){var $t=Q[ye].dataCount,wt=Q[ye].totalCount-$t;re=Math.max(re,$t),ie=Math.max(ie,wt),me[ye]=new Array($t);for(var ze=0;ze<me[ye].length;ze+=1)me[ye][ze]=255&Z.getBuffer()[ze+ee];ee+=$t;var gr=a.getErrorCorrectPolynomial(wt),Ut=l(me[ye],gr.getLength()-1),ur=Ut.mod(gr);le[ye]=new Array(gr.getLength()-1);for(var ze=0;ze<le[ye].length;ze+=1){var hi=ze+ur.getLength()-le[ye].length;le[ye][ze]=hi>=0?ur.getAt(hi):0}}for(var Bt=0,ze=0;ze<Q.length;ze+=1)Bt+=Q[ze].totalCount;for(var Ht=new Array(Bt),Pn=0,ze=0;ze<re;ze+=1)for(var ye=0;ye<Q.length;ye+=1)ze<me[ye].length&&(Ht[Pn]=me[ye][ze],Pn+=1);for(var ze=0;ze<ie;ze+=1)for(var ye=0;ye<Q.length;ye+=1)ze<le[ye].length&&(Ht[Pn]=le[ye][ze],Pn+=1);return Ht},S=function(Z,Q,ee){for(var re=u.getRSBlocks(Z,Q),ie=f(),me=0;me<ee.length;me+=1){var le=ee[me];ie.put(le.getMode(),4),ie.put(le.getLength(),a.getLengthInBits(le.getMode(),Z)),le.write(ie)}for(var ye=0,me=0;me<re.length;me+=1)ye+=re[me].dataCount;if(ie.getLengthInBits()>ye*8)throw"code length overflow. ("+ie.getLengthInBits()+">"+ye*8+")";for(ie.getLengthInBits()+4<=ye*8&&ie.put(0,4);ie.getLengthInBits()%8!=0;)ie.putBit(!1);for(;!(ie.getLengthInBits()>=ye*8||(ie.put(W,8),ie.getLengthInBits()>=ye*8));)ie.put(B,8);return G(ie,re)};b.addData=function(Z,Q){Q=Q||"Byte";var ee=null;switch(Q){case"Numeric":ee=d(Z);break;case"Alphanumeric":ee=p(Z);break;case"Byte":ee=h(Z);break;case"Kanji":ee=g(Z);break;default:throw"mode:"+Q}m.push(ee),T=null},b.isDark=function(Z,Q){if(Z<0||O<=Z||Q<0||O<=Q)throw Z+","+Q;return D[Z][Q]},b.getModuleCount=function(){return O},b.make=function(){if(I<1){for(var Z=1;Z<40;Z++){for(var Q=u.getRSBlocks(Z,j),ee=f(),re=0;re<m.length;re++){var ie=m[re];ee.put(ie.getMode(),4),ee.put(ie.getLength(),a.getLengthInBits(ie.getMode(),Z)),ie.write(ee)}for(var me=0,re=0;re<Q.length;re++)me+=Q[re].dataCount;if(ee.getLengthInBits()<=me*8)break}I=Z}E(!1,R())},b.createTableTag=function(Z,Q){Z=Z||2,Q=typeof Q>"u"?Z*4:Q;var ee="";ee+='<table style="',ee+=" border-width: 0px; border-style: none;",ee+=" border-collapse: collapse;",ee+=" padding: 0px; margin: "+Q+"px;",ee+='">',ee+="<tbody>";for(var re=0;re<b.getModuleCount();re+=1){ee+="<tr>";for(var ie=0;ie<b.getModuleCount();ie+=1)ee+='<td style="',ee+=" border-width: 0px; border-style: none;",ee+=" border-collapse: collapse;",ee+=" padding: 0px; margin: 0px;",ee+=" width: "+Z+"px;",ee+=" height: "+Z+"px;",ee+=" background-color: ",ee+=b.isDark(re,ie)?"#000000":"#ffffff",ee+=";",ee+='"/>';ee+="</tr>"}return ee+="</tbody>",ee+="</table>",ee},b.createSvgTag=function(Z,Q,ee,re){var ie={};typeof arguments[0]=="object"&&(ie=arguments[0],Z=ie.cellSize,Q=ie.margin,ee=ie.alt,re=ie.title),Z=Z||2,Q=typeof Q>"u"?Z*4:Q,ee=typeof ee=="string"?{text:ee}:ee||{},ee.text=ee.text||null,ee.id=ee.text?ee.id||"qrcode-description":null,re=typeof re=="string"?{text:re}:re||{},re.text=re.text||null,re.id=re.text?re.id||"qrcode-title":null;var me=b.getModuleCount()*Z+Q*2,le,ye,$t,wt,ze="",gr;for(gr="l"+Z+",0 0,"+Z+" -"+Z+",0 0,-"+Z+"z ",ze+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',ze+=ie.scalable?"":' width="'+me+'px" height="'+me+'px"',ze+=' viewB
1169ox="0 0 '+me+" "+me+'" ',ze+=' preserveAspectRatio="xMinYMin meet"',ze+=re.text||ee.text?' role="img" aria-labelledby="'+J([re.id,ee.id].join(" ").trim())+'"':"",ze+=">",ze+=re.text?'<title id="'+J(re.id)+'">'+J(re.text)+"</title>":"",ze+=ee.text?'<description id="'+J(ee.id)+'">'+J(ee.text)+"</description>":"",ze+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',ze+='<path d="',$t=0;$t<b.getModuleCount();$t+=1)for(wt=$t*Z+Q,le=0;le<b.getModuleCount();le+=1)b.isDark($t,le)&&(ye=le*Z+Q,ze+="M"+ye+","+wt+gr);return ze+='" stroke="transparent" fill="black"/>',ze+="</svg>",ze},b.createDataURL=function(Z,Q){Z=Z||2,Q=typeof Q>"u"?Z*4:Q;var ee=b.getModuleCount()*Z+Q*2,re=Q,ie=ee-Q;return L(ee,ee,function(me,le){if(re<=me&&me<ie&&re<=le&&le<ie){var ye=Math.floor((me-re)/Z),$t=Math.floor((le-re)/Z);return b.isDark($t,ye)?0:1}else return 1})},b.createImgTag=function(Z,Q,ee){Z=Z||2,Q=typeof Q>"u"?Z*4:Q;var re=b.getModuleCount()*Z+Q*2,ie="";return ie+="<img",ie+=' src="',ie+=b.createDataURL(Z,Q),ie+='"',ie+=' width="',ie+=re,ie+='"',ie+=' height="',ie+=re,ie+='"',ee&&(ie+=' alt="',ie+=J(ee),ie+='"'),ie+="/>",ie};var J=function(Z){for(var Q="",ee=0;ee<Z.length;ee+=1){var re=Z.charAt(ee);switch(re){case"<":Q+="<";break;case">":Q+=">";break;case"&":Q+="&";break;case'"':Q+=""";break;default:Q+=re;break}}return Q},ne=function(Z){var Q=1;Z=typeof Z>"u"?Q*2:Z;var ee=b.getModuleCount()*Q+Z*2,re=Z,ie=ee-Z,me,le,ye,$t,wt,ze={"ââ":"â","â ":"â"," â":"â"," ":" "},gr={"ââ":"â","â ":"â"," â":" "," ":" "},Ut="";for(me=0;me<ee;me+=2){for(ye=Math.floor((me-re)/Q),$t=Math.floor((me+1-re)/Q),le=0;le<ee;le+=1)wt="â",re<=le&&le<ie&&re<=me&&me<ie&&b.isDark(ye,Math.floor((le-re)/Q))&&(wt=" "),re<=le&&le<ie&&re<=me+1&&me+1<ie&&b.isDark($t,Math.floor((le-re)/Q))?wt+=" ":wt+="â",Ut+=Z<1&&me+1>=ie?gr[wt]:ze[wt];Ut+=` 1170`}return ee%2&&Z>0?Ut.substring(0,Ut.length-ee-1)+Array(ee+1).join("â"):Ut.substring(0,Ut.length-1)};return b.createASCII=function(Z,Q){if(Z=Z||1,Z<2)return ne(Q);Z-=1,Q=typeof Q>"u"?Z*2:Q;var ee=b.getModuleCount()*Z+Q*2,re=Q,ie=ee-Q,me,le,ye,$t,wt=Array(Z+1).join("ââ"),ze=Array(Z+1).join(" "),gr="",Ut="";for(me=0;me<ee;me+=1){for(ye=Math.floor((me-re)/Z),Ut="",le=0;le<ee;le+=1)$t=1,re<=le&&le<ie&&re<=me&&me<ie&&b.isDark(ye,Math.floor((le-re)/Z))&&($t=0),Ut+=$t?wt:ze;for(ye=0;ye<Z;ye+=1)gr+=Ut+` 1171`}return gr.substring(0,gr.length-1)},b.renderTo2dContext=function(Z,Q){Q=Q||2;for(var ee=b.getModuleCount(),re=0;re<ee;re++)for(var ie=0;ie<ee;ie++)Z.fillStyle=b.isDark(re,ie)?"black":"white",Z.fillRect(re*Q,ie*Q,Q,Q)},b};n.stringToBytesFuncs={default:function(P){for(var z=[],W=0;W<P.length;W+=1){var B=P.charCodeAt(W);z.push(B&255)}return z}},n.stringToBytes=n.stringToBytesFuncs.default,n.createStringToBytes=function(P,z){var W=function(){for(var I=C(P),j=function(){var M=I.read();if(M==-1)throw"eof";return M},D=0,O={};;){var T=I.read();if(T==-1)break;var m=j(),b=j(),E=j(),k=String.fromCharCode(T<<8|m),R=b<<8|E;O[k]=R,D+=1}if(D!=z)throw D+" != "+z;return O}(),B=63;return function(I){for(var j=[],D=0;D<I.length;D+=1){var O=I.charCodeAt(D);if(O<128)j.push(O);else{var T=W[I.charAt(D)];typeof T=="number"?(T&255)==T?j.push(T):(j.push(T>>>8),j.push(T&255)):j.push(B)}}return j}};var i={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},s={L:1,M:0,Q:3,H:2},o={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},a=function(){var P=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],z=1335,W=7973,B=21522,I={},j=function(D){for(var O=0;D!=0;)O+=1,D>>>=1;return O};return I.getBCHTypeInfo=function(D){for(var O=D<<10;j(O)-j(z)>=0;)O^=z<<j(O)-j(z);return(D<<10|O)^B},I.getBCHTypeNumber=function(D){for(var O=D<<12;j(O)-j(W)>=0;)O^=W<<j(O)-j(W);return D<<12|O},I.getPatternPosition=function(D){return P[D-1]},I.getMaskFunction=function(D){switch(D){case o.PATTERN000:return function(O,T){return(O+T)%2==0};case o.PATTERN001:return function(O,T){return O%2==0};case o.PATTERN010:return function(O,T){return T%3==0};case o.PATTERN011:return function(O,T){return(O+T)%3==0};case o.PATTERN100:return function(O,T){return(Math.floor(O/2)+Math.floor(T/3))%2==0};case o.PATTERN101:return function(O,T){return O*T%2+O*T%3==0};case o.PATTERN110:return function(O,T){return(O*T%2+O*T%3)%2==0};case o.PATTERN111:return function(O,T){return(O*T%3+(O+T)%2)%2==0};default:throw"bad maskPattern:"+D}},I.getErrorCorrectPolynomial=function(D){for(var O=l([1],0),T=0;T<D;T+=1)O=O.multiply(l([1,c.gexp(T)],0));return O},I.getLengthInBits=function(D,O){if(1<=O&&O<10)switch(D){case i.MODE_NUMBER:return 10;case i.MODE_ALPHA_NUM:return 9;
1171case i.MODE_8BIT_BYTE:return 8;case i.MODE_KANJI:return 8;default:throw"mode:"+D}else if(O<27)switch(D){case i.MODE_NUMBER:return 12;case i.MODE_ALPHA_NUM:return 11;case i.MODE_8BIT_BYTE:return 16;case i.MODE_KANJI:return 10;default:throw"mode:"+D}else if(O<41)switch(D){case i.MODE_NUMBER:return 14;case i.MODE_ALPHA_NUM:return 13;case i.MODE_8BIT_BYTE:return 16;case i.MODE_KANJI:return 12;default:throw"mode:"+D}else throw"type:"+O},I.getLostPoint=function(D){for(var O=D.getModuleCount(),T=0,m=0;m<O;m+=1)for(var b=0;b<O;b+=1){for(var E=0,k=D.isDark(m,b),R=-1;R<=1;R+=1)if(!(m+R<0||O<=m+R))for(var M=-1;M<=1;M+=1)b+M<0||O<=b+M||R==0&&M==0||k==D.isDark(m+R,b+M)&&(E+=1);E>5&&(T+=3+E-5)}for(var m=0;m<O-1;m+=1)for(var b=0;b<O-1;b+=1){var H=0;D.isDark(m,b)&&(H+=1),D.isDark(m+1,b)&&(H+=1),D.isDark(m,b+1)&&(H+=1),D.isDark(m+1,b+1)&&(H+=1),(H==0||H==4)&&(T+=3)}for(var m=0;m<O;m+=1)for(var b=0;b<O-6;b+=1)D.isDark(m,b)&&!D.isDark(m,b+1)&&D.isDark(m,b+2)&&D.isDark(m,b+3)&&D.isDark(m,b+4)&&!D.isDark(m,b+5)&&D.isDark(m,b+6)&&(T+=40);for(var b=0;b<O;b+=1)for(var m=0;m<O-6;m+=1)D.isDark(m,b)&&!D.isDark(m+1,b)&&D.isDark(m+2,b)&&D.isDark(m+3,b)&&D.isDark(m+4,b)&&!D.isDark(m+5,b)&&D.isDark(m+6,b)&&(T+=40);for(var N=0,b=0;b<O;b+=1)for(var m=0;m<O;m+=1)D.isDark(m,b)&&(N+=1);var v=Math.abs(100*N/O/O-50)/5;return T+=v*10,T},I}(),c=function(){for(var P=new Array(256),z=new Array(256),W=0;W<8;W+=1)P[W]=1<<W;for(var W=8;W<256;W+=1)P[W]=P[W-4]^P[W-5]^P[W-6]^P[W-8];for(var W=0;W<255;W+=1)z[P[W]]=W;var B={};return B.glog=function(I){if(I<1)throw"glog("+I+")";return z[I]},B.gexp=function(I){for(;I<0;)I+=255;for(;I>=256;)I-=255;return P[I]},B}();function l(P,z){if(typeof P.length>"u")throw P.length+"/"+z;var W=function(){for(var I=0;I<P.length&&P[I]==0;)I+=1;for(var j=new Array(P.length-I+z),D=0;D<P.length-I;D+=1)j[D]=P[D+I];return j}(),B={};return B.getAt=function(I){return W[I]},B.getLength=function(){return W.length},B.multiply=function(I){for(var j=new Array(B.getLength()+I.getLength()-1),D=0;D<B.getLength();D+=1)for(var O=0;O<I.getLength();O+=1)j[D+O]^=c.gexp(c.glog(B.getAt(D))+c.glog(I.getAt(O)));return l(j,0)},B.mod=function(I){if(B.getLength()-I.getLength()<0)return B;for(var j=c.glog(B.getAt(0))-c.glog(I.getAt(0)),D=new Array(B.getLength()),O=0;O<B.getLength();O+=1)D[O]=B.getAt(O);for(var O=0;O<I.getLength();O+=1)D[O]^=c.gexp(c.glog(I.getAt(O))+j);return l(D,0).mod(I)},B}var u=function(){var P=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],z=function(I,j){var D={};return D.totalCount=I,D.dataCount=j,D},W={},B=function(I,j){switch(j){case s.L:return P[(I-1)*4+0];case s.M:return P[(I-1)*4+1];case s.Q:return P[(I-1)*4+2];case s.H:return P[(I-1)*4+3];default:return}};return W.getRSBlocks=function(I,j){var D=B(I,j);if(typeof D>"u")throw"bad rs block @ typeNumber:"+I+"/errorCorrectionLevel:"+j;for(var O=D.length/3,T=[],m=0;m<O;m+=1)for(var b=D[m*3+0],E=D[m*3+1],k=D[m*3+2],R=0;R<b;R+=1)T.push(z(E,k));return T},W}(),f=function(){var P=[],z=0,W={};return W.getBuffer=function(){return P},W.getAt=function(B){var I=Math.floor(B/8);return(P[I]>>>7-B%8&1)==1},W.put=function(B,I){for(var j=0;j<I;j+=1)W.putBit((B>>>I-j-1&1)==1)},W.getLengthInBits=function(){return z},W.putBit=function(B){var I=Math.floor(z/8);P.length<=I&&P.push(0),B&&(P[I]|=128>>>z%8),z+=1},W},d=function(P){var z=i.MODE_NUMBER,W=P,B={};B.getMode=function(){return z},B.getLength=function(D){return W.length},B.write=function(D){for(var O=W,T=0;T+2<O.length;)D.put(I(O.substring(T,T+3)),10),T+=3;
1171T<O.length&&(O.length-T==1?D.put(I(O.substring(T,T+1)),4):O.length-T==2&&D.put(I(O.substring(T,T+2)),7))};var I=function(D){for(var O=0,T=0;T<D.length;T+=1)O=O*10+j(D.charAt(T));return O},j=function(D){if("0"<=D&&D<="9")return D.charCodeAt(0)-48;throw"illegal char :"+D};return B},p=function(P){var z=i.MODE_ALPHA_NUM,W=P,B={};B.getMode=function(){return z},B.getLength=function(j){return W.length},B.write=function(j){for(var D=W,O=0;O+1<D.length;)j.put(I(D.charAt(O))*45+I(D.charAt(O+1)),11),O+=2;O<D.length&&j.put(I(D.charAt(O)),6)};var I=function(j){if("0"<=j&&j<="9")return j.charCodeAt(0)-48;if("A"<=j&&j<="Z")return j.charCodeAt(0)-65+10;switch(j){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+j}};return B},h=function(P){var z=i.MODE_8BIT_BYTE,W=n.stringToBytes(P),B={};return B.getMode=function(){return z},B.getLength=function(I){return W.length},B.write=function(I){for(var j=0;j<W.length;j+=1)I.put(W[j],8)},B},g=function(P){var z=i.MODE_KANJI,W=n.stringToBytesFuncs.SJIS;if(!W)throw"sjis not supported.";(function(j,D){var O=W(j);if(O.length!=2||(O[0]<<8|O[1])!=D)throw"sjis not supported."})("å",38726);var B=W(P),I={};return I.getMode=function(){return z},I.getLength=function(j){return~~(B.length/2)},I.write=function(j){for(var D=B,O=0;O+1<D.length;){var T=(255&D[O])<<8|255&D[O+1];if(33088<=T&&T<=40956)T-=33088;else if(57408<=T&&T<=60351)T-=49472;else throw"illegal char at "+(O+1)+"/"+T;T=(T>>>8&255)*192+(T&255),j.put(T,13),O+=2}if(O<D.length)throw"illegal char at "+(O+1)},I},y=function(){var P=[],z={};return z.writeByte=function(W){P.push(W&255)},z.writeShort=function(W){z.writeByte(W),z.writeByte(W>>>8)},z.writeBytes=function(W,B,I){B=B||0,I=I||W.length;for(var j=0;j<I;j+=1)z.writeByte(W[j+B])},z.writeString=function(W){for(var B=0;B<W.length;B+=1)z.writeByte(W.charCodeAt(B))},z.toByteArray=function(){return P},z.toString=function(){var W="";W+="[";for(var B=0;B<P.length;B+=1)B>0&&(W+=","),W+=P[B];return W+="]",W},z},x=function(){var P=0,z=0,W=0,B="",I={},j=function(O){B+=String.fromCharCode(D(O&63))},D=function(O){if(!(O<0)){if(O<26)return 65+O;if(O<52)return 97+(O-26);if(O<62)return 48+(O-52);if(O==62)return 43;if(O==63)return 47}throw"n:"+O};return I.writeByte=function(O){for(P=P<<8|O&255,z+=8,W+=1;z>=6;)j(P>>>z-6),z-=6},I.flush=function(){if(z>0&&(j(P<<6-z),P=0,z=0),W%3!=0)for(var O=3-W%3,T=0;T<O;T+=1)B+="="},I.toString=function(){return B},I},C=function(P){var z=P,W=0,B=0,I=0,j={};j.read=function(){for(;I<8;){if(W>=z.length){if(I==0)return-1;throw"unexpected end of file./"+I}var O=z.charAt(W);if(W+=1,O=="=")return I=0,-1;if(O.match(/^\s$/))continue;B=B<<6|D(O.charCodeAt(0)),I+=6}var T=B>>>I-8&255;return I-=8,T};var D=function(O){if(65<=O&&O<=90)return O-65;if(97<=O&&O<=122)return O-97+26;if(48<=O&&O<=57)return O-48+52;if(O==43)return 62;if(O==47)return 63;throw"c:"+O};return j},_=function(P,z){var W=P,B=z,I=new Array(P*z),j={};j.setPixel=function(m,b,E){I[b*W+m]=E},j.write=function(m){m.writeString("GIF87a"),m.writeShort(W),m.writeShort(B),m.writeByte(128),m.writeByte(0),m.writeByte(0),m.writeByte(0),m.writeByte(0),m.writeByte(0),m.writeByte(255),m.writeByte(255),m.writeByte(255),m.writeString(","),m.writeShort(0),m.writeShort(0),m.writeShort(W),m.writeShort(B),m.writeByte(0);var b=2,E=O(b);m.writeByte(b);for(var k=0;E.length-k>255;)m.writeByte(255),m.writeBytes(E,k,255),k+=255;m.writeByte(E.length-k),m.writeBytes(E,k,E.length-k),m.writeByte(0),m.writeString(";")};var D=function(m){var b=m,E=0,k=0,R={};return R.write=function(M,H){if(M>>>H)throw"length over";for(;E+H>=8;)b.writeByte(255&(M<<E|k)),H-=8-E,M>>>=8-E,k=0,E=0;k=M<<E|k,E=E+H},R.flush=function(){E>0&&b.writeByte(k)},R},O=function(m){for(var b=1<<m,E=(1<<m)+1,k=m+1,R=T(),M=0;M<b;M+=1)R.add(String.fromCharCode(M));R.add(String.fromCharCode(b)),R.add(String.fromCharCode(E));var H=y(),N=D(H);N.write(b,k);var v=0,U=String.fromCharCode(I[v]);for(v+=1;v<I.length;){var G=String.fromCharCode(I[v]);v+=1,R.contains(U+G)?U=U+G:(N.write(R.indexOf(U),k),R.size()<4095&&(R.size()==1<<k&&(k+=1),R.add(U+G)),U=G)}return N.write(R.indexOf(U),k),N.write(E,k),N.flush(),H.toByteArray()},T=function(){var m={},b=0,E={};return E.add=function(k){if(E.contains(k))throw"dup key:"+k;m[k]=b,b+=1},E.size=function(){return b},E.indexOf=function(k){return m[k]},E.contains=function(k){return typeof m[k]<"u"},E};return j},L=function(P,z,W){for(var B=_(P,z),I=0;I<z;I+=1)for(var j=0;j<P;j+=1)B.setPixel(j,I,W(j,I));var D=y();B.write(D);for(var O=x(),T=D.toByteArray(),m=0;m<T.length;m+=1)O.writeByte(T[m]);return O.flush(),"data:image/gif;base64,"+O};return n}();(function(){r.stringToBytesFuncs["UTF-8"]=function(n){function i(s){for(var o=[],a=0;a<s.length;a++){var c=s.charCodeAt(a);c<128?o.push(c):c<2048?o.push(192|c>>6,128|c&63):c<55296||c>=57344?o.push(224|c>>12,128|c>>
11716&63,128|c&63):(a++,c=65536+((c&1023)<<10|s.charCodeAt(a)&1023),o.push(240|c>>18,128|c>>12&63,128|c>>6&63,128|c&63))}return o}return i(n)}})(),function(n){t.exports=n()}(function(){return r})})(tj);const iue=tj.exports;function hx(t){return hr(this,null,function*(){try{if(!(navigator!=null&&navigator.clipboard))throw new In("Clipboard API not available");return yield navigator.clipboard.writeText(t)}catch{}sue(t)})}function sue(t){const e=document.createElement("textarea");e.value=t,e.style.top="0",e.style.left="0",e.style.position="fixed",document.body.appendChild(e),e.focus(),e.select();try{document.execCommand("copy")}finally{document.body.removeChild(e)}}const oue=or("<div></div>"),px=t=>{let e,r,n;const[i,s]=yt(!1),[o,a]=yt(nk);di(()=>{const d=iue(0,"L");d.addData(t.sourceUrl),d.make(),e.innerHTML=d.createSvgTag(4,0);const p=e.firstElementChild.clientWidth,h=Math.round(ej/p*1e5)/1e5;if(n){const g=Math.ceil($C/(h*4))*4,y=nl(Math.ceil((p-g)/(2*4))*4);n.style.top=y,n.style.left=y,n.style.height=nl(g),n.style.width=nl(g),a(Math.round(nk/h))}r.style.transform=`scale(${h})`});let c=null;return F(Xle,{get class(){return t.class},onClick:()=>{s(!0),hx(t.sourceUrl),c!=null&&clearTimeout(c),c=setTimeout(()=>s(!1),1500)},get children(){return[F(eue,{ref(u){const f=r;typeof f=="function"?f(u):r=u},get children(){return[(()=>{const u=oue.cloneNode(!0),f=e;return typeof f=="function"?Ip(f,u):e=u,u})(),F(Nt,{get when(){return t.imageUrl},get children(){return F(tue,{ref(u){const f=n;typeof f=="function"?f(u):n=u},get children(){return F(rue,{get src(){return t.imageUrl},alt:"",get size(){return o()}})}})}})]}}),F(dx,{onBeforeEnter:u=>{va(u,[{opacity:0,transform:"translate(-50%, 44px)"},{opacity:1,transform:"translate(-50%, 0)"}],{duration:150,easing:"ease-out"})},onExit:(u,f)=>{va(u,[{opacity:1,transform:"translate(-50%, 0)"},{opacity:0,transform:"translate(-50%, 44px)"}],{duration:150,easing:"ease-out"}).finished.then(()=>{f()})},get children(){return F(Nt,{get when(){return i()&&!t.disableCopy},get children(){return F(nue,{get children(){return[F(mx,{size:"xs"}),F(Io,{translationKey:"common.linkCopied",children:"Link Copied"})]}})}})}}),F(Nt,{get when(){return!t.disableCopy},get children(){return F(dv,{get children(){return F(ife,{})}})}})]}})};var UC=(t,e,r)=>{const n=e.trim().split(".").reduce((i,s)=>i?i[s]:void 0,t);return n!==void 0?n:r},aue=(t,e,r=/{{(.*?)}}/g)=>t.replace(r,(n,i)=>UC(e,i,"")),cue=(t={},e=navigator.language in t?navigator.language:Object.keys(t)[0])=>{const[r,n]=yt(e),[i,s]=Q9(t);return[(c,l,u)=>{const f=UC(i[r()],c,u||"");return typeof f=="function"?f(l):typeof f=="string"?aue(f,l||{}):f},{add(c,l){s(c,u=>Object.assign(u||{},l))},locale:c=>c?n(c):r(),dict:c=>UC(i,c)}]},rj=cx({}),vc=()=>Rs(rj);const lue=ue.div` 1172 font-style: normal; 1173 font-weight: ${t=>t.fontWeight}; 1174 font-size: ${t=>t.fontSize}; 1175 line-height: ${t=>t.lineHeight}; 1176 1177 color: ${t=>t.color}; 1178`,Io=t=>{const e=wn(),[r]=vc();let n;const i=()=>t.color||e.colors.text.primary,s=rl({fontSize:"14px",fontWeight:"510",lineHeight:"130%"},t);return di(()=>{n&&s.cursor!=="unset"&&getComputedStyle(n).cursor!=="pointer"&&(n.style.cursor="default")}),F(lue,{get fontSize(){return s.fontSize},get fontWeight(){return s.fontWeight},get lineHeight(){return s.lineHeight},get color(){return i()},get class(){return s.class},ref(o){const a=n;typeof a=="function"?a(o):n=o},"data-tc-text":"true",get children(){var o;return Pe(()=>!!s.translationKey)()?r(s.translationKey,s.translationValues,(o=s.children)==null?void 0:o.toString()):s.children}})},uue=ue.div` 1179 position: relative; 1180 1181 &::after { 1182 content: ''; 1183 display: block; 1184 position: absolute; 1185 top: 0; 1186 bottom: 0; 1187 left: 0; 1188 right: 0; 1189 border: 0.5px solid rgba(0, 0, 0, 0.08); 1190 border-radius: inherit; 1191 } 1192`,fue=ue(Qh)` 1193 width: 100%; 1194 height: 100%; 1195 border-radius: inherit; 1196`,nj=t=>F(uue,{get class(){return t.class},get children(){return[F(fue,{get src(){return t.src}}),Pe(()=>t.badge)]}}),due={m:"16px",s:"12px",none:"0"},hue={m:"6px",s:"6px",none:"0"},pue=ue.ul` 1197 display: flex; 1198 gap: 0; 1199 width: 100%; 1200 overflow-x: auto; 1201 padding: 8px 12px 16px 12px; 1202 margin: 0; 1203 list-style: none; 1204 flex-wrap: nowrap; 1205 1206 &&::-webkit-scrollbar {
1207 display: none; 1208 } 1209 -ms-overflow-style: none; 1210 scrollbar-width: none; 1211 1212 > li { 1213 display: flex; 1214 flex: 1; 1215 min-width: 78px; 1216 height: fit-content; 1217 } 1218 1219 > li > button { 1220 width: 100%; 1221 } 1222`,gue=ue.button` 1223 position: relative; 1224 cursor: pointer; 1225 border: none; 1226 background-color: unset; 1227 padding: 8px 4px; 1228 width: 100%; 1229 min-width: 78px; 1230 display: flex; 1231 flex-direction: column; 1232 align-items: center; 1233 1234 transition: transform 0.125s ease-in-out; 1235 1236 ${Yy} { 1237 &:hover { 1238 transform: scale(1.04); 1239 } 1240 } 1241 1242 &:active { 1243 transform: scale(0.96); 1244 } 1245 1246 ${Gy} { 1247 &:active { 1248 transform: scale(0.92); 1249 } 1250 } 1251`,mue=ue(nj)` 1252 width: 60px; 1253 height: 60px; 1254 border-radius: ${t=>due[t.theme.borderRadius]}; 1255 margin-bottom: 8px; 1256 position: relative; 1257`,yue=ue(Qh)` 1258 position: absolute; 1259 right: -6px; 1260 bottom: -6px; 1261 width: 24px; 1262 height: 24px; 1263 border-radius: ${t=>hue[t.theme.borderRadius]}; 1264 box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.08); 1265`,bue=ue(Io)` 1266 max-width: 90px; 1267 font-weight: 510; 1268 white-space: nowrap; 1269 text-overflow: ellipsis; 1270 overflow: hidden; 1271 1272 ${Qo("mobile")} { 1273 max-width: 80px; 1274 } 1275`,wue=ue(Io)` 1276 font-weight: ${t=>t.colorPrimary?"510":"400"}; 1277 max-width: 90px; 1278 white-space: nowrap; 1279 text-overflow: ellipsis; 1280 overflow: hidden; 1281 color: ${t=>t.colorPrimary?t.theme.colors.text.primary:t.theme.colors.text.secondary}; 1282 1283 ${Qo("mobile")} { 1284 max-width: 80px; 1285 } 1286`,vue=or("<div></div>"),R3=t=>{let e=null;const r=()=>{const n=e==null?void 0:e.querySelector("div");if(n&&n.scrollWidth>n.clientWidth){let i=0;const s=-.4,o=.05;for(;n.scrollWidth>n.clientWidth&&i>=s;)i-=o,n.style.letterSpacing=`${i}px`;i!==0&&(i-=o,n.style.letterSpacing=`${i}px`)}};return CF(()=>r()),di(()=>{r()}),F(gue,{get class(){return t.class},onClick:()=>t.onClick(),"data-tc-wallet-item":"true",get children(){return[Pe(()=>Pe(()=>typeof t.icon=="string")()?F(mue,{get src(){return t.icon},get badge(){return Pe(()=>!!t.badgeUrl)()&&F(yue,{get src(){return t.badgeUrl}})}}):t.icon),(()=>{const n=vue.cloneNode(!0);return Ip(i=>e=i,n),Bi(n,F(bue,{get children(){return t.name}})),n})(),Pe(()=>Pe(()=>!!t.secondLine)()&&F(wue,{get colorPrimary(){var n;return(n=t.secondLineColorPrimary)!=null?n:!0},get children(){return t.secondLine}}))]}})},xue=ue.h1` 1287 font-style: normal; 1288 font-weight: 590; 1289 font-size: 20px; 1290 line-height: 28px; 1291 1292 text-align: center; 1293 1294 color: ${t=>t.theme.colors.text.primary}; 1295 1296 margin-top: 0; 1297 margin-bottom: 0; 1298 1299 cursor: default; 1300`,Xo=t=>{const[e]=vc();return F(xue,{get class(){return t.class},"data-tc-h1":"true",get children(){var r;return Pe(()=>!!t.translationKey)()?e(t.translationKey,t.translationValues,(r=t.children)==null?void 0:r.toString()):t.children}})},Eue=ue.h2` 1301 font-style: normal; 1302 font-weight: 400; 1303 font-size: 16px; 1304 line-height: 22px; 1305 1306 text-align: center; 1307 1308 color: ${t=>t.theme.colors.text.secondary}; 1309 1310 margin-top: 0; 1311 margin-bottom: 32px; 1312 1313 cursor: default; 1314`,Al=t=>{const[e]=vc();return F(Eue,{get class(){return t.class},"data-tc-h2":"true",get children(){var r;return Pe(()=>!!t.translationKey)()?e(t.translationKey,t.translationValues,(r=t.children)==null?void 0:r.toString()):t.children}})},Cue=ue.h3` 1315 font-style: normal; 1316 font-weight: 510; 1317 font-size: 16px; 1318 line-height: 20px; 1319 1320 color: ${t=>t.theme.colors.text.primary}; 1321 1322 margin-top: 0; 1323 margin-bottom: 0; 1324 1325 cursor: default; 1326`,gx=t=>{const[e]=vc();return F(Cue,{"data-tc-h3":"true",get class(){return t.class},get children(){var r;return Pe(()=>!!t.translationKey)()?e(t.translationKey,t.translationValues,(r=t.children)==null?void 0:r.toString()):t.children}})},_ue=or('<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M14.1839 17.7069C13.6405 18.6507 13.3688 19.1226 13.0591 19.348C12.4278 19.8074 11.5723 19.8074 10.941 19.348C10.6312 19.1226 10.3595 18.6507 9.81613 17.7069L5.52066 10.2464C4.76864 8.94024 4.39263 8.28717 4.33762 7.75894C4.2255 6.68236 4.81894 5.65591 5.80788 5.21589C6.29309 5 7.04667 5 8.55383 5
1326H15.4462C16.9534 5 17.7069 5 18.1922 5.21589C19.1811 5.65591 19.7745 6.68236 19.6624 7.75894C19.6074 8.28717 19.2314 8.94024 18.4794 10.2464L14.1839 17.7069ZM11.1 16.3412L6.56139 8.48002C6.31995 8.06185 6.19924 7.85276 6.18146 7.68365C6.14523 7.33896 6.33507 7.01015 6.65169 6.86919C6.80703 6.80002 7.04847 6.80002 7.53133 6.80002H7.53134L11.1 6.80002V16.3412ZM12.9 16.3412L17.4387 8.48002C17.6801 8.06185 17.8008 7.85276 17.8186 7.68365C17.8548 7.33896 17.665 7.01015 17.3484 6.86919C17.193 6.80002 16.9516 6.80002 16.4687 6.80002L12.9 6.80002V16.3412Z"></path></svg>'),Aue=t=>{const e=wn(),r=()=>t.fill||e.colors.icon.primary;return(()=>{const n=_ue.cloneNode(!0),i=n.firstChild;return ir(()=>gt(i,"fill",r())),n})()},Sue=or('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><g clip-path="url(#clip0_3783_2045)"><circle cx="8" cy="8.00098" r="8"></circle><path d="M4.75 8.50098L7 10.751L11.75 6.00098" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></g><defs><clipPath id="clip0_3783_2045"><rect width="16" height="16" fill="white" transform="translate(0 0.000976562)"></rect></clipPath></defs></svg>'),Nue=or('<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="11"></circle><path d="M17.1364 9.6364C17.4879 9.28493 17.4879 8.71508 17.1364 8.36361C16.7849 8.01214 16.2151 8.01214 15.8636 8.36361L10 14.2272L8.1364 12.3636C7.78493 12.0121 7.21508 12.0121 6.86361 12.3636C6.51214 12.7151 6.51214 13.2849 6.86361 13.6364L9.36361 16.1364C9.71508 16.4879 10.2849 16.4879 10.6364 16.1364L17.1364 9.6364Z"></path></svg>'),Iue=or('<svg width="72" height="72" viewBox="0 0 72 72" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="36" cy="36" r="33"></circle><path d="M50.9142 28.4142C51.6953 27.6332 51.6953 26.3668 50.9142 25.5858C50.1332 24.8047 48.8668 24.8047 48.0858 25.5858L30 43.6716L23.9142 37.5858C23.1332 36.8047 21.8668 36.8047 21.0858 37.5858C20.3047 38.3668 20.3047 39.6332 21.0858 40.4142L28.5858 47.9142C29.3668 48.6953 30.6332 48.6953 31.4142 47.9142L50.9142 28.4142Z"></path></svg>'),mx=t=>{const e=wn(),r=()=>t.size||"s",n=()=>t.fill||e.colors.icon.success;return Pe((()=>{const i=Pe(()=>r()==="xs");return()=>i()?(()=>{const s=Sue.cloneNode(!0),o=s.firstChild,a=o.firstChild,c=a.nextSibling;return ir(l=>{const u=t.class,f=n(),d=e.colors.constant.white;return u!==l._v$&>(s,"class",l._v$=u),f!==l._v$2&>(a,"fill",l._v$2=f),d!==l._v$3&>(c,"stroke",l._v$3=d),l},{_v$:void 0,_v$2:void 0,_v$3:void 0}),s})():(()=>{const s=Pe(()=>r()==="s");return()=>s()?(()=>{const o=Nue.cloneNode(!0),a=o.firstChild,c=a.nextSibling;return ir(l=>{const u=t.class,f=n(),d=e.colors.constant.white;return u!==l._v$4&>(o,"class",l._v$4=u),f!==l._v$5&>(a,"fill",l._v$5=f),d!==l._v$6&>(c,"fill",l._v$6=d),l},{_v$4:void 0,_v$5:void 0,_v$6:void 0}),o})():(()=>{const o=Iue.cloneNode(!0),a=o.firstChild,c=a.nextSibling;return ir(l=>{const u=t.class,f=n(),d=e.colors.constant.white;return u!==l._v$7&>(o,"class",l._v$7=u),f!==l._v$8&>(a,"fill",l._v$8=f),d!==l._v$9&>(c,"fill",l._v$9=d),l},{_v$7:void 0,_v$8:void 0,_v$9:void 0}),o})()})()})())},Tue=or('<svg width="72" height="72" viewBox="0 0 72 72" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="36" cy="36" r="33"></circle><path d="M24.0858 26.9142C23.3047 26.1332 23.3047 24.8668 24.0858 24.0858C24.8668 23.3047 26.1332 23.3047 26.9142 24.0858L36 33.1716L45.0858 24.0858C45.8668 23.3047 47.1332 23.3047 47.9142 24.0858C48.6953 24.8668 48.6953 26.1332 47.9142 26.9142L38.8284 36L47.9142 45.0858C48.6953 45.8668 48.6953 47.1332 47.9142 47.9142C47.1332 48.6953 45.8668 48.6953 45.0858 47.9142L36 38.8284L26.9142 47.9142C26.1332 48.6953 24.8668 48.6953 24.0858 47.9142C23.3047 47.1332 23.3047 45.8668 24.0858 45.0858L33.1716 36L24.0858 26.9142Z"></path></svg>'),kue=or('<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="none"><circle cx="24" cy="24.001" r="22"></circle><path d="M24 24.001L31.5 16.501M24 24.001L16.5 16.501M24 24.001L16.5 31.501M24 24.001L31.5 31.501" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"></path></svg>
1326'),Pue=or('<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="11"></circle><path d="M7.86361 9.1364C7.51214 8.78493 7.51214 8.21508 7.86361 7.86361C8.21508 7.51214 8.78493 7.51214 9.1364 7.86361L12 10.7272L14.8636 7.86361C15.2151 7.51214 15.7849 7.51214 16.1364 7.86361C16.4879 8.21508 16.4879 8.78493 16.1364 9.1364L13.2728 12L16.1364 14.8636C16.4879 15.2151 16.4879 15.7849 16.1364 16.1364C15.7849 16.4879 15.2151 16.4879 14.8636 16.1364L12 13.2728L9.1364 16.1364C8.78493 16.4879 8.21508 16.4879 7.86361 16.1364C7.51214 15.7849 7.51214 15.2151 7.86361 14.8636L10.7272 12L7.86361 9.1364Z"></path></svg>'),yd=t=>{const e=wn(),r=()=>t.size||"m",n=()=>t.fill||e.colors.icon.error;return Pe((()=>{const i=Pe(()=>r()==="m");return()=>i()?(()=>{const s=Tue.cloneNode(!0),o=s.firstChild,a=o.nextSibling;return ir(c=>{const l=t.class,u=n(),f=e.colors.constant.white;return l!==c._v$&>(s,"class",c._v$=l),u!==c._v$2&>(o,"fill",c._v$2=u),f!==c._v$3&>(a,"fill",c._v$3=f),c},{_v$:void 0,_v$2:void 0,_v$3:void 0}),s})():(()=>{const s=Pe(()=>r()==="s");return()=>s()?(()=>{const o=kue.cloneNode(!0),a=o.firstChild,c=a.nextSibling;return ir(l=>{const u=t.class,f=n(),d=e.colors.constant.white;return u!==l._v$4&>(o,"class",l._v$4=u),f!==l._v$5&>(a,"fill",l._v$5=f),d!==l._v$6&>(c,"stroke",l._v$6=d),l},{_v$4:void 0,_v$5:void 0,_v$6:void 0}),o})():(()=>{const o=Pue.cloneNode(!0),a=o.firstChild,c=a.nextSibling;return ir(l=>{const u=t.class,f=n(),d=e.colors.constant.white;return u!==l._v$7&>(o,"class",l._v$7=u),f!==l._v$8&>(a,"fill",l._v$8=f),d!==l._v$9&>(c,"fill",l._v$9=d),l},{_v$7:void 0,_v$8:void 0,_v$9:void 0}),o})()})()})())},Rue=or('<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.55 5.85123C18.9459 7.81184 20.1094 12.1541 18.1488 15.55C16.1882 18.9459 11.8459 20.1094 8.44998 18.1488C8.01952 17.9003 7.46909 18.0478 7.22056 18.4782C6.97203 18.9087 7.11952 19.4591 7.54998 19.7076C11.8068 22.1653 17.2499 20.7068 19.7076 16.45C22.1653 12.1932 20.7068 6.75005 16.45 4.29239C12.1932 1.83472 6.75003 3.29321 4.29236 7.55001C4.04383 7.98047 4.19132 8.53091 4.62178 8.77943C5.05224 9.02796 5.60268 8.88048 5.8512 8.45001C7.81181 5.05413 12.1541 3.89062 15.55 5.85123Z"></path></svg>'),Oue=or('<svg xmlns="http://www.w3.org/2000/svg" width="44" height="44" viewBox="0 0 44 44" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M22 2.99951C11.5066 2.99951 3 11.5061 3 21.9995C3 32.4929 11.5066 40.9995 22 40.9995C22.8284 40.9995 23.5 41.6711 23.5 42.4995C23.5 43.3279 22.8284 43.9995 22 43.9995C9.84974 43.9995 0 34.1498 0 21.9995C0 9.84925 9.84974 -0.000488281 22 -0.000488281C34.1503 -0.000488281 44 9.84925 44 21.9995C44 22.8279 43.3284 23.4995 42.5 23.4995C41.6716 23.4995 41 22.8279 41 21.9995C41 11.5061 32.4934 2.99951 22 2.99951Z"></path></svg>'),Due=or('<svg width="72" height="72" viewBox="0 0 72 72" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M24 56.7846C35.479 63.412 50.1572 59.479 56.7846 47.9999C63.412 36.5209 59.479 21.8427 48 15.2153C36.521 8.58791 21.8428 12.5209 15.2154 23.9999" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"></path></svg>'),Sl=t=>{const e=wn(),r=()=>t.size||"xs",n=()=>t.fill||e.colors.icon.tertiary,i=Sce` 1327 0% { 1328 transform: rotate(0deg); 1329 } 1330 100% { 1331 transform: rotate(360deg); 1332 } 1333 `,s=bu` 1334 animation: ${i} 1s linear infinite; 1335 `;return Pe((()=>{const o=Pe(()=>r()==="xs");return()=>o()?(()=>{const a=Rue.cloneNode(!0),c=a.firstChild;return ir(l=>{const u=uv(s,t.class),f=n();return u!==l._v$&>(a,"class",l._v$=u),f!==l._v$2&>(c,"fill",l._v$2=f),l},{_v$:void 0,_v$2:void 0}),a})():(()=>{const a=Pe(()=>r()==="s");return()=>a()?(()=>{const c=Oue.cloneNode(!0),l=c.firstChild;return ir(u=>{const f=uv(s,t.class),d=n();return f!==u._v$3&>(c,"class",u._v$3=f),d!==u._v$4&>(l,"fill",u._v$4=d),u},{_v$3:void 0,_v$4:void 0}),c})():(()=>{const c=Due.cloneNode(!0),l=c.firstChild;return ir(u=>{const f=uv(s,t.class),d=n();return f!==u._v$5&>(c,"class",u._v$5=f),d!==u._v$6&>(l,"stroke",u._v$6=d),u},{_v$5:void 0,_v$6:void 0}),c})()})()})())},Lue=or('<svg width="158" height="28" viewBox="0 0 158 28" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M28 14.001C28 21.733 21.732 28.001 14 28.001C6.26801 28.001 0 21.733 0 14.001C0 6.26899 6.26801 0.000976562 14 0.000976562C21.732 0.000976562 28 6.26899 28 14.001ZM9.21931 8.00098H18.7801H18.7813C20.538 8.00098 21.6522 9.89966 20.7691 11.4302L14.8672 21.6576C14.4822 22.3254 13.5172 22.3254 13.1322 21.6576L7.23158 11.4302C6.34721 9.89726 7.4614 8.00098 9.21931 8.00098ZM13.1262 18.5882V9.74806H9.21811C8.78976 9.74806 8.53708 10.2029 8.74163 10.5578L11.8423 16.1035L13.1262 18.5882ZM16.1559 16.1047L19.2554 10.5566C19.4599 10.2017 19.2073 9.74685 18.7789 9.74685H14.8709V18.5906L16.1559 16.1047Z" fill="#0098EA"></path><path d="M18.7802 8.00098H9.21936C7.46145 8.00098 6.34727 9.89726 7.23164 11.4302L13.1322 21.6576C13.5173 22.3254 14.4823 22.3254 14.8673 21.6576L20.7691 11.4302C21.6523 9.89966 20.5381 8.00098 18.7814 8.00098H18.7802ZM13.1274 18.5906L11.8424 16.1035L8.74168 10.5578C8.53714 10.2029 8.78981 9.74806 9.21816 9.74806H13.1262V18.5918L13.1274 18.5906ZM19.2555 10.5566L16.156 16.
13351047L14.8709 18.5906V9.74685H18.779C19.2073 9.74685 19.46 10.2017 19.2555 10.5566Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M51.7483 22.1967C55.7182 22.1967 58.9609 18.954 58.9609 14.9841C58.9609 11.0142 55.7182 7.77148 51.7483 7.77148C47.7588 7.77148 44.5357 11.0142 44.5357 14.9841C44.5357 18.954 47.7588 22.1967 51.7483 22.1967ZM51.7483 19.1702C49.4686 19.1702 47.6802 17.2442 47.6802 14.9841C47.6802 12.724 49.4686 10.798 51.7483 10.798C54.0084 10.798 55.7968 12.724 55.7968 14.9841C55.7968 17.2442 54.0084 19.1702 51.7483 19.1702ZM37.0698 21.9609H40.2142V10.9946H44.2843V8.00732H33V10.9946H37.0698V21.9609ZM69.9379 8.00732H73.0823V21.9609H70.3899L63.59 13.3333V21.9609H60.4652V8.00732H63.1576L69.9379 16.6153V8.00732ZM79.2259 14.9887C79.2259 10.9202 82.351 7.77539 86.4982 7.77539C89.8592 7.77539 92.5519 9.95709 93.2202 12.6891H90.7437C90.154 11.0971 88.4637 9.9964 86.4982 9.9964C83.5893 9.9964 81.5452 12.1781 81.5452 14.9887C81.5452 17.7994 83.5893 19.9811 86.4982 19.9811C88.4637 19.9811 90.154 18.8804 90.7437 17.2884H93.2202C92.5519 20.0204 89.8592 22.2021 86.4982 22.2021C82.351 22.2021 79.2259 19.0573 79.2259 14.9887ZM104.584 17.0525C104.584 19.9025 102.343 22.1628 99.4342 22.1628C96.5253 22.1628 94.2846 19.9025 94.2846 17.0525C94.2846 14.2025 96.5253 11.9422 99.4342 11.9422C102.343 11.9422 104.584 14.2025 104.584 17.0525ZM96.4663 17.0525C96.4663 18.8018 97.6849 20.158 99.4342 20.158C101.164 20.158 102.382 18.8018 102.382 17.0525C102.382 15.3032 101.164 13.947 99.4342 13.947C97.6849 13.947 96.4663 15.3032 96.4663 17.0525ZM108.626 12.1388H106.463V21.9662H108.626V17.1311C108.626 15.0281 109.726 13.9077 111.161 13.9077C112.419 13.9077 113.205 14.8512 113.205 16.4039V21.9662H115.367V16.0501C115.367 13.5539 113.893 11.9422 111.613 11.9422C110.335 11.9422 109.215 12.4926 108.626 13.4753V12.1388ZM117.839 12.1388H120.001V13.4753C120.59 12.4926 121.711 11.9422 122.988 11.9422C125.268 11.9422 126.742 13.5539 126.742 16.0501V21.9662H124.58V16.4039C124.58 14.8512 123.794 13.9077 122.536 13.9077C121.101 13.9077 120.001 15.0281 120.001 17.1311V21.9662H117.839V12.1388ZM133.558 22.1628C136.054 22.1628 137.823 20.728 138.373 18.8804H136.113C135.661 19.8238 134.717 20.2563 133.636 20.2563C131.887 20.2563 130.747 19.077 130.668 17.5832H138.491C138.688 14.2419 136.585 11.9422 133.577 11.9422C130.551 11.9422 128.526 14.1436 128.526 17.0525C128.526 20.0007 130.629 22.1628 133.558 22.1628ZM130.747 16.0501C131.042 14.5367 132.162 13.7505 133.518 13.7505C134.717 13.7505 135.838 14.4581 136.172 16.0501H130.747ZM149.851 18.3694C149.32 20.5511 147.453 22.1628 144.859 22.1628C141.871 22.1628 139.709 19.8828 139.709 17.0525C139.709 14.2222 141.871 11.9422 144.859 11.9422C147.453 11.9422 149.32 13.5539 149.851 15.7356H147.571C147.178 14.6743 146.215 13.9077 144.859 13.9077C143.109 13.9077 141.91 15.2246 141.91 17.0525C141.91 18.8804 143.109 20.1973 144.859 20.1973C146.215 20.1973 147.178 19.4307 147.571 18.3694H149.851ZM155.75 22.0645C156.418 22.0645 156.929 21.9859 157.362 21.8483V19.9221C157.047 20.0401 156.615 20.1187 156.202 20.1187C155.082 20.1187 154.551 19.6666 154.551 18.448V14.065H157.362V12.1388H154.551V9.40675H152.389V12.1388H150.345V14.065H152.389V18.8018C152.389 21.0228 153.863 22.0645 155.75 22.0645Z"></path></svg>'),Mue=()=>{const t=wn(),e=()=>t.theme===jn.DARK?t.colors.constant.white:t.colors.constant.black;return(()=>{const r=Lue.cloneNode(!0),n=r.firstChild,i=n.nextSibling,s=i.nextSibling;return ir(()=>gt(s,"fill",e())),r})()},$ue=or('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M5.56608 4.42584C5.82527 3.32158 6.8176 2.5 8.00001 2.5C9.38072 2.5 10.5 3.61929 10.5 5C10.5 5.63026 10.3391 6.0386 10.1264 6.34455C9.90018 6.66993 9.58561 6.92478 9.18864 7.20877C9.12579 7.25372 9.05873 7.30025 8.9887 7.34883C8.27392 7.84472 7.25001 8.55507 7.25001 10V10.25C7.25001 10.6642 7.5858 11 8.00001 11C8.41422 11 8.75001 10.6642 8.75001 10.25V10C8.75001 9.36502 9.10777 9.1096 9.94554 8.51149L10.0614 8.42873C10.4769 8.13147 10.9748 7.75194 11.358 7.20076C11.7547 6.63015 12 5.91973 12 5C12 2.79086 10.2091 1 8.00001 1C6.10564 1 4.5205 2.31615 4.10577 4.08308C4.01112 4.48634 4.26129 4.88997 4.66454 4.98462C5.0678 5.07927 5.47143 4.8291 5.56608 4.42584ZM8.00001 15C8.60752 15 9.10001 14.5075 9.10001 13.9C9.10001 13.2925 8.60752 12.8 8.00001 12.8C7.39249 12.8 6.90001 13.2925 6.90001 13.9C6.90001 14.5075 7.39249 15 8.00001 15Z"></path></svg>'),Uue=t=>{const e=wn(),r=()=>t.fill||e.colors.icon.secondary;return(()=>{const n=$ue.cloneNode(!0),i=n.firstChild;return ir(()=>gt(i,"fill",r())),n})()},Bue=or('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewB
1335ox="0 0 16 16" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.98156 8.75C9.84854 11.4328 9.01206 13.5 8 13.5C6.98794 13.5 6.15146 11.4328 6.01844 8.75H9.98156ZM11.4832 8.75C11.4217 10.1155 11.1929 11.3869 10.8239 12.4017C10.7734 12.5405 10.7188 12.6789 10.6595 12.8154C12.1454 11.993 13.2103 10.5029 13.4493 8.75H11.4832ZM13.4493 7.25H11.4832C11.4217 5.88453 11.1929 4.61314 10.8239 3.5983C10.7734 3.4595 10.7188 3.32111 10.6595 3.18459C12.1454 4.00697 13.2103 5.49709 13.4493 7.25ZM9.98156 7.25H6.01844C6.15144 4.56764 6.98769 2.50062 7.99955 2.5H8C9.01206 2.5 9.84854 4.56724 9.98156 7.25ZM4.51678 7.25C4.57826 5.88453 4.80706 4.61314 5.1761 3.5983C5.22657 3.4595 5.28124 3.32111 5.3405 3.18459C3.85463 4.00697 2.78972 5.49709 2.55071 7.25H4.51678ZM2.55071 8.75C2.78972 10.5029 3.85463 11.993 5.3405 12.8154C5.28124 12.6789 5.22657 12.5405 5.1761 12.4017C4.80706 11.3869 4.57826 10.1155 4.51678 8.75H2.55071ZM15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8Z"></path></svg>'),Fue=t=>{const e=wn(),r=()=>t.fill||e.colors.icon.primary;return(()=>{const n=Bue.cloneNode(!0),i=n.firstChild;return ir(()=>gt(i,"fill",r())),n})()},jue=or('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M2.5 4.8C2.5 3.11984 2.5 2.27976 2.82698 1.63803C3.1146 1.07354 3.57354 0.614601 4.13803 0.32698C4.77976 0 5.61984 0 7.3 0H8.7C10.3802 0 11.2202 0 11.862 0.32698C12.4265 0.614601 12.8854 1.07354 13.173 1.63803C13.5 2.27976 13.5 3.11984 13.5 4.8V11.2C13.5 12.8802 13.5 13.7202 13.173 14.362C12.8854 14.9265 12.4265 15.3854 11.862 15.673C11.2202 16 10.3802 16 8.7 16H7.3C5.61984 16 4.77976 16 4.13803 15.673C3.57354 15.3854 3.1146 14.9265 2.82698 14.362C2.5 13.7202 2.5 12.8802 2.5 11.2V4.8ZM4 3.9C4 3.05992 4 2.63988 4.16349 2.31901C4.3073 2.03677 4.53677 1.8073 4.81901 1.66349C5.13988 1.5 5.55992 1.5 6.4 1.5H9.6C10.4401 1.5 10.8601 1.5 11.181 1.66349C11.4632 1.8073 11.6927 2.03677 11.8365 2.31901C12 2.63988 12 3.05992 12 3.9V12.1C12 12.9401 12 13.3601 11.8365 13.681C11.6927 13.9632 11.4632 14.1927 11.181 14.3365C10.8601 14.5 10.4401 14.5 9.6 14.5H6.4C5.55992 14.5 5.13988 14.5 4.81901 14.3365C4.53677 14.1927 4.3073 13.9632 4.16349 13.681C4 13.3601 4 12.9401 4 12.1V3.9ZM7 2.5C6.58579 2.5 6.25 2.83579 6.25 3.25C6.25 3.66421 6.58579 4 7 4H9C9.41421 4 9.75 3.66421 9.75 3.25C9.75 2.83579 9.41421 2.5 9 2.5H7Z"></path></svg>'),zue=t=>{const e=wn(),r=()=>t.fill||e.colors.icon.primary;return(()=>{const n=jue.cloneNode(!0),i=n.firstChild;return ir(()=>gt(i,"fill",r())),n})()},Wue=or('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M1.5 6.8C1.5 5.11984 1.5 4.27976 1.82698 3.63803C2.1146 3.07354 2.57354 2.6146 3.13803 2.32698C3.77976 2 4.61984 2 6.3 2H9.7C11.3802 2 12.2202 2 12.862 2.32698C13.4265 2.6146 13.8854 3.07354 14.173 3.63803C14.5 4.27976 14.5 5.11984 14.5 6.8V11.5H15.25C15.6642 11.5 16 11.8358 16 12.25C16 12.6642 15.6642 13 15.25 13H0.75C0.335786 13 0 12.6642 0 12.25C0 11.8358 0.335786 11.5 0.75 11.5H1.5V6.8ZM3 11.5H13V5.9C13 5.05992 13 4.63988 12.8365 4.31901C12.6927 4.03677 12.4632 3.8073 12.181 3.66349C11.8601 3.5 11.4401 3.5 10.6 3.5H5.4C4.55992 3.5 4.13988 3.5 3.81901 3.66349C3.53677 3.8073 3.3073 4.03677 3.16349 4.31901C3 4.63988 3 5.05992 3 5.9V11.5Z"></path></svg>'),Hue=t=>{const e=wn(),r=()=>t.fill||e.colors.icon.primary;return(()=>{const n=Wue.cloneNode(!0),i=n.firstChild;return ir(()=>gt(i,"fill",r())),n})()},que=or('<svg xmlns="http://www.w3.org/2000/svg" width="17" height="16" viewBox="0 0 17 16" fill="none"><g clip-path="url(#clip0_3676_1603)"><path fill-rule="evenodd" clip-rule="evenodd" d="M15.5 1.25049C15.5 0.836275 15.1642 0.500488 14.75 0.500488C14.3358 0.500488 14 0.836275 14 1.25049V3.67012C12.7187 2.04487 10.7318 1.00049 8.5 1.00049C4.63401 1.00049 1.5 4.1345 1.5 8.00049C1.5 11.8665 4.63401 15.0005 8.5 15.0005C11.6844 15.0005 14.3703 12.8748 15.2199 9.96661C15.3361 9.56902 15.1079 9.15254 14.7103 9.03638C14.3127 8.92023 13.8962 9.14838 13.7801 9.54597C13.1123 11.8319 11 13.5005 8.5 13.5005C5.46243 13.5005 3 11.0381 3 8.00049C3 4.96292 5.46243 2.50049 8.5 2.50049C10.321 2.50049 11.9363 3.3855 12.9377 4.75049H10.5C10.0858 4.75049 9.75 5.08627 9.75 5.50049C9.75 5.9147 10.0858 6.25049 10.5 6.25049H14.75C15.1642 6.25049 15.5 5.9147 15.5 5.50049V1.25049Z"></path></g><defs><clipPath id="clip0_3676_1603"><rect width="16" height="16" fill="white" transform="translate(0.5 0.000488281)"></rect></clipPath></defs></svg>'),kp=t=>{const e=wn(),r=()=>t.fill||e.colors.accent;return(()=>{const n=que.cloneNode(!0),i=n.firstChild,s=i.firstChild;return ir(()=>gt(s,"fill",r())),n})()},Vue=or('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewB
1335ox="0 0 16 16" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M13 4.06119V6.75053C13 7.16474 13.3358 7.50053 13.75 7.50053C14.1642 7.50053 14.5 7.16474 14.5 6.75053V2.75053L14.5 2.72807C14.5001 2.63191 14.5003 2.49627 14.4842 2.37627C14.4638 2.22503 14.4063 1.99261 14.2071 1.79342C14.0079 1.59423 13.7755 1.5367 13.6243 1.51637C13.5043 1.50023 13.3686 1.50039 13.2725 1.50051L13.25 1.50053H9.25C8.83579 1.50053 8.5 1.83631 8.5 2.25053C8.5 2.66474 8.83579 3.00053 9.25 3.00053H11.9393L7.21967 7.7202C6.92678 8.01309 6.92678 8.48796 7.21967 8.78086C7.51256 9.07375 7.98744 9.07375 8.28033 8.78086L13 4.06119ZM5.85 1.50053H5.81903H5.81899C5.21528 1.50052 4.71702 1.50051 4.31113 1.53367C3.88956 1.56812 3.50203 1.64204 3.13803 1.82751C2.57354 2.11513 2.1146 2.57407 1.82698 3.13856C1.64151 3.50256 1.56759 3.89009 1.53315 4.31166C1.49998 4.71755 1.49999 5.21581 1.5 5.81953V5.81955V5.85053V10.1505V10.1815V10.1815C1.49999 10.7852 1.49998 11.2835 1.53315 11.6894C1.56759 12.111 1.64151 12.4985 1.82698 12.8625C2.1146 13.427 2.57354 13.8859 3.13803 14.1735C3.50203 14.359 3.88956 14.4329 4.31113 14.4674C4.71702 14.5005 5.21527 14.5005 5.81897 14.5005H5.81901H5.85H10.15H10.181H10.181C10.7847 14.5005 11.283 14.5005 11.6889 14.4674C12.1104 14.4329 12.498 14.359 12.862 14.1735C13.4265 13.8859 13.8854 13.427 14.173 12.8625C14.3585 12.4985 14.4324 12.111 14.4669 11.6894C14.5 11.2835 14.5 10.7853 14.5 10.1816V10.1815V10.1505V9.75053C14.5 9.33631 14.1642 9.00053 13.75 9.00053C13.3358 9.00053 13 9.33631 13 9.75053V10.1505C13 10.793 12.9994 11.2297 12.9718 11.5672C12.945 11.8961 12.8963 12.0642 12.8365 12.1815C12.6927 12.4638 12.4632 12.6932 12.181 12.837C12.0637 12.8968 11.8955 12.9455 11.5667 12.9724C11.2292 12.9999 10.7924 13.0005 10.15 13.0005H5.85C5.20757 13.0005 4.77085 12.9999 4.43328 12.9724C4.10447 12.9455 3.93632 12.8968 3.81902 12.837C3.53677 12.6932 3.3073 12.4638 3.16349 12.1815C3.10372 12.0642 3.05503 11.8961 3.02816 11.5672C3.00058 11.2297 3 10.793 3 10.1505V5.85053C3 5.20809 3.00058 4.77137 3.02816 4.43381C3.05503 4.10499 3.10372 3.93684 3.16349 3.81954C3.3073 3.5373 3.53677 3.30783 3.81902 3.16402C3.93632 3.10425 4.10447 3.05556 4.43328 3.02869C4.77085 3.00111 5.20757 3.00053 5.85 3.00053H6.25C6.66422 3.00053 7 2.66474 7 2.25053C7 1.83631 6.66422 1.50053 6.25 1.50053H5.85Z"></path></svg>'),Pp=t=>{const e=wn(),r=()=>t.fill||e.colors.accent;return(()=>{const n=Vue.cloneNode(!0),i=n.firstChild;return ir(()=>gt(i,"fill",r())),n})()},Kue=or('<svg xmlns="http://www.w3.org/2000/svg" width="17" height="16" viewBox="0 0 17 16" fill="none"><g clip-path="url(#clip0_3676_1274)"><path fill-rule="evenodd" clip-rule="evenodd" d="M1.82698 2.63901C1.5 3.28074 1.5 4.12082 1.5 5.80098V8.80098V9.00098V10.201C1.5 11.8811 1.5 12.7212 1.82698 13.3629C2.1146 13.9274 2.57354 14.3864 3.13803 14.674C3.77976 15.001 4.61984 15.001 6.3 15.001H11.7C13.3802 15.001 14.2202 15.001 14.862 14.674C15.4265 14.3864 15.8854 13.9274 16.173 13.3629C16.5 12.7212 16.5 11.8811 16.5 10.201V8.80098C16.5 7.12082 16.5 6.28074 16.173 5.63901C15.8854 5.07452 15.4265 4.61558 14.862 4.32796C14.743 4.26733 14.6172 4.21795 14.4805 4.17772C14.4501 3.49449 14.3722 3.02994 14.173 2.63901C13.8854 2.07452 13.4265 1.61558 12.862 1.32796C12.2202 1.00098 11.3802 1.00098 9.7 1.00098H6.3C4.61984 1.00098 3.77976 1.00098 3.13803 1.32796C2.57354 1.61558 2.1146 2.07452 1.82698 2.63901ZM12.9861 4.00942C12.9684 3.7108 12.9281 3.49982 12.8365 3.31999C12.6927 3.03775 12.4632 2.80828 12.181 2.66447C11.8601 2.50098 11.4401 2.50098 10.6 2.50098H5.4C4.55992 2.50098 4.13988 2.50098 3.81901 2.66447C3.53677 2.80828 3.3073 3.03775 3.16349 3.31999C3.03615 3.56991 3.00799 3.88 3.00177 4.40188C3.04646 4.37612 3.09189 4.35146 3.13803 4.32796C3.77976 4.00098 4.61984 4.00098 6.3 4.00098H11.7C12.1966 4.00098 12.6197 4.00098 12.9861 4.00942ZM3 7.90098V8.10098C3 8.47468 3 8.76527 3.01439 9.00098H3V11.101C3 11.9411 3 12.3611 3.16349 12.682C3.3073 12.9642 3.53677 13.1937 3.81901 13.3375C4.13988 13.501 4.55992 13.501 5.4 13.501H12.6C13.4401 13.501 13.8601 13.501 14.181 13.3375C14.4632 13.1937 14.6927 12.9642 14.8365 12.682C15 12.3611 15 11.9411 15 11.
1335101V7.90098C15 7.0609 15 6.64086 14.8365 6.31999C14.6927 6.03775 14.4632 5.80828 14.181 5.66447C13.8601 5.50098 13.4401 5.50098 12.6 5.50098H5.4C4.55992 5.50098 4.13988 5.50098 3.81901 5.66447C3.53677 5.80828 3.3073 6.03775 3.16349 6.31999C3 6.64086 3 7.0609 3 7.90098ZM10.5 9.75098C10.5 9.33676 10.8358 9.00098 11.25 9.00098H12.75C13.1642 9.00098 13.5 9.33676 13.5 9.75098C13.5 10.1652 13.1642 10.501 12.75 10.501H11.25C10.8358 10.501 10.5 10.1652 10.5 9.75098Z"></path></g><defs><clipPath id="clip0_3676_1274"><rect width="16" height="16" fill="white" transform="translate(0.5 0.000976562)"></rect></clipPath></defs></svg>'),Gue=t=>{const e=wn(),r=()=>t.fill||e.colors.accent;return(()=>{const n=Kue.cloneNode(!0),i=n.firstChild,s=i.firstChild;return ir(()=>gt(s,"fill",r())),n})()},Yue=or('<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M39.6319 16.8719C38.3212 16.2041 36.7002 16.0478 34 16.0112V11C34 5.47715 29.5228 1 24 1C18.4772 1 14 5.47715 14 11V16.0112C11.2998 16.0478 9.6788 16.2041 8.36808 16.8719C6.86278 17.6389 5.63893 18.8628 4.87195 20.3681C4 22.0794 4 24.3196 4 28.8V32.2C4 36.6804 4 38.9206 4.87195 40.6319C5.63893 42.1372 6.86278 43.3611 8.36808 44.1281C10.0794 45 12.3196 45 16.8 45H31.2C35.6804 45 37.9206 45 39.6319 44.1281C41.1372 43.3611 42.3611 42.1372 43.1281 40.6319C44 38.9206 44 36.6804 44 32.2V28.8C44 24.3196 44 22.0794 43.1281 20.3681C42.3611 18.8628 41.1372 17.6389 39.6319 16.8719ZM31 11V16H17V11C17 7.13401 20.134 4 24 4C27.866 4 31 7.13401 31 11ZM7.54497 21.73C7 22.7996 7 24.1997 7 27V34C7 36.8003 7 38.2004 7.54497 39.27C8.02433 40.2108 8.78924 40.9757 9.73005 41.455C10.7996 42 12.1997 42 15 42H33C35.8003 42 37.2004 42 38.27 41.455C39.2108 40.9757 39.9757 40.2108 40.455 39.27C41 38.2004 41 36.8003 41 34V27C41 24.1997 41 22.7996 40.455 21.73C39.9757 20.7892 39.2108 20.0243 38.27 19.545C37.2004 19 35.8003 19 33 19H15C12.1997 19 10.7996 19 9.73005 19.545C8.78924 20.0243 8.02433 20.7892 7.54497 21.73ZM24 24C23.1716 24 22.5 24.6716 22.5 25.5V29.5C22.5 30.3284 23.1716 31 24 31C24.8284 31 25.5 30.3284 25.5 29.5V25.5C25.5 24.6716 24.8284 24 24 24Z"></path></svg>'),Zue=t=>{const e=wn(),r=()=>t.fill||e.colors.icon.secondary;return(()=>{const n=Yue.cloneNode(!0),i=n.firstChild;return ir(s=>{const o=t.class,a=r();return o!==s._v$&>(n,"class",s._v$=o),a!==s._v$2&>(i,"fill",s._v$2=a),s},{_v$:void 0,_v$2:void 0}),n})()},Jue=or('<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M37.485 37.3849C40.894 33.9506 43 29.2212 43 24C43 13.5066 34.4934 5 24 5C13.5066 5 5 13.5066 5 24C5 29.2213 7.1061 33.9507 10.5151 37.385C13.3583 32.9438 18.3354 30 24.0001 30C29.6647 30 34.6418 32.9437 37.485 37.3849ZM35.1809 39.3635C32.9143 35.5532 28.7554 33 24.0001 33C19.2448 33 15.0858 35.5533 12.8193 39.3636C15.9564 41.6506 19.8206 43 24 43C28.1795 43 32.0437 41.6505 35.1809 39.3635ZM24 46C36.1503 46 46 36.1503 46 24C46 11.8497 36.1503 2 24 2C11.8497 2 2 11.8497 2 24C2 36.1503 11.8497 46 24 46ZM24 24C26.7614 24 29 21.7614 29 19C29 16.2386 26.7614 14 24 14C21.2386 14 19 16.2386 19 19C19 21.7614 21.2386 24 24 24ZM24 27C28.4183 27 32 23.4183 32 19C32 14.5817 28.4183 11 24 11C19.5817 11 16 14.5817 16 19C16 23.4183 19.5817 27 24 27Z"></path></svg>'),Que=t=>{const e=wn(),r=()=>t.fill||e.colors.icon.secondary;return(()=>{const n=Jue.cloneNode(!0),i=n.firstChild;return ir(s=>{const o=t.class,a=r();return o!==s._v$&>(n,"class",s._v$=o),a!==s._v$2&>(i,"fill",s._v$2=a),s},{_v$:void 0,_v$2:void 0}),n})()},Xue=or('<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M34.5607 4.43934C33.9749 3.85355 33.0251 3.85355 32.4393 4.43934C31.8536 5.02513 31.8536 5.97487 32.4393 6.56066L37.8787 12H10.5C9.67157 12 9 12.6716 9 13.5C9 14.3284 9.67157 15 10.5 15H37.8787L32.4393 20.4393C31.8536 21.0251 31.8536 21.9749 32.4393 22.5607C33.0251 23.1464 33.9749 23.1464 34.5607 22.5607L42.5607 14.5607C43.1464 13.9749 43.1464 13.0251 42.5607 12.4393L34.5607 4.43934ZM13.4393 25.4393
1335C14.0251 24.8536 14.9749 24.8536 15.5607 25.4393C16.1464 26.0251 16.1464 26.9749 15.5607 27.5607L10.1213 33H37.5C38.3284 33 39 33.6716 39 34.5C39 35.3284 38.3284 36 37.5 36H10.1213L15.5607 41.4393C16.1464 42.0251 16.1464 42.9749 15.5607 43.5607C14.9749 44.1464 14.0251 44.1464 13.4393 43.5607L5.43934 35.5607C4.85355 34.9749 4.85355 34.0251 5.43934 33.4393L13.4393 25.4393Z"></path></svg>'),efe=t=>{const e=wn(),r=()=>t.fill||e.colors.icon.secondary;return(()=>{const n=Xue.cloneNode(!0),i=n.firstChild;return ir(s=>{const o=t.class,a=r();return o!==s._v$&>(n,"class",s._v$=o),a!==s._v$2&>(i,"fill",s._v$2=a),s},{_v$:void 0,_v$2:void 0}),n})()},tfe=or('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M1.75 12.002C1.75 9.20169 1.75 7.80156 2.29497 6.732C2.77433 5.79119 3.53924 5.02629 4.48005 4.54692C5.54961 4.00195 6.94974 4.00195 9.75 4.00195H17.25C20.0503 4.00195 21.4504 4.00195 22.52 4.54692C23.4608 5.02629 24.2257 5.79119 24.705 6.732C24.8256 6.96861 24.9195 7.2214 24.9926 7.50195H21.5C19.6377 7.50195 18.7065 7.50195 17.9609 7.77334C16.711 8.22828 15.7263 9.21291 15.2714 10.4629C15 11.2085 15 12.1396 15 14.002C15 15.8643 15 16.7954 15.2714 17.541C15.7263 18.791 16.711 19.7756 17.9609 20.2306C18.7065 20.502 19.6377 20.502 21.5 20.502H24.9926C24.9195 20.7825 24.8256 21.0353 24.705 21.2719C24.2257 22.2127 23.4608 22.9776 22.52 23.457C21.4504 24.002 20.0503 24.002 17.25 24.002H9.75C6.94974 24.002 5.54961 24.002 4.48005 23.457C3.53924 22.9776 2.77433 22.2127 2.29497 21.2719C1.75 20.2023 1.75 18.8022 1.75 16.002V12.002ZM16.4999 13.802C16.4999 12.1218 16.4999 11.2817 16.8269 10.64C17.1145 10.0755 17.5735 9.61656 18.138 9.32894C18.7797 9.00196 19.6198 9.00196 21.2999 9.00196H23.1999C24.8801 9.00196 25.7202 9.00196 26.3619 9.32894C26.9264 9.61656 27.3853 10.0755 27.673 10.64C27.9999 11.2817 27.9999 12.1218 27.9999 13.802V14.202C27.9999 15.8821 27.9999 16.7222 27.673 17.3639C27.3853 17.9284 26.9264 18.3874 26.3619 18.675C25.7202 19.002 24.8801 19.002 23.1999 19.002H21.2999C19.6198 19.002 18.7797 19.002 18.138 18.675C17.5735 18.3874 17.1145 17.9284 16.8269 17.3639C16.4999 16.7222 16.4999 15.8821 16.4999 14.202V13.802ZM22.4999 14.002C22.4999 14.9685 21.7164 15.752 20.7499 15.752C19.7834 15.752 18.9999 14.9685 18.9999 14.002C18.9999 13.0355 19.7834 12.252 20.7499 12.252C21.7164 12.252 22.4999 13.0355 22.4999 14.002Z"></path></svg>'),rfe=t=>{const e=wn(),r=()=>t.fill||e.colors.constant.white;return(()=>{const n=tfe.cloneNode(!0),i=n.firstChild;return ir(s=>{const o=t.class,a=r();return o!==s._v$&>(n,"class",s._v$=o),a!==s._v$2&>(i,"fill",s._v$2=a),s},{_v$:void 0,_v$2:void 0}),n})()},nfe=or('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.0001 10.0001C10.0016 8.02333 10.0267 6.98719 10.436 6.18404C10.8195 5.43139 11.4314 4.81947 12.184 4.43597C13.0397 4 14.1598 4 16.4 4H17.6C19.8402 4 20.9603 4 21.816 4.43597C22.5686 4.81947 23.1805 5.43139 23.564 6.18404C24 7.03969 24 8.15979 24 10.4V11.6C24 13.8402 24 14.9603 23.564 15.816C23.1805 16.5686 22.5686 17.1805 21.816 17.564C21.0128 17.9733 19.9767 17.9984 17.9999 17.9999C17.9984 19.9767 17.9733 21.0128 17.564 21.816C17.1805 22.5686 16.5686 23.1805 15.816 23.564C14.9603 24 13.8402 24 11.6 24H10.4C8.15979 24 7.03969 24 6.18404 23.564C5.43139 23.1805 4.81947 22.5686 4.43597 21.816C4 20.9603 4 19.8402 4 17.6V16.4C4 14.1598 4 13.0397 4.43597 12.184C4.81947 11.4314 5.43139 10.8195 6.18404 10.436C6.98719 10.0267 8.02333 10.0016 10.0001 10.0001ZM10 11.5H9.5C8.09987 11.5 7.3998 11.5 6.86502 11.7725C6.39462 12.0122 6.01217 12.3946 5.77248 12.865C5.5 13.3998 5.5 14.0999 5.5 15.5V18.5C5.5 19.9001 5.5 20.6002 5.77248 21.135C6.01217 21.6054 6.39462 21.9878 6.86502 22.2275C7.3998 22.5 8.09987 22.5 9.5 22.5H12.5C13.9001 22.5 14.6002 22.5 15.135 22.2275C15.6054 21.9878 15.9878 21.6054 16.2275 21.135C16.5 20.6002 16.5 19.9001 16.5 18.5V18H16.4C14.1598 18 13.0397 18 12.184 17.564C11.4314 17.1805 10.8195 16.5686 10.436 15.816C10 14.9603 10 13.8402 10 11.6V11.5ZM11.5 9.5C11.5 8.09987 11.5 7.3998 11.7725 6.86502C12.0122 6.39462 12.3946 6.01217 12.865 5.77248C13.3998 5.5 14.0999 5.5 15.5 5.5H18.5C19.9001 5.5 20.6002 5.5 21.135 5.77248C21.6054 6.01217 21.9878 6.39462 22.2275 6.86502C22.5 7.3998 22.5 8.09987 22.5 9.5V12.5C22.5 13.9001 22.5 14.6002 22.2275 15.135C21.9878 15.6054 21.6054 15.9878 21.135 16.2275C20.6002 16.5 19.9001 16.5 18.5 16.5H15.5C14.0999 16.5 13.3998 16.5 12.865 16.2275C12.3946 15.9878 12.0122 15.6054 11.7725 15.135C11.5 14.6002 11.5 13.9001 11.5 12.5V9.5Z"></path></svg>'),ife=t=>{const e=wn(),r=()=>t.fill||e.colors.icon.secondary;return(()=>{const n=nfe.cloneNode(!0),i=n.firstChild;return ir(s=>{const o=r(),a=r();return o!==s._v$&>(n,"fill",s._v$=o),a!==s._v$2&>(i,"fill",s._v$2=a),s},{_v$:void 0,_v$2:void 0}),n})()}
1335,sfe=or('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="17" viewBox="0 0 16 17" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M1 4.12695C1 3.07754 1 2.55284 1.19202 2.14684C1.38986 1.72856 1.7266 1.39181 2.14489 1.19397C2.55088 1.00195 3.07559 1.00195 4.125 1.00195C5.17441 1.00195 5.69912 1.00195 6.10511 1.19397C6.5234 1.39181 6.86014 1.72856 7.05798 2.14684C7.25 2.55284 7.25 3.07754 7.25 4.12695C7.25 5.17636 7.25 5.70107 7.05798 6.10706C6.86014 6.52535 6.5234 6.8621 6.10511 7.05993C5.69912 7.25195 5.17441 7.25195 4.125 7.25195C3.07559 7.25195 2.55088 7.25195 2.14489 7.05993C1.7266 6.8621 1.38986 6.52535 1.19202 6.10706C1 5.70107 1 5.17636 1 4.12695ZM2.5 3.30195C2.5 3.02193 2.5 2.88191 2.5545 2.77496C2.60243 2.68088 2.67892 2.60439 2.773 2.55645C2.87996 2.50195 3.01997 2.50195 3.3 2.50195H4.95C5.23003 2.50195 5.37004 2.50195 5.477 2.55645C5.57108 2.60439 5.64757 2.68088 5.6955 2.77496C5.75 2.88191 5.75 3.02193 5.75 3.30195V4.95195C5.75 5.23198 5.75 5.37199 5.6955 5.47895C5.64757 5.57303 5.57108 5.64952 5.477 5.69746C5.37004 5.75195 5.23003 5.75195 4.95 5.75195H3.3C3.01997 5.75195 2.87996 5.75195 2.773 5.69746C2.67892 5.64952 2.60243 5.57303 2.5545 5.47895C2.5 5.37199 2.5 5.23198 2.5 4.95195V3.30195ZM1 11.877C1 10.8275 1 10.3028 1.19202 9.89684C1.38986 9.47856 1.7266 9.14181 2.14489 8.94397C2.55088 8.75195 3.07559 8.75195 4.125 8.75195C5.17441 8.75195 5.69912 8.75195 6.10511 8.94397C6.5234 9.14181 6.86014 9.47856 7.05798 9.89684C7.25 10.3028 7.25 10.8275 7.25 11.877C7.25 12.9264 7.25 13.4511 7.05798 13.8571C6.86014 14.2753 6.5234 14.6121 6.10511 14.8099C5.69912 15.002 5.17441 15.002 4.125 15.002C3.07559 15.002 2.55088 15.002 2.14489 14.8099C1.7266 14.6121 1.38986 14.2753 1.19202 13.8571C1 13.4511 1 12.9264 1 11.877ZM2.5 11.052C2.5 10.7719 2.5 10.6319 2.5545 10.525C2.60243 10.4309 2.67892 10.3544 2.773 10.3064C2.87996 10.252 3.01997 10.252 3.3 10.252H4.95C5.23003 10.252 5.37004 10.252 5.477 10.3064C5.57108 10.3544 5.64757 10.4309 5.6955 10.525C5.75 10.6319 5.75 10.7719 5.75 11.052V12.702C5.75 12.982 5.75 13.122 5.6955 13.2289C5.64757 13.323 5.57108 13.3995 5.477 13.4475C5.37004 13.502 5.23003 13.502 4.95 13.502H3.3C3.01997 13.502 2.87996 13.502 2.773 13.4475C2.67892 13.3995 2.60243 13.323 2.5545 13.2289C2.5 13.122 2.5 12.982 2.5 12.702V11.052ZM8.94202 2.14684C8.75 2.55284 8.75 3.07754 8.75 4.12695C8.75 5.17636 8.75 5.70107 8.94202 6.10706C9.13986 6.52535 9.4766 6.8621 9.89489 7.05993C10.3009 7.25195 10.8256 7.25195 11.875 7.25195C12.9244 7.25195 13.4491 7.25195 13.8551 7.05993C14.2734 6.8621 14.6101 6.52535 14.808 6.10706C15 5.70107 15 5.17636 15 4.12695C15 3.07754 15 2.55284 14.808 2.14684C14.6101 1.72856 14.2734 1.39181 13.8551 1.19397C13.4491 1.00195 12.9244 1.00195 11.875 1.00195C10.8256 1.00195 10.3009 1.00195 9.89489 1.19397C9.4766 1.39181 9.13986 1.72856 8.94202 2.14684ZM10.3045 2.77496C10.25 2.88191 10.25 3.02193 10.25 3.30195V4.95195C10.25 5.23198 10.25 5.37199 10.3045 5.47895C10.3524 5.57303 10.4289 5.64952 10.523 5.69746C10.63 5.75195 10.77 5.75195 11.05 5.75195H12.7C12.98 5.75195 13.12 5.75195 13.227 5.69746C13.3211 5.64952 13.3976 5.57303 13.4455 5.47895C13.5 5.37199 13.5 5.23198 13.5 4.95195V3.30195C13.5 3.02193 13.5 2.88191 13.4455 2.77496C13.3976 2.68088 13.3211 2.60439 13.227 2.55645C13.12 2.50195 12.98 2.50195 12.7 2.50195H11.05C10.77 2.50195 10.63 2.50195 10.523 2.55645C10.4289 2.60439 10.3524 2.68088 10.3045 2.77496ZM8.80727 9.13518C8.75 9.26242 8.75 9.4256 8.75 9.75195C8.75 10.0783 8.75 10.2415 8.80727 10.3687C8.87245 10.5136 8.9884 10.6295 9.13323 10.6947C9.26047 10.752 9.42365 10.752 9.75 10.752C10.0764 10.752 10.2395 10.752 10.3668 10.6947C10.5116 10.6295 10.6276 10.5136 10.6927 10.3687C10.75 10.2415 10.75 10.0783 10.75 9.75195C10.75 9.4256 10.75 9.26242 10.6927 9.13518C10.6276 8.99035 10.5116 8.8744 10.3668 8.80922C10.2395 8.75195 10.0764 8.75195 9.75 8.75195C9.42365 8.75195 9.26047 8.75195 9.13323 8.80922C8.9884 8.8744 8.87245 8.99035 8.80727 9.13518ZM10.87 11.8771C10.87 11.546 10.87 11.3805 10.9289 11.2517C10.9938 11.1098 11.1077 10.9959 11.2497 10.931C11.3784 10.8721 11.5439 10.8721 11.875 10.8721C12.2061 10.8721 12.3716 10.8721 12.5003 10.931C12.6423 10.9959 12.7562 11.1098 12.8211 11.2517C12.88 11.3805 12.88 11.546 12.88 11.8771C12.88 12.2081 12.88 12.3737 12.8211 12.5024C12.7562 12.6444 12.6423 12.7583 12.5003 12.8232C12.3716 12.8821 12.2061 12.8821 11.875 12.8821C11.5439 12.8821 11.3784 12.8821 11.2497 12.8232C11.1077 12.7583 10.9938 12.6444 10.9289 12.5024C10.87 12.3737 10.87 12.2081 10.87 11.8771ZM8.80727 13.3852C8.75 13.5124 8.75 13.6756 8.75 14.002C8.75 14.3283 8.75 14.4915 8.80727 14.6187C8.87245 14.7636 8.9884 14.8795 9.13323 14.9447C9.26047 15.002 9.42365 15.002 9.75 15.002C10.0764 15.002 10.2395 15.002 10.3668 14.9447C10.5116 14.8795 10.6276 14.7636 10.6927 14.6187C10.75 14.4915 10.75 14.3283 10.75 14.002C10.75 13.6756 10.75 13.5124 10.6927 13.3852C10.6276 13.2404 10.5116 13.1244 10.3668 13.0592C10.2395 13.002 10.0764 13.002 9.75 13.002C9.42365 13.002 9.26047 13.002 9.13323 13.0592C8.9884 13.1244 8.87245 13.2404 8.80727 13.3852ZM13 9.75195C13 9.4256 13 9.26242 13.0573 9.13518C13.1224 8.99035 13.2384 8.8744 13.3832 8.80922C13.5105 8.75195 13.6736 8.75195 14 8.75195C14.3264 8.75195 14.4895 8.75195 14.6168 8.80922C14.7616 8.8744 14.8776 8.99035 14.9427 9.13518C15 9.26242 15 9.4256 15 9.75195C15 10.0783 15 10.2415 14.9427 10.3687C14.8776 10.5136 14.7616 10.6295 14.6168 10.6947C14.4895 10.752 14.3264 10.752 14 10.752C13.6736 10.752 13.5105 10.752 13.3832 10.6947C13.2384 10.6295 13.1224 10.5136 13.0573 10.3687C13 10.2415 13 10.0783 13 9.75195ZM13.0573 13.3852C13 13.5124 13 13.6756 13 14.002C13 14.3283 13 14.4915 13.0573 14.6187C13.1224 14.7636 13.2384 14.8795 13.3832 14.9447C13.5105 15.002 13.6736 15.002 14 15.002C14.3264 15.002 14.4895 15.002 14.6168 14.9447C14.7616 14.8795 14.8776 14.7636 14.9427 14.6187C15 14.4915 15 14.3283 15 14.002C15 13.6756 15 13.5124 14.9427 13.3852C14.8776 13.2404 14.7616 13.1244 14.6168 13.0592C14.4895 13.002 14.3264 13.002 14 13.002C13.6736 13.002 13.5105 13.002 13.3832 13.0592C13.2384 13.1244 13.1224 13.2404 13.0573 13.3852Z"></path></svg>'),BC=t=>{const e=wn(),r=()=>t.fill||e.colors.icon.secondary;return(()=>{const n=sfe.cloneNode(!0),i=n.firstChild;return ir(()=>gt(i,"fill",r())),n})()},ofe={m:"16px",s:"12px",none:"0"},afe={m:"6px",s:"6px",none:"0"},cfe=ue.div` 1336 width: 60px; 1337 height: 60px; 1338 padding: 8px; 1339 margin-bottom: 8px; 1340 border-radius: ${t=>ofe[t.theme.borderRadius]}; 1341 background-color: ${t=>t.theme.colors.background.tint}; 1342 display: grid; 1343 grid-template: 1fr 1fr / 1fr 1fr; 1344 gap: 4px; 1345`,lfe=ue(nj)`
1346 width: 20px; 1347 height: 20px; 1348 border-radius: ${t=>afe[t.theme.borderRadius]}; 1349`,ij=t=>F(R3,{get name(){return t.labelLine1},get secondLine(){return t.labelLine2},get icon(){return F(cfe,{get children(){return F(Qp,{each:[0,1,2,3],children:e=>F(lfe,{get src(){return t.images[e]}})})}})},onClick:()=>t.onClick()}),lc="telegram-wallet",Jy={TON:"https://raw.githubusercontent.com/ton-connect/sdk/main/assets/ton-icon-48.png",TG:"https://raw.githubusercontent.com/ton-connect/sdk/main/assets/tg.png"},sj=t=>{const[e]=vc(),r=()=>{if(t.wallet.appName!==lc){if("isPreferred"in t.wallet&&t.wallet.isPreferred)return e("walletItem.recent",{},"Recent");if(lh(t.wallet))return e("walletItem.installed",{},"Installed");if(t.wallet.name==="Tonkeeper")return e("walletItem.popular",{},"Popular")}};return Pe((()=>{const n=Pe(()=>t.wallet.appName===lc);return()=>n()?F(R3,{get icon(){return t.wallet.imageUrl},get name(){return e("walletItem.walletOn",{},"Wallet in")},secondLine:"Telegram",get badgeUrl(){return Jy.TG},onClick:()=>t.onClick(),get class(){return t.class}}):F(R3,{get icon(){return t.wallet.imageUrl},get name(){return t.wallet.name},get secondLine(){return r()},secondLineColorPrimary:!1,onClick:()=>t.onClick(),get class(){return t.class}})})())},ufe=ue.div` 1350 width: 100%; 1351 overflow-y: auto; 1352 max-height: ${t=>t.maxHeight}; 1353 1354 scrollbar-width: none; 1355 &&::-webkit-scrollbar {
1356 display: none; 1357 } 1358 1359 &&::-webkit-scrollbar-track { 1360 background: transparent; 1361 } 1362 1363 &&::-webkit-scrollbar-thumb { 1364 display: none; 1365 } 1366`,ffe=ue.div` 1367 height: 1px; 1368 margin: 0 -24px; 1369 width: calc(100% + 48px); 1370 opacity: 0.08; 1371 background: ${t=>t.isShown?t.theme.colors.icon.secondary:"transparent"}; 1372 transition: background 0.15s ease-in-out; 1373 1374 ${Qo("mobile")} { 1375 width: 100%; 1376 margin: 0; 1377 } 1378`,[dfe,hfe]=yt(((zT=_l())==null?void 0:zT.innerHeight)||0);_l()&&window.addEventListener("resize",()=>hfe(window.innerHeight));const[rg,pfe]=yt(mp("mobile")),O3=()=>pfe(mp("mobile"));_l()&&(window.addEventListener("resize",()=>O3()),window.addEventListener("load",()=>O3(),{once:!0}));const eS=t=>{const[e,r]=yt(!1),n=o=>{r(o.target.scrollTop>0)},i=()=>rg()?150:200,s=()=>t.maxHeight!==void 0?`${t.maxHeight}px`:`${dfe()-i()}px`;return[F(ffe,{get isShown(){return e()}}),F(ufe,{get maxHeight(){return s()},onScroll:n,get class(){return t.class},get children(){return t.children}})]},gfe=ue.a` 1379 display: block; 1380 text-decoration: unset; 1381`,zf=t=>F(gfe,rl({get href(){return t.href},get target(){return t.blank?"_blank":"_self"},get class(){return t.class}},()=>t.blank?{rel:"noreferrer noopener"}:{},{get children(){return t.children}})),Ru=cx(),mfe=or('<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M7.76228 2.09998H10.2378C11.0458 2.09997 11.7067 2.09996 12.2438 2.14384C12.7997 2.18926 13.3017 2.28614 13.7706 2.52505C14.5045 2.89896 15.1011 3.49558 15.475 4.22941C15.7139 4.6983 15.8108 5.20038 15.8562 5.75629C15.9001 6.29337 15.9001 6.95422 15.9001 7.76227V8.1H16.2377C17.0457 8.09999 17.7066 8.09998 18.2437 8.14386C18.7996 8.18928 19.3017 8.28616 19.7705 8.52507C20.5044 8.89898 21.101 9.4956 21.4749 10.2294C21.7138 10.6983 21.8107 11.2004 21.8561 11.7563C21.9 12.2934 21.9 12.9542 21.9 13.7623V16.2377C21.9 17.0458 21.9 17.7066 21.8561 18.2437C21.8107 18.7996 21.7138 19.3017 21.4749 19.7706C21.101 20.5044 20.5044 21.101 19.7705 21.4749C19.3017 21.7138 18.7996 21.8107 18.2437 21.8561C17.7066 21.9 17.0458 21.9 16.2378 21.9H13.7623C12.9543 21.9 12.2934 21.9 11.7563 21.8561C11.2004 21.8107 10.6983 21.7138 10.2294 21.4749C9.49561 21.101 8.89898 20.5044 8.52508 19.7706C8.28616 19.3017 8.18928 18.7996 8.14386 18.2437C8.09998 17.7066 8.09999 17.0458 8.1 16.2377V15.9H7.76227C6.95426 15.9 6.29335 15.9 5.75629 15.8561C5.20038 15.8107 4.6983 15.7138 4.22941 15.4749C3.49558 15.101 2.89896 14.5044 2.52505 13.7705C2.28614 13.3017 2.18926 12.7996 2.14384 12.2437C2.09996 11.7066 2.09997 11.0458 2.09998 10.2377V7.76228C2.09997 6.95424 2.09996 6.29336 2.14384 5.75629C2.18926 5.20038 2.28614 4.6983 2.52505 4.22941C2.89896 3.49558 3.49558 2.89896 4.22941 2.52505C4.6983 2.28614 5.20038 2.18926 5.75629 2.14384C6.29336 2.09996 6.95425 2.09997 7.76228 2.09998ZM8.1 14.1V13.7623C8.09999 12.9542 8.09998 12.2934 8.14386 11.7563C8.18928 11.2004 8.28616 10.6983 8.52508 10.2294C8.89898 9.4956 9.49561 8.89898 10.2294 8.52507C10.6983 8.28616 11.2004 8.18928 11.7563 8.14386C12.2934 8.09998 12.9542 8.09999 13.7623 8.1H14.1001V7.79998C14.1001 6.94505 14.0994 6.35798 14.0622 5.90287C14.0259 5.45827 13.9593 5.21944 13.8712 5.0466C13.6699 4.65146 13.3486 4.3302 12.9535 4.12886C12.7806 4.04079 12.5418 3.97419 12.0972 3.93786C11.6421 3.90068 11.055 3.89998 10.2001 3.89998H7.79998C6.94505 3.89998 6.35798 3.90068 5.90287 3.93786C5.45827 3.97419 5.21944 4.04079 5.0466 4.12886C4.65146 4.3302 4.3302 4.65146 4.12886 5.0466C4.04079 5.21944 3.97419 5.45827 3.93786 5.90287C3.90068 6.35798 3.89998 6.94505 3.89998 7.79998V10.2C3.89998 11.0549 3.90068 11.642 3.93786 12.0971C3.97419 12.5417 4.04079 12.7805 4.12886 12.9534C4.3302 13.3485 4.65146 13.6698 5.0466 13.8711C5.21944 13.9592 5.45827 14.0258 5.90287 14.0621C6.35798 14.0993 6.94505 14.1 7.79998 14.1H8.1ZM11.0466 10.1289C11.2195 10.0408 11.4583 9.97421 11.9029 9.93788C12.358 9.9007 12.9451 9.9 13.8 9.9H16.2C17.0549 9.9 17.642 9.9007 18.0971 9.93788C18.5417 9.97421 18.7805 10.0408 18.9534 10.1289C19.3485 10.3302 19.6698 10.6515 19.8711 11.0466C19.9592 11.2195 20.0258 11.4583 20.0621 11.9
1381029C20.0993 12.358 20.1 12.9451 20.1 13.8V16.2C20.1 17.0549 20.0993 17.642 20.0621 18.0971C20.0258 18.5417 19.9592 18.7805 19.8711 18.9534C19.6698 19.3485 19.3485 19.6698 18.9534 19.8711C18.7805 19.9592 18.5417 20.0258 18.0971 20.0621C17.642 20.0993 17.0549 20.1 16.2 20.1H13.8C12.9451 20.1 12.358 20.0993 11.9029 20.0621C11.4583 20.0258 11.2195 19.9592 11.0466 19.8711C10.6515 19.6698 10.3302 19.3485 10.1289 18.9534C10.0408 18.7805 9.97421 18.5417 9.93788 18.0971C9.9007 17.642 9.9 17.0549 9.9 16.2V13.8C9.9 12.9451 9.9007 12.358 9.93788 11.9029C9.97421 11.4583 10.0408 11.2195 10.1289 11.0466C10.3302 10.6515 10.6515 10.3302 11.0466 10.1289Z"></path></svg>'),yfe=t=>{const e=wn(),r=()=>t.fill||e.colors.icon.primary;return(()=>{const n=mfe.cloneNode(!0),i=n.firstChild;return ir(s=>{const o=t.class,a=r();return o!==s._v$&>(n,"class",s._v$=o),a!==s._v$2&>(i,"fill",s._v$2=a),s},{_v$:void 0,_v$2:void 0}),n})()},bfe=or('<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.7624 3.10001C7.95435 3.1 7.29349 3.09999 6.75642 3.14387C6.2005 3.18929 5.69842 3.28617 5.22954 3.52508C4.4957 3.89899 3.89908 4.49561 3.52517 5.22944C3.28626 5.69833 3.18938 6.20041 3.14396 6.75632C3.10008 7.2934 3.10009 7.95424 3.1001 8.76229V15.2377C3.10009 16.0458 3.10008 16.7066 3.14396 17.2437C3.18938 17.7996 3.28626 18.3017 3.52517 18.7706C3.89908 19.5044 4.4957 20.101 5.22954 20.4749C5.69842 20.7138 6.2005 20.8107 6.75642 20.8561C7.29349 20.9 7.95434 20.9 8.76239 20.9H12.0001C12.4972 20.9 12.9001 20.4971 12.9001 20C12.9001 19.503 12.4972 19.1 12.0001 19.1H8.8001C7.94517 19.1 7.3581 19.0993 6.90299 19.0621C6.45839 19.0258 6.21956 18.9592 6.04672 18.8711C5.65158 18.6698 5.33032 18.3485 5.12898 17.9534C5.04092 17.7805 4.97431 17.5417 4.93798 17.0971C4.9008 16.642 4.9001 16.0549 4.9001 15.2V8.80001C4.9001 7.94508 4.9008 7.35801 4.93798 6.9029C4.97431 6.4583 5.04092 6.21947 5.12898 6.04663C5.33032 5.65149 5.65158 5.33023 6.04672 5.12889C6.21956 5.04082 6.45839 4.97422 6.90299 4.93789C7.3581 4.90071 7.94517 4.90001 8.8001 4.90001H12.0001C12.4972 4.90001 12.9001 4.49706 12.9001 4.00001C12.9001 3.50295 12.4972 3.10001 12.0001 3.10001H8.7624Z"></path><path d="M17.6364 7.3636C17.2849 7.01212 16.7151 7.01212 16.3636 7.3636C16.0121 7.71507 16.0121 8.28492 16.3636 8.63639L18.8272 11.1H9.00001C8.50295 11.1 8.10001 11.5029 8.10001 12C8.10001 12.497 8.50295 12.9 9.00001 12.9H18.8272L16.3636 15.3636C16.0121 15.7151 16.0121 16.2849 16.3636 16.6364C16.7151 16.9879 17.2849 16.9879 17.6364 16.6364L21.6364 12.6364C21.9879 12.2849 21.9879 11.7151 21.6364 11.3636L17.6364 7.3636Z"></path></svg>'),wfe=t=>{const e=wn(),r=()=>t.fill||e.colors.icon.primary;return(()=>{const n=bfe.cloneNode(!0),i=n.firstChild,s=i.nextSibling;return ir(o=>{const a=r(),c=r();return a!==o._v$&>(i,"fill",o._v$=a),c!==o._v$2&>(s,"fill",o._v$2=c),o},{_v$:void 0,_v$2:void 0}),n})()},vfe={m:"8px",s:"4px",none:"0"},xfe={m:"16px",s:"8px",none:"0"},Efe=ue.div` 1382 width: 256px; 1383 box-shadow: 0 4px 24px rgba(0, 0, 0, 0.16); 1384 border-radius: ${t=>xfe[t.theme.borderRadius]}; 1385 1386 background-color: ${t=>t.theme.colors.background.primary} 1387 1388 color: ${t=>t.theme.colors.text.primary} 1389`,Cfe=ue.ul` 1390 background-color: ${t=>t.theme.colors.background.primary}; 1391 padding: 8px; 1392`,sk=ue.button` 1393 display: flex; 1394 align-items: center; 1395 gap: 8px; 1396 height: 40px; 1397 padding-left: 8px; 1398 width: 100%; 1399 1400 background-color: ${t=>t.theme.colors.background.primary}; 1401 border: none; 1402 border-radius: ${t=>vfe[t.theme.borderRadius]}; 1403 cursor: pointer; 1404 1405 transition: background-color, transform 0.1s ease-in-out; 1406 1407 &:hover { 1408 background-color: ${t=>t.theme.colors.background.secondary}; 1409 } 1410 1411 &:active { 1412 transform: scale(0.96); 1413 } 1414`,ok=or("<li></li>"),sE=t=>F(Io,{get translationKey(){return t.translationKey},fontSize:"15px",fontWeight:"590",get children(){return t.children}}),_fe=t=>{const e=Rs(Ru),[r,n]=yt(!1),i=()=>hr(void 0,null,function*(){const o=yF(e.account.address,e.account.chain===m3.TESTNET);yield hx(o),n(!0),setTimeout(()=>n(!1),1e3)}),s=()=>{e.disconnect(),t.onClose()};return F(Efe,{ref(o){const a=t.ref;typeof a=="function"?a(o):t.ref=o},get class(){return t.class},"data-tc-dropdown":"true",get children(){return F(Cfe,{get children(){return[(()=>{const o=ok.cloneNode(!0);return Bi(o,F(sk,{onClick:()=>i(),get children(){return[F(yfe,{}),F(Nt,{get when(){return!r()},get children(){return F(sE,{translationKey:"button.dropdown.copy",children:"Copy address"})}}),F(Nt,{get when(){return r()},get children(){return F(sE,{translationKey:"button.dropdown.copied",children:"Address copied!"})}})]}})),o})(),(()=>{const o=ok.cloneNode(!0);return Bi(o,F(sk,{onClick:()=>s(),get children(){return[F(wfe,{}),F(sE,{translationKey:"button.dropdown.disconnect",children:"Disconnect"})]}})),o})()]}})}})},Afe={m:"16px",s:"8px",none:"0"},Sfe=ue.div` 1415 width: 256px; 1416 padding: 12px 16px; 1417 display: flex; 1418 gap: 9px; 1419 1420 background-color: ${t=>t.theme.colors.background.primary}; 1421 box-shadow: 0 4px 24px rgba(0, 0, 0, 0.16); 1422 border-radius: ${t=>Afe[t.theme.borderRadius]}; 1423`,Nfe=ue.div` 1424 width: 192px; 1425 1426 > h3 { 1427 font-size: 15px; 1428 } 1429`,Ife=ue(Io)` 1430 margin-top: 4px; 1431 color: ${t=>t.theme.colors.text.secondary}; 1432`,Qy=t=>{const e=Zy(t);return F(Sfe,rl({get class(){return t.class},"data-tc-notification":"true"},e,{get children(){return[F(Nfe,{get children(){return[F(gx,{get translationKey(){return t.header.translationKey},get translationValues(){return t.header.translationValues},get children(){return t.children}}),F(Nt,{get when(){return t.text},get children(){return F(Ife,{get translationKey(){return t.text.translationKey},get translationValues(){return t.text.translationValues}})}})]}}),Pe(()=>t.icon)]}}))},Tfe=ue(Sl)` 1433 align-self: center; 1434`,kfe=t=>{const e=Rs(Ru),[r]=vc(),n=()=>e.wallet&&"name"in e.wallet?e.wallet.name:r("common.yourWallet",{},"Your wallet");return F(Qy,{get header(){return{translationKey:"notifications.confirm.header",translationValues:{name:n()}}},get class(){return t.class},get icon(){return F(Tfe,{})},"data-tc-notification-confirm":"true",children:"Confirm operation in your wallet"})},Pfe=ue(yd)` 1435 margin-top: 2px; 1436`,Rfe=t=>F(Qy,{header:{translationKey:"notifications.transactionCanceled.header"},text:{translationKey:"notifications.transactionCanceled.text"},get icon(){return F(Pfe,{size:"xs"})},get class(){return t.class},"data-tc-notification-tx-cancelled":"true",children:"Transaction cancelled"}),oj=ue(mx)` 1437 margin-top: 2px; 1438`,Ofe=t=>F(Qy,{header:{translationKey:"notifications.transactionSent.header"},text:{translationKey:"notifications.transactionSent.text"},get icon(){return F(oj,{})},get class(){return t.class},"data-tc-notification-tx-sent":"true",children:"Transaction sent"}),a1=bu` 1439 transform: translateY(-8px); 1440 margin-bottom: 12px; 1441`,Dfe={timeout:4500},[oE,Lfe]=yt(null);function Mfe(t){const{timeout:e}=zr(zr({},Dfe),t),[r,n]=yt([]),[i,s]=yt([]);return di(qae(fa,o=>{var a,c;if(!o||!o.showNotification){n(p=>p.filter(h=>h.action!=="confirm-transaction"));return}if(oE()===o)return;const l=((a=oE())==null?void 0:a.name)==="confirm-transaction"&&o.name==="confirm-transaction",u=((c=oE())==null?void 0:c.name)==="confirm-sign-data"&&o.name==="confirm-sign-data";if(l||u)return;Lfe(o),n(p=>p.filter(h=>h.action!=="confirm-transaction"&&h.action!=="confirm-sign-data"));const f={action:o.name};n(p=>[...p,f]);const d=setTimeout(()=>{n(p=>p.filter(h=>h!==f)),s(p=>p.filter(h=>h!==d))},e);s(p=>[...p,d])})),Vs(()=>
1441{i().forEach(o=>clearTimeout(o))}),r}const $fe=ue(yd)` 1442 margin-top: 2px; 1443`,Ufe=t=>F(Qy,{header:{translationKey:"notifications.signDataCanceled.header"},get icon(){return F($fe,{size:"xs"})},get class(){return t.class},"data-tc-notification-sign-data-cancelled":"true",children:"Sign data canceled"}),Bfe=t=>F(Qy,{header:{translationKey:"notifications.dataSigned.header"},get icon(){return F(oj,{})},get class(){return t.class},"data-tc-notification-data-signed":"true",children:"Data signed"}),Ffe=or('<div data-tc-list-notifications="true"></div>'),jfe=t=>{const e=Mfe();return(()=>{const r=Ffe.cloneNode(!0);return Bi(r,F(Ale,{onBeforeEnter:n=>{va(n,[{opacity:0,transform:"translateY(0)"},{opacity:1,transform:"translateY(-8px)"}],{duration:200})},onExit:(n,i)=>{va(n,[{opacity:1,transform:"translateY(-8px)"},{opacity:0,transform:"translateY(-30px)"}],{duration:200}).finished.then(i)},get children(){return F(Qp,{get each(){return e()},children:n=>F(yu,{get children(){return[F(br,{get when(){return n.action==="transaction-sent"},get children(){return F(Ofe,{class:a1})}}),F(br,{get when(){return n.action==="transaction-canceled"},get children(){return F(Rfe,{class:a1})}}),F(br,{get when(){return n.action==="data-signed"},get children(){return F(Bfe,{class:a1})}}),F(br,{get when(){return n.action==="sign-data-canceled"},get children(){return F(Ufe,{class:a1})}}),F(br,{get when(){return n.action==="confirm-transaction"||n.action==="confirm-sign-data"},get children(){return F(kfe,{class:a1})}})]}})})}})),ir(()=>V9(r,t.class)),r})()},aj=ue(Jr)` 1444 background-color: ${t=>t.theme.colors.connectButton.background}; 1445 color: ${t=>t.theme.colors.connectButton.foreground}; 1446 box-shadow: ${t=>`0 4px 24px ${Jh(t.theme.colors.constant.black,.16)}`}; 1447 padding: 8px 16px 8px 12px; 1448 1449 display: flex; 1450 align-items: center; 1451 gap: 4px; 1452 height: 40px; 1453`,zfe=ue(aj)` 1454 padding: 12px 16px; 1455 min-width: 148px; 1456 justify-content: center; 1457 background-color: ${t=>t.theme.colors.background.primary}; 1458`,Wfe=ue(Jr)` 1459 min-width: 148px; 1460 height: 40px; 1461 1462 background-color: ${t=>t.theme.colors.background.primary}; 1463 color: ${t=>t.theme.colors.connectButton.foreground}; 1464 box-shadow: ${t=>`0 4px 24px ${Jh(t.theme.colors.constant.black,.16)}`}; 1465 1466 display: flex; 1467 align-items: center; 1468 justify-content: center; 1469`,Hfe=ue(Sl)` 1470 height: 18px; 1471 width: 18px; 1472`,qfe=ue.div` 1473 width: fit-content; 1474 display: flex; 1475 flex-direction: column; 1476 align-items: flex-end; 1477`,Vfe=ue(_fe)` 1478 box-sizing: border-box; 1479 overflow: hidden; 1480 margin-top: 12px; 1481`,Kfe=ue(jfe)` 1482 > div:first-child { 1483 margin-top: 20px; 1484 } 1485`;function cj(t){return t.split("-")[0]}function Gfe(t){return t.split("-")[1]}function Yfe(t){return["top","bottom"].includes(cj(t))?"x":"y"}function Zfe(t){return t==="y"?"height":"width"}function ak(t,e,r){let{reference:n,floating:i}=t;const s=n.x+n.width/2-i.width/2,o=n.y+n.height/2-i.height/2,a=Yfe(e),c=Zfe(a),l=n[c]/2-i[c]/2,u=cj(e),f=a==="x";let d;switch(u){case"top":d={x:s,y:n.y-i.height};break;case"bottom":d={x:s,y:n.y+n.height};break;case"right":d={x:n.x+n.width,y:o};break;case"left":d={x:n.x-i.width,y:o};break;default:d={x:n.x,y:n.y}}switch(Gfe(e)){case"start":d[a]-=l*(r&&f?-1:1);break;case"end":d[a]+=l*(r&&f?-1:1);break}return d}const Jfe=(t,e,r)=>hr(void 0,null,function*(){const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:o}=r,a=s.filter(Boolean),c=yield o.isRTL==null?void 0:o.isRTL(e);if({}.NODE_ENV!=="production"){if(o==null&&console.error(["Floating UI: `platform` property was not passed to config. If you","want to use Floating UI on the web, install @floating-ui/dom","instead of the /core package. Otherwise, you can create your own","`platform`: https://floating-ui.com/docs/platform"].join(" ")),a.filter(g=>{let{name:y}=g;return y==="autoPlacement"||y==="flip"}).length>1)throw new Error(["Floating UI: duplicate `flip` and/or `autoPlacement` middleware","detected. This will lead to an infinite loop. Ensure only one of","either has been passed to the `middleware` array."].join(" "));(!t||!e)&&console.error(["Floating UI: The reference and/or floating element was not defined","when `computePosition()` was called. Ensure that both elements have","been created and can be measured."].join(" "))}let l=yield o.getElementRects({reference:t,floating:e,strategy:i}
1485),{x:u,y:f}=ak(l,n,c),d=n,p={},h=0;for(let g=0;g<a.length;g++){const{name:y,fn:x}=a[g],{x:C,y:_,data:L,reset:P}=yield x({x:u,y:f,initialPlacement:n,placement:d,strategy:i,middlewareData:p,rects:l,platform:o,elements:{reference:t,floating:e}});if(u=C??u,f=_??f,p=wo(zr({},p),{[y]:zr(zr({},p[y]),L)}),{}.NODE_ENV!=="production"&&h>50&&console.warn(["Floating UI: The middleware lifecycle appears to be running in an","infinite loop. This is usually caused by a `reset` continually","being returned without a break condition."].join(" ")),P&&h<=50){h++,typeof P=="object"&&(P.placement&&(d=P.placement),P.rects&&(l=P.rects===!0?yield o.getElementRects({reference:t,floating:e,strategy:i}):P.rects),{x:u,y:f}=ak(l,d,c)),g=-1;continue}}return{x:u,y:f,placement:d,strategy:i,middlewareData:p}});function ck(t){return wo(zr({},t),{top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height})}function Ou(t){var e;return((e=t.ownerDocument)==null?void 0:e.defaultView)||window}function dl(t){return Ou(t).getComputedStyle(t)}function rd(t){return uj(t)?(t.nodeName||"").toLowerCase():""}let Qb;function lj(){if(Qb)return Qb;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(Qb=t.brands.map(e=>e.brand+"/"+e.version).join(" "),Qb):navigator.userAgent}function hl(t){return t instanceof Ou(t).HTMLElement}function Ca(t){return t instanceof Ou(t).Element}function uj(t){return t instanceof Ou(t).Node}function lk(t){if(typeof ShadowRoot>"u")return!1;const e=Ou(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function yx(t){const{overflow:e,overflowX:r,overflowY:n,display:i}=dl(t);return/auto|scroll|overlay|hidden/.test(e+n+r)&&!["inline","contents"].includes(i)}function Qfe(t){return["table","td","th"].includes(rd(t))}function tS(t){const e=/firefox/i.test(lj()),r=dl(t),n=r.backdropFilter||r.WebkitBackdropFilter;return r.transform!=="none"||r.perspective!=="none"||(n?n!=="none":!1)||e&&r.willChange==="filter"||e&&(r.filter?r.filter!=="none":!1)||["transform","perspective"].some(i=>r.willChange.includes(i))||["paint","layout","strict","content"].some(i=>{const s=r.contain;return s!=null?s.includes(i):!1})}function fj(){return!/^((?!chrome|android).)*safari/i.test(lj())}function rS(t){return["html","body","#document"].includes(rd(t))}const uk=Math.min,Em=Math.max,fk=Math.round,FC={x:1,y:1};function N2(t){const e=!Ca(t)&&t.contextElement?t.contextElement:Ca(t)?t:null;if(!e)return FC;const r=e.getBoundingClientRect(),n=dl(e);if(n.boxSizing!=="border-box")return hl(e)?{x:e.offsetWidth>0&&fk(r.width)/e.offsetWidth||1,y:e.offsetHeight>0&&fk(r.height)/e.offsetHeight||1}:FC;let i=r.width/parseFloat(n.width),s=r.height/parseFloat(n.height);return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}function nd(t,e,r,n){var i,s,o,a;e===void 0&&(e=!1),r===void 0&&(r=!1);const c=t.getBoundingClientRect();let l=FC;e&&(n?Ca(n)&&(l=N2(n)):l=N2(t));const u=Ca(t)?Ou(t):window,f=!fj()&&r,d=(c.left+(f&&(i=(s=u.visualVie
1485wport)==null?void 0:s.offsetLeft)!=null?i:0))/l.x,p=(c.top+(f&&(o=(a=u.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/l.y,h=c.width/l.x,g=c.height/l.y;return{width:h,height:g,top:p,right:d+h,bottom:p+g,left:d,x:d,y:p}}function bd(t){return((uj(t)?t.ownerDocument:t.document)||window.document).documentElement}function bx(t){return Ca(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function dj(t){return nd(bd(t)).left+bx(t).scrollLeft}function Xfe(t,e,r){const n=hl(e),i=bd(e),s=nd(t,!0,r==="fixed",e);let o={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(n||!n&&r!=="fixed")if((rd(e)!=="body"||yx(i))&&(o=bx(e)),hl(e)){const c=nd(e,!0);a.x=c.x+e.clientLeft,a.y=c.y+e.clientTop}else i&&(a.x=dj(i));return{x:s.left+o.scrollLeft-a.x,y:s.top+o.scrollTop-a.y,width:s.width,height:s.height}}function I2(t){if(rd(t)==="html")return t;const e=t.assignedSlot||t.parentNode||(lk(t)?t.host:null)||bd(t);return lk(e)?e.host:e}function dk(t){return!hl(t)||dl(t).position==="fixed"?null:t.offsetParent}function ede(t){let e=I2(t);for(;hl(e)&&!rS(e);){if(tS(e))return e;e=I2(e)}return null}function hk(t){const e=Ou(t);let r=dk(t);for(;r&&Qfe(r)&&dl(r).position==="static";)r=dk(r);return r&&(rd(r)==="html"||rd(r)==="body"&&dl(r).position==="static"&&!tS(r))?e:r||ede(t)||e}function tde(t){if(hl(t))return{width:t.offsetWidth,height:t.offsetHeight};const e=nd(t);return{width:e.width,height:e.height}}function rde(t){let{rect:e,offsetParent:r,strategy:n}=t;const i=hl(r),s=bd(r);if(r===s)return e;let o={scrollLeft:0,scrollTop:0},a={x:1,y:1};const c={x:0,y:0};if((i||!i&&n!=="fixed")&&((rd(r)!=="body"||yx(s))&&(o=bx(r)),hl(r))){const l=nd(r);a=N2(r),c.x=l.x+r.clientLeft,c.y=l.y+r.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-o.scrollLeft*a.x+c.x,y:e.y*a.y-o.scrollTop*a.y+c.y}}function nde(t,e){const r=Ou(t),n=bd(t),i=r.visualViewport;let s=n.clientWidth,o=n.clientHeight,a=0,c=0;if(i){s=i.width,o=i.height;const l=fj();(l||!l&&e==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}return{width:s,height:o,x:a,y:c}}function ide(t){var e;const r=bd(t),n=bx(t),i=(e=t.ownerDocument)==null?void 0:e.body,s=Em(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=Em(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let a=-n.scrollLeft+dj(t);const c=-n.scrollTop;return dl(i||r).direction==="rtl"&&(a+=Em(r.clientWidth,i?i.clientWidth:0)-s),{width:s,height:o,x:a,y:c}}function hj(t){const e=I2(t);return rS(e)?t.ownerDocument.body:hl(e)&&yx(e)?e:hj(e)}function Cm(t,e){var r;e===void 0&&(e=[]);const n=hj(t),i=n===((r=t.ownerDocument)==null?void 0:r.body),s=Ou(n);return i?e.concat(s,s.visualViewport||[],yx(n)?n:[]):e.concat(n,Cm(n))}function sde(t,e){const r=nd(t,!0,e==="fixed"),n=r.top+t.clientTop,i=r.left+t.clientLeft,s=hl(t)?N2(t):{x:1,y:1},o=t.clientWidth*s.x,a=t.clientHeight*s.y,c=i*s.x,l=n*s.y;return{top:l,left:c,right:c+o,bottom:l+a,x:c,y:l,width:o,height:a}}function pk(t,e,r){return e==="viewport"?ck(nde(t,r)):Ca(e)?sde(e,r):ck(ide(bd(t)))}function ode(t,e){const r=e.get(t);if(r)return r;let n=Cm(t).filter(a=>Ca(a)&&rd(a)!=="body"),i=null;const s=dl(t).position==="fixed";let o=s?I2(t):t;for(;Ca(o)&&!rS(o);){const a=dl(o),c=tS(o);(s?!c&&!i:!c&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position))?n=n.filter(u=>u!==o):i=a,o=I2(o)}return e.set(t,n),n}function ade(t){let{element:e,boundary:r,rootBoundary:n,strategy:i}=t;const o=[...r==="clippingAncestors"?ode(e,this._c):[].concat(r),n],a=o[0],c=o.reduce((l,u)=>{const f=pk(e,u,i);return l.top=Em(f.top,l.top),l.right=uk(f.right,l.right),l.bottom=uk(f.bottom,l.bottom),l.left=Em(f.left,l.left),l},pk(e,a,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}const cde={getClippingRect:ade,convertOffsetParentRelativeRectToViewportRelativeRect:rde,isElement:Ca,getDimensions:tde,getOffsetParent:hk,getDocumentElement:bd,getScale:N2,getElementRects(t){return hr(this,null,function*(){let{reference:e,floating:r,strategy:n}=t;const i=this.getOffsetParent||hk,s=this.getDimensions;return{reference:Xfe(e,yield i(r),n),floating:zr({x:0,y:0},yield s(r))}})},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>dl(t).direction==="rtl"};function lde(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=!0,animationFrame:a=!1}=n,c=i&&!a,l=c||s?[...Ca(t)?Cm(t):t.contextElement?Cm(t.contextElement):[],...Cm(e)]:[];l.forEach(h=>{c&&h.addEventListener("scroll",r,{passive:!0}),s&&h.addEventListener("resize",r)});let u=null;if(o){let h=!0;u=new ResizeObserver(()=>{h||r(),h=!1}),Ca(t)&&!a&&u.observe(t),!Ca(t)&&t.contextElement&&!a&&u.observe(t.contextElement),u.observe(e)}let f,d=a?nd(t):null;a&&p();function p(){const h=nd(t);d&&(h.x!==d.x||h.y!==d.y||h.width!==d.width||h.height!==d.height)&&r(),d=h,f=requestAnimationFrame(p)}return r(),()=>{var h;l.forEach(g=>{c&&g.removeEventListener("scroll",r),s&&g.removeEventListener("resize",r)}),(h=u)==null||h.disconnect(),u=null,a&&cancelAnimationFrame(f)}}const ude=(t,e,r)=>{const n=new Map,i=zr({platform:cde},r),s=wo(zr({},i.platform),{_c:n});return Jfe(t,e,wo(zr({},i),{platform:s}))};function fde(t,e,r){let n=()=>{var f;return(f=r==null?void 0:r.placement)!=null?f:"bottom"},i=()=>{var f;return(f=r==null?void 0:r.strategy)!=null?f:"absolute"},[s,o]=yt({x:null,y:null,placement:n(),strategy:i(),middlewareData:{}}),[a,c]=yt();di(()=>{let f=a();if(f)throw f.value});let l=Pe(()=>(t(),e(),{}));function u(){let f=t(),d=e();if(f&&d){let p=l();ude(f,d,{middleware:r==null?void 0:r.middleware,placement:n(),strategy:i()}).then(h=>{p===l()&&o(h)},h=>{c(h)})}}return di(()=>{let f=t(),d=e();if(n(),i(),f&&d)if(r!=null&&r.whileElementsMounted){let p=r.whileElementsMounted(f,d,u);p&&Vs(p)}else u()}),{get x(){return s().x},get y(){return s().y},get placement(){return s().placement},get strategy(){return s().strategy},get middlewareData(){return s().middlewareData},update:u}}const dde=or('<tc-root data-tc-dropdown-container="true"></tc-root>'),hde=()=>{const t=wn(),e=Rs(Og),r=Rs(Ru),[n,i]=yt(!1),[s,o]=yt(e.account),[a,c]=yt(!e.account);let l;const[u,f]=yt(),[d,p]=yt(),h=fde(d,u,{whileElementsMounted:lde,placement:"bottom-end"}),g=()=>{const C=s();if(C){const _=yF(C.address,C.chain===m3.TESTNET);return _.slice(0,4)+"â¦"+_.slice(-4)}return""};r.connectionRestored.then(()=>c(!1));const y=e.onStatusChange(C=>{if(!C){i(!1),o(null),c(!1);return}o(C.account),c(!1)}),x=C=>{if(!s()||!n())return;const _=d().contains(C.target),L=l.contains(C.target);!_&&!L&&i(!1)};return CF(()=>{document.body.addEventListener("click",x)}),Vs(()=>{document.body.removeEventListener("click",x),y()}),F(Xp,{component:Yl,get children(){return[F(Nt,{get when(){return a()},get children(){return F(Wfe,{disabled:!0,"data-tc-connect-button-loading":"true",get children(){return F(Hfe,{})}})}}),F(Nt,{get when(){return!a()},get children(){return[F(Nt,{get when(){return!s()},get children(){return F(aj,{onClick:()=>r.openModal(),"data-tc-connect-button":"true",scale:"s",get children(){return[F(Aue,{get fill(){return t.colors.connectButton.foreground}}),F(Io,{translationKey:"button.connectWallet",fontSize:"15px",lineHeight:"18px",fontWeight:"590",get color(){return t.colors.connectButton.foreground},children:"Connect wallet"})]}})}}),F(Nt,{get when(){return s()},get children(){return F(qfe,{get children(){return[F(zfe,{onClick:()=>i(C=>!C),ref:p,"data-tc-dropdown-button":"true",scale:"s",get children(){return[F(Io,{fontSize:"15px",fontWeight:"590",lineHeight:"18px",get children(){return g()}}),F(JF,{direction:"bottom"})]}}),F(DF,{get children(){const C=zi(()=>document.importNode(dde,!0));return Ip(f,C),C.style.setProperty("z-index","999"),C._$owner=Vae(),Bi(C,F(dx,{onBeforeEnter:_=>{va(_,[{opacity:0,transform:"translateY(-8px)"},{opacity:1,transform:"translateY(0)"}],{duration:150})},onExit:(_,L)=>{va(_,[{opacity:1,transform:"translateY(0)"},{opacity:0,transform:"translateY(-8px)"}],{duration:150}).finished.then(L)},get children(){return F(Nt,{get when(){return n()},get children(){return F(Vfe,{get hidden(){return!n()},onClose:()=>i(!1),ref(_){const L=l;typeof L=="function"?L(_):l=_}})}})}}),null),Bi(C,F(Kfe,{}),null),ir(_=>{var L,P;const z=h.strategy,W=`${(L=h.y)!=null?L:0}px`,B=`${(P=h.x)!=null?P:0}px`;return z!==_._v$&&C.style.setProperty("position",_._v$=z),W!==_._v$2&&C.style.setProperty("top",_._v$2=W),B!==_._v$3&&C.style.setProperty("left",_._v$3=B),_},{_v$:void 0,_v$2:void 0,_v$3:void 0}),C}})]}})}})]}})]}})},pj=ue(XF)` 1486 padding-left: 24px; 1487 padding-right: 24px; 1488 padding-top: 18px; 1489 padding-bottom: 0; 1490 1491 ${Qo("mobile")} { 1492 padding-left: 0; 1493 padding-right: 0; 1494 } 1495`,gj=ue(Xo)` 1496 margin-top: 12px; 1497 1498 ${Qo("mobile")} { 1499 padding: 0 10px; 1500 } 1501`,mj=ue.div` 1502 margin: 30px 0; 1503 width: 100%; 1504 display: flex; 1505 justify-content: center; 1506 1507 ${Qo("mobile")} { 1508 height: 160px; 1509 align-items: center; 1510 } 1511`;ue(Io)` 1512 min-width: 84px; 1513 text-align: center; 1514 font-weight: 590; 1515`;ue(Zle)` 1516 margin: 0 auto 22px; 1517`;const[Tr,Xb]=Q9({buttonRootId:null,language:"en",returnStrategy:"back",twaReturnUrl:void 0,walletsListConfiguration:{},enableAndroidBackHandler:!0});function pde(t){return[...new Set(t)]}function gde(t,e,r){return e.map(n=>{const i=r.find(s=>
1517s[t]===n[t]);return r=r.filter(s=>s[t]!==n[t]),i===void 0?n:i}).concat(r)}function mde(t){return"jsBridgeKey"in t?wo(zr({},t),{injected:Th.isWalletInjected(t.jsBridgeKey),embedded:Th.isInsideWalletBrowser(t.jsBridgeKey)}):t}function nS(t,e){var r;return e&&(r=e.includeWallets)!=null&&r.length&&(t=gde("name",t,e.includeWallets.map(mde))),t}function gk(t){return t.platforms.some(e=>["macos","linux","windows"].includes(e))}function _m(t){return t.platforms.some(e=>["ios","android"].includes(e))}function mk(t){return t.platforms.some(e=>["chrome","firefox","safari"].includes(e))}function bf(t,e){return e?t.name.toLowerCase()===e.toLowerCase()||t.appName.toLowerCase()===e.toLowerCase():!1}const yde=ue.div` 1518 display: flex; 1519 flex-direction: column; 1520 align-items: center; 1521`,bde=ue(Xo)` 1522 margin-bottom: 18px; 1523`;ue.div` 1524 height: 1px; 1525 margin: 0 -24px; 1526 width: calc(100% + 48px); 1527 opacity: 0.12; 1528 background: ${t=>t.isShown?t.theme.colors.icon.secondary:"transparent"}; 1529 transition: background 0.15s ease-in-out; 1530 1531 ${Qo("mobile")} { 1532 width: 100%; 1533 } 1534`;const yk=ue.ul` 1535 display: grid; 1536 grid-template-columns: repeat(auto-fit, 92px); 1537 grid-template-rows: auto; 1538 align-content: flex-start; 1539 row-gap: 8px; 1540 width: 100%; 1541 padding: 0 0 16px; 1542 align-self: flex-start; 1543 max-width: 400px; 1544 margin: 0 auto; 1545 list-style: none; 1546 1547 > li { 1548 display: block; 1549 height: fit-content; 1550 } 1551 1552 ${Qo("mobile")} { 1553 display: grid; 1554 grid-template-columns: repeat(4, 1fr); 1555 gap: 0; 1556 padding: 8px 12px 16px; 1557 max-width: none; 1558 1559 > li { 1560 min-width: 78px; 1561 display: flex; 1562 } 1563 1564 > li > * { 1565 width: 100%; 1566 } 1567 } 1568`;ue(Jr)` 1569 display: block; 1570 margin: 0 auto 1px; 1571 font-size: 15px; 1572`;const wde=ue(Pu)` 1573 position: absolute; 1574 top: 16px; 1575 left: 16px; 1576`,bk=ue(sj)` 1577 opacity: ${t=>t.withOpacity?"0.4":"1"}; 1578`,vde=ue.div` 1579 display: grid; 1580 grid-template-columns: auto 28px; 1581 gap: 16px; 1582 padding: 16px; 1583 margin-bottom: 16px; 1584 border-radius: 16px; 1585 color: ${t=>t.theme.colors.text.secondary}; 1586 background: ${t=>t.theme.colors.background.tint}; 1587 1588 ${Qo("mobile")} { 1589 margin-left: 16px; 1590 margin-right: 16px; 1591 } 1592`,xde=ue(Al)` 1593 color: ${t=>t.theme.colors.text.secondary}; 1594 text-align: left; 1595 margin: 0; 1596`,Ede=ue.div` 1597 position: absolute; 1598 bottom: 14px; 1599 left: 50%; 1600 transform: translate(-50%, 0); 1601 1602 text-wrap: nowrap; 1603 display: flex; 1604 gap: 6px; 1605 align-items: center; 1606 border-radius: 18px; 1607 min-width: 126px; 1608 padding: 9px 16px 9px 10px; 1609 1610 filter: drop-shadow(0px 2px 8px rgba(0, 0, 0, 0.08)); 1611 background-color: ${t=>t.theme.colors.background.segment}; 1612`,Cde=or('<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_5122_10355)"><circle cx="8" cy="8" r="8"></circle><circle cx="8" cy="11" r="1"></circle><path d="M7.04994 4.99875C7.02277 4.45542 7.45598 4 8 4C8.54402 4 8.97723 4.45541 8.95006 4.99875L8.78745 8.25094C8.76647 8.67055 8.42014 9 8 9C7.57986 9 7.23353 8.67055 7.21255 8.25094L7.04994 4.99875Z"></path></g><defs><clipPath id="clip0_5122_10355"><rect width="16" height="16"></rect></clipPath></defs></svg>'),_de=or('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28" fill="none"><circle cx="14" cy="14" r="12"></circle><circle cx="14" cy="18.9" r="1.4"></circle><path d="M12.6658 8.89845C12.63 8.13698 13.2377 7.5 14 7.5C14.7623 7.5 15.37 8.13698 15.3342 8.89845L15.047 15.0013C15.0207 15.5604 14.5597 16.0002 14 16.0002C13.4403 16.0002 12.9793 15.5604 12.953 15.0013L12.6658 8.89845Z"></path></svg>'),Ade=t=>{const e=wn(),r=()=>t.size,n=()=>t.fill||e.colors.icon.error;return Pe((()=>{const i=Pe(()=>r()==="16");return()=>i()?(()=>{const s=Cde.cloneNode(!0),o=s.firstChild,a=o.firstChild,c=a.nextSibling,l=c.nextSibling,u=o.nextSibling,f=u.firstChild,d=f.firstChild;return ir(p=>{const h=n(),g=e.colors.constant.white,y=e.colors.constant.white,x=e.colors.constant.white;return h!==p._v$&>(a,"fill",p._v$=h),g!==p._v$2&>(c,"fill",p._v$2=g),y!==p._v$3&>(l,"fill",p._v$3=y),x!==p._v$4&>(d,"fill",p._v$4=x),p},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0}),s})():(()=>{const s=Pe(()=>r()==="28");return()=>s()?(()=>{const o=_de.cloneNode(!0),a=o.firstChild,c=a.nextSibling,l=c.nextSibling;return ir(u=>{const f=t.class,d=n(),p=e.colors.constant.white,h=e.colors.constant.white;return f!==u._v$5&>(o,"class",u._v$5=f),d!==u._v$6&>(a,"fill",u._v$6=d),p!==u._v$7&>(c,"fill",u._v$7=p),h!==u._v$8&>(l,"fill",u._v$8=h),u},{_v$5:void 0,_v$6:void 0,_v$7:void 0,_v$8:void 0}),o})():null})()})())},wk=or("<li></li>"),Sde=t=>{const e=()=>rg()?void 0:510,[r,n]=yt(null);let i=null;const s=u=>{n(u),i!=null&&clearTimeout(i),i=setTimeout(()=>n(null),1500)},o=u=>{if(!u.isSupportRequiredFeatures&&t.featureCheckMode==="strict"){s(u);return}t.onSelect(u)},a=()=>rg()?t.walletsList.filter(_m):t.walletsList,c=()=>a().filter(u=>u.isSupportRequiredFeatures),l=()=>a().filter(u=>!u.isSupportRequiredFeatures);return F(yde,{"data-tc-wallets-modal-list":"true",get children(){return[F(wde,{icon:"arrow",onClick:()=>t.onBack()}),F(bde,{translationKey:"walletModal.wallets",children:"Wallets"}),F(eS,{get maxHeight(){return e()},get children(){return[F(yk,{get children(){return F(Qp,{get each(){return c()},children:u=>(()=>{const f=wk.cloneNode(!0);return Bi(f,F(bk,{wallet:u,onClick:()=>t.onSelect(u)})),f})()})}}),F(Nt,{get when(){return l().length>0&&t.featureCheckMode!=="hide"},get children(){return[F(vde,{get children(){return[F(xde,{translationKey:"walletModal.allWallets.walletsBelowNotSupported",children:"The wallets below donât support all features of the connected service. You can use your recovery phrase in one of the supported wallets above."}),F(Ade,{size:"28"})]}}),F(yk,{get children(){return F(Qp,{get each(){return l()},children:u=>(()=>{const f=wk.cloneNode(!0);return Bi(f,F(bk,{wallet:u,onClick:()=>o(u),get withOpacity(){return t.featureCheckMode==="strict"}})),f})()})}}),F(dx,{onBeforeEnter:u=>{va(u,[{opacity:0,transform:"translate(-50%, 44px)"},{opacity:1,transform:"translate(-50%, 0)"}],{duration:150,easing:"ease-out"})},onExit:(u,f)=>{va(u,[{opacity:1,transform:"translate(-50%, 0)"},{opacity:0,transform:"translate(-50%, 44px)"}],{duration:150,easing:"ease-out"}).finished.then(()=>{f()})},get children(){return F(Nt,{get when(){return r()},get children(){return F(Ede,{get children(){return[F(yd,{size:"xs"}),F(Io,{translationKey:"walletModal.allWallets.walletNotSupportService",get translationValues(){return{name:r().name}},get children(){return[Pe(()=>r().name)," doesnât support connected service"]}})]}})}})}})]}})]}})]}})},Nde={m:"16px",s:"12px",none:"0"},Ide={m:"6px",s:"6px",none:"0"},Tde=ue.div` 1613 display: flex; 1614 flex-direction: column; 1615`,kde=ue.div` 1616 flex: 1; 1617 margin-top: ${t=>t.qr?"0":"18px"}; 1618 display: flex; 1619 flex-direction: column; 1620 align-items: center; 1621 justify-content: center; 1622 min-height: 232px; 1623`,Pde=ue(px)` 1624 margin-bottom: 24px; 1625`,Rde=ue(Xo)` 1626 max-width: 288px; 1627 margin: 0 auto 2px; 1628`,Ode=ue(Al)` 1629 max-width: 288px; 1630 text-align: center; 1631 margin: 0 auto 20px; 1632`,Dde=ue(Pu)` 1633 position: absolute; 1634 top: 16px; 1635 left: 16px; 1636`,V1=ue.div` 1637 display: flex; 1638 justify-content: center; 1639 gap: 8px; 1640 padding-bottom: 16px; 1641`,Lde=ue(V1)` 1642 padding-bottom: 0; 1643`,aE=ue(Jr)` 1644 margin-bottom: 24px; 1645`,Mde=ue(Sl)` 1646 margin-bottom: 18px; 1647 margin-top: 2px; 1648`,$de=ue(yd)` 1649 margin-bottom: 16px; 1650`,p0=ue(Al)` 1651 color: ${t=>t.theme.colors.text.secondary}; 1652 text-align: center; 1653 margin-bottom: 20px; 1654`,Ude=ue(Jr)` 1655 margin-top: -8px; 1656 margin-bottom: 24px; 1657 width: 100%; 1658 padding: 12px 12px 12px 20px; 1659 border-radius: ${t=>Nde[t.theme.borderRadius]}; 1660 font-size: 16px; 1661 line-height: 20px; 1662`,Bde=ue(Qh)` 1663 width: 32px; 1664 height: 32px; 1665 border-radius: ${t=>
1665Ide[t.theme.borderRadius]}; 1666`,Xr=t=>{const[e]=vc();return Pe(()=>{var r;return e(t.translationKey,t.translationValues,(r=t.children)==null?void 0:r.toString())})};function sn(t,e){let r;typeof e=="string"?r=e:r=cc()?e.twaReturnUrl||e.returnStrategy:"none";const n=Fde(t,"ret",r);if(!Ff(t))return n;const i=n.slice(n.lastIndexOf("&")+1);return n.slice(0,n.lastIndexOf("&"))+"-"+JB(i)}function Xy(t,e){e=zr({},e);const r=jde(t),n=new URL(r);if(n.searchParams.has("startapp")||n.searchParams.append("startapp","tonconnect"),KF()){e.returnStrategy="back";const i=sn(n.toString(),e.returnStrategy);yn(i)}else if(cc())if(Gd("ios","android","macos","tdesktop","web")){e.returnStrategy="back";const i=sn(n.toString(),e.returnStrategy);MC(i)}else Gd("weba")?MC(sn(n.toString(),e)):yn(sn(n.toString(),e));else if(Xa("ios")){e.returnStrategy==="back"&&(tr("safari")?e.returnStrategy="back":tr("chrome")?e.returnStrategy="googlechrome://":tr("firefox")?e.returnStrategy="firefox://":tr("opera")?e.returnStrategy="opera-http://":e.returnStrategy=location.href);const i=tr("chrome"),s=tr("firefox");if((i||s)&&!e.forceRedirect){const a=sn(n.toString(),e.returnStrategy),c=ew(a);Sf(c,()=>yn(a))}else{const a=sn(n.toString(),e.returnStrategy);yn(a)}}else if(Xa("android")){e.returnStrategy="back";const i=tr("chrome"),s=tr("firefox");if((i||s)&&!e.forceRedirect){const a=sn(n.toString(),e.returnStrategy),c=ew(a);Sf(c,()=>yn(a))}else{const a=sn(n.toString(),e.returnStrategy);yn(a)}}else if(Xa("ipad")){e.returnStrategy==="back"&&(tr("safari")?e.returnStrategy="back":tr("chrome")?e.returnStrategy="googlechrome://":tr("firefox")?e.returnStrategy="firefox://":tr("opera")?e.returnStrategy="opera-http://":e.returnStrategy=location.href);const i=tr("chrome"),s=tr("firefox"),o=(i||s)&&!e.forceRedirect,a=sn(n.toString(),e.returnStrategy);if(o){const c=ew(a);Sf(c,()=>yn(a))}else yn(a)}else if(Xa("macos","windows","linux")){e.returnStrategy="back",e.twaReturnUrl=void 0;const i=sn(n.toString(),e.returnStrategy);if(e.forceRedirect)yn(i);else{const s=ew(i);Sf(s,()=>yn(i))}}else yn(sn(n.toString(),e))}function eb(t,e,r,n){if(r=zr({},r),KF())if(Xa("ios","android"))r.returnStrategy==="back"&&(r.returnStrategy="tg://resolve"),n("universal-link"),xm(sn(t,r.returnStrategy),"_self");else{n("universal-link");const i=sn(t,r.returnStrategy);yn(i)}else if(cc())if(Gd("ios","android")){r.returnStrategy==="back"&&(r.returnStrategy="tg://resolve"),n("universal-link");const i=sn(t,r.returnStrategy);MC(i,()=>{n("universal-link"),yn(i)})}else if(Gd("macos","tdesktop")){r.returnStrategy==="back"&&(r.returnStrategy="tg://resolve");const i=sn(t,r.returnStrategy);!!e&&!r.forceRedirect?(n("custom-deeplink"),Sf(Zb(i,e),()=>{n("universal-link"),yn(i)})):(n("universal-link"),yn(i))}else if(Gd("weba")){r.returnStrategy==="back"&&(tr("safari")?r.returnStrategy=location.href:tr("chrome")?r.returnStrategy="googlechrome://":tr("firefox")?r.returnStrategy="firefox://":tr("opera")?r.returnStrategy="opera-http://":r.returnStrategy=location.href);const i=sn(t,r.returnStrategy);!!e&&!r.forceRedirect?(n("custom-deeplink"),Sf(Zb(i,e),()=>{n("universal-link"),yn(i)})):(n("universal-link"),yn(i))}else if(Gd("web")){r.returnStrategy==="back"&&(tr("safari")?r.returnStrategy=location.href:tr("chrome")?r.returnStrategy="googlechrome://":tr("firefox")?r.returnStrategy="firefox://":tr("opera")?r.returnStrategy="opera-http://":r.returnStrategy=location.href);const i=sn(t,r.returnStrategy);!!e&&!r.forceRedirect?(n("custom-deeplink"),Sf(Zb(i,e),()=>{n("universal-link"),yn(i)})):(n("universal-link"),yn(i))}else{n("universal-link");const i=sn(t,r.returnStrategy);yn(i)}else if(Xa("ios"))r.returnStrategy==="back"&&(tr("safari")?r.returnStrategy="none":tr("chrome")?r.returnStrategy="googlechrome://":tr("firefox")?r.returnStrategy="firefox://":tr("opera")?r.returnStrategy="opera-http://":r.returnStrategy=location.href),tr("chrome")?(n("universal-link"),xm(sn(t,r.returnStrategy),"_self")):(n("universal-link"),yn(sn(t,r.returnStrategy)));else if(Xa("android"))r.returnStrategy==="back"&&(tr("chrome")?r.returnStrategy="googlechrome://":tr("firefox")?r.returnStrategy="firefox://":tr("opera")?r.returnStrategy="opera-http://":r.returnStrategy=location.href),n("universal-link"),yn(sn(t,r.returnStrategy));else if(Xa("ipad"))r.returnStrategy==="back"&&(tr("safari")?r.returnStrategy="none":tr("chrome")?r.returnStrategy="googlechrome://":tr("firefox")?r.returnStrategy="firefox://":tr("opera")?r.returnStrategy="opera-http://":r.returnStrategy=location.href),tr("chrome")?(n("universal-link"),xm(sn(t,r.returnStrategy),"_self")):(n("universal-link"),yn(sn(t,r.returnStrategy)));else if(Xa("macos","windows","linux")){r.returnStrategy==="back"&&(tr("safari")?r.returnStrategy="none":tr("chrome")?r.returnStrategy="googlechrome://":tr("firefox")?r.returnStrategy="firefox://":tr("opera")?r.returnStrategy="opera-http://":r.returnStrategy="none");const i=sn(t,r.returnStrategy);!!e&&!r.forceRedirect?(n("custom-deeplink"),Sf(Zb(i,e),()=>{n("universal-link"),yn(i)})):(n("universal-link"),yn(i))}else n("universal-link"),yn(sn(t,r.returnStrategy))}function Fde(t,e,r){const n=new URL(t);return n.searchParams.append(e,r),n.toString()}
1666function jde(t){const e=new URL(t);return e.searchParams.has("attach")&&(e.searchParams.delete("attach"),e.pathname+="/start"),e.toString()}function ew(t){const e=new URL(t),[,r,n]=e.pathname.split("/"),i=e.searchParams.get("startapp");return`tg://resolve?domain=${r}&appname=${n}&startapp=${i}`}const yj=t=>{const[e,r]=yt("mobile"),[n,i]=yt(null);di(()=>{var y;i((y=t.defaultError)!=null?y:null)});const[s,o]=yt(),[a,c]=yt(!0),l=Rs(Og),u=l.onStatusChange(()=>{},y=>{if(y instanceof Hy){i("missing-features");return}t.wallet.appName!==lc&&i("connection-declined")});Vs(u);const f=()=>{try{const y=l.connect({universalLink:t.wallet.universalLink,bridgeUrl:t.wallet.bridgeUrl},t.additionalRequest);o(y)}catch{}};di(()=>{zi(e)!=="extension"&&(_m(t.wallet)||gk(t.wallet))&&f()});const d=()=>{i(null),e()==="extension"&&f(),r("mobile"),ts(wo(zr({},t.wallet),{openMethod:"qrcode"}))},p=()=>{if(i(null),e()==="extension"&&f(),r("desktop"),Ff(s()))h();else{const y=!a();c(!1),eb(s(),t.wallet.deepLink,{returnStrategy:Tr.returnStrategy,forceRedirect:y},x=>{ts(wo(zr({},t.wallet),{openMethod:x}))})}},h=()=>{const y=!a();c(!1),ts(wo(zr({},t.wallet),{openMethod:"universal-link"})),Xy(s(),{returnStrategy:Tr.returnStrategy,twaReturnUrl:Tr.twaReturnUrl,forceRedirect:y})},g=()=>{i(null),r("extension"),lh(t.wallet)&&(ts(t.wallet),l.connect({jsBridgeKey:t.wallet.jsBridgeKey},t.additionalRequest))};return _m(t.wallet)?d():mk(t.wallet)?g():p(),F(Tde,{"data-tc-wallets-modal-connection-desktop":"true",get children(){return[F(Nt,{get when(){return!t.backDisabled},get children(){return F(Dde,{icon:"arrow",onClick:()=>t.onBackClick()})}}),F(Rde,{get children(){return t.wallet.name}}),F(Nt,{get when(){return Pe(()=>e()==="mobile")()&&!n()},get children(){return F(Ode,{translationKey:"walletModal.desktopConnectionModal.scanQR",get translationValues(){return{name:t.wallet.name}},get children(){return["Scan the QR code below with your phoneâs or ",Pe(()=>t.wallet.name),"âs camera"]}})}}),F(kde,{get qr(){return e()==="mobile"},get children(){return F(yu,{get children(){return[F(br,{get when(){return n()},get children(){return[F($de,{size:"s"}),F(yu,{get children(){return[F(br,{get when(){return n()==="missing-features"},get children(){return F(p0,{translationKey:"walletModal.desktopConnectionModal.missingFeatures",get translationValues(){return{name:t.wallet.name}},children:"Please update Wallet, your version does not support required features for this dApp"})}}),F(br,{get when(){return n()==="connection-declined"},get children(){return F(p0,{translationKey:"walletModal.desktopConnectionModal.connectionDeclined",children:"Connection declined"})}}),F(br,{get when(){return n()==="not-supported"},get children(){return F(p0,{translationKey:"walletModal.desktopConnectionModal.notSupportedWallet",get translationValues(){return{name:t.wallet.name}},get children(){return[Pe(()=>t.wallet.name)," doesnât support the requested action. Please connect another wallet that supports it."]}})}})]}}),F(V1,{get children(){return[F(Nt,{get when(){return n()!=="not-supported"},get children(){return F(Jr,{get leftIcon(){return F(kp,{})},get onClick(){return e()==="extension"?g:p},get children(){return F(Xr,{translationKey:"common.retry",children:"Retry"})}})}}),F(Nt,{get when(){return n()==="missing-features"},get children(){return F(zf,{get href(){return t.wallet.aboutUrl},blank:!0,get children(){return F(Jr,{get leftIcon(){return F(Pp,{})},get children(){return F(Xr,{translationKey:"walletModal.desktopConnectionModal.updateWallet",get translationValues(){return{name:t.wallet.name}},get children(){return["Update ",Pe(()=>t.wallet.name)]}})}})}})}}),F(Nt,{get when(){return n()==="not-supported"},get children(){return F(Jr,{onClick:()=>t.onBackClick(),get children(){return F(Xr,{translationKey:"walletModal.desktopConnectionModal.chooseAnotherWallet",children:"Choose Another Wallet"})}})}})]}})]}}),F(br,{get when(){return e()==="mobile"},get children(){return F(Pde,{disableCopy:!1,get sourceUrl(){return sn(s(),"none")},get imageUrl(){return t.wallet.imageUrl}})}}),F(br,{get when(){return e()==="extension"},get children(){return[F(Nt,{get when(){return lh(t.wallet)},get children(){return[F(Mde,{size:"s"}),F(p0,{translationKey:"walletModal.desktopConnectionModal.continueInExtension",get translationValues(){return{name:t.wallet.name}},get children(){return["Continue in ",Pe(()=>t.wallet.name)," browser extensionâ¦"]}}),F(V1,{get children(){return F(Jr,{get leftIcon(){return F(kp,{})},onClick:g,get children(){return F(Xr,{translationKey:"common.retry",children:"Retry"})}})}})]}}),F(Nt,{get when(){return!lh(t.wallet)},get children(){return[F(p0,{translationKey:"walletModal.desktopConnectionModal.dontHaveExtension",get translationValues(){return{name:t.wallet.name}},get children(){return["Seems you don't have installed ",Pe(()=>t.wallet.name)," browser extension"]}}),F(V1,{get children(){return F(zf,{get href(){return t.wallet.aboutUrl},blank:!0,get children(){return F(Jr,{get rightIcon(){return F(Pp,{})},onClick:g,get children(){return F(Xr,{translationKey:"walletModal.desktopConnectionModal.getWallet",get translationValues(){return{name:t.wallet.name}},get children(){return["Get ",Pe(()=>t.wallet.name)]}})}})}})}})]}})]}}),F(br,{get when(){return e()==="desktop"},get children(){return[F(Sl,{size:"m"}),F(p0,{translationKey:"walletModal.desktopConnectionModal.continueOnDesktop",get translationValues(){return{name:t.wallet.name}},get children(){return["Continue in ",Pe(()=>t.wallet.name)," on desktopâ¦"]}}),F(V1,{get children(){return[F(Jr,{get leftIcon(){return F(kp,{})},onClick:p,get children(){return F(Xr,{translationKey:"common.retry",children:"Retry"})}}),F(zf,{get href(){return t.wallet.aboutUrl},blank:!0,get children(){return F(Jr,{get rightIcon(){return F(Pp,{})},get children(){return F(Xr,{translationKey:"walletModal.desktopConnectionModal.getWallet",get translationValues(){return{name:t.wallet.name}},get children(){return["Get ",Pe(()=>t.wallet.name)]}})}})}})]}})]}})]}})}}),F(Nt,{get when(){return t.wallet.appName===lc},get children(){return F(Ude,{get rightIcon(){return F(Bde,{get src(){return Jy.TG}})},scale:"s",onClick:h,get children(){return F(Xr,{translationKey:"walletModal.desktopConnectionModal.openWalletOnTelegram",children:"Open Wallet in Telegram on desktop"})}})}}),F(Nt,{get when(){return t.wallet.appName!==lc},get children(){return F(Lde,{get children(){return[F(Nt,{get when(){return Pe(()=>e()!=="mobile")()&&_m(t.wallet)},get children(){return F(aE,{appearance:"secondary",get leftIcon(){return F(zue,{})},onClick:d,get children(){return F(Xr,{translationKey:"common.mobile",children:"Mobile"})}})}}),F(Nt,{get when(){return Pe(()=>e()!=="extension")()&&mk(t.wallet)},get children(){return F(aE,{appearance:"secondary",get leftIcon(){return F(Fue,{})},onClick:g,get children(){return F(Xr,{translationKey:"common.browserExtension",children:"Browser Extension"})}})}}),F(Nt,{get when(){return Pe(()=>e()!=="desktop")()&&gk(t.wallet)},get children(){return F(aE,{appearance:"secondary",get leftIcon(){return F(Hue,{})},onClick:p,get children(){return F(Xr,{translationKey:"common.desktop",children:"Desktop"})}})}})]}})}})]}})},zde=ue.div``,Wde=ue(Pu)` 1667 position: absolute; 1668 top: 16px; 1669 left: 16px; 1670`,Hde=ue(Xo)` 1671 margin-bottom: 18px; 1672`,cE=ue.div` 1673 padding: 16px 0; 1674 display: flex; 1675 flex-direction: column; 1676 align-items: center; 1677`,lE=bu` 1678 margin-bottom: 12px; 1679`,uE=ue(gx)` 1680 text-align: center; 1681 margin-bottom: 4px; 1682`,fE=ue(Io)` 1683 text-align: center; 1684 max-width: 352px; 1685 color: ${t=>t.theme.colors.text.secondary}; 1686`,qde=ue.div` 1687 padding: 16px 24px 24px; 1688 display: flex; 1689 align-items: center; 1690 justify-content: center; 1691 gap: 8px; 1692`,Vde={GET_A_WALLET:"https://ton.org/wallets?filters[wallet_features][slug][$in]=dapp-auth&pagination[limit]=-1"},bj=t=>F(zde,{"data-tc-wallets-modal-info":"true",get children(){return[F(Wde,{icon:"arrow",onClick:()=>t.onBackClick()}),F(Hde,{translationKey:"walletModal.infoModal.whatIsAWallet",children:"What is a wallet"}),F(eS,{get children(){return[F(cE,{get children(){return[F(Zue,{class:lE}),F(uE,{translationKey:"walletModal.infoModal.secureDigitalAssets",children:"Secure digital assets storage"}),F(fE,{translationKey:"walletModal.infoModal.walletProtects",children:"A wallet protects and manages your digital assets including TON, tokens and collectables."})]}}),F(cE,{get children(){return[F(Que,{class:lE}),F(uE,{translationKey:"walletModal.infoModal.controlIdentity",children:"Control your Web3 identity"}),F(fE,{translationKey:"walletModal.infoModal.manageIdentity",children:"Manage your digital identity and access decentralized applications with ease. Maintain control over your data and engage securely in the blockchain ecosystem."})]}}),F(cE,{get children(){return[F(efe,{class:lE}),F(uE,{translationKey:"walletModal.infoModal.effortlessCryptoTransactions",children:"Effortless crypto transactions"}),F(fE,{translationKey:"walletModal.infoModal.easilySend",children:"Easily send, receive, monitor your cryptocurrencies. Streamline your operations with decentralized applications."})]}}),F(qde,{get children(){return F(zf,{get href(){return Vde.GET_A_WALLET},blank:!0,get children(){return F(Jr,{get rightIcon(){return F(Gue,{})},get children(){return F(Xr,{translationKey:"walletModal.infoModal.getAWallet",children:"Get a Wallet"})}})}})}})]}})]}}),Kde=ue.div``,Gde=ue.div` 1693 flex: 1; 1694 margin-top: 18px; 1695 display: flex; 1696 flex-direction: column; 1697 align-items: center; 1698 justify-content: center; 1699 min-height: 232px; 1700`,Yde=ue(Xo)` 1701 max-width: 262px; 1702 margin: 0 auto 8px; 1703`,Zde=ue(Pu)` 1704 position: absolute; 1705 top: 16px; 1706 left: 16px; 1707`,Jde=ue.div` 1708 padding: 16px; 1709 display: flex; 1710 align-items: center; 1711 gap: 12px; 1712 border-top: 0.5px solid ${t=>Jh(t.theme.colors.icon.secondary,.2)}; 1713`,Qde=ue(Qh)` 1714 width: 36px; 1715 height: 36px; 1716 border-radius: 10px; 1717`,Xde=ue(zf)` 1718 margin-left: auto; 1719`,ehe=ue(Sl)` 1720 margin-bottom: 18px; 1721 margin-top: 2px; 1722`,the=ue(yd)` 1723 margin-bottom: 16px; 1724`,tw=ue(Al)` 1725 color: ${t=>t.theme.colors.text.secondary}; 1726 text-align: center; 1727 margin-bottom: 20px; 1728`,vk=ue.div` 1729 display: flex; 1730 justify-content: center; 1731 gap: 8px; 1732 padding-bottom: 16px; 1733`,rhe={m:"16px",s:"8px",none:"0"},nhe=ue(Xo)` 1734 margin-bottom: 2px; 1735 padding: 0 52px; 1736`,ihe=ue(Al)` 1737 margin-bottom: 20px; 1738 padding: 0 64px; 1739`,she=ue.div` 1740 padding: 0 24px 16px; 1741`,ohe=ue.div` 1742 display: flex; 1743 flex-direction: row; 1744 gap: 16px; 1745 padding: 0 24px 24px; 1746 margin-top: 0; 1747`,xk=ue(Jr)` 1748 width: 100%; 1749 height: 56px; 1750 border-radius: ${t=>rhe[t.theme.borderRadius]}; 1751 background-color: ${t=>Jh(t.theme.colors.accent,.12)}; 1752 color: ${t=>t.theme.colors.accent}; 1753 font-size: 16px; 1754 line-height: 20px; 1755 font-weight: 500; 1756 padding: 17px 20px 19px 20px; 1757`,ahe=t=>[F(nhe,{get children(){return t.walletInfo.name}}),F(ihe,{translationKey:"walletModal.mobileConnectionModal.scanQR",get translationValues(){return{name:t.walletInfo.name}},get children(){return["Scan the QR code below with your phoneâs or ",Pe(()=>t.walletInfo.name),"âs camera"]}}),F(she,{get children(){return F(px,{get imageUrl(){return t.walletInfo.imageUrl},get sourceUrl(){return sn(t.universalLink,"none")},disableCopy:!0})}}),F(ohe,{get children(){return[F(xk,{appearance:"secondary",onClick:()=>{var e;return(e=t.onOpenLink)==null?void 0:e.call(t)},get children(){return F(Xr,{translationKey:"walletModal.mobileUniversalModal.openLink",children:"Open Link"})}}),F(xk,{appearance:"secondary",onClick:()=>{var e;return(e=t.onCopy)==null?void 0:e.call(t)},get children(){return F(Xr,{get translationKey(){return t.isCopiedShown!==void 0?"common.copied":"common.copyLink"},get children(){return t.isCopiedShown!==void 0?"Copied":"Copy Link"}})}})]}})],wj=t=>{const e=wn(),[r,n]=yt(!0),[i,s]=yt(!1),[o,a]=yt(null);di(()=>{var _;a((_=t.defaultError)!=null?_:null)});const c=Rs(Og),l=c.onStatusChange(()=>{},()=>{a(null)}),u=Pe(()=>c.connect({universalLink:t.wallet.universalLink,bridgeUrl:t.wallet.bridgeUrl},t.additionalRequest)),f=()=>{ts(wo(zr({},t.wallet),{openMethod:"universal-link"})),Xy(u(),{returnStrategy:Tr.returnStrategy,twaReturnUrl:Tr.twaReturnUrl,forceRedirect:!0})},d=()=>{const _=u();if(Ff(_))return f();a(null);const L=!r();n(!1),eb(u(),t.wallet.deepLink,{returnStrategy:Tr.returnStrategy,forceRedirect:L},P=>{ts(wo(zr({},t.wallet),{openMethod:P}))})},[p,h]=yt(void 0),g=()=>hr(void 0,null,function*(){p()!==void 0&&clearTimeout(p()),yield hx(u());const _=setTimeout(()=>h(void 0),1500);h(_)}),y=()=>{a(null),s(!0),ts(wo(zr({},t.wallet),{openMethod:"qrcode"}))},x=()=>{s(!1),ts(wo(zr({},t.wallet),{openMethod:"universal-link"}))},C=()=>{i()?x():t.onBackClick()};return Vs(l),d(),F(Kde,{"data-tc-wallets-modal-connection-mobile":"true",get children(){return[F(Nt,{get when(){return!t.backDisabled||i()},get children(){return F(Zde,{icon:"arrow",onClick:C})}}),F(Nt,{get when(){return i()},get children(){return F(ahe,{get universalLink(){return u()},get walletInfo(){return t.wallet},onOpenLink:d,onCopy:g,get isCopiedShown(){return p()}})}}),F(Nt,{get when(){return!i()},get children(){return[F(Yde,{get children(){return t.wallet.name}}),F(Gde,{get children(){return[F(Nt,{get when(){return o()},get children(){return[F(the,{size:"s"}),F(yu,{get children(){return[F(br,{get when(){return o()==="missing-features"},get children(){return F(tw,{translationKey:"walletModal.mobileConnectionModal.missingFeatures",get translationValues(){return{name:t.wallet.name}},children:"Please update Wallet, your version does not support required features for this dApp"})}}),F(br,{get when(){return o()==="connection-declined"},get children(){return F(tw,{translationKey:"walletModal.mobileConnectionModal.connectionDeclined",children:"Connection declined"})}}),F(br,{get when(){return o()==="not-supported"},get children(){return F(tw,{translationKey:"walletModal.mobileConnectionModal.notSupportedWallet",get translationValues(){return{name:t.wallet.name}},get children(){return[Pe(()=>t.wallet.name)," doesnât support the requested action. Please connect another wallet that supports it."]}})}})]}}),F(vk,{get children(){return F(yu,{get children(){return[F(br,{get when(){return o()==="missing-features"},get children(){return[F(Jr,{get leftIcon(){return F(kp,{})},onClick:d,get children(){return F(Xr,{translationKey:"common.retry",children:"Retry"})}}),F(zf,{get href(){return t.wallet.aboutUrl},blank:!0,get children(){return F(Jr,{get leftIcon(){return F(Pp,{})},get children(){return F(Xr,{translationKey:"walletModal.mobileConnectionModal.updateWallet",get translationValues(){return{name:t.wallet.name}},get children(){return["Update ",Pe(()=>t.wallet.name)]}})}})}})]}}),F(br,{get when(){return o()==="not-supported"},get children(){return F(Jr,{onClick:()=>t.onBackClick(),get children(){return F(Xr,{translationKey:"walletModal.mobileConnectionModal.chooseAnotherWallet",children:"Choose Another Wallet"})}})}}),F(br,{get when(){return o()==="connection-declined"},get children(){return[F(Jr,{get leftIcon(){return F(kp,{})},onClick:d,get children(){return F(Xr,{translationKey:"common.retry",children:"Retry"})}}),F(Jr,{get leftIcon(){return F(BC,{get fill(){return e.colors.accent}})},onClick:y,get children(){return F(Xr,{translationKey:"walletModal.mobileConnectionModal.showQR",children:"Show QR Code"})}})]}})]}})}})]}}),F(Nt,{get when(){return!o()},get children(){return[F(ehe,{size:"s"}),F(tw,{translationKey:"walletModal.mobileConnectionModal.continueIn",get translationValues(){return{name:t.wallet.name}},get children(){return["Continue in ",Pe(()=>t.wallet.name),"â¦"]}}),F(vk,{get children(){return[F(Jr,{get leftIcon(){return F(kp,{})},onClick:d,get children(){return F(Xr,{translationKey:"common.retry",children:"Retry"})}}),F(Jr,{get leftIcon(){return F(BC,{get fill(){return e.colors.accent}})},onClick:y,get children(){return F(Xr,{translationKey:"walletModal.mobileConnectionModal.showQR",children:"Show QR Code"})}})]}})]}})]}}),F(Jde,{get children(){return[F(Qde,{get src(){return t.wallet.imageUrl}}),F(gx,{get children(){return t.wallet.name}}),F(Xde,{get href(){return t.wallet.aboutUrl},blank:!0,get children(){return F(Jr,{get children(){return F(Xr,{translationKey:"common.get",chil
1757dren:"GET"})}})}})]}})]}})]}})},che={m:"16px",s:"12px",none:"0"},lhe={m:"6px",s:"6px",none:"0"};ue.li` 1758 width: 82px; 1759 min-width: 82px; 1760 height: 124px; 1761 display: flex; 1762 flex-direction: column; 1763 align-items: center; 1764 padding: 8px 4px; 1765 1766 text-align: center; 1767 cursor: pointer; 1768 1769 transition: transform 0.1s ease-in-out; 1770 1771 ${Yy} { 1772 &:hover { 1773 transform: scale(1.04); 1774 } 1775 } 1776 1777 &:active { 1778 transform: scale(0.96); 1779 } 1780 1781 ${Gy} { 1782 &:active { 1783 transform: scale(0.92); 1784 } 1785 } 1786`;const uhe=ue(Xo)` 1787 margin-top: 38px; 1788 margin-bottom: 4px; 1789 padding: 0 24px; 1790`,Ek=ue(Al)` 1791 margin: ${t=>{var e;return(e=t.margin)!=null?e:"0 0 28px 0"}}; 1792 padding: ${t=>{var e;return(e=t.padding)!=null?e:"0 24px"}}; 1793 min-height: ${t=>{var e;return(e=t.padding)!=null?e:"44px"}}; 1794 max-width: ${t=>t.maxWidth}px; 1795 margin-left: ${t=>t.maxWidth?"auto":"0px"}; 1796 margin-right: ${t=>t.maxWidth?"auto":"0px"}; 1797`;ue(Jr)` 1798 display: block; 1799 margin: 0 auto; 1800`;const fhe=ue(Jr)` 1801 margin: 0 28px 24px; 1802 width: calc(100% - 56px); 1803 border-radius: ${t=>che[t.theme.borderRadius]}; 1804 padding: 14px 16px 14px 14px; 1805 background-color: ${t=>t.theme.colors.telegramButton}; 1806 1807 color: ${t=>t.theme.colors.constant.white}; 1808 font-weight: 500; 1809 font-size: 16px; 1810 line-height: 20px; 1811 1812 @media (max-width: 375px) { 1813 margin: 0 16px 24px; 1814 width: calc(100% - 32px); 1815 } 1816`,dhe=ue(Qh)` 1817 background-color: transparent; 1818 border-radius: ${t=>lhe[t.theme.borderRadius]}; 1819 width: 24px; 1820 height: 24px; 1821`,Ck=ue(Pu)` 1822 position: absolute; 1823 top: 16px; 1824 left: 16px; 1825`,hhe={m:"16px",s:"8px",none:"0"},phe=ue(Xo)` 1826 margin-bottom: 2px; 1827 padding: 0 52px; 1828`,ghe=ue(Al)` 1829 margin-bottom: 20px; 1830 padding: 0 64px; 1831`,mhe=ue.div` 1832 padding: 0 24px 16px; 1833`,yhe=ue.div` 1834 display: flex; 1835 flex-direction: row; 1836 gap: 16px; 1837 padding: 0 24px 24px; 1838 margin-top: 0; 1839`,_k=ue(Jr)` 1840 width: 100%; 1841 height: 56px; 1842 border-radius: ${t=>hhe[t.theme.borderRadius]}; 1843 background-color: ${t=>Jh(t.theme.colors.accent,.12)}; 1844 color: ${t=>t.theme.colors.accent}; 1845 font-size: 16px; 1846 line-height: 20px; 1847 font-weight: 500; 1848 padding: 17px 20px 19px 20px; 1849`,bhe=t=>[F(phe,{translationKey:"walletModal.mobileUniversalModal.connectYourWallet",children:"Connect your TON wallet"}),F(ghe,{translationKey:"walletModal.mobileUniversalModal.scan",children:"Scan with your mobile wallet"}),F(mhe,{get children(){return F(px,{get imageUrl(){return Jy.TON},get sourceUrl(){return sn(t.universalLink,"none")},disableCopy:!0})}}),F(yhe,{get children(){return[F(_k,{appearance:"secondary",onClick:()=>t.onOpenLink(),get children(){return F(Xr,{translationKey:"walletModal.mobileUniversalModal.openLink",children:"Open Link"})}}),F(_k,{appearance:"secondary",onClick:()=>t.onCopy(),get children(){return F(Xr,{get translationKey(){return t.isCopiedShown!==void 0?"common.copied":"common.copyLink"},get children(){return t.isCopiedShown!==void 0?"Copied":"Copy Link"}})}})]}})];function vj(t){const e=new Set(t.filter(j9).map(r=>r.bridgeUrl));return Array.from(e).map(r=>({bridgeUrl:r}))}function xj(t,e){const r=new Set(t==null?void 0:t.map(i=>i.bridgeUrl)),n=new Set(e==null?void 0:e.map(i=>i.bridgeUrl));return r.size===n.size&&[...r].every(i=>n.has(i))}const Ak=or("<li></li>"),whe=or('<div data-tc-wallets-modal-universal-mobile="true"></div>'),vhe=t=>{const[e,r]=yt(!1),[n,i]=yt(!0),[s,o]=yt(null),a=Tr.connector,c=()=>t.walletsList.filter(W=>_m(W)&&W.appName!==lc),l=()=>c().length>7,u=Pe(()=>vj(t.walletsList),null,{equals:xj}),f=Pe(()=>{var W,B;return(B=(W=t.walletsList.find(I=>I.appName===lc))==null?void 0:W.isSupportRequiredFeatures)!=null?B:!1},null),d=()=>(s()||o(a.connect(u(),t.additionalRequest)),s());ts({openMethod:"universal-link"});const[p,h]=yt(void 0),g=()=>hr(void 0,null,function*(){p()!==void 0&&clearTimeout(p()),yield hx(d());const W=setTimeout(()=>h(void 0),1500);h(W)}),y=()=>{const W=!n();i(!1),eb(d(),void 0,{returnStrategy:Tr.returnStrategy,forceRedirect:W},B=>{ts({openMethod:B})})},x=()=>{o(null);const W=t.walletsList.find(j=>j.appName===lc);if(!W||!j9(W))throw new In("@wallet bot not found in the wallets list");const B=a.connect({bridgeUrl:W.bridgeUrl,universalLink:W.universalLink},t.additionalRequest),I=!n();i(!1),Xy(B,{returnStrategy:Tr.returnStrategy,twaReturnUrl:Tr.twaReturnUrl,forceRedirect:I})},C=()=>{r(!0),ts({openMethod:"qrcode"})},_=()=>{r(!1),ts({openMethod:"universal-link"})},L=Pe(()=>c().filter(W=>W.isSupportRequiredFeatures),null),P=Pe(()=>L().slice(0,3),null),z=Pe(()=>c().filter(W=>!P().find(B=>B.appName===W.appName)).slice(0,4),null);return(()=>{const W=whe.cloneNode(!0);return Bi(W,F(Nt,{get when(){return e()},get children(){return[F(Ck,{icon:"arrow",onClick:_}),F(bhe,{get universalLink(){return d()},get isCopiedShown(){return p()},onOpenLink:y,onCopy:g})]}}),null),Bi(W,F(Nt,{get when(){return!e()},get children(){return[F(Ck,{get icon(){return F(BC,{})},onClick:C}),F(uhe,{translationKey:"walletModal.mobileUniversalModal.connectYourWallet",children:"Connect your TON wallet"}),F(Nt,{get when(){return f()},get children(){return[F(Ek,{translationKey:"walletModal.mobileUniversalModal.openWalletOnTelegramOr
1849Select",maxWidth:320,children:"Use Wallet in Telegram or choose other application"}),F(fhe,{get leftIcon(){return F(rfe,{})},get rightIcon(){return F(dhe,{get src(){return Jy.TG}})},onClick:x,scale:"s",get children(){return F(Xr,{translationKey:"walletModal.mobileUniversalModal.openWalletOnTelegram",children:"Connect Wallet in Telegram"})}})]}}),F(Ek,{translationKey:"walletModal.mobileUniversalModal.chooseOtherApplication",maxWidth:342,padding:"0 24px 8px 24px",margin:"0",children:"Choose other application"}),F(pue,{get children(){return[F(Qp,{get each(){return Pe(()=>!!l())()?P():L()},children:B=>(()=>{const I=Ak.cloneNode(!0);return Bi(I,F(R3,{get icon(){return B.imageUrl},get name(){return B.name},onClick:()=>t.onSelect(B)})),I})()}),F(Nt,{get when(){return l()},get children(){const B=Ak.cloneNode(!0);return Bi(B,F(ij,{labelLine1:"View all",labelLine2:"wallets",get images(){return z().map(I=>I.imageUrl)},onClick:()=>t.onSelectAllWallets()})),B}})]}})]}}),null),W})()},Ej={m:"16px",s:"8px",none:"0"},xhe={m:"8px",s:"4px",none:"0"},Ehe=ue.div` 1850 display: flex; 1851 flex-direction: column; 1852 align-items: center; 1853 padding-bottom: 16px; 1854`,Che=ue(Al)` 1855 max-width: 320px; 1856 margin-top: 2px; 1857 margin-bottom: 20px; 1858`,_he=ue(Al)` 1859 margin-bottom: 16px; 1860`,Ahe=ue(px)` 1861 margin-bottom: 24px; 1862`,She=ue.ul` 1863 display: flex; 1864`;ue.div` 1865 display: flex; 1866 gap: 16px; 1867 width: 100%; 1868`;ue(Jr)` 1869 position: relative; 1870 font-size: 16px; 1871 line-height: 20px; 1872 width: 100%; 1873 padding: 0 16px; 1874 height: 56px; 1875 border-radius: ${t=>Ej[t.theme.borderRadius]}; 1876 1877 &:hover { 1878 ${t=>t.disableEventsAnimation?"transform: unset;":""} 1879 } 1880 1881 &:active { 1882 ${t=>t.disableEventsAnimation?"transform: unset;":""} 1883 } 1884`;ue.ul` 1885 position: absolute; 1886 bottom: 100%; 1887 left: 0; 1888 margin: 0; 1889 padding: 8px; 1890 width: 188px; 1891 transform: translateY(-16px); 1892 1893 background-color: ${t=>t.theme.colors.background.primary}; 1894 border-radius: ${t=>Ej[t.theme.borderRadius]}; 1895 box-shadow: 0 4px 24px rgba(0, 0, 0, 0.16); 1896`;ue.li` 1897 padding: 8px; 1898 1899 display: flex; 1900 align-items: center; 1901 gap: 8px; 1902 1903 cursor: pointer; 1904 border-radius: ${t=>xhe[t.theme.borderRadius]}; 1905 1906 transition: background-color, transform 0.1s ease-in-out; 1907 1908 &:hover { 1909 background-color: ${t=>t.theme.colors.background.secondary}; 1910 } 1911 1912 &:active { 1913 transform: scale(0.96); 1914 } 1915`;ue(Qh)` 1916 width: 24px; 1917 height: 24px; 1918 1919 border-radius: 6px; 1920`;ue.div` 1921 margin-top: 23px; 1922 margin-bottom: 1px; 1923 width: 100%; 1924 display: flex; 1925 justify-content: center; 1926 align-items: center; 1927`;ue(Io)` 1928 color: ${t=>t.theme.colors.text.secondary}; 1929 font-size: 16px; 1930`;const Nhe=or("<li></li>"),Ihe=t=>{const[e,r]=yt(!1),n=Tr.connector,i=Pe(()=>vj(t.walletsList),null,{equals:xj});ts({openMethod:"qrcode"});const s=Pe(()=>n.connect(i(),t.additionalRequest)),o=Pe(()=>t.walletsList.filter(l=>l.isSupportRequiredFeatures),null),a=Pe(()=>o().slice(0,3),null),c=Pe(()=>t.walletsList.filter(l=>!a().find(u=>u.appName===l.appName)).slice(0,4),null);return F(Ehe,{onClick:()=>r(!1),"data-tc-wallets-modal-universal-desktop":"true",get children(){return[F(Xo,{translationKey:"walletModal.desktopUniversalModal.connectYourWallet",children:"Connect your wallet"}),F(Che,{translationKey:"walletModal.desktopUniversalModal.scan",children:"Scan with your mobile wallet"}),F(Ahe,{get sourceUrl(){return sn(s(),"none")},get disableCopy(){return e()},get imageUrl(){return Jy.TON}}),F(_he,{translationKey:"walletModal.desktopUniversalModal.availableWallets",children:"Available wallets"}),F(She,{get children(){return[F(Qp,{get each(){return a()},children:l=>(()=>{const u=Nhe.cloneNode(!0);return Bi(u,F(sj,{wallet:l,onClick:()=>t.onSelect(l)})),u})()}),F(ij,{labelLine1:"View all",labelLine2:"wallets",get images(){return c().map(l=>l.imageUrl)},onClick:()=>t.onSelectAllWallets()})]}})]}})},The={m:"16px",s:"8px",none:"0"},khe=ue(Xo)` 1931 max-width: 288px; 1932 margin: 0 auto 38px; 1933`,Sk=ue.div` 1934 display: flex; 1935 flex-direction: column; 1936 align-items: center; 1937`,Phe=ue(Pu)` 1938 position: absolute; 1939 top: 16px; 1940 left: 16px; 1941`,Nk=ue(Xo)` 1942 text-align: center; 1943 font-size: 20px; 1944 line-height: 28px; 1945`,Rhe=ue(Io)` 1946 margin-top: 12px; 1947 margin-bottom: 24px; 1948 text-align: center; 1949 max-width: 360px; 1950 font-weight: 400; 1951 color: ${t=>t.theme.colors.text.secondary}; 1952`;ue.button` 1953 background: transparent; 1954 border: none; 1955 padding: 0; 1956 margin: 0; 1957 color: ${t=>t.theme.colors.accent}; 1958 text-decoration: underline; 1959 cursor: pointer; 1960 font: inherit; 1961`;const dE=ue.div` 1962 margin-bottom: 46px; 1963`,Ik=ue(yd)` 1964 margin-bottom: 16px; 1965`;ue.ul` 1966 display: flex; 1967 gap: 8px; 1968 margin-bottom: 24px; 1969 list-style: none; 1970 padding: 0; 1971`;const Ohe=ue(Jr)` 1972 max-width: 320px; 1973 width: 100%; 1974 height: 48px; 1975 font-size: 16px; 1976 line-height: 20px; 1977 border-radius: ${t=>The[t.theme.borderRadius]}; 1978 margin-bottom: 28px; 1979`,Dhe=ue(Al)` 1980 color: ${t=>t.theme.colors.text.secondary}; 1981 text-align: center; 1982 margin-bottom: 20px; 1983`,Lhe=ue.div` 1984 display: flex; 1985 justify-content: center; 1986 gap: 8px; 1987 padding-bottom: 31px; 1988`,Mhe=ue.div` 1989 margin: 0 8px 16px 8px; 1990`,$he=ue(Pu)` 1991 position: absolute; 1992 top: 16px; 1993 left: 16px; 1994`,Uhe=ue(Xo)` 1995 margin-bottom: 18px; 1996 text-align: center; 1997`,hE=ue.div` 1998 padding: 16px 0; 1999 display: flex; 2000 flex-direction: column; 2001 align-items: center; 2002`;ue.div` 2003 margin-bottom: 12px; 2004`;const pE=ue(gx)` 2005 text-align: center; 2006 margin-bottom: 4px; 2007`,gE=ue(Io)` 2008 text-align: center; 2009 max-width: 352px; 2010 color: ${t=>t.theme.colors.text.secondary}; 2011`,mE=ue.div` 2012 width: 44px; 2013 height: 44px; 2014 border-radius: 20px; 2015 background-color: ${t=>{var e;return(e=t.theme)==null?void 0:e.colors.icon.secondary}}; 2016 display: flex; 2017 align-items: center; 2018 justify-content: center; 2019 margin-bottom: 12px; 2020 font-weight: 700; 2021 font-size: 22px; 2022 color: ${t=>{var e;return(e=t.theme)==null?void 0:e.colors.text.primary}}; 2023`,Bhe=t=>F(Mhe,{"data-tc-wallets-modal-restore":"true",get children(){return[F($he,{icon:"arrow",get onClick(){return t.onBackClick}}),F(Uhe,{translationKey:"walletModal.restoreInfoModal.title",children:"Restore"}),F(eS,{get children(){return[F(hE,{get children(){return[F(mE,{children:"1"}),F(pE,{translationKey:"walletModal.restoreModal.step1.title",children:"Find your current recovery phrase"}),F(gE,{translationKey:"walletModal.restoreModal.step1.text",children:"Open your wallet settings and locate the recovery phrase"})]}}),F(hE,{get children(){return[F(mE,{children:"2"}),F(pE,{translationKey:"walletModal.restoreModal.step2.title",children:"Copy your recovery phrase"}),F(gE,{translationKey:"walletModal.restoreModal.step2.text",children:"Write it down or copy it to a safe place"})]}}),F(hE,{get children(){return[F(mE,{children:"3"}),F(pE,{translationKey:"walletModal.restoreModal.step3.title",children:"Restore in a supported wallet from the list below"}),F(gE,{translationKey:"walletModal.restoreModal.step3.text",children:"Enter the recovery phrase to access your wallet"})]}})]}})]}}),Fhe=t=>{const[e,r]=yt(null),[n,i]=yt(!1),s=Pe(()=>t.walletsList.find(l=>l.appName===t.currentWallet.device.appName||l.name===t.currentWallet.device.appName)),o=Pe(()=>{var l,u,f,d;return((u=(l=s())==null?void 0:l.appName)!=null?u:t.currentWallet.device.appName)===lc?"Wallet in Telegram":(d=(f=s())==null?void 0:f.name)!=null?d:t.currentWallet.device.appName}),a=Pe(()=>{const l=s();if(!(l!=null&&l.features))return!1;const u=t.walletsModalState.requiredFeature,f=u?{[u.featureName]:u.value}:{},d=v3(l.features,f),p=v3(t.currentWallet.device.features,f);return d&&!p}),c=()=>hr(void 0,null,function*(){yield t.onDisconnect(),t.onSelect(e())});return F(Sk,{get children(){return F(yu,{get children(){return[F(br,{get when(){return n()},get children(){return F(Bhe,{onBackClick:()=>i(!1)})}}),F(br,{get when(){return e()},get children(){return[F(dE,{}),F(Sk,{get children(){return[F(Phe,{icon:"arrow",onClick:()=>r(null)}),F(Nk,{translationKey:"walletModal.featureNotSupported.disconnect.title",children:"Confirm Disconnect"}),F(Rhe,{translationKey:"walletModal.featureNotSupported.disconnect.description",get translationValues(){return{name:e().name}},get children(){return["You will be disconnected from your current wallet and redirected to connect ",Pe(()=>{var l;return(l=e())==null?void 0:l.name}),"."]}}),F(Ohe,{onClick:()=>c(),get children(){return F(Xr,{translationKey:"walletModal.featureNotSupported.disconnect.button",children:"Disconnect"})}})]}})]}}),F(br,{get when(){return a()},get children(){return[F(khe,{get children(){return o()}}),F(Ik,{size:"s"}),F(Dhe,{translationKey:"walletModal.featureNotSupported.version.description",get translationValues(){return{name:o()}},get children(){return["Your current version of ",Pe(()=>o())," or wallet contract type doesn't support the required features. Please update it to continue."]}}),F(Lhe,{get children(){return[F(zf,{get href(){return s().aboutUrl},blank:!0,get children(){return F(Jr,{get leftIcon(){return F(Pp,{})},get children(){return F(Xr,{translationKey:"walletModal.featureNotSupported.version.updateButton",get translationValues(){return{name:o()}},get children(){return["Update ",Pe(()=>o())]}})}})}}),F(zf,{href:"https://tonkeeper.helpscoutdocs.com/article/102-w5",blank:!0,get children(){return F(Jr,{get leftIcon(){return F(Pp,{})},get children(){return F(Xr,{translationKey:"walletModal.featureNotSupported.version.aboutW5",children:"About W5"})}})}})]}})]}}),F(br,{when:!0,get children(){return[F(dE,{}),F(Ik,{size:"s"}),F(Nk,{translationKey:"walletModal.featureNotSupported.wallet.title",get translationValues(){return{name:o()}},get children(){return[Pe(()=>o())," doesnât support the requested action"]}}),F(dE,{})]}})]}})}})},jhe=()=>{const{locale:t}=vc()[1];di(()=>t(Tr.language)),di(()=>{ZT()?O3():(s(null),l("universal"),f(!1))});const e=Rs(Og),r=Rs(Ru),[n]=Hae(()=>r.getWallets()),[i,s]=yt(null),[o,a]=yt(null),[c,l]=yt("universal"),[u,f]=yt(!1),d=Pe(()=>{const z=A2();return"type"in z&&z.type==="wallet-not-support-feature"}),p=Pe(()=>{var z;if(n.state!=="ready")return null;let W=nS(n(),Tr.walletsListConfiguration);const B=W.filter(lh),I=W.filter(E=>!lh(E));
2023W=(B||[]).concat(I);const j=Tr.preferredWalletAppName,D=W.find(E=>bf(E,j)),O=W.filter(E=>bf(E,j)).length>=2;j&&D&&!O&&(W=[wo(zr({},D),{isPreferred:!0})].concat(W.filter(E=>!bf(E,j))));const T=W.find(E=>bf(E,lc));T&&(W=[T].concat(W.filter(E=>!bf(E,lc))));const m=(z=r==null?void 0:r.walletsRequiredFeatures)!=null?z:r==null?void 0:r.walletsPreferredFeatures;return W.map(E=>{var k;return wo(zr({},E),{isSupportRequiredFeatures:m?v3((k=E.features)!=null?k:[],m):!0})})}),h=()=>{var z;return((z=Tr.connectRequestParameters)==null?void 0:z.state)==="loading"},g=Pe(()=>{var z;if(!h())return(z=Tr.connectRequestParameters)==null?void 0:z.value}),y=z=>{r.closeModal(z)},x=e.onStatusChange(z=>{z&&y("wallet-selected")},z=>{var W;if(z instanceof Hy){const B=z.cause.connectEvent.device.appName.toLowerCase(),I=(W=p())==null?void 0:W.find(D=>D.appName.toLowerCase()===B);if(!I)throw new ht("Wallet not found");const j=I.isSupportRequiredFeatures?"missing-features":"not-supported";a(j),s(I)}}),C=()=>{l("all-wallets")},_=()=>{l("universal")},L=z=>{s(z),Qn.openWalletsModal()},P=()=>{s(null),a(null)};return Vs(()=>{s(null),a(null),f(!1)}),Vs(x),F(pj,{get opened(){return ZT()},get enableAndroidBackHandler(){return Tr.enableAndroidBackHandler},onClose:()=>y("action-cancelled"),onClickQuestion:()=>f(z=>!z),get showFooter(){return!d()},"data-tc-wallets-modal-container":"true",get children(){return[F(Nt,{get when(){return u()},get children(){return F(bj,{onBackClick:()=>f(!1)})}}),F(Nt,{get when(){return!u()},get children(){return[F(Nt,{get when(){return h()||!p()},get children(){return[F(gj,{translationKey:"walletModal.loading",children:"Wallets list is loading"}),F(mj,{get children(){return F(Sl,{size:"m"})}})]}}),F(Nt,{get when(){return Pe(()=>!h())()&&p()},get children(){return F(yu,{get children(){return[F(br,{get when(){return d()},get children(){return F(Fhe,{get walletsList(){return p()},get currentWallet(){return r==null?void 0:r.wallet},onSelect:L,onSelectAllWallets:C,onDisconnect:()=>e.disconnect(),get walletsModalState(){return A2()},onClose:()=>y("action-cancelled")})}}),F(br,{get when(){return i()},get children(){return F(Xp,{get component(){return rg()?wj:yj},get wallet(){return i()},get additionalRequest(){return g()},onBackClick:P,get defaultError(){return o()}})}}),F(br,{get when(){return c()==="universal"},get children(){return F(Xp,{get component(){return rg()?vhe:Ihe},onSelect:s,get walletsList(){return p()},get additionalRequest(){return g()},onSelectAllWallets:C})}}),F(br,{get when(){return c()==="all-wallets"},get children(){return F(Sde,{get walletsList(){return p()},get featureCheckMode(){return r!=null&&r.walletsRequiredFeatures?"strict":"soft"},onBack:_,onSelect:s})}})]}})}})]}})]}})},zhe=ue.div` 2024 display: flex; 2025 flex-direction: column; 2026 align-items: center; 2027 padding-bottom: 8px; 2028`,Whe=ue(Xo)` 2029 margin-top: 16px; 2030`,Hhe=ue(Io)` 2031 font-weight: 510; 2032 font-size: 16px; 2033 line-height: 20px; 2034 text-align: center; 2035 max-width: 250px; 2036 2037 color: ${t=>t.theme.colors.text.secondary}; 2038`,qhe=ue(Jr)` 2039 min-width: 112px; 2040 margin-top: 32px; 2041`,Vhe=ue(Sl)` 2042 height: 16px; 2043 width: 16px; 2044`,Tk=ue(Jr)` 2045 margin-top: 32px; 2046`,Dg=t=>{const e=Zy(t),r=Rs(Ru),[n,i]=yt(!0),[s,o]=yt(!1),[a,c]=yt(!1),[l,u]=yt(!1);di(()=>{const h=fa();o(!!h&&("sent"in h&&h.sent||h.name==="transaction-sent")),c(!!h&&("signed"in h&&h.signed||h.name==="data-signed")),u(!!h&&(h.name==="transaction-canceled"||h.name==="sign-data-canceled"))});let f;r!=null&&r.wallet&&"universalLink"in r.wallet&&(r.wallet.openMethod==="universal-link"||Ff(r.wallet.universalLink)&&cc())&&(f=r.wallet.universalLink);let d;r!=null&&r.wallet&&"deepLink"in r.wallet&&(r.wallet.openMethod==="custom-deeplink"||Ff(r.wallet.deepLink)&&cc())&&(d=r.wallet.deepLink);const p=()=>{const h=fa(),g="returnStrategy"in h?h.returnStrategy:Tr.returnStrategy,y=!n();i(!1),Ff(f)?Xy(f,{returnStrategy:g,twaReturnUrl:"twaReturnUrl"in h?h.twaReturnUrl:Tr.twaReturnUrl,forceRedirect:y}):eb(f,d,{returnStrategy:g,forceRedirect:y},()=>{})};return F(zhe,rl(e,{get children(){return[Pe(()=>t.icon),F(Whe,{get translationKey(){return t.headerTranslationKey},get translationValues(){return t.headerTranslationValues}}),F(Hhe,{get translationKey(){return t.textTranslationKey},get translationValues(){return t.textTranslationValues}}),F(Nt,{get when(){return!s()&&!a()&&!l()&&(t.showButton==="open-wallet"&&f||t.showButton!=="open-wallet")},get children(){return F(qhe,{disabled:!0,"data-tc-connect-button-loading":"true",get children(){return F(Vhe,{})}})}}),F(Nt,{get when(){return s()||a()},get children(){return[F(Nt,{get when(){return t.showButton!=="open-wallet"},get children(){return F(Tk,{onClick:()=>t.onClose(),get children(){return F(Xr,{translationKey:"common.close",children:"Close"})}})}}),F(Nt,{get when(){return t.showButton==="open-wallet"&&f},get children(){return F(Tk,{onClick:p,get children(){return F(Xr,{translationKey:"common.openWallet",children:"Open wallet"})}})}})]}})]}}))},Khe=t=>{const e=Rs(Ru),[r]=vc(),n=()=>e.wallet&&"name"in e.wallet?e.wallet.name:r("common.yourWallet",{},"Your wallet");return F(Dg,{headerTranslationKey:"actionModal.confirmTransaction.header",get headerTranslationValues(){return{name:n()}},textTranslationKey:"actionModal.confirmTransaction.text",get icon(){return F(Sl,{size:"m"})},onClose:()=>t.onClose(),showButton:"open-wallet","data-tc-confirm-modal":"true"})},Ghe=t=>F(Dg,{headerTranslationKey:"actionModal.transactionCanceled.header",textTranslationKey:"actionModal.transactionCanceled.text",get icon(){return F(yd,{size:"m"})},onClose:()=>t.onClose(),"data-tc-transaction-canceled-modal":"true"}),Yhe=t=>F(Dg,{headerTranslationKey:"actionModal.transactionSent.header",textTranslationKey:"actionModal.transactionSent.text",get icon(){return F(mx,{size:"m"})},showButton:"open-wallet",onClose:()=>t.onClose(),"data-tc-transaction-sent-modal":"true"}),Zhe=t=>{const e=Rs(Ru),[r]=vc(),n=()=>e.wallet&&"name"in e.wallet?e.wallet.name:r("common.yourWallet",{},"Your wallet");return F(Dg,{headerTranslationKey:"actionModal.signData.header",get headerTranslationValues(){return{name:n()}},textTranslationKey:"actionModal.signData.text",get icon(){return F(Sl,{size:"m"})},onClose:()=>t.onClose(),showButton:"open-wallet","data-tc-sign-data-confirm-modal":"true"})},Jhe=t=>F(Dg,{headerTranslationKey:"actionModal.signDataCanceled.header",get icon(){return F(yd,{size:"m"})},onClose:()=>t.onClose(),"data-tc-sign-data-canceled-modal":"true"}),Qhe=t=>F(Dg,{headerTranslationKey:"actionModal.dataSigned.header",get icon(){return F(mx,{size:"m"})},onClose:()=>t.onClose(),"data-tc-data-signed-modal":"true"}),Xhe=()=>F(XF,{get opened(){var t;return Pe(()=>fa()!==null)()&&((t=fa())==null?void 0:t.openModal)===!0},get enableAndroidBackHandler(){return Tr.enableAndroidBackHandler},onClose:()=>ql(null),showFooter:!1,"data-tc-actions-modal-container":"true",get children(){return F(yu,{get children(){return[F(br,{get when(){return fa().name==="transaction-sent"},get children(){return F(Yhe,{onClose:()=>ql(null)})}}),F(br,{get when(){return fa().name==="transaction-canceled"},get children(){return F(Ghe,{onClose:()=>ql(null)})}}),F(br,{get when(){return fa().name==="confirm-transaction"},get children(){return F(Khe,{onClose:()=>ql(null)})}}),F(br,{get when(){return fa().name==="data-signed"},get children(){return F(Qhe,{onClose:()=>ql(null)})}}),F(br,{get when(){return fa().name==="sign-data-canceled"},get children(){return F(Jhe,{onClose:()=>ql(null)})}}),F(br,{get when(){return fa().name==="confirm-sign-data"},get children(){return F(Zhe,{onClose:()=>ql(null)})}})]}})}}),e0e=()=>{const{locale:t}=vc()[1];di(()=>t(Tr.language)),di(()=>{QT()&&O3()});const e=Rs(Og),r=Rs(Ru),[n,i]=yt(!1),s=()=>{var l;return((l=Tr.connectRequestParameters)==null?void 0:l.state)==="loading"},o=Pe(()=>{var l;if(!s())return(l=Tr.connectRequestParameters)==null?void 0:l.value}),a=l=>{r.closeSingleWalletModal(l)},c=e.onStatusChange(l=>{l&&a("wallet-selected")});return Vs(c),Vs(()=>{i(!1)}),F(pj,{get opened(){return QT()},get enableAndroidBackHandler(){return Tr.enableAndroidBackHandler},onClose:()=>a("action-cancelled"),onClickQuestion:()=>i(l=>!l),showFooter:!0,"data-tc-wallets-modal-container":"true",get children(){return[F(Nt,{get when(){return n()},get children(){return F(bj,{onBackClick:()=>i(!1)})}}),F(Nt,{get when(){return!n()},get children(){return[F(Nt,{get when(){return s()},get children(){return[F(gj,{translationKey:"walletModal.loading",children:"Wallets list is loading"}),F(mj,{get children(){return F(Sl,{size:"m"})}})]}}),F(Nt,{get when(){return!s()},get children(){return F(Xp,{get component(){return rg()?wj:yj},get wallet(){return Hce()}
2046,get additionalRequest(){return o()},onBackClick:()=>{},backDisabled:!0})}})]}})]}})},t0e=t=>{const e=cue(ale,Tr.language);return Uce(),$ce(),F(rj.Provider,{value:e,get children(){return F(Ru.Provider,{get value(){return t.tonConnectUI},get children(){return F(Og.Provider,{get value(){return Tr.connector},get children(){return[F(Tce,{}),F(Nce,{theme:gle,get children(){return[F(Nt,{get when(){return Tr.buttonRootId},get children(){return F(DF,{get mount(){return document.getElementById(Tr.buttonRootId)},get children(){return F(hde,{})}})}}),F(Xp,{component:Yl,get children(){return[F(jhe,{}),F(e0e,{}),F(Xhe,{})]}})]}})]}})}})}})},Qn={openWalletsModal:()=>void setTimeout(()=>rE({status:"opened",closeReason:null})),closeWalletsModal:t=>void setTimeout(()=>rE({status:"closed",closeReason:t})),openSingleWalletModal:t=>{setTimeout(()=>JT({status:"opened",closeReason:null,walletInfo:t}))},closeSingleWalletModal:t=>void setTimeout(()=>JT({status:"closed",closeReason:t})),openWalletNotSupportFeatureModal:t=>void setTimeout(()=>rE({status:"opened",closeReason:null,type:"wallet-not-support-feature",requiredFeature:t.requiredFeature})),setAction:t=>void setTimeout(()=>ql(t)),clearAction:()=>void setTimeout(()=>ql(null)),getSelectedWalletInfo:()=>qce(),removeSelectedWalletInfo:()=>ts(null),renderApp:(t,e)=>cce(()=>F(t0e,{tonConnectUI:e}),document.getElementById(t))};class r0e{constructor(e){_t(this,"connector"),_t(this,"setConnectRequestParametersCallback"),_t(this,"consumers",[]),_t(this,"tracker"),_t(this,"state",A2()),this.connector=e.connector,this.tracker=e.tracker,this.setConnectRequestParametersCallback=e.setConnectRequestParametersCallback,di(()=>{const r=A2();this.state=r,this.consumers.forEach(n=>n(r))})}open(){return hr(this,null,function*(){this.tracker.trackConnectionStarted();const r=(yield this.connector.getWallets()).find(ax);return r?this.connectEmbeddedWallet(r):this.openWalletsModal()})}close(e="action-cancelled"){e==="action-cancelled"&&this.tracker.trackConnectionError("Connection was cancelled"),Qn.closeWalletsModal(e)}onStateChange(e){return this.consumers.push(e),()=>{this.consumers=this.consumers.filter(r=>r!==e)}}connectEmbeddedWallet(e){const r=i=>
2046{ts(e),this.connector.connect({jsBridgeKey:e.jsBridgeKey},i)},n=Tr.connectRequestParameters;(n==null?void 0:n.state)==="loading"?this.setConnectRequestParametersCallback(r):r(n==null?void 0:n.value)}openWalletsModal(){return hr(this,null,function*(){return cc()&&T3(),Qn.openWalletsModal(),new Promise(e=>{const r=this.onStateChange(n=>{const{status:i}=n;i==="opened"&&(r(),e())})})})}}class n0e{constructor(e){_t(this,"connector"),_t(this,"consumers",[]),this.connector=e.connector,di(()=>{const r=fa();this.consumers.forEach(n=>n(r))})}onStateChange(e){return this.consumers.push(e),()=>{this.consumers=this.consumers.filter(r=>r!==e)}}}class i0e{constructor(e){_t(this,"connector"),_t(this,"setConnectRequestParametersCallback"),_t(this,"consumers",[]),_t(this,"tracker"),_t(this,"state",A3()),this.connector=e.connector,this.tracker=e.tracker,this.setConnectRequestParametersCallback=e.setConnectRequestParametersCallback,di(()=>{const r=A3();this.state=r,this.consumers.forEach(n=>n(r))})}open(e){return hr(this,null,function*(){this.tracker.trackConnectionStarted();const r=yield this.connector.getWallets(),n=nS(r,Tr.walletsListConfiguration),i=n.find(ax);if(!!i)return this.connectEmbeddedWallet(i);const a=n.filter(j9).find(u=>bf(u,e));if(!!a)return this.openSingleWalletModal(a);const l=`Trying to open modal window with unknown wallet "${e}".`;throw this.tracker.trackConnectionError(l),new In(l)})}close(e="action-cancelled"){e==="action-cancelled"&&this.tracker.trackConnectionError("Connection was cancelled"),Qn.closeSingleWalletModal("action-cancelled")}onStateChange(e){return this.consumers.push(e),()=>{this.consumers=this.consumers.filter(r=>r!==e)}}connectEmbeddedWallet(e){const r=i=>
2046{ts(e),this.connector.connect({jsBridgeKey:e.jsBridgeKey},i)},n=Tr.connectRequestParameters;(n==null?void 0:n.state)==="loading"?this.setConnectRequestParametersCallback(r):r(n==null?void 0:n.value)}openSingleWalletModal(e){return hr(this,null,function*(){return cc()&&T3(),Qn.openSingleWalletModal(e),new Promise(r=>{const n=this.onStateChange(i=>{const{status:s}=i;s==="opened"&&(n(),r())})})})}}class s0e{constructor(e){_t(this,"eventPrefix","ton-connect-ui-"),_t(this,"tonConnectUiVersion"),_t(this,"tonConnectSdkVersion",null),_t(this,"eventDispatcher");var r;this.eventDispatcher=(r=e==null?void 0:e.eventDispatcher)!=null?r:new mF,this.tonConnectUiVersion=e.tonConnectUiVersion,this.init().catch()}get version(){return Zh({ton_connect_sdk_lib:this.tonConnectSdkVersion,ton_connect_ui_lib:this.tonConnectUiVersion})}init(){return hr(this,null,function*(){try{yield this.setRequestVersionHandler(),this.tonConnectSdkVersion=yield this.requestTonConnectSdkVersion()}catch{}})}setRequestVersionHandler(){return hr(this,null,function*(){yield this.eventDispatcher.addEventListener("ton-connect-ui-request-version",()=>hr(this,null,function*(){yield this.eventDispatcher.dispatchEvent("ton-connect-ui-response-version",rF(this.tonConnectUiVersion))}))})}requestTonConnectSdkVersion(){return hr(this,null,function*(){return new Promise((e,r)=>hr(this,null,function*(){try{yield this.eventDispatcher.addEventListener("ton-connect-response-version",n=>{e(n.detail.version)},{once:!0}),yield this.eventDispatcher.dispatchEvent("ton-connect-request-version",tF())}catch(n){r(n)}}))})}dispatchUserActionEvent(e){var r;try{(r=this.eventDispatcher)==null||r.dispatchEvent(`${this.eventPrefix}${e.type}`,e).catch()}catch{}}trackConnectionStarted(...e){try{const r=nF(this.version,...e);this.dispatchUserActionEvent(r)}catch{}}trackConnectionCompleted(...e){try{const r=iF(this.version,...e);this.dispatchUserActionEvent(r)}catch{}}trackConnectionError(...e){try{const r=sF(this.version,...e);this.dispatchUserActionEvent(r)}catch{}}trackConnectionRestoringStarted(...e){try{const r=oF(this.version,...e);this.dispatchUserActionEvent(r)}catch{}}trackConnectionRestoringCompleted(...e){try{const r=aF(this.version,...e);this.dispatchUserActionEvent(r)}catch{}}trackConnectionRestoringError(...e){try{const r=cF(this.version,...e);this.dispatchUserActionEvent(r)}catch{}}trackDisconnection(...e){try{const r=gF(this.version,...e);this.dispatchUserActionEvent(r)}catch{}}trackTransactionSentForSignature(...e){try{const r=lF(this.version,...e);this.dispatchUserActionEvent(r)}catch{}}trackTransactionSigned(...e){try{const r=uF(this.version,...e);this.dispatchUserActionEvent(r)}catch{}}trackTransactionSigningFailed(...e){try{const r=fF(this.version,...e);this.dispatchUserActionEvent(r)}catch{}}trackDataSentForSignature(...e){try{const r=dF(this.version,...e);this.dispatchUserActionEvent(r)}catch{}}trackDataSigned(...e){try{const r=hF(this.version,...e);this.dispatchUserActionEvent(r)}catch{}}trackDataSigningFailed(...e){try{const r=pF(this.version,...e);this.dispatchUserActionEvent(r)}catch{}}}const o0e="2.2.0";class a0e{constructor(e){if(_t(this,"walletInfoStorage",new zce),_t(this,"preferredWalletStorage",new Wce),_t(this,"tracker"),_t(this,"walletInfo",null),_t(this,"systemThemeChangeUnsubscribe",null),_t(this,"actionsConfiguration"),_t(this,"walletsList"),_t(this,"_walletsRequiredFeatures"),_t(this,"_walletsPreferredFeatures"),_t(this,"connectRequestParametersCallback"),_t(this,"connector"),_t(this,"modal"),_t(this,"singleWalletModal"),_t(this,"transactionModal"),_t(this,"connectionRestored",Promise.resolve(!1)),e&&"connector"in e&&e.connector)this.connector=e.connector;else if(e&&"manifestUrl"in e&&e.manifestUrl)this.connector=new Th({manifestUrl:e.manifestUrl,eventDispatcher:e.eventDispatcher,walletsRequiredFeatures:e.walletsRequiredFeatures});else throw new In("You have to specify a `manifestUrl` or a `connector` in the options.");this.tracker=new s0e({eventDispatcher:e==null?void 0:e.eventDispatcher,tonConnectUiVersion:o0e}),this.modal=new r0e({connector:this.connector,tracker:this.tracker,setConnectRequestParametersCallback:i=>{this.connectRequestParametersCallback=i}}),this.singleWalletModal=new i0e({connector:this.connector,tracker:this.tracker,setConnectRequestParametersCallback:i=>{this.connectRequestParametersCallback=i}}),this.transactionModal=new n0e({connector:this.connector}),this._walletsRequiredFeatures=e.walletsRequiredFeatures,this._walletsPreferredFeatures=e.walletsPreferredFeatures,this.walletsList=this.getWallets(),this.walletsList.then(i=>BF(pde(i.map(s=>s.imageUrl))));const r=this.normalizeWidgetRoot(e==null?void 0:e.widgetRootId);this.subscribeToWalletChange(),(e==null?void 0:e.restoreConnection)!==!1&&(this.connectionRestored=Bce(()=>hr(this,null,function*(){return this.tracker.trackConnectionRestoringStarted(),yield this.connector.restoreConnection(),this.connector.connected?this.tracker.trackConnectionRestoringCompleted(this.wallet):(this.tracker.trackConnectionRestoringError("Connection was not restored"),this.walletInfoStorage.removeWalletInfo()),this.connector.connected}))),this.uiOptions=jf(e,{uiPreferences:{theme:"SYSTEM"}});const n=this.preferredWalletStorage.getPreferredWalletAppName();Xb({connector:this.connector,preferredWalletAppName:n}),Qn.renderApp(r,this)}static getWallets(){return Th.getWallets()}get walletsRequiredFeatures(){return this._walletsRequiredFeatures}get walletsPreferredFeatures(){return this._walletsPreferredFeatures}get connected(){return this.connector.connected}get account(){return this.connector.account}get wallet(){return this.connector.wallet?zr(zr({},this.connector.wallet),this.walletInfo):null}set uiOptions(e){var r,n,i,s,o;this.checkButtonRootExist(e.buttonRootId),this.actionsConfiguration=e.actionsConfiguration,"walletsRequiredFeatures"in e&&(this._walletsRequiredFeatures=e.walletsRequiredFeatures),"walletsPreferredFeatures"in e&&(this._walletsPreferredFeatures=e.walletsPreferredFeatures),(r=e.uiPreferences)!=null&&r.theme?((n=e.uiPreferences)==null?void 0:n.theme)!=="SYSTEM"?((i=this.systemThemeChangeUnsubscribe)==null||i.call(this),nE(e.uiPreferences.theme,e.uiPreferences.colorsSet)):(nE(Oce(),e.uiPreferences.colorsSet),this.systemThemeChangeUnsubscribe||(this.systemThemeChangeUnsubscribe=Dce(nE))):(s=e.uiPreferences)!=null&&s.colorsSet&&yle(e.uiPreferences.colorsSet),(o=e.uiPreferences)!=null&&o.borderRadius&&mle(e.uiPreferences.borderRadius),Xb(a=>{var c,l;const u=jf(zr(zr(zr(zr({},e.language&&{language:e.language}),!!((c=e.actionsConfiguration)!=null&&c.returnStrategy)&&{returnStrategy:e.actionsConfiguration.returnStrategy}),!!((l=e.actionsConfiguration)!=null&&l.twaReturnUrl)&&{twaReturnUrl:e.actionsConfiguration.twaReturnUrl}),!!e.walletsListConfiguration&&{walletsListConfiguration:e.walletsListConfiguration}),eg(a));return e.buttonRootId!==void 0&&(u.buttonRootId=e.buttonRootId),e.enableAndroidBackHandler!==void 0&&(u.enableAndroidBackHandler=e.enableAndroidBackHandler),u})}setConnectRequestParameters(e){var r;
2046Xb({connectRequestParameters:e}),((e==null?void 0:e.state)==="ready"||!e)&&((r=this.connectRequestParametersCallback)==null||r.call(this,e==null?void 0:e.value))}getWallets(){return hr(this,null,function*(){return this.connector.getWallets()})}onStatusChange(e,r){return this.connector.onStatusChange(n=>hr(this,null,function*(){if(n){const i=yield this.getSelectedWalletInfo(n);e(zr(zr({},n),i||this.walletInfoStorage.getWalletInfo()))}else e(n)}),r)}openModal(){return hr(this,null,function*(){return this.modal.open()})}closeModal(e){this.modal.close(e)}onModalStateChange(e){return this.modal.onStateChange(e)}get modalState(){return this.modal.state}openSingleWalletModal(e){return hr(this,null,function*(){return this.singleWalletModal.open(e)})}closeSingleWalletModal(e){this.singleWalletModal.close(e)}onSingleWalletModalStateChange(e){return this.singleWalletModal.onStateChange(e)}get singleWalletModalState(){return this.singleWalletModal.state}connectWallet(){return hr(this,null,function*(){const r=(yield this.getWallets()).find(ax);return r?yield this.connectEmbeddedWallet(r):yield this.connectExternalWallet()})}disconnect(){return this.tracker.trackDisconnection(this.wallet,"dapp"),Qn.clearAction(),Qn.removeSelectedWalletInfo(),this.walletInfoStorage.removeWalletInfo(),this.connector.disconnect()}sendTransaction(e,r){return hr(this,null,function*(){if(this.tracker.trackTransactionSentForSignature(this.wallet,e),!this.connected)throw this.tracker.trackTransactionSigningFailed(this.wallet,e,"Wallet was not connected"),new In("Connect wallet to send a transaction.");cc()&&T3();const{notifications:n,modals:i,returnStrategy:s,twaReturnUrl:o}=this.getModalsAndNotificationsConfiguration(r);Qn.setAction({name:"confirm-transaction",showNotification:n.includes("before"),openModal:i.includes("before"),sent:!1});const a=new AbortController,c=()=>{a.signal.aborted||(Qn.setAction({name:"confirm-transaction",showNotification:n.includes("before"),openModal:i.includes("before"),sent:!0}),this.redirectAfterRequestSent({returnStrategy:s,twaReturnUrl:o}))},l=this.onTransactionModalStateChange(u=>{u!=null&&u.openModal||(l(),u||a.abort())});try{const u=yield this.waitForSendTransaction({transaction:e,signal:a.signal},c);return this.tracker.trackTransactionSigned(this.wallet,e,u),Qn.setAction({name:"transaction-sent",showNotification:n.includes("success"),openModal:i.includes("success")}),u}catch(u){throw u instanceof iu?(Qn.clearAction(),Qn.openWalletNotSupportFeatureModal(u.cause),u):(Qn.setAction({name:"transaction-canceled",showNotification:n.includes("error"),openModal:i.includes("error")}),u instanceof ht?u:(console.error(u),new In("Unhandled error:"+u)))}finally{l()}})}signData(e){return hr(this,null,function*(){if(this.tracker.trackDataSentForSignature(this.wallet,e),!this.connected)throw this.tracker.trackDataSigningFailed(this.wallet,e,"Wallet was not connected"),new In("Connect wallet to send a transaction.");cc()&&T3();const{notifications:r,modals:n,returnStrategy:i,twaReturnUrl:s}=this.getModalsAndNotificationsConfiguration();Qn.setAction({name:"confirm-sign-data",showNotification:r.includes("before"),openModal:n.includes("before"),signed:!1});const o=new AbortController,a=()=>{o.signal.aborted||(Qn.setAction({name:"confirm-sign-data",showNotification:r.includes("before"),openModal:n.includes("before"),signed:!0}),this.redirectAfterRequestSent({returnStrategy:i,twaReturnUrl:s}))},c=this.onTransactionModalStateChange(l=>{l!=null&&l.openModal||(c(),l||o.abort())});try{const l=yield this.waitForSignData({data:e,signal:new AbortController().signal},a);return this.tracker.trackDataSigned(this.wallet,e,l),Qn.setAction({name:"data-signed",showNotification:r.includes("success"),openModal:n.includes("success")}),l}catch(l){throw l instanceof iu?(Qn.clearAction(),Qn.openWalletNotSupportFeatureModal(l.cause),l):(Qn.setAction({name:"sign-data-canceled",showNotification:r.includes("error"),openModal:n.includes("error")}),l instanceof ht?l:(console.error(l),new In("Unhandled error:"+l)))}finally{c()}})}redirectAfterRequestSent({returnStrategy:e,twaReturnUrl:r}){this.walletInfo&&"universalLink"in this.walletInfo&&(this.walletInfo.openMethod==="universal-link"||this.walletInfo.openMethod==="custom-deeplink")&&(Ff(this.walletInfo.universalLink)?Xy(this.walletInfo.universalLink,{returnStrategy:e,twaReturnUrl:r||Tr.twaReturnUrl,forceRedirect:!1}):eb(this.walletInfo.universalLink,this.walletInfo.deepLink,{returnStrategy:e,forceRedirect:!1},()=>{}))}connectEmbeddedWallet(e){return hr(this,null,function*(){const r=i=>
2046{ts(e),this.connector.connect({jsBridgeKey:e.jsBridgeKey},i)},n=Tr.connectRequestParameters;return(n==null?void 0:n.state)==="loading"?this.connectRequestParametersCallback=r:r(n==null?void 0:n.value),yield this.waitForWalletConnection({ignoreErrors:!1})})}connectExternalWallet(){return hr(this,null,function*(){const e=new AbortController;Qn.openWalletsModal();const r=this.onModalStateChange(n=>{const{status:i,closeReason:s}=n;i!=="opened"&&(r(),s==="action-cancelled"&&e.abort())});return yield this.waitForWalletConnection({ignoreErrors:!0,signal:e.signal})})}waitForWalletConnection(e){return hr(this,null,function*(){return new Promise((r,n)=>{this.tracker.trackConnectionStarted();const{ignoreErrors:i=!1,signal:s=null}=e;if(s&&s.aborted)return this.tracker.trackConnectionError("Connection was cancelled"),n(new In("Wallet was not connected"));const o=l=>hr(this,null,function*(){if(l)this.tracker.trackConnectionCompleted(l),c(),r(l);else{if(this.tracker.trackConnectionError("Connection was cancelled"),i)return;c(),n(new In("Wallet was not connected"))}}),a=l=>{this.tracker.trackConnectionError(l.message),!i&&(c(),n(l))},c=this.onStatusChange(l=>o(l),l=>a(l));s&&s.addEventListener("abort",()=>{c(),n(new In("Wallet was not connected"))},{once:!0})})})}waitForSendTransaction(e,r){return hr(this,null,function*(){return new Promise((n,i)=>{const{transaction:s,signal:o}=e;if(o.aborted)return this.tracker.trackTransactionSigningFailed(this.wallet,s,"Transaction was cancelled"),i(new In("Transaction was not sent"));const a=u=>hr(this,null,function*(){n(u)}),c=u=>{i(u)},l=()=>{this.tracker.trackTransactionSigningFailed(this.wallet,s,"Transaction was cancelled"),i(new In("Transaction was not sent"))};o.addEventListener("abort",l,{once:!0}),this.connector.sendTransaction(s,{onRequestSent:r,signal:o}).then(u=>(o.removeEventListener("abort",l),a(u))).catch(u=>(o.removeEventListener("abort",l),c(u)))})})}waitForSignData(e,r){return hr(this,null,function*(){return new Promise((n,i)=>{const{data:s,signal:o}=e;if(o.aborted)return this.tracker.trackDataSigningFailed(this.wallet,s,"SignData was cancelled"),i(new In("SignData was not sent"));const a=u=>hr(this,null,function*(){n(u)}),c=u=>{i(u)},l=()=>{this.tracker.trackDataSigningFailed(this.wallet,s,"SignData was cancelled"),i(new In("SignData was not sent"))};o.addEventListener("abort",l,{once:!0}),this.connector.signData(s,{onRequestSent:r,signal:o}).then(u=>a(u)).catch(u=>c(u))})})}onTransactionModalStateChange(e){return this.transactionModal.onStateChange(e)}subscribeToWalletChange(){this.connector.onStatusChange(e=>hr(this,null,function*(){var r;e?(yield this.updateWalletInfo(e),this.setPreferredWalletAppName(((r=this.walletInfo)==null?void 0:r.appName)||e.device.appName)):this.walletInfoStorage.removeWalletInfo()}))}setPreferredWalletAppName(e){this.preferredWalletStorage.setPreferredWalletAppName(e),Xb({preferredWalletAppName:e})}getSelectedWalletInfo(e){return hr(this,null,function*(){let r=Qn.getSelectedWalletInfo();if(!r)return null;let n;if("name"in r)n=r;else{const s=nS(yield this.walletsList,Tr.walletsListConfiguration).find(o=>bf(o,e.device.appName));if(!s)throw new In(`Cannot find WalletInfo for the '${e.device.appName}' wallet`);n=zr(zr({},s),r)}return n})}updateWalletInfo(e){return hr(this,null,function*(){const r=yield this.getSelectedWalletInfo(e);if(r){this.walletInfo=r,this.walletInfoStorage.setWalletInfo(r);return}const n=this.walletInfoStorage.getWalletInfo();if(n){this.walletInfo=n;return}this.walletInfo=(yield this.walletsList).find(i=>bf(i,e.device.appName))||null})}normalizeWidgetRoot(e){if(!e||!document.getElementById(e)){e="tc-widget-root";const r=document.createElement("div");r.id=e,document.body.appendChild(r)}return e}checkButtonRootExist(e){if(e!=null&&!document.getElementById(e))throw new In(`${e} element not found in the document.`)}getModalsAndNotificationsConfiguration(e){var r,n,i,s,o,a;const c=["before","success","error"];let l=c;(r=this.actionsConfiguration)!=null&&r.notifications&&((n=this.actionsConfiguration)==null?void 0:n.notifications)!=="all"&&(l=this.actionsConfiguration.notifications),e!=null&&e.notifications&&(e.notifications==="all"?l=c:l=e.notifications);let u=["before"];(i=this.actionsConfiguration)!=null&&i.modals&&(this.actionsConfiguration.modals==="all"?u=c:u=this.actionsConfiguration.modals),e!=null&&e.modals&&(e.modals==="all"?u=c:u=e.modals);const f=(e==null?void 0:e.returnStrategy)||((s=this.actionsConfiguration)==null?void 0:s.returnStrategy)||"back",d=(e==null?void 0:e.twaReturnUrl)||((o=this.actionsConfiguration)==null?void 0:o.twaReturnUrl);let p=(e==null?void 0:e.skipRedirectToWallet)||((a=this.actionsConfiguration)==null?void 0:a.skipRedirectToWallet)||"ios";return cc()&&(p="never"),{notifications:l,modals:u,returnStrategy:f,twaReturnUrl:d,skipRedirectToWallet:p}}}var c0e=Object.defineProperty,D3=Object.getOwnPropertySymbols,Cj=Object.prototype.hasOwnProperty,_j=Object.prototype.propertyIsEnumerable,kk=(t,e,r)=>e in t?c0e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,l0e=(t,e)=>{for(var r in e||(e={}))Cj.call(e,r)&&kk(t,r,e[r]);if(D3)for(var r of D3(e))_j.call(e,r)&&kk(t,r,e[r]);return t},u0e=(t,e)=>{var r={};for(var n in t)Cj.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&D3)for(var n of D3(t))e.indexOf(n)<0&&_j.call(t,n)&&(r[n]=t[n]);return r};function Aj(){return typeof window<"u"}function f0e(){return!Aj()}const Sj=se.createContext(null);let yE=null;const d0e=t=>{var e=t,{children:r}=e,n=u0e(e,["children"]);return Aj()&&!yE&&(yE=new a0e(n)),w.jsx(Sj.Provider,{value:yE,children:r})},h0e=se.memo(d0e);class iS extends In{constructor(...e){super(...e),Object.setPrototypeOf(this,iS.prototype)}}class sS extends iS{constructor(...e){super(...e),Object.setPrototypeOf(this,sS.prototype)}}function p0e(t){if(!t)throw new sS("You should add <TonConnectUIProvider> on the top of the app to use TonConnect");return!0}function g0e(){const t=se.useContext(Sj),e=se.useCallback(r=>{t&&(t.uiOptions=r)},[t]);return f0e()?[null,()=>{}]:(p0e(t),[t,e])}const Pk="ton-connect-button",m0e=({className:t,style:e})=>{const[r,n]=g0e();return se.useEffect(()=>(n({buttonRootId:Pk}),()=>n({buttonRootId:null})),[n]),w.jsx("div",{id:Pk,className:t,style:l0e({width:"fit-content"},e)})};se.memo(m0e);const y0e=Symbol(),oS=Symbol(),K1="a",Nj="f",Rk="p",Ij="c",Tj="t",aS="h",Am="w",cS="o",lS="k";let b0e=(t,e)=>new Proxy(t,e);const jC=Object.getPrototypeOf,zC=new WeakMap,kj=t=>t&&(zC.has(t)?zC.get(t):jC(t)===Object.prototype||jC(t)===Array.prototype),L3=t=>typeof t=="object"&&t!==null,w0e=t=>Object.values(Object.getOwnPropertyDescriptors(t)).some(e=>!e.configurable&&!e.writable),v0e=t=>
2046{if(Array.isArray(t))return Array.from(t);const e=Object.getOwnPropertyDescriptors(t);return Object.values(e).forEach(r=>{r.configurable=!0}),Object.create(jC(t),e)},x0e=(t,e)=>{const r={[Nj]:e};let n=!1;const i=(a,c)=>{if(!n){let l=r[K1].get(t);if(l||(l={},r[K1].set(t,l)),a===Am)l[Am]=!0;else{let u=l[a];u||(u=new Set,l[a]=u),u.add(c)}}},s=()=>{n=!0,r[K1].delete(t)},o={get(a,c){return c===oS?t:(i(lS,c),Pj(Reflect.get(a,c),r[K1],r[Ij],r[Tj]))},has(a,c){return c===y0e?(s(),!0):(i(aS,c),Reflect.has(a,c))},getOwnPropertyDescriptor(a,c){return i(cS,c),Reflect.getOwnPropertyDescriptor(a,c)},ownKeys(a){return i(Am),Reflect.ownKeys(a)}};return e&&(o.set=o.deleteProperty=()=>!1),[o,r]},uS=t=>t[oS]||t,Pj=(t,e,r,n)=>{if(!kj(t))return t;let i=n&&n.get(t);if(!i){const c=uS(t);w0e(c)?i=[c,v0e(c)]:i=[c],n==null||n.set(t,i)}const[s,o]=i;let a=r&&r.get(s);return(!a||a[1][Nj]!==!!o)&&(a=x0e(s,!!o),a[1][Rk]=b0e(o||s,a[0]),r&&r.set(s,a)),a[1][K1]=e,a[1][Ij]=r,a[1][Tj]=n,a[1][Rk]},E0e=(t,e)=>{const r=Reflect.ownKeys(t),n=Reflect.ownKeys(e);return r.length!==n.length||r.some((i,s)=>i!==n[s])},Rj=(t,e,r,n,i=Object.is)=>{if(i(t,e))return!1;if(!L3(t)||!L3(e))return!0;const s=r.get(uS(t));if(!s)return!0;if(n){if(n.get(t)===e)return!1;n.set(t,e)}let o=null;for(const a of s[aS]||[])if(o=Reflect.has(t,a)!==Reflect.has(e,a),o)return o;if(s[Am]===!0){if(o=E0e(t,e),o)return o}else for(const a of s[cS]||[]){const c=!!Reflect.getOwnPropertyDescriptor(t,a),l=!!Reflect.getOwnPropertyDescriptor(e,a);if(o=c!==l,o)return o}for(const a of s[lS]||[])if(o=Rj(t[a],e[a],r,n,i),o)return o;if(o===null)throw new Error("invalid used");return o},C0e=t=>kj(t)&&t[oS]||null,Ok=(t,e=!0)=>{zC.set(t,e)},_0e=(t,e,r)=>{const n=[],i=new WeakSet,s=(o,a)=>{var c,l,u;if(i.has(o))return;L3(o)&&i.add(o);const f=L3(o)&&e.get(uS(o));if(f){if((c=f[aS])===null||c===void 0||c.forEach(d=>{const p=`:has(${String(d)})`;n.push(a?[...a,p]:[p])}),f[Am]===!0){const d=":ownKeys";n.push(a?[...a,d]:[d])}else(l=f[cS])===null||l===void 0||l.forEach(d=>{const p=`:hasOwn(${String(d)})`;n.push(a?[...a,p]:[p])});(u=f[lS])===null||u===void 0||u.forEach(d=>{"value"in(Object.getOwnPropertyDescriptor(o,d)||{})&&s(o[d],a?[...a,d]:[d])})}else a&&n.push(a)};return s(t),n},M3={},fS=t=>typeof t=="object"&&t!==null,A0e=t=>fS(t)&&!tb.has(t)&&(Array.isArray(t)||!(Symbol.iterator in t))&&!(t instanceof WeakMap)&&!(t instanceof WeakSet)&&!(t instanceof Error)&&!(t instanceof Number)&&!(t instanceof Date)&&!(t instanceof String)&&!(t instanceof RegExp)&&!(t instanceof ArrayBuffer)&&!(t instanceof Promise),Oj=(t,e)=>{const r=WC.get(t);if((r==null?void 0:r[0])===e)return r[1];const n=Array.isArray(t)?[]:Object.create(Object.getPrototypeOf(t));return Ok(n,!0),WC.set(t,[e,n]),Reflect.ownKeys(t).forEach(i=>{if(Object.getOwnPropertyDescriptor(n,i))return;const s=Reflect.get(t,i),{enumerable:o}=Reflect.getOwnPropertyDescriptor(t,i),a={value:s,enumerable:o,configurable:!0};if(tb.has(s))Ok(s,!1);else if(id.has(s)){const[c,l]=id.get(s);a.value=Oj(c,l())}Object.defineProperty(n,i,a)}),Object.preventExtensions(n)},S0e=(t,e,r,n)=>({deleteProperty(i,s){const o=Reflect.get(i,s);r(s);const a=Reflect.deleteProperty(i,s);return a&&n(["delete",[s],o]),a},set(i,s,o,a){const c=!t()&&Reflect.has(i,s),l=Reflect.get(i,s,a);if(c&&(Dk(l,o)||T2.has(o)&&Dk(l,T2.get(o))))return!0;r(s),fS(o)&&(o=C0e(o)||o);const u=!id.has(o)&&I0e(o)?_n(o):o;return e(s,u),Reflect.set(i,s,u,a),n(["set",[s],o,l]),!0}}),id=new WeakMap,tb=new WeakSet,WC=new WeakMap,G1=[1,1],T2=new WeakMap;let Dk=Object.is,N0e=(t,e)=>new Proxy(t,e),I0e=A0e,T0e=Oj,k0e=S0e;function _n(t={}){if(!fS(t))throw new Error("object required");const e=T2.get(t);if(e)return e;let r=G1[0];const n=new Set,i=(y,x=++G1[0])=>{r!==x&&(r=x,n.forEach(C=>C(y,x)))};let s=G1[1];const o=(y=++G1[1])=>(s!==y&&!n.size&&(s=y,c.forEach(([x])=>{const C=x[1](y);C>r&&(r=C)})),r),a=y=>(x,C)=>{const _=[...x];_[1]=[y,..._[1]],i(_,C)},c=new Map,l=(y,x)=>{const C=!tb.has(x)&&id.get(x);if(C){if((M3?"production":void 0)!=="production"&&c.has(y))throw new Error("prop listener already exists");if(n.size){const _=C[2](a(y));c.set(y,[C,_])}else c.set(y,[C])}},u=y=>{var x;const C=c.get(y);C&&(c.delete(y),(x=C[1])==null||x.call(C))},f=y=>
2046(n.add(y),n.size===1&&c.forEach(([C,_],L)=>{if((M3?"production":void 0)!=="production"&&_)throw new Error("remove already exists");const P=C[2](a(L));c.set(L,[C,P])}),()=>{n.delete(y),n.size===0&&c.forEach(([C,_],L)=>{_&&(_(),c.set(L,[C]))})});let d=!0;const p=k0e(()=>d,l,u,i),h=N0e(t,p);T2.set(t,h);const g=[t,o,f];return id.set(h,g),Reflect.ownKeys(t).forEach(y=>{const x=Object.getOwnPropertyDescriptor(t,y);"value"in x&&x.writable&&(h[y]=t[y])}),d=!1,h}function Wi(t,e,r){const n=id.get(t);(M3?"production":void 0)!=="production"&&!n&&console.warn("Please use proxy object");let i;const s=[],o=n[2];let a=!1;const l=o(u=>{s.push(u),i||(i=Promise.resolve().then(()=>{i=void 0,a&&e(s.splice(0))}))});return a=!0,()=>{a=!1,l()}}function kh(t){const e=id.get(t);(M3?"production":void 0)!=="production"&&!e&&console.warn("Please use proxy object");const[r,n]=e;return T0e(r,n())}function Ph(t){return tb.add(t),t}function P0e(){return{proxyStateMap:id,refSet:tb,snapCache:WC,versionHolder:G1,proxyCache:T2}}function Ds(t,e,r,n){let i=t[e];return Wi(t,()=>{const s=t[e];Object.is(i,s)||r(i=s)})}const{proxyStateMap:R0e,snapCache:O0e}=P0e(),rw=t=>R0e.has(t);function D0e(t){const e=[];let r=0;const n=new Map,i=new WeakMap,s=()=>{const l=O0e.get(a),u=l==null?void 0:l[1];if(u&&!i.has(u)){const f=new Map(n);i.set(u,f)}},o=l=>i.get(l)||n,a={data:e,index:r,epoch:0,get size(){return rw(this)||s(),o(this).size},get(l){const f=o(this).get(l);if(f===void 0){this.epoch;return}return this.data[f]},has(l){const u=o(this);return this.epoch,u.has(l)},set(l,u){if(!rw(this))throw new Error("Cannot perform mutations on a snapshot");const f=n.get(l);return f===void 0?(n.set(l,this.index),this.data[this.index++]=u):this.data[f]=u,this.epoch++,this},delete(l){if(!rw(this))throw new Error("Cannot perform mutations on a snapshot");const u=n.get(l);return u===void 0?!1:(delete this.data[u],n.delete(l),this.epoch++,!0)},clear(){if(!rw(this))throw new Error("Cannot perform mutations on a snapshot");this.data.length=0,this.index=0,this.epoch++,n.clear()},forEach(l){this.epoch,o(this).forEach((f,d)=>{l(this.data[f],d,this)})},*entries(){this.epoch;const l=o(this);for(const[u,f]of l)yield[u,this.data[f]]},*keys(){this.epoch;const l=o(this);for(const u of l.keys())yield u},*values(){this.epoch;const l=o(this);for(const u of l.values())yield this.data[u]},[Symbol.iterator](){return this.entries()},get[Symbol.toStringTag](){return"Map"},toJSON(){return new Map(this.entries())}},c=_n(a);return Object.defineProperties(c,{size:{enumerable:!1},index:{enumerable:!1},epoch:{enumerable:!1},data:{enumerable:!1},toJSON:{enumerable:!1}}),Object.seal(c),c}var Lk={};const fe={WC_NAME_SUFFIX:".reown.id",WC_NAME_SUFFIX_LEGACY:".wcn.id",BLOCKCHAIN_API_RPC_URL:"https://rpc.walletconnect.org",PULSE_API_URL:"https://pulse.walletconnect.org",W3M_API_URL:"https://api.web3modal.org",CONNECTOR_ID:{WALLET_CONNECT:"walletConnect",INJECTED:"injected",WALLET_STANDARD:"announced",COINBASE:"coinbaseWallet",COINBASE_SDK:"coinbaseWalletSDK",SAFE:"safe",LEDGER:"ledger",OKX:"okx",EIP6963:"eip6963",AUTH:"ID_AUTH"},CONNECTOR_NAMES:{AUTH:"Auth"},AUTH_CONNECTOR_SUPPORTED_CHAINS:["eip155","solana"],LIMITS:{PENDING_TRANSACTIONS:99},CHAIN:{EVM:"eip155",SOLANA:"solana",POLKADOT:"polkadot",BITCOIN:"bip122"}
2046,CHAIN_NAME_MAP:{eip155:"EVM Networks",solana:"Solana",polkadot:"Polkadot",bip122:"Bitcoin",cosmos:"Cosmos"},ADAPTER_TYPES:{BITCOIN:"bitcoin",SOLANA:"solana",WAGMI:"wagmi",ETHERS:"ethers",ETHERS5:"ethers5"},USDT_CONTRACT_ADDRESSES:["0xdac17f958d2ee523a2206206994597c13d831ec7","0xc2132d05d31c914a87c6611c10748aeb04b58e8f","0x9702230a8ea53601f5cd2dc00fdbc13d4df4a8c7","0x919C1c267BC06a7039e03fcc2eF738525769109c","0x48065fbBE25f71C9282ddf5e1cD6D6A887483D5e","0x55d398326f99059fF775485246999027B3197955","0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9"],HTTP_STATUS_CODES:{SERVER_ERROR:500,TOO_MANY_REQUESTS:429,SERVICE_UNAVAILABLE:503,FORBIDDEN:403},UNSUPPORTED_NETWORK_NAME:"Unknown Network",SECURE_SITE_SDK_ORIGIN:(typeof process<"u"&&typeof Lk<"u"?Lk.NEXT_PUBLIC_SECURE_SITE_ORIGIN:void 0)||"https://secure.walletconnect.org",REMOTE_FEATURES_ALERTS:{MULTI_WALLET_NOT_ENABLED:{DEFAULT:{shortMessage:"Multi-Wallet Not Enabled",longMessage:"Multi-wallet support is not enabled. Please enable it in your AppKit configuration at cloud.reown.com."},CONNECTIONS_HOOK:{shortMessage:"Multi-Wallet Not Enabled",longMessage:"Multi-wallet support is not enabled. Please enable it in your AppKit configuration at cloud.reown.com to use the useAppKitConnections hook."},CONNECTION_HOOK:{shortMessage:"Multi-Wallet Not Enabled",longMessage:"Multi-wallet support is not enabled. Please enable it in your AppKit configuration at cloud.reown.com to use the useAppKitConnection hook."}}}},Dj={caipNetworkIdToNumber(t){return t?Number(t.split(":")[1]):void 0},parseEvmChainId(t){return typeof t=="string"?this.caipNetworkIdToNumber(t):t},getNetworksByNamespace(t,e){return(t==null?void 0:t.filter(r=>r.chainNamespace===e))||[]},getFirstNetworkByNamespace(t,e){return this.getNetworksByNamespace(t,e)[0]},getNetworkNameByCaipNetworkId(t,e){var i;if(!e)return;const r=t.find(s=>s.caipNetworkId===e);if(r)return r.name;const[n]=e.split(":");return((i=fe.CHAIN_NAME_MAP)==null?void 0:i[n])||void 0}};var L0e=20,M0e=1,Rh=1e6,Mk=1e6,$0e=-7,U0e=21,B0e=!1,rb="[big.js] ",Xh=rb+"Invalid ",wx=Xh+"decimal places",F0e=Xh+"rounding mode",Lj=rb+"Division by zero",cn={},il=void 0,j0e=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function Mj(){function t(e){var r=this;if(!(r instanceof t))return e===il?Mj():new t(e);if(e instanceof t)r.s=e.s,r.e=e.e,r.c=e.c.slice();else{if(typeof e!="string"){if(t.strict===!0&&typeof e!="bigint")throw TypeError(Xh+"value");e=e===0&&1/e<0?"-0":String(e)}z0e(r,e)}r.constructor=t}return t.prototype=cn,t.DP=L0e,t.RM=M0e,t.NE=$0e,t.PE=U0e,t.strict=B0e,t.roundDown=0,t.roundHalfUp=1,t.roundHalfEven=2,t.roundUp=3,t}function z0e(t,e){var r,n,i;if(!j0e.test(e))throw Error(Xh+"number");for(t.s=e.charAt(0)=="-"?(e=e.slice(1),-1):1,(r=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(r<0&&(r=n),r+=+e.slice(n+1),e=e.substring(0,n)):r<0&&(r=e.length),i=e.length,n=0;n<i&&e.charAt(n)=="0";)++n;if(n==i)t.c=[t.e=0];else{for(;i>0&&e.charAt(--i)=="0";);for(t.e=r-n-1,t.c=[],r=0;n<=i;)t.c[r++]=+e.charAt(n++)}return t}function e0(t,e,r,n){var i=t.c;if(r===il&&(r=t.constructor.RM),r!==0&&r!==1&&r!==2&&r!==3)throw Error(F0e);if(e<1)n=r===3&&(n||!!i[0])||e===0&&(r===1&&i[0]>=5||r===2&&(i[0]>5||i[0]===5&&(n||i[1]!==il))),i.length=1,n?(t.e=t.e-e+1,i[0]=1):i[0]=t.e=0;else if(e<i.length){if(n=r===1&&i[e]>=5||r===2&&(i[e]>5||i[e]===5&&(n||i[e+1]!==il||i[e-1]&1))||r===3&&(n||!!i[0]),i.length=e,n){for(;++i[--e]>9;)if(i[e]=0,e===0){++t.e,i.unshift(1);break}}for(e=i.length;!i[--e];)i.pop()}return t}function t0(t,e,r){var n=t.e,i=t.c.join(""),s=i.length;if(e)i=i.charAt(0)+(s>1?"."+i.slice(1):"")+(n<0?"e":"e+")+n;else if(n<0){for(;++n;)i="0"+i;i="0."+i}else if(n>0)if(++n>s)for(n-=s;n--;)i+="0";else n<s&&(i=i.slice(0,n)+"."+i.slice(n));else s>1&&(i=i.charAt(0)+"."+i.slice(1));return t.s<0&&r?"-"+i:i}cn.abs=function(){var t=new this.constructor(this);return t.s=1,t};cn.cmp=function(t){var e,r=this,n=r.c,i=(t=new r.constructor(t)).c,s=r.s,o=t.s,a=r.e,c=t.e;if(!n[0]||!i[0])return n[0]?s:i[0]?-o:0;if(s!=o)return s;if(e=s<0,a!=c)return a>c^e?1:-1;for(o=(a=n.length)<(c=i.length)?a:c,s=-1;++s<o;)if(n[s]!=i[s])return n[s]>i[s]^e?1:-1;return a==c?0:a>c^e?1:-1};cn.div=function(t){var e=this,r=e.constructor,n=e.c,i=(t=new r(t)).c,s=e.s==t.s?1:-1,o=r.DP;if(o!==~~o||o<0||o>Rh)throw Error(wx);if(!i[0])throw Error(Lj);if(!n[0])return t.s=s,t.c=[t.e=0],t;
2046var a,c,l,u,f,d=i.slice(),p=a=i.length,h=n.length,g=n.slice(0,a),y=g.length,x=t,C=x.c=[],_=0,L=o+(x.e=e.e-t.e)+1;for(x.s=s,s=L<0?0:L,d.unshift(0);y++<a;)g.push(0);do{for(l=0;l<10;l++){if(a!=(y=g.length))u=a>y?1:-1;else for(f=-1,u=0;++f<a;)if(i[f]!=g[f]){u=i[f]>g[f]?1:-1;break}if(u<0){for(c=y==a?i:d;y;){if(g[--y]<c[y]){for(f=y;f&&!g[--f];)g[f]=9;--g[f],g[y]+=10}g[y]-=c[y]}for(;!g[0];)g.shift()}else break}C[_++]=u?l:++l,g[0]&&u?g[y]=n[p]||0:g=[n[p]]}while((p++<h||g[0]!==il)&&s--);return!C[0]&&_!=1&&(C.shift(),x.e--,L--),_>L&&e0(x,L,r.RM,g[0]!==il),x};cn.eq=function(t){return this.cmp(t)===0};cn.gt=function(t){return this.cmp(t)>0};cn.gte=function(t){return this.cmp(t)>-1};cn.lt=function(t){return this.cmp(t)<0};cn.lte=function(t){return this.cmp(t)<1};cn.minus=cn.sub=function(t){var e,r,n,i,s=this,o=s.constructor,a=s.s,c=(t=new o(t)).s;if(a!=c)return t.s=-c,s.plus(t);var l=s.c.slice(),u=s.e,f=t.c,d=t.e;if(!l[0]||!f[0])return f[0]?t.s=-c:l[0]?t=new o(s):t.s=1,t;if(a=u-d){for((i=a<0)?(a=-a,n=l):(d=u,n=f),n.reverse(),c=a;c--;)n.push(0);n.reverse()}else for(r=((i=l.length<f.length)?l:f).length,a=c=0;c<r;c++)if(l[c]!=f[c]){i=l[c]<f[c];break}if(i&&(n=l,l=f,f=n,t.s=-t.s),(c=(r=f.length)-(e=l.length))>0)for(;c--;)l[e++]=0;for(c=e;r>a;){if(l[--r]<f[r]){for(e=r;e&&!l[--e];)l[e]=9;--l[e],l[r]+=10}l[r]-=f[r]}for(;l[--c]===0;)l.pop();for(;l[0]===0;)l.shift(),--d;return l[0]||(t.s=1,l=[d=0]),t.c=l,t.e=d,t};cn.mod=function(t){var e,r=this,n=r.constructor,i=r.s,s=(t=new n(t)).s;if(!t.c[0])throw Error(Lj);return r.s=t.s=1,e=t.cmp(r)==1,r.s=i,t.s=s,e?new n(r):(i=n.DP,s=n.RM,n.DP=n.RM=0,r=r.div(t),n.DP=i,n.RM=s,this.minus(r.times(t)))};cn.neg=function(){var t=new this.constructor(this);return t.s=-t.s,t};cn.plus=cn.add=function(t){var e,r,n,i=this,s=i.constructor;if(t=new s(t),i.s!=t.s)return t.s=-t.s,i.minus(t);var o=i.e,a=i.c,c=t.e,l=t.c;if(!a[0]||!l[0])return l[0]||(a[0]?t=new s(i):t.s=i.s),t;if(a=a.slice(),e=o-c){for(e>0?(c=o,n=l):(e=-e,n=a),n.reverse();e--;)n.push(0);n.reverse()}for(a.length-l.length<0&&(n=l,l=a,a=n),e=l.length,r=0;e;a[e]%=10)r=(a[--e]=a[e]+l[e]+r)/10|0;for(r&&(a.unshift(r),++c),e=a.length;a[--e]===0;)a.pop();return t.c=a,t.e=c,t};cn.pow=function(t){var e=this,r=new e.constructor("1"),n=r,i=t<0;if(t!==~~t||t<-Mk||t>Mk)throw Error(Xh+"exponent");for(i&&(t=-t);t&1&&(n=n.times(e)),t>>=1,!!t;)e=e.times(e);return i?r.div(n):n};cn.prec=function(t,e){if(t!==~~t||t<1||t>Rh)throw Error(Xh+"precision");return e0(new this.constructor(this),t,e)};cn.round=function(t,e){if(t===il)t=0;else if(t!==~~t||t<-Rh||t>Rh)throw Error(wx);return e0(new this.constructor(this),t+this.e+1,e)};cn.sqrt=function(){var t,e,r,n=this,i=n.constructor,s=n.s,o=n.e,a=new i("0.5");if(!n.c[0])return new i(n);if(s<0)throw Error(rb+"No square root");s=Math.sqrt(+t0(n,!0,!0)),s===0||s===1/0?(e=n.c.join(""),e.length+o&1||(e+="0"),s=Math.sqrt(e),o=((o+1)/2|0)-(o<0||o&1),t=new i((s==1/0?"5e":(s=s.toExponential()).slice(0,s.indexOf("e")+1))+o)):t=new i(s+""),o=t.e+(i.DP+=4);do r=t,t=a.times(r.plus(n.div(r)));while(r.c.slice(0,o).join("")!==t.c.slice(0,o).join(""));return e0(t,(i.DP-=4)+t.e+1,i.RM)};cn.times=cn.mul=function(t){var e,r=this,n=r.constructor,i=r.c,s=(t=new n(t)).c,o=i.length,a=s.length,c=r.e,l=t.e;if(t.s=r.s==t.s?1:-1,!i[0]||!s[0])return t.c=[t.e=0],t;for(t.e=c+l,o<a&&(e=i,i=s,s=e,l=o,o=a,a=l),e=new Array(l=o+a);l--;)e[l]=0;for(c=a;c--;){for(a=0,l=o+c;l>c;)a=e[l]+s[c]*i[l-c-1]+a,e[l--]=a%10,a=a/10|0;e[l]=a}for(a?++t.e:e.shift(),c=e.length;!e[--c];)e.pop();return t.c=e,t};cn.toExponential=function(t,e){var r=this,n=r.c[0];if(t!==il){if(t!==~~t||t<0||t>Rh)throw Error(wx);for(r=e0(new r.constructor(r),++t,e);r.c.length<t;)r.c.push(0)}return t0(r,!0,!!n)};cn.toFixed=function(t,e){var r=this,n=r.c[0];if(t!==il){if(t!==~~t||t<0||t>Rh)throw Error(wx);for(r=e0(new r.constructor(r),t+r.e+1,e),t=t+r.e+1;r.c.length<t;)r.c.push(0)}return t0(r,!1,!!n)};cn[Symbol.for("nodejs.util.inspect.custom")]=cn.toJSON=cn.toString=function(){var t=this,e=t.constructor;return t0(t,t.e<=e.NE||t.e>=e.PE,!!t.c[0])};cn.toNumber=function(){var t=+t0(this,!0,!0);if(this.constructor.strict===!0&&!this.eq(t.toString()))throw Error(rb+"Imprecise conversion");return t};cn.toPrecision=function(t,e){var r=this,n=r.constructor,i=r.c[0];if(t!==il){if(t!==~~t||t<1||t>Rh)throw Error(Xh+"precision");for(r=e0(new n(r),t,e);r.c.length<t;)r.c.push(0)}return t0(r,t<=r.e||r.e<=n.NE||r.e>=n.PE,!!i)};cn.valueOf=function(){var t=this,e=t.constructor;if(e.strict===!0)throw Error(rb+"valueOf disallowed");return t0(t,t.e<=e.NE||t.e>=e.PE,!0)};var c1=Mj();const W0e={bigNumber(t){return t?new c1(t):new c1(0)},multiply(t,e){if(t===void 0||e===void 0)return new c1(0);const r=new c1(t),n=new c1(e);return r.times(n)},formatNumberToLocalString(t,e=2){return t===void 0?"0.00":typeof t=="number"?t.toLocaleStr
2046ing("en-US",{maximumFractionDigits:e,minimumFractionDigits:e}):parseFloat(t).toLocaleString("en-US",{maximumFractionDigits:e,minimumFractionDigits:e})},parseLocalStringToNumber(t){return t===void 0?0:parseFloat(t.replace(/,/gu,""))}},H0e=[{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],outputs:[{name:"",type:"bool"}]}],q0e=[{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}],V0e=[{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}],K0e={getERC20Abi:t=>fe.USDT_CONTRACT_ADDRESSES.includes(t)?V0e:H0e,getSwapAbi:()=>q0e},Bs={validateCaipAddress(t){var e;if(((e=t.split(":"))==null?void 0:e.length)!==3)throw new Error("Invalid CAIP Address");return t},parseCaipAddress(t){const e=t.split(":");if(e.length!==3)throw new Error(`Invalid CAIP-10 address: ${t}`);const[r,n,i]=e;if(!r||!n||!i)throw new Error(`Invalid CAIP-10 address: ${t}`);return{chainNamespace:r,chainId:n,address:i}},parseCaipNetworkId(t){const e=t.split(":");if(e.length!==2)throw new Error(`Invalid CAIP-2 network id: ${t}`);const[r,n]=e;if(!r||!n)throw new Error(`Invalid CAIP-2 network id: ${t}`);return{chainNamespace:r,chainId:n}}},zt={WALLET_ID:"@appkit/wallet_id",WALLET_NAME:"@appkit/wallet_name",SOLANA_WALLET:"@appkit/solana_wallet",SOLANA_CAIP_CHAIN:"@appkit/solana_caip_chain",ACTIVE_CAIP_NETWORK_ID:"@appkit/active_caip_network_id",CONNECTED_SOCIAL:"@appkit/connected_social",CONNECTED_SOCIAL_USERNAME:"@appkit-wallet/SOCIAL_USERNAME",RECENT_WALLETS:"@appkit/recent_wallets",DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",ACTIVE_NAMESPACE:"@appkit/active_namespace",CONNECTED_NAMESPACES:"@appkit/connected_namespaces",CONNECTION_STATUS:"@appkit/connection_status",SIWX_AUTH_TOKEN:"@appkit/siwx-auth-token",SIWX_NONCE_TOKEN:"@appkit/siwx-nonce-token",TELEGRAM_SOCIAL_PROVIDER:"@appkit/social_provider",NATIVE_BALANCE_CACHE:"@appkit/native_balance_cache",PORTFOLIO_CACHE:"@appkit/portfolio_cache",ENS_CACHE:"@appkit/ens_cache",IDENTITY_CACHE:"@appkit/identity_cache",PREFERRED_ACCOUNT_TYPES:"@appkit/preferred_account_types",CONNECTIONS:"@appkit/connections",DISCONNECTED_CONNECTOR_IDS:"@appkit/disconnected_connector_ids"};function bE(t){if(!t)throw new Error("Namespace is required for CONNECTED_CONNECTOR_ID");return`@appkit/${t}:connected_connector_id`}const Dt={setItem(t,e){Y1()&&e!==void 0&&localStorage.setItem(t,e)},getItem(t){if(Y1())return localStorage.getItem(t)||void 0},removeItem(t){Y1()&&localStorage.removeItem(t)},clear(){Y1()&&localStorage.clear()}};function Y1(){return typeof window<"u"&&typeof localStorage<"u"}function tu(t,e){return e==="light"?{"--w3m-accent":(t==null?void 0:t["--w3m-accent"])||"hsla(231, 100%, 70%, 1)","--w3m-background":"#fff"}:{"--w3m-accent":(t==null?void 0:t["--w3m-accent"])||"hsla(230, 100%, 67%, 1)","--w3m-background":"#121313"}}var $k={};const wE=(typeof process<"u"&&typeof $k<"u"?$k.NEXT_PUBLIC_SECURE_SITE_ORIGIN:void 0)||"https://secure.walletconnect.org",$j=[{label:"Meld.io",name:"meld",feeRange:"1-2%",url:"https://meldcrypto.com",supportedChains:["eip155","solana"]}],G0e="WXETMuFUQmqqybHuRkSgxv:25B8LJHSfpG6LVjR2ytU5Cwh7Z4Sch2ocoU",Zr={FOUR_MINUTES_MS:24e4,TEN_SEC_MS:1e4,FIVE_SEC_MS:5e3,THREE_SEC_MS:3e3,ONE_SEC_MS:1e3,SECURE_SITE:wE,SECURE_SITE_DASHBOARD:`${wE}/dashboard`,SECURE_SITE_FAVICON:`${wE}/images/favicon.png`,RESTRICTED_TIMEZONES:["ASIA/SHANGHAI","ASIA/URUMQI","ASIA/CHONGQING","ASIA/HARBIN","ASIA/KASHGAR","ASIA/MACAU","ASIA/HONG_KONG","ASIA/MACAO","ASIA/BEIJING","ASIA/HARBIN"],SWAP_SUGGESTED_TOKENS:["ETH","UNI","1INCH","AAVE","SOL","ADA","AVAX","DOT","LINK","NITRO","GAIA","MILK","TRX","NEAR","GNO","WBTC","DAI","WETH","USDC","USDT","ARB","BAL","BICO","CRV","ENS","MATIC","OP"],SWAP_POPULAR_TOKENS:["ETH","UNI","1INCH","AAVE","SOL","ADA","AVAX","DOT","LINK","NITRO","GAIA","MILK","TRX","NEAR","GNO","WBTC","DAI","WETH","USDC","USDT","ARB","BAL","BICO","CRV","ENS","MATIC","OP","METAL","DAI","CHAMP","WOLF","SALE","BAL","BUSD","MUST","BTCpx","ROUTE","HEX","WELT","amDAI","VSQ","VISION","AURUM","pSP","SNX","VC","LINK","CHP","amUSDT","SPHERE","FOX","GIDDY","GFC","OMEN","OX_OLD","DE","WNT"],BALANCE_SUPPORTED_CHAINS:[fe.CHAIN.EVM,fe.CHAIN.SOLANA],SWAP_SUPPORTED_NETWORKS:["eip155:1","eip155:42161","eip155:10","eip155:324","eip155:8453","eip155:
204656","eip155:137","eip155:100","eip155:43114","eip155:250","eip155:8217","eip155:1313161554"],NAMES_SUPPORTED_CHAIN_NAMESPACES:[fe.CHAIN.EVM],ONRAMP_SUPPORTED_CHAIN_NAMESPACES:[fe.CHAIN.EVM,fe.CHAIN.SOLANA],ACTIVITY_ENABLED_CHAIN_NAMESPACES:[fe.CHAIN.EVM],NATIVE_TOKEN_ADDRESS:{eip155:"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",solana:"So11111111111111111111111111111111111111111",polkadot:"0x",bip122:"0x",cosmos:"0x"},CONVERT_SLIPPAGE_TOLERANCE:1,CONNECT_LABELS:{MOBILE:"Open and continue in the wallet app",WEB:"Open and continue in the wallet app"},SEND_SUPPORTED_NAMESPACES:[fe.CHAIN.EVM,fe.CHAIN.SOLANA],DEFAULT_REMOTE_FEATURES:{swaps:["1inch"],onramp:["meld"],email:!0,socials:["google","x","discord","farcaster","github","apple","facebook"],activity:!0,reownBranding:!0,multiWallet:!1},DEFAULT_REMOTE_FEATURES_DISABLED:{email:!1,socials:!1,swaps:!1,onramp:!1,activity:!1,reownBranding:!1},DEFAULT_FEATURES:{receive:!0,send:!0,emailShowWallets:!0,connectorTypeOrder:["walletConnect","recent","injected","featured","custom","external","recommended"],analytics:!0,allWallets:!0,legalCheckbox:!1,smartSessions:!1,collapseWallets:!1,walletFeaturesOrder:["onramp","swaps","receive","send"],connectMethodsOrder:void 0,pay:!1},DEFAULT_SOCIALS:["google","x","farcaster","discord","apple","github","facebook"],DEFAULT_ACCOUNT_TYPES:{bip122:"payment",eip155:"smartAccount",polkadot:"eoa",solana:"eoa"},ADAPTER_TYPES:{UNIVERSAL:"universal",SOLANA:"solana",WAGMI:"wagmi",ETHERS:"ethers",ETHERS5:"ethers5",BITCOIN:"bitcoin"},SIWX_DEFAULTS:{signOutOnDisconnect:!0}},Oe={cacheExpiry:{portfolio:3e4,nativeBalance:3e4,ens:3e5,identity:3e5},isCacheExpired(t,e){return Date.now()-t>e},getActiveNetworkProps(){const t=Oe.getActiveNamespace(),e=Oe.getActiveCaipNetworkId(),r=e?e.split(":")[1]:void 0,n=r?isNaN(Number(r))?r:Number(r):void 0;return{namespace:t,caipNetworkId:e,chainId:n}},setWalletConnectDeepLink({name:t,href:e}){try{Dt.setItem(zt.DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},getWalletConnectDeepLink(){try{const t=Dt.getItem(zt.DEEPLINK_CHOICE);if(t)return JSON.parse(t)}catch{console.info("Unable to get WalletConnect deep link")}},deleteWalletConnectDeepLink(){try{Dt.removeItem(zt.DEEPLINK_CHOICE)}catch{console.info("Unable to delete WalletConnect deep link")}},setActiveNamespace(t){try{Dt.setItem(zt.ACTIVE_NAMESPACE,t)}catch{console.info("Unable to set active namespace")}},setActiveCaipNetworkId(t){try{Dt.setItem(zt.ACTIVE_CAIP_NETWORK_ID,t),Oe.setActiveNamespace(t.split(":")[0])}catch{console.info("Unable to set active caip network id")}},getActiveCaipNetworkId(){try{return Dt.getItem(zt.ACTIVE_CAIP_NETWORK_ID)}catch{console.info("Unable to get active caip network id");return}},deleteActiveCaipNetworkId(){try{Dt.removeItem(zt.ACTIVE_CAIP_NETWORK_ID)}catch{console.info("Unable to delete active caip network id")}},deleteConnectedConnectorId(t){try{const e=bE(t);Dt.removeItem(e)}catch{console.info("Unable to delete connected connector id")}},setAppKitRecent(t){try{const e=Oe.getRecentWallets();e.find(n=>n.id===t.id)||(e.unshift(t),e.length>2&&e.pop(),Dt.setItem(zt.RECENT_WALLETS,JSON.stringify(e)))}catch{console.info("Unable to set AppKit recent")}},getRecentWallets(){try{const t=Dt.getItem(zt.RECENT_WALLETS);return t?JSON.parse(t):[]}catch{console.info("Unable to get AppKit recent")}return[]},setConnectedConnectorId(t,e){try{const r=bE(t);Dt.setItem(r,e)}catch{console.info("Unable to set Connected Connector Id")}},getActiveNamespace(){try{return Dt.getItem(zt.ACTIVE_NAMESPACE)}catch{console.info("Unable to get active namespace")}},getConnectedConnectorId(t){if(t)try{const e=bE(t);return Dt.getItem(e)}catch{console.info("Unable to get connected connector id in namespace",t)}},setConnectedSocialProvider(t){try{Dt.setItem(zt.CONNECTED_SOCIAL,t)}catch{console.info("Unable to set connected social provider")}},getConnectedSocialProvider(){try{return Dt.getItem(zt.CONNECTED_SOCIAL)}catch{console.info("Unable to get connected social provider")}},deleteConnectedSocialProvider(){try{Dt.removeItem(zt.CONNECTED_SOCIAL)}catch{console.info("Unable to delete connected social provider")}},getConnectedSocialUsername(){try{return Dt.getItem(zt.CONNECTED_SOCIAL_USERNAME)}catch{console.info("Unable to get connected social username")}},getStoredActiveCaipNetworkId(){var r;const t=Dt.getItem(zt.ACTIVE_CAIP_NETWORK_ID);return(r=t==null?void 0:t.split(":"))==null?void 0:r[1]},setConnectionStatus(t){try{Dt.setItem(zt.CONNECTION_STATUS,t)}catch{console.info("Unable to set connection status")}},getConnectionStatus(){try{return Dt.getItem(zt.CONNECTION_STATUS)}catch{return}},getConnectedNamespaces(){try{const t=Dt.getItem(zt.CONNECTED_NAMESPACES);return t!=null&&t.length?t.split(","):[]}catch{return[]}},setConnectedNamespaces(t){try{const e=Array.from(new Set(t));Dt.setItem(zt.CONNECTED_NAMESPACES,e.join(","))}catch{console.info("Unable to set namespaces in storage")}},addConnectedNamespace(t){try{const e=Oe.getConnectedNamespaces();e.includes(t)||(e.push(t),Oe.setConnectedNamespaces(e))}catch{console.info("Unable to add connected namespace")}},removeConnectedNamespace(t){try{const e=Oe.getConnectedNamespaces(),r=e.indexOf(t);r>-1&&(e.splice(r,1),Oe.setConnectedNamespaces(e))}catch{console.info("Unable to remove connected namespace")}},getTelegramSocialProvider(){try{return Dt.getItem(zt.TELEGRAM_SOCIAL_PROVIDER)}catch{return console.info("Unable to get telegram social provider"),null}},setTelegramSocialProvider(t){try{Dt.setItem(zt.TELEGRAM_SOCIAL_PROVIDER,t)}catch{console.info("Unable to set telegram social provider")}},removeTelegramSocialProvider(){try{Dt.removeItem(zt.TELEGRAM_SOCIAL_PROVIDER)}catch{console.info("Unable to remove telegram social provider")}},getBalanceCache(){let t={};try{const e=Dt.getItem(zt.PORTFOLIO_CACHE);t=e?JSON.parse(e):{}}catch{console.info("Unable to get balance cache")}return t},removeAddressFromBalanceCache(t){try{const e=Oe.getBalanceCache();Dt.setItem(zt.PORTFOLIO_CACHE,JSON.stringify({...e,[t]:void 0}))}catch{console.info("Unable to remove address from balance cache",t)}},getBalanceCacheForCaipAddress(t){try{const r=Oe.getBalanceCache()[t];if(r&&!this.isCacheExpired(r.timestamp,this.cacheExpiry.portfolio))return r.balance;Oe.removeAddressFromBalanceCache(t)}catch{console.info("Unable to get balance cache for address",t)}},updateBalanceCache(t){try{const e=Oe.getBalanceCache();e[t.caipAddress]=t,Dt.setItem(zt.PORTFOLIO_CACHE,JSON.stringify(e))}catch{console.info("Unable to update balance cache",t)}},getNativeBalanceCache(){let t={};try{const e=Dt.getItem(zt.NATIVE_BALANCE_CACHE);t=e?JSON.parse(e):{}}catch{console.info("Unable to get balance cache")}return t},removeAddressFromNativeBalanceCache(t){try{const e=Oe.getBalanceCache();Dt.setItem(zt.NATIVE_BALANCE_CACHE,JSON.stringify({...e,[t]:void 0}))}catch{console.info("Unable to remove address from balance cache",t)}},getNativeBalanceCacheForCaipAddress(t){try{const r=Oe.getNativeBalanceCache()[t];if(r&&!this.isCacheExpired(r.timestamp,this.cacheExpiry.nativeBalance))return r;console.info("Discarding cache for address",t),Oe.removeAddressFromBalanceCache(t)}catch{console.info("Unable to get balance cache for address",t)}},updateNativeBalanceCache(t){try{const e=Oe.getNativeBalanceCache();e[t.caipAddress]=t,Dt.setItem(zt.NATIVE_BALANCE_CACHE,JSON.stringify(e))}catch{console.info("Unable to update balance cache",t)}},getEnsCache(){let t={};try{const e=Dt.getItem(zt.ENS_CACHE);t=e?JSON.parse(e):{}}catch{console.info("Unable to get ens name cache")}return t}
2046,getEnsFromCacheForAddress(t){try{const r=Oe.getEnsCache()[t];if(r&&!this.isCacheExpired(r.timestamp,this.cacheExpiry.ens))return r.ens;Oe.removeEnsFromCache(t)}catch{console.info("Unable to get ens name from cache",t)}},updateEnsCache(t){try{const e=Oe.getEnsCache();e[t.address]=t,Dt.setItem(zt.ENS_CACHE,JSON.stringify(e))}catch{console.info("Unable to update ens name cache",t)}},removeEnsFromCache(t){try{const e=Oe.getEnsCache();Dt.setItem(zt.ENS_CACHE,JSON.stringify({...e,[t]:void 0}))}catch{console.info("Unable to remove ens name from cache",t)}},getIdentityCache(){let t={};try{const e=Dt.getItem(zt.IDENTITY_CACHE);t=e?JSON.parse(e):{}}catch{console.info("Unable to get identity cache")}return t},getIdentityFromCacheForAddress(t){try{const r=Oe.getIdentityCache()[t];if(r&&!this.isCacheExpired(r.timestamp,this.cacheExpiry.identity))return r.identity;Oe.removeIdentityFromCache(t)}catch{console.info("Unable to get identity from cache",t)}},updateIdentityCache(t){try{const e=Oe.getIdentityCache();e[t.address]={identity:t.identity,timestamp:t.timestamp},Dt.setItem(zt.IDENTITY_CACHE,JSON.stringify(e))}catch{console.info("Unable to update identity cache",t)}},removeIdentityFromCache(t){try{const e=Oe.getIdentityCache();Dt.setItem(zt.IDENTITY_CACHE,JSON.stringify({...e,[t]:void 0}))}catch{console.info("Unable to remove identity from cache",t)}},clearAddressCache(){try{Dt.removeItem(zt.PORTFOLIO_CACHE),Dt.removeItem(zt.NATIVE_BALANCE_CACHE),Dt.removeItem(zt.ENS_CACHE),Dt.removeItem(zt.IDENTITY_CACHE)}catch{console.info("Unable to clear address cache")}},setPreferredAccountTypes(t){try{Dt.setItem(zt.PREFERRED_ACCOUNT_TYPES,JSON.stringify(t))}catch{console.info("Unable to set preferred account types",t)}},getPreferredAccountTypes(){try{const t=Dt.getItem(zt.PREFERRED_ACCOUNT_TYPES);return t?JSON.parse(t):{}}catch{console.info("Unable to get preferred account types")}return{}},setConnections(t,e){try{const r=Oe.getConnections(),n=r[e]??[],i=new Map;for(const o of n)i.set(o.connectorId,{...o});for(const o of t){const a=i.get(o.connectorId),c=o.connectorId===fe.CONNECTOR_ID.AUTH;if(a&&!c){const l=new Set(a.accounts.map(f=>f.address.toLowerCase())),u=o.accounts.filter(f=>!l.has(f.address.toLowerCase()));a.accounts.push(...u)}else i.set(o.connectorId,{...o})}const s={...r,[e]:Array.from(i.values())};Dt.setItem(zt.CONNECTIONS,JSON.stringify(s))}catch(r){console.error("Unable to sync connections to storage",r)}},getConnections(){try{const t=Dt.getItem(zt.CONNECTIONS);return t?JSON.parse(t):{}}catch(t){return console.error("Unable to get connections from storage",t),{}}},deleteAddressFromConnection({connectorId:t,address:e,namespace:r}){try{const n=Oe.getConnections(),i=n[r]??[],s=new Map(i.map(a=>[a.connectorId,a])),o=s.get(t);o&&(o.accounts.filter(c=>c.address.toLowerCase()!==e.toLowerCase()).length===0?s.delete(t):s.set(t,{...o,accounts:o.accounts.filter(c=>c.address.toLowerCase()!==e.toLowerCase())})),Dt.setItem(zt.CONNECTIONS,JSON.stringify({...n,[r]:Array.from(s.values())}))}catch{console.error(`Unable to remove address "${e}" from connector "${t}" in namespace "${r}"`)}},getDisconnectedConnectorIds(){try{const t=Dt.getItem(zt.DISCONNECTED_CONNECTOR_IDS);return t?JSON.parse(t):{}}catch{console.info("Unable to get disconnected connector ids")}return{}},addDisconnectedConnectorId(t,e){try{const r=Oe.getDisconnectedConnectorIds(),n=r[e]??[];n.push(t),Dt.setItem(zt.DISCONNECTED_CONNECTOR_IDS,JSON.stringify({...r,[e]:Array.from(new Set(n))}))}catch{console.error(`Unable to set disconnected connector id "${t}" for namespace "${e}"`)}},removeDisconnectedConnectorId(t,e){try{const r=Oe.getDisconnectedConnectorIds();let n=r[e]??[];n=n.filter(i=>i.toLowerCase()!==t.toLowerCase()),Dt.setItem(zt.DISCONNECTED_CONNECTOR_IDS,JSON.stringify({...r,[e]:Array.from(new Set(n))}))}catch{console.error(`Unable to remove disconnected connector id "${t}" for namespace "${e}"`)}},isConnectorDisconnected(t,e){try{return(Oe.getDisconnectedConnectorIds()[e]??[]).some(i=>i.toLowerCase()===t.toLowerCase())}catch{console.info(`Unable to get disconnected connector id "${t}" for namespace "${e}"`)}return!1}},it={isMobile(){var t;return this.isClient()?!!(window!=null&&window.matchMedia&&typeof window.matchMedia=="function"&&((t=window.matchMedia("(pointer:coarse)"))!=null&&t.matches)||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},checkCaipNetwork(t,e=""){return t==null?void 0:t.caipNetworkId.toLocaleLowerCase().includes(e.toLowerCase())},isAndroid(){if(!this.isMobile())return!1;const t=window==null?void 0:window.navigator.userAgent.toLowerCase();return it.isMobile()&&t.includes("android")},isIos(){if(!this.isMobile())return!1;const t=window==null?void 0:window.navigator.userAgent.toLowerCase();return t.includes("iphone")||t.includes("ipad")},isSafari(){return this.isClient()?(window==null?void 0:window.navigator.userAgent.toLowerCase()).includes("safari"):!1}
2046,isClient(){return typeof window<"u"},isPairingExpired(t){return t?t-Date.now()<=Zr.TEN_SEC_MS:!0},isAllowedRetry(t,e=Zr.ONE_SEC_MS){return Date.now()-t>=e},copyToClopboard(t){navigator.clipboard.writeText(t)},isIframe(){try{return(window==null?void 0:window.self)!==(window==null?void 0:window.top)}catch{return!1}},isSafeApp(){var t,e;if(it.isClient()&&window.self!==window.top)try{const r=(e=(t=window==null?void 0:window.location)==null?void 0:t.ancestorOrigins)==null?void 0:e[0],n="https://app.safe.global";if(r){const i=new URL(r),s=new URL(n);return i.hostname===s.hostname}}catch{return!1}return!1},getPairingExpiry(){return Date.now()+Zr.FOUR_MINUTES_MS},getNetworkId(t){return t==null?void 0:t.split(":")[1]},getPlainAddress(t){return t==null?void 0:t.split(":")[2]},async wait(t){return new Promise(e=>{setTimeout(e,t)})},debounce(t,e=500){let r;return(...n)=>{function i(){t(...n)}r&&clearTimeout(r),r=setTimeout(i,e)}},isHttpUrl(t){return t.startsWith("http://")||t.startsWith("https://")},formatNativeUrl(t,e,r=null){if(it.isHttpUrl(t))return this.formatUniversalUrl(t,e);let n=t,i=r;n.includes("://")||(n=t.replaceAll("/","").replaceAll(":",""),n=`${n}://`),n.endsWith("/")||(n=`${n}/`),i&&!(i!=null&&i.endsWith("/"))&&(i=`${i}/`),this.isTelegram()&&this.isAndroid()&&(e=encodeURIComponent(e));const s=encodeURIComponent(e);return{redirect:`${n}wc?uri=${s}`,redirectUniversalLink:i?`${i}wc?uri=${s}`:void 0,href:n}},formatUniversalUrl(t,e){if(!it.isHttpUrl(t))return this.formatNativeUrl(t,e);let r=t;r.endsWith("/")||(r=`${r}/`);const n=encodeURIComponent(e);return{redirect:`${r}wc?uri=${n}`,href:r}},getOpenTargetForPlatform(t){return t==="popupWindow"?t:this.isTelegram()?Oe.getTelegramSocialProvider()?"_top":"_blank":t},openHref(t,e,r){window==null||window.open(t,this.getOpenTargetForPlatform(e),r||"noreferrer noopener")},returnOpenHref(t,e,r){return window==null?void 0:window.open(t,this.getOpenTargetForPlatform(e),r||"noreferrer noopener")},isTelegram(){return typeof window<"u"&&(!!window.TelegramWebviewProxy||!!window.Telegram||!!window.TelegramWebviewProxyProto)},isPWA(){var r,n;if(typeof window>"u")return!1;const t=window!=null&&window.matchMedia&&typeof window.matchMedia=="function"?(r=window.matchMedia("(display-mode: standalone)"))==null?void 0:r.matches:!1,e=(n=window==null?void 0:window.navigator)==null?void 0:n.standalone;return!!(t||e)},async preloadImage(t){const e=new Promise((r,n)=>{const i=new Image;i.onload=r,i.onerror=n,i.crossOrigin="anonymous",i.src=t});return Promise.race([e,it.wait(2e3)])},formatBalance(t,e){let r="0.000";if(typeof t=="string"){const n=Number(t);if(n){const i=Math.floor(n*1e3)/1e3;i&&(r=i.toString())}}return`${r}${e?` ${e}`:""}`},formatBalance2(t,e){var n;let r;if(t==="0")r="0";else if(typeof t=="string"){const i=Number(t);i&&(r=(n=i.toString().match(/^-?\d+(?:\.\d{0,3})?/u))==null?void 0:n[0])}return{value:r??"0",rest:r==="0"?"000":"",symbol:e}},getApiUrl(){return fe.W3M_API_URL},getBlockchainApiUrl(){return fe.BLOCKCHAIN_API_RPC_URL},getAnalyticsUrl(){return fe.PULSE_API_URL},getUUID(){return crypto!=null&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/gu,t=>{const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})},parseError(t){var e,r;return typeof t=="string"?t:typeof((r=(e=t==null?void 0:t.issues)==null?void 0:e[0])==null?void 0:r.message)=="string"?t.issues[0].message:t instanceof Error?t.message:"Unknown error"},sortRequestedNetworks(t,e=[]){const r={};return e&&t&&(t.forEach((n,i)=>{r[n]=i}),e.sort((n,i)=>{const s=r[n.id],o=r[i.id];return s!==void 0&&o!==void 0?s-o:s!==void 0?-1:o!==void 0?1:0})),e},calculateBalance(t){let e=0;for(const r of t)e+=r.value??0;return e},formatTokenBalance(t){const e=t.toFixed(2),[r,n]=e.split(".");return{dollars:r,pennies:n}},isAddress(t,e="eip155"){switch(e){case"eip155":if(/^(?:0x)?[0-9a-f]{40}$/iu.test(t)){if(/^(?:0x)?[0-9a-f]{40}$/iu.test(t)||/^(?:0x)?[0-9A-F]{40}$/iu.test(t))return!0}else return!1;return!1;case"solana":return/[1-9A-HJ-NP-Za-km-z]{32,44}$/iu.test(t);default:return!1}},uniqueBy(t,e){const r=new Set;return t.filter(n=>{const i=n[e];return r.has(i)?!1:(r.add(i),!0)})},generateSdkVersion(t,e,r){const i=t.length===0?Zr.ADAPTER_TYPES.UNIVERSAL:t.map(s=>s.adapterType).join(",");return`${e}-${i}-${r}`},createAccount(t,e,r,n,i){return{namespace:t,address:e,type:r,publicKey:n,path:i}},isCaipAddress(t){if(typeof t!="string")return!1;const e=t.split(":"),r=e[0];return e.filter(Boolean).length===3&&r in fe.CHAIN_NAME_MAP},getAccount(t){return t?typeof t=="string"?{address:t,chainId:void 0}:{address:t.address,chainId:t.chainId}:{address:void 0,chainId:void 0}},isMac(){const t=window==null?void 0:window.navigator.userAgent.toLowerCase();return t.includes("macintosh")&&!t.includes("safari")},formatTelegramSocialLoginUrl(t){const e=`--${encodeURIComponent(window==null?void 0:window.location.href)}`,r="state=";if(new URL(t).host==="auth.magic.link"){const i="provider_authorization_url=",s=t.substring(t.indexOf(i)+i.length),o=this.injectIntoUrl(decodeURIComponent(s),r,e);return t.replace(s,encodeURIComponent(o))}return this.injectIntoUrl(t,r,e)},injectIntoUrl(t,e,r){const n=t.indexOf(e);if(n===-1)throw new Error(`${e} parameter not found in the URL: ${t}`);const i=t.indexOf("&",n),s=e.length,o=i!==-1?i:t.length,a=t.substring(0,n+s),c=t.substring(n+s,o),l=t.substring(i),u=c+r;return a+u+l}};async function l1(...t){const e=await fetch(...t);if(!e.ok)throw new Error(`HTTP status code: ${e.status}`,{cause:e});return e}class nb{constructor({baseUrl:e,clientId:r}){this.baseUrl=e,this.clientId=r}async get({headers:e,signal:r,cache:n,...i}){const s=this.createUrl(i);return(await l1(s,{method:"GET",headers:e,signal:r,cache:n})).json()}async getBlob({headers:e,signal:r,...n}){const i=this.createUrl(n);return(await l1(i,{method:"GET",headers:e,signal:r})).blob()}async post({body:e,headers:r,signal:n,...i}){const s=this.createUrl(i);return(await l1(s,{method:"POST",headers:r,body:e?JSON.stringify(e):void 0,signal:n})).json()}async put({body:e,headers:r,signal:n,...i}){const s=this.createUrl(i);return(await l1(s,{method:"PUT",headers:r,body:e?JSON.stringify(e):void 0,signal:n})).json()}async delete({body:e,headers:r,signal:n,...i}){const s=this.createUrl(i);return(await l1(s,{method:"DELETE",headers:r,body:e?JSON.stringify(e):void 0,signal:n})).json()}createUrl({path:e,params:r}){const n=new URL(e,this.baseUrl);return r&&Object.entries(r).forEach(([i,s])=>{s&&n.searchParams.append(i,s)}),this.clientId&&n.searchParams.append("clientId",this.clientId),n}}const Y0e={getFeatureValue(t,e){const r=e==null?void 0:e[t];return r===void 0?Zr.DEFAULT_FEATURES[t]:r}
2046,filterSocialsByPlatform(t){if(!t||!t.length)return t;if(it.isTelegram()){if(it.isIos())return t.filter(e=>e!=="google");if(it.isMac())return t.filter(e=>e!=="x");if(it.isAndroid())return t.filter(e=>!["facebook","x"].includes(e))}return t}},mt=_n({features:Zr.DEFAULT_FEATURES,projectId:"",sdkType:"appkit",sdkVersion:"html-wagmi-undefined",defaultAccountTypes:Zr.DEFAULT_ACCOUNT_TYPES,enableNetworkSwitch:!0,experimental_preferUniversalLinks:!1,remoteFeatures:{}}),Ee={state:mt,subscribeKey(t,e){return Ds(mt,t,e)},setOptions(t){Object.assign(mt,t)},setRemoteFeatures(t){var r,n;if(!t)return;const e={...mt.remoteFeatures,...t};mt.remoteFeatures=e,(r=mt.remoteFeatures)!=null&&r.socials&&(mt.remoteFeatures.socials=Y0e.filterSocialsByPlatform(mt.remoteFeatures.socials)),(n=mt.features)!=null&&n.pay&&(mt.remoteFeatures.email=!1,mt.remoteFeatures.socials=!1)},setFeatures(t){var r;if(!t)return;mt.features||(mt.features=Zr.DEFAULT_FEATURES);const e={...mt.features,...t};mt.features=e,(r=mt.features)!=null&&r.pay&&mt.remoteFeatures&&(mt.remoteFeatures.email=!1,mt.remoteFeatures.socials=!1)},setProjectId(t){mt.projectId=t},setCustomRpcUrls(t){mt.customRpcUrls=t},setAllWallets(t){mt.allWallets=t},setIncludeWalletIds(t){mt.includeWalletIds=t},setExcludeWalletIds(t){mt.excludeWalletIds=t},setFeaturedWalletIds(t){mt.featuredWalletIds=t},setTokens(t){mt.tokens=t},setTermsConditionsUrl(t){mt.termsConditionsUrl=t},setPrivacyPolicyUrl(t){mt.privacyPolicyUrl=t},setCustomWallets(t){mt.customWallets=t},setIsSiweEnabled(t){mt.isSiweEnabled=t},setIsUniversalProvider(t){mt.isUniversalProvider=t},setSdkVersion(t){mt.sdkVersion=t},setMetadata(t){mt.metadata=t},setDisableAppend(t){mt.disableAppend=t},setEIP6963Enabled(t){mt.enableEIP6963=t},setDebug(t){mt.debug=t},setEnableWalletConnect(t){mt.enableWalletConnect=t},setEnableWalletGuide(t){mt.enableWalletGuide=t},setEnableAuthLogger(t){mt.enableAuthLogger=t},setEnableWallets(t){mt.enableWallets=t},setPreferUniversalLinks(t){mt.experimental_preferUniversalLinks=t},setSIWX(t){if(t)for(const[e,r]of Object.entries(Zr.SIWX_DEFAULTS))t[e]??(t[e]=r);mt.siwx=t},setConnectMethodsOrder(t){mt.features={...mt.features,connectMethodsOrder:t}},setWalletFeaturesOrder(t){mt.features={...mt.features,walletFeaturesOrder:t}},setSocialsOrder(t){mt.remoteFeatures={...mt.remoteFeatures,socials:t}},setCollapseWallets(t){mt.features={...mt.features,collapseWallets:t}},setEnableEmbedded(t){mt.enableEmbedded=t},setAllowUnsupportedChain(t){mt.allowUnsupportedChain=t},setManualWCControl(t){mt.manualWCControl=t},setEnableNetworkSwitch(t){mt.enableNetworkSwitch=t},setEnableReconnect(t){mt.enableReconnect=t},setDefaultAccountTypes(t={}){Object.entries(t).forEach(([e,r])=>{r&&(mt.defaultAccountTypes[e]=r)})},setUniversalProviderConfigOverride(t){mt.universalProviderConfigOverride=t},getUniversalProviderConfigOverride(){return mt.universalProviderConfigOverride},getSnapshot(){return kh(mt)}},Z0e=Object.freeze({enabled:!0,events:[]}),J0e=new nb({baseUrl:it.getAnalyticsUrl(),clientId:null}),Q0e=5,X0e=60*1e3,$u=_n({...Z0e}),epe={state:$u,subscribeKey(t,e){return Ds($u,t,e)},async sendError(t,e){if(!$u.enabled)return;const r=Date.now();if($u.events.filter(s=>{const o=new Date(s.properties.timestamp||"").getTime();return r-o<X0e}).length>=Q0e)return;const i={type:"error",event:e,properties:{errorType:t.name,errorMessage:t.message,stackTrace:t.stack,timestamp:new Date().toISOString()}};$u.events.push(i);try{if(typeof window>"u")return;const{projectId:s,sdkType:o,sdkVersion:a}=Ee.state;await J0e.post({path:"/e",params:{projectId:s,st:o,sv:a||"html-wagmi-4.2.2"},body:{eventId:it.getUUID(),url:window.location.href,domain:window.location.hostname,timestamp:new Date().toISOString(),props:{type:"error",event:e,errorType:t.name,errorMessage:t.message,stackTrace:t.stack}}})}catch{}},enable(){$u.enabled=!0},disable(){$u.enabled=!1},clearEvents(){$u.events=[]}};class ng extends Error{constructor(e,r,n){super(e),this.name="AppKitError",this.category=r,this.originalError=n,Object.setPrototypeOf(this,ng.prototype);let i=!1;
2046if(n instanceof Error&&typeof n.stack=="string"&&n.stack){const s=n.stack,o=s.indexOf(` 2047`);if(o>-1){const a=s.substring(o+1);this.stack=`${this.name}: ${this.message} 2048${a}`,i=!0}}i||(Error.captureStackTrace?Error.captureStackTrace(this,ng):this.stack||(this.stack=`${this.name}: ${this.message}`))}}function Uk(t,e){const r=t instanceof ng?t:new ng(t instanceof Error?t.message:String(t),e,t);throw epe.sendError(r,r.category),r}function ea(t,e="INTERNAL_SDK_ERROR"){const r={};return Object.keys(t).forEach(n=>{const i=t[n];if(typeof i=="function"){let s=i;i.constructor.name==="AsyncFunction"?s=async(...o)=>{try{return await i(...o)}catch(a){return Uk(a,e)}}:s=(...o)=>{try{return i(...o)}catch(a){return Uk(a,e)}},r[n]=s}else r[n]=i}),r}var ig={};const tpe="https://secure.walletconnect.org/sdk",rpe=(typeof process<"u"&&typeof ig<"u"?ig.NEXT_PUBLIC_SECURE_SITE_SDK_URL:void 0)||tpe,npe=(typeof process<"u"&&typeof ig<"u"?ig.NEXT_PUBLIC_DEFAULT_LOG_LEVEL:void 0)||"error",ipe=(typeof process<"u"&&typeof ig<"u"?ig.NEXT_PUBLIC_SECURE_SITE_SDK_VERSION:void 0)||"4",lt={APP_EVENT_KEY:"@w3m-app/",FRAME_EVENT_KEY:"@w3m-frame/",RPC_METHOD_KEY:"RPC_",STORAGE_KEY:"@appkit-wallet/",SESSION_TOKEN_KEY:"SESSION_TOKEN_KEY",EMAIL_LOGIN_USED_KEY:"EMAIL_LOGIN_USED_KEY",LAST_USED_CHAIN_KEY:"LAST_USED_CHAIN_KEY",LAST_EMAIL_LOGIN_TIME:"LAST_EMAIL_LOGIN_TIME",EMAIL:"EMAIL",PREFERRED_ACCOUNT_TYPE:"PREFERRED_ACCOUNT_TYPE",SMART_ACCOUNT_ENABLED:"SMART_ACCOUNT_ENABLED",SMART_ACCOUNT_ENABLED_NETWORKS:"SMART_ACCOUNT_ENABLED_NETWORKS",SOCIAL_USERNAME:"SOCIAL_USERNAME",APP_SWITCH_NETWORK:"@w3m-app/SWITCH_NETWORK",APP_CONNECT_EMAIL:"@w3m-app/CONNECT_EMAIL",APP_CONNECT_DEVICE:"@w3m-app/CONNECT_DEVICE",APP_CONNECT_OTP:"@w3m-app/CONNECT_OTP",APP_CONNECT_SOCIAL:"@w3m-app/CONNECT_SOCIAL",APP_GET_SOCIAL_REDIRECT_URI:"@w3m-app/GET_SOCIAL_REDIRECT_URI",APP_GET_USER:"@w3m-app/GET_USER",APP_SIGN_OUT:"@w3m-app/SIGN_OUT",APP_IS_CONNECTED:"@w3m-app/IS_CONNECTED",APP_GET_CHAIN_ID:"@w3m-app/GET_CHAIN_ID",APP_RPC_REQUEST:"@w3m-app/RPC_REQUEST",APP_UPDATE_EMAIL:"@w3m-app/UPDATE_EMAIL",APP_UPDATE_EMAIL_PRIMARY_OTP:"@w3m-app/UPDATE_EMAIL_PRIMARY_OTP",APP_UPDATE_EMAIL_SECONDARY_OTP:"@w3m-app/UPDATE_EMAIL_SECONDARY_OTP",APP_AWAIT_UPDATE_EMAIL:"@w3m-app/AWAIT_UPDATE_EMAIL",APP_SYNC_THEME:"@w3m-app/SYNC_THEME",APP_SYNC_DAPP_DATA:"@w3m-app/SYNC_DAPP_DATA",APP_GET_SMART_ACCOUNT_ENABLED_NETWORKS:"@w3m-app/GET_SMART_ACCOUNT_ENABLED_NETWORKS",APP_INIT_SMART_ACCOUNT:"@w3m-app/INIT_SMART_ACCOUNT",APP_SET_PREFERRED_ACCOUNT:"@w3m-app/SET_PREFERRED_ACCOUNT",APP_CONNECT_FARCASTER:"@w3m-app/CONNECT_FARCASTER",APP_GET_FARCASTER_URI:"@w3m-app/GET_FARCASTER_URI",APP_RELOAD:"@w3m-app/RELOAD",APP_RPC_ABORT:"@w3m-app/RPC_ABORT",FRAME_SWITCH_NETWORK_ERROR:"@w3m-frame/SWITCH_NETWORK_ERROR",FRAME_SWITCH_NETWORK_SUCCESS:"@w3m-frame/SWITCH_NETWORK_SUCCESS",FRAME_CONNECT_EMAIL_ERROR:"@w3m-frame/CONNECT_EMAIL_ERROR",FRAME_CONNECT_EMAIL_SUCCESS:"@w3m-frame/CONNECT_EMAIL_SUCCESS",FRAME_CONNECT_DEVICE_ERROR:"@w3m-frame/CONNECT_DEVICE_ERROR",FRAME_CONNECT_DEVICE_SUCCESS:"@w3m-frame/CONNECT_DEVICE_SUCCESS",FRAME_CONNECT_OTP_SUCCESS:"@w3m-frame/CONNECT_OTP_SUCCESS",FRAME_CONNECT_OTP_ERROR:"@w3m-frame/CONNECT_OTP_ERROR",FRAME_CONNECT_SOCIAL_SUCCESS:"@w3m-frame/CONNECT_SOCIAL_SUCCESS",FRAME_CONNECT_SOCIAL_ERROR:"@w3m-frame/CONNECT_SOCIAL_ERROR",FRAME_CONNECT_FARCASTER_SUCCESS:"@w3m-frame/CONNECT_FARCASTER_SUCCESS",FRAME_CONNECT_FARCASTER_ERROR:"@w3m-frame/CONNECT_FARCASTER_ERROR",FRAME_GET_FARCASTER_URI_SUCCESS:"@w3m-frame/GET_FARCASTER_URI_SUCCESS",FRAME_GET_FARCASTER_URI_ERROR:"@w3m-frame/GET_FARCASTER_URI_ERROR",FRAME_GET_SOCIAL_REDIRECT_URI_SUCCESS:"@w3m-frame/GET_SOCIAL_REDIRECT_URI_SUCCESS",FRAME_GET_SOCIAL_REDIRECT_URI_ERROR:"@w3m-frame/GET_SOCIAL_REDIRECT_URI_ERROR",FRAME_GET_USER_SUCCESS:"@w3m-frame/GET_USER_SUCCESS",FRAME_GET_USER_ERROR:"@w3m-frame/GET_USER_ERROR",FRAME_SIGN_OUT_SUCCESS:"@w3m-frame/SIGN_OUT_SUCCESS",FRAME_SIGN_OUT_ERROR:"@w3m-frame/SIGN_OUT_ERROR",FRAME_IS_CONNECTED_SUCCESS:"@w3m-frame/IS_CONNECTED_SUCCESS",FRAME_IS_CONNECTED_ERROR:"@w3m-frame/IS_CONNECTED_ERROR",FRAME_GET_CHAIN_ID_SUCCESS:"@w3m-frame/GET_CHAIN_ID_SUCCESS",FRAME_GET_CHAIN_ID_ERROR:"@w3m-frame/GET_CHAIN_ID_ERROR",FRAME_RPC_REQUEST_SUCCESS:"@w3m-frame/RPC_REQUEST_SUCCESS",FRAME_RPC_REQUEST_ERROR:"@w3m-frame/RPC_REQUEST_ERROR",FRAME_SESSION_UPDATE:"@w3m-frame/SESSION_UPDATE",FRAME_UPDATE_EMAIL_SUCCESS:"@w3m-frame/UPDATE_EMAIL_SUCCESS",FRAME_UPDATE_EMAIL_ERROR:"@w3m-frame/UPDATE_EMAIL_ERROR",FRAME_UPDATE_EMAIL_PRIMARY_OTP_SUCCESS:"@w3m-frame/UPDATE_EMAIL_PRIMARY_OTP_SUCCESS",FRAME_UPDATE_EMAIL_PRIMARY_OTP_ERROR:"@w3m-frame/UPDATE_EMAIL_PRIMARY_OTP_ERROR",FRAME_UPDATE_EMAIL_SECONDARY_OTP_SUCCESS:"@w3m-frame/UPDATE_EMAIL_SECONDARY_OTP_SUCCESS",FRAME_UPDATE_EMAIL_SECONDARY_OTP_ERROR:"@w3m-frame/UPDATE_EMAIL_SECONDARY_OTP_ERROR",FRAME_SYNC_THEME_SUCCESS:"@w3m-frame/SYNC_THEME_SUCCESS",FRAME_SYNC_THEME_ERROR:"@w3m-frame/SYNC_THEME_ERROR",FRAME_SYNC_DAPP_DATA_SUCCESS:"@w3m-frame/SYNC_DAPP_DATA_SUCCESS",FRAME_SYNC_DAPP_DATA_ERROR:"@w3m-frame/SYNC_DAPP_DATA_ERROR",FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS:"@w3m-frame/GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS",FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR:"@w3m-frame/GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR",FRAME_INIT_SMART_ACCOUNT_SUCCESS:"@w3m-frame/INIT_SMART_ACCOUNT_SUCCESS",FRAME_INIT_SMART_ACCOUNT_ERROR:"@w3m-frame/INIT_SMART_ACCOUNT_ERROR",FRAME_SET_PREFERRED_ACCOUNT_SUCCESS:"@w3m-frame/SET_PREFERRED_ACCOUNT_SUCCESS",FRAME_SET_PREFERRED_ACCOUNT_ERROR:"@w3m-frame/SET_PREFERRED_ACCOUNT_ERROR",FRAME_READY:"@w3m-frame/READY",FRAME_RELOAD_SUCCESS:"@w3m-frame/RELOAD_SUCCESS",FRAME_RELOAD_ERROR:"@w3m-frame/RELOAD_ERROR",FRAME_RPC_ABORT_SUCCESS:"@w3m-frame/RPC_ABORT_SUCCESS",FRAME_RPC_ABORT_ERROR:"@w3m-frame/RPC_ABORT_ERROR",RPC_RESPONSE_TYPE_ER
2048ROR:"RPC_RESPONSE_ERROR",RPC_RESPONSE_TYPE_TX:"RPC_RESPONSE_TRANSACTION_HASH",RPC_RESPONSE_TYPE_OBJECT:"RPC_RESPONSE_OBJECT"},Pi={SAFE_RPC_METHODS:["eth_accounts","eth_blockNumber","eth_call","eth_chainId","eth_estimateGas","eth_feeHistory","eth_gasPrice","eth_getAccount","eth_getBalance","eth_getBlockByHash","eth_getBlockByNumber","eth_getBlockReceipts","eth_getBlockTransactionCountByHash","eth_getBlockTransactionCountByNumber","eth_getCode","eth_getFilterChanges","eth_getFilterLogs","eth_getLogs","eth_getProof","eth_getStorageAt","eth_getTransactionByBlockHashAndIndex","eth_getTransactionByBlockNumberAndIndex","eth_getTransactionByHash","eth_getTransactionCount","eth_getTransactionReceipt","eth_getUncleCountByBlockHash","eth_getUncleCountByBlockNumber","eth_maxPriorityFeePerGas","eth_newBlockFilter","eth_newFilter","eth_newPendingTransactionFilter","eth_sendRawTransaction","eth_syncing","eth_uninstallFilter","wallet_getCapabilities","wallet_getCallsStatus","eth_getUserOperationReceipt","eth_estimateUserOperationGas","eth_getUserOperationByHash","eth_supportedEntryPoints","wallet_getAssets"],NOT_SAFE_RPC_METHODS:["personal_sign","eth_signTypedData_v4","eth_sendTransaction","solana_signMessage","solana_signTransaction","solana_signAllTransactions","solana_signAndSendTransaction","wallet_sendCalls","wallet_grantPermissions","wallet_revokePermissions","eth_sendUserOperation"],GET_CHAIN_ID:"eth_chainId",RPC_METHOD_NOT_ALLOWED_MESSAGE:"Requested RPC call is not allowed",RPC_METHOD_NOT_ALLOWED_UI_MESSAGE:"Action not allowed",ACCOUNT_TYPES:{EOA:"eoa",SMART_ACCOUNT:"smartAccount"}},jc={PHANTOM:{id:"a797aa35c0fadbfc1a53e7f675162ed5226968b44a19ee3d24385c64d1d3c393",url:"https://phantom.app"},SOLFLARE:{id:"1ca0bdd4747578705b1939af023d120677c64fe6ca76add81fda36e350605e79",url:"https://solflare.com"},COINBASE:{id:"fd20dc426fb37566d803205b19bbc1d4096b248ac04548e3cfb6b3a38bd033aa",url:"https://go.cb-w.com"}},spe={handleMobileDeeplinkRedirect(t,e){const r=window.location.href,n=encodeURIComponent(r);if(t===jc.PHANTOM.id&&!("phantom"in window)){const i=r.startsWith("https")?"https":"http",s=r.split("/")[2],o=encodeURIComponent(`${i}://${s}`);window.location.href=`${jc.PHANTOM.url}/ul/browse/${n}?ref=${o}`}t===jc.SOLFLARE.id&&!("solflare"in window)&&(window.location.href=`${jc.SOLFLARE.url}/ul/v1/browse/${n}?ref=${n}`),e===fe.CHAIN.SOLANA&&t===jc.COINBASE.id&&!("coinbaseSolana"in window)&&(window.location.href=`${jc.COINBASE.url}/dapp?cb_url=${n}`)}},Oo=_n({walletImages:{},networkImages:{},chainImages:{},connectorImages:{},tokenImages:{},currencyImages:{}}),ope={state:Oo,subscribeNetworkImages(t){return Wi(Oo.networkImages,()=>t(Oo.networkImages))},subscribeKey(t,e){return Ds(Oo,t,e)},subscribe(t){return Wi(Oo,()=>t(Oo))},setWalletImage(t,e){Oo.walletImages[t]=e},setNetworkImage(t,e){Oo.networkImages[t]=e},setChainImage(t,e){Oo.chainImages[t]=e},setConnectorImage(t,e){Oo.connectorImages={...Oo.connectorImages,[t]:e}},setTokenImage(t,e){Oo.tokenImages[t]=e},setCurrencyImage(t,e){Oo.currencyImages[t]=e}},Qa=ea(ope),ape={eip155:"ba0ba0cd-17c6-4806-ad93-f9d174f17900",solana:"a1b58899-f671-4276-6a5e-56ca5bd59700",polkadot:"",bip122:"0b4838db-0161-4ffe-022d-532bf03dba00",cosmos:""},vE=_n({networkImagePromises:{}}),Uj={async fetchWalletImage(t){if(t)return await At._fetchWalletImage(t),this.getWalletImageById(t)},async fetchNetworkImage(t){if(!t)return;const e=this.getNetworkImageById(t);return e||(vE.networkImagePromises[t]||(vE.networkImagePromises[t]=At._fetchNetworkImage(t)),await vE.networkImagePromises[t],this.getNetworkImageById(t))},getWalletImageById(t){if(t)return Qa.state.walletImages[t]},getWalletImage(t){if(t!=null&&t.image_url)return t==null?void 0:t.image_url;if(t!=null&&t.image_id)return Qa.state.walletImages[t.image_id]},getNetworkImage(t){var e,r,n;if((e=t==null?void 0:t.assets)!=null&&e.imageUrl)return(r=t==null?void 0:t.assets)==null?void 0:r.imageUrl;if((n=t==null?void 0:t.assets)!=null&&n.imageId)return Qa.state.networkImages[t.assets.imageId]},getNetworkImageById(t){if(t)return Qa.state.networkImages[t]},getConnectorImage(t){var e;if(t!=null&&t.imageUrl)return t.imageUrl;if((e=t==null?void 0:t.info)!=null&&e.icon)return t.info.icon;if(t!=null&&t.imageId)return Qa.state.connectorImages[t.imageId]},getChainImage(t){return Qa.state.networkImages[ape[t]]}},Uu=_n({message:"",variant:"info",open:!1}),cpe={state:Uu,subscribeKey(t,e){return Ds(Uu,t,e)},open(t,e){const{debug:r}=Ee.state,{shortMessage:n,longMessage:i}=t;r&&(Uu.message=n,Uu.variant=e,Uu.open=!0),i&&console.error(typeof i=="function"?i():i)},close(){Uu.open=!1,Uu.message="",Uu.variant="info"}},Ci=ea(cpe),lpe=it.getAnalyticsUrl(),upe=new nb({baseUrl:lpe,clientId:null}),fpe=["MODAL_CREATED"],Rl=_n({timestamp:Date.now(),reportedErrors:{},data:{type:"track",event:"MODAL_CREATED"}}),on={state:Rl,subscribe(t){return Wi(Rl,()=>t(Rl))},getSdkProperties(){const{projectId:t,sdkType:e,sdkVersion:r}=Ee.state;return{projectId:t,st:e,sv:r||"html-wagmi-4.2.2"}},async _sendAnalyticsEvent(t){try{const e=ct.state.address;if(fpe.includes(t.data.event)||typeof window>"u")return;await upe.post({path:"/e",params:on.getSdkProperties(),body:{eventId:it.getUUID(),url:window.location.href,domain:window.location.hostname,timestamp:t.timestamp,props:{...t.data,address:e}}}),Rl.reportedErrors.FORBIDDEN=!1}
2048catch(e){e instanceof Error&&e.cause instanceof Response&&e.cause.status===fe.HTTP_STATUS_CODES.FORBIDDEN&&!Rl.reportedErrors.FORBIDDEN&&(Ci.open({shortMessage:"Invalid App Configuration",longMessage:`Origin ${Y1()?window.origin:"uknown"} not found on Allowlist - update configuration on cloud.reown.com`},"error"),Rl.reportedErrors.FORBIDDEN=!0)}},sendEvent(t){var e;Rl.timestamp=Date.now(),Rl.data=t,((e=Ee.state.features)!=null&&e.analytics||t.event==="INITIALIZE")&&on._sendAnalyticsEvent(Rl)}},dpe=it.getApiUrl(),Qs=new nb({baseUrl:dpe,clientId:null}),hpe=40,Bk=4,ppe=20,Zt=_n({promises:{},page:1,count:0,featured:[],allFeatured:[],recommended:[],allRecommended:[],wallets:[],filteredWallets:[],search:[],isAnalyticsEnabled:!1,excludedWallets:[],isFetchingRecommendedWallets:!1}),At={state:Zt,subscribeKey(t,e){return Ds(Zt,t,e)},_getSdkProperties(){const{projectId:t,sdkType:e,sdkVersion:r}=Ee.state;return{projectId:t,st:e||"appkit",sv:r||"html-wagmi-4.2.2"}},_filterOutExtensions(t){return Ee.state.isUniversalProvider?t.filter(e=>!!(e.mobile_link||e.desktop_link||e.webapp_link)):t},async _fetchWalletImage(t){const e=`${Qs.baseUrl}/getWalletImage/${t}`,r=await Qs.getBlob({path:e,params:At._getSdkProperties()});Qa.setWalletImage(t,URL.createObjectURL(r))},async _fetchNetworkImage(t){const e=`${Qs.baseUrl}/public/getAssetImage/${t}`,r=await Qs.getBlob({path:e,params:At._getSdkProperties()});Qa.setNetworkImage(t,URL.createObjectURL(r))},async _fetchConnectorImage(t){const e=`${Qs.baseUrl}/public/getAssetImage/${t}`,r=await Qs.getBlob({path:e,params:At._getSdkProperties()});Qa.setConnectorImage(t,URL.createObjectURL(r))},async _fetchCurrencyImage(t){const e=`${Qs.baseUrl}/public/getCurrencyImage/${t}`,r=await Qs.getBlob({path:e,params:At._getSdkProperties()});Qa.setCurrencyImage(t,URL.createObjectURL(r))},async _fetchTokenImage(t){const e=`${Qs.baseUrl}/public/getTokenImage/${t}`,r=await Qs.getBlob({path:e,params:At._getSdkProperties()});Qa.setTokenImage(t,URL.createObjectURL(r))},_filterWalletsByPlatform(t){return it.isMobile()?t==null?void 0:t.filter(r=>r.mobile_link||r.id===jc.COINBASE.id?!0:X.state.activeChain==="solana"&&(r.id===jc.SOLFLARE.id||r.id===jc.PHANTOM.id)):t},async fetchProjectConfig(){return(await Qs.get({path:"/appkit/v1/config",params:At._getSdkProperties()})).features},async fetchAllowedOrigins(){try{const{allowedOrigins:t}=await Qs.get({path:"/projects/v1/origins",params:At._getSdkProperties()});return t}catch(t){if(t instanceof Error&&t.cause instanceof Response){const e=t.cause.status;if(e===fe.HTTP_STATUS_CODES.TOO_MANY_REQUESTS)throw new Error("RATE_LIMITED",{cause:t});if(e>=fe.HTTP_STATUS_CODES.SERVER_ERROR&&e<600)throw new Error("SERVER_ERROR",{cause:t});return[]}return[]}},async fetchNetworkImages(){const t=X.getAllRequestedCaipNetworks(),e=t==null?void 0:t.map(({assets:r})=>r==null?void 0:r.imageId).filter(Boolean).filter(r=>!Uj.getNetworkImageById(r));e&&await Promise.allSettled(e.map(r=>At._fetchNetworkImage(r)))},async fetchConnectorImages(){const{connectors:t}=Fe.state,e=t.map(({imageId:r})=>r).filter(Boolean);await Promise.allSettled(e.map(r=>At._fetchConnectorImage(r)))},async fetchCurrencyImages(t=[]){await Promise.allSettled(t.map(e=>At._fetchCurrencyImage(e)))},async fetchTokenImages(t=[]){await Promise.allSettled(t.map(e=>At._fetchTokenImage(e)))},async fetchWallets(t){var s;const e=t.exclude??[];At._getSdkProperties().sv.startsWith("html-core-")&&e.push(...Object.values(jc).map(o=>o.id));const n=await Qs.get({path:"/getWallets",params:{...At._getSdkProperties(),...t,page:String(t.page),entries:String(t.entries),include:(s=t.include)==null?void 0:s.join(","),exclude:e.join(",")}});return{data:At._filterWalletsByPlatform(n==null?void 0:n.data)||[],count:n==null?void 0:n.count}},async fetchFeaturedWallets(){const{featuredWalletIds:t}=Ee.state;if(t!=null&&t.length){const e={...At._getSdkProperties(),page:1,entries:(t==null?void 0:t.length)??Bk,include:t},{data:r}=await At.fetchWallets(e),n=[...r].sort((s,o)=>t.indexOf(s.id)-t.indexOf(o.id)),i=n.map(s=>s.image_id).filter(Boolean);await Promise.allSettled(i.map(s=>At._fetchWalletImage(s))),Zt.featured=n,Zt.allFeatured=n}}
2048,async fetchRecommendedWallets(){try{Zt.isFetchingRecommendedWallets=!0;const{includeWalletIds:t,excludeWalletIds:e,featuredWalletIds:r}=Ee.state,n=[...e??[],...r??[]].filter(Boolean),i=X.getRequestedCaipNetworkIds().join(","),s={page:1,entries:Bk,include:t,exclude:n,chains:i},{data:o,count:a}=await At.fetchWallets(s),c=Oe.getRecentWallets(),l=o.map(f=>f.image_id).filter(Boolean),u=c.map(f=>f.image_id).filter(Boolean);await Promise.allSettled([...l,...u].map(f=>At._fetchWalletImage(f))),Zt.recommended=o,Zt.allRecommended=o,Zt.count=a??0}catch{}finally{Zt.isFetchingRecommendedWallets=!1}},async fetchWalletsByPage({page:t}){const{includeWalletIds:e,excludeWalletIds:r,featuredWalletIds:n}=Ee.state,i=X.getRequestedCaipNetworkIds().join(","),s=[...Zt.recommended.map(({id:u})=>u),...r??[],...n??[]].filter(Boolean),o={page:t,entries:hpe,include:e,exclude:s,chains:i},{data:a,count:c}=await At.fetchWallets(o),l=a.slice(0,ppe).map(u=>u.image_id).filter(Boolean);await Promise.allSettled(l.map(u=>At._fetchWalletImage(u))),Zt.wallets=it.uniqueBy([...Zt.wallets,...At._filterOutExtensions(a)],"id").filter(u=>{var f;return(f=u.chains)==null?void 0:f.some(d=>i.includes(d))}),Zt.count=c>Zt.count?c:Zt.count,Zt.page=t},async initializeExcludedWallets({ids:t}){const e={page:1,entries:t.length,include:t},{data:r}=await At.fetchWallets(e);r&&r.forEach(n=>{Zt.excludedWallets.push({rdns:n.rdns,name:n.name})})},async searchWallet({search:t,badge:e}){const{includeWalletIds:r,excludeWalletIds:n}=Ee.state,i=X.getRequestedCaipNetworkIds().join(",");Zt.search=[];const s={page:1,entries:100,search:t==null?void 0:t.trim(),badge_type:e,include:r,exclude:n,chains:i},{data:o}=await At.fetchWallets(s);on.sendEvent({type:"track",event:"SEARCH_WALLET",properties:{badge:e??"",search:t??""}});const a=o.map(c=>c.image_id).filter(Boolean);await Promise.allSettled([...a.map(c=>At._fetchWalletImage(c)),it.wait(300)]),Zt.search=At._filterOutExtensions(o)},initPromise(t,e){const r=Zt.promises[t];return r||(Zt.promises[t]=e())},prefetch({fetchConnectorImages:t=!0,fetchFeaturedWallets:e=!0,fetchRecommendedWallets:r=!0,fetchNetworkImages:n=!0}={}){const i=[t&&At.initPromise("connectorImages",At.fetchConnectorImages),e&&At.initPromise("featuredWallets",At.fetchFeaturedWallets),r&&At.initPromise("recommendedWallets",At.fetchRecommendedWallets),n&&At.initPromise("networkImages",At.fetchNetworkImages)].filter(Boolean);return Promise.allSettled(i)},prefetchAnalyticsConfig(){var t;(t=Ee.state.features)!=null&&t.analytics&&At.fetchAnalyticsConfig()},async fetchAnalyticsConfig(){try{const{isAnalyticsEnabled:t}=await Qs.get({path:"/getAnalyticsConfig",params:At._getSdkProperties()});Ee.setFeatures({analytics:t})}catch{Ee.setFeatures({analytics:!1})}},filterByNamespaces(t){if(!(t!=null&&t.length)){Zt.featured=Zt.allFeatured,Zt.recommended=Zt.allRecommended;return}const e=X.getRequestedCaipNetworkIds().join(",");Zt.featured=Zt.allFeatured.filter(r=>{var n;return(n=r.chains)==null?void 0:n.some(i=>e.includes(i))}),Zt.recommended=Zt.allRecommended.filter(r=>{var n;return(n=r.chains)==null?void 0:n.some(i=>e.includes(i))}),Zt.filteredWallets=Zt.wallets.filter(r=>{var n;return(n=r.chains)==null?void 0:n.some(i=>e.includes(i))})},clearFilterByNamespaces(){Zt.filteredWallets=[]},setFilterByNamespace(t){if(!t){Zt.featured=Zt.allFeatured,Zt.recommended=Zt.allRecommended;return}const e=X.getRequestedCaipNetworkIds().join(",");Zt.featured=Zt.allFeatured.filter(r=>{var n;return(n=r.chains)==null?void 0:n.some(i=>e.includes(i))}),Zt.recommended=Zt.allRecommended.filter(r=>{var n;return(n=r.chains)==null?void 0:n.some(i=>e.includes(i))}),Zt.filteredWallets=Zt.wallets.filter(r=>{var n;return(n=r.chains)==null?void 0:n.some(i=>e.includes(i))})}},fn=_n({view:"Connect",history:["Connect"],transactionStack:[]}),gpe={state:fn,subscribeKey(t,e){return Ds(fn,t,e)},pushTransactionStack(t){fn.transactionStack.push(t)},popTransactionStack(t){const e=fn.transactionStack.pop();if(!e)return;const{onSuccess:r,onError:n,onCancel:i}=e;switch(t){case"success":r==null||r();break;case"error":n==null||n(),Lt.goBack();break;case"cancel":i==null||i(),Lt.goBack();break}},push(t,e){t!==fn.view&&(fn.view=t,fn.history.push(t),fn.data=e)},reset(t,e){fn.view=t,fn.history=[t],fn.data=e},replace(t,e){fn.history.at(-1)===t||(fn.view=t,fn.history[fn.history.length-1]=t,fn.data=e)},goBack(){var n;const t=X.state.activeCaipAddress,e=Lt.state.view==="ConnectingFarcaster",r=!t&&e;if(fn.history.length>1){fn.history.pop();const[i]=fn.history.slice(-1);i&&(t&&i==="Connect"?fn.view="Account":fn.view=i)}else Wr.close();(n=fn.data)!=null&&n.wallet&&(fn.data.wallet=void 0),setTimeout(()=>{var i,s,o;
2048if(r){ct.setFarcasterUrl(void 0,X.state.activeChain);const a=Fe.getAuthConnector();(i=a==null?void 0:a.provider)==null||i.reload();const c=kh(Ee.state);(o=(s=a==null?void 0:a.provider)==null?void 0:s.syncDappData)==null||o.call(s,{metadata:c.metadata,sdkVersion:c.sdkVersion,projectId:c.projectId,sdkType:c.sdkType})}},100)},goBackToIndex(t){if(fn.history.length>1){fn.history=fn.history.slice(0,t+1);const[e]=fn.history.slice(-1);e&&(fn.view=e)}},goBackOrCloseModal(){Lt.state.history.length>1?Lt.goBack():Wr.close()}},Lt=ea(gpe),Ol=_n({themeMode:"dark",themeVariables:{},w3mThemeVariables:void 0}),HC={state:Ol,subscribe(t){return Wi(Ol,()=>t(Ol))},setThemeMode(t){Ol.themeMode=t;try{const e=Fe.getAuthConnector();if(e){const r=HC.getSnapshot().themeVariables;e.provider.syncTheme({themeMode:t,themeVariables:r,w3mThemeVariables:tu(r,t)})}}catch{console.info("Unable to sync theme to auth connector")}},setThemeVariables(t){Ol.themeVariables={...Ol.themeVariables,...t};try{const e=Fe.getAuthConnector();if(e){const r=HC.getSnapshot().themeVariables;e.provider.syncTheme({themeVariables:r,w3mThemeVariables:tu(Ol.themeVariables,Ol.themeMode)})}}catch{console.info("Unable to sync theme to auth connector")}},getSnapshot(){return kh(Ol)}},co=ea(HC),Bj={eip155:void 0,solana:void 0,polkadot:void 0,bip122:void 0,cosmos:void 0},Mr=_n({allConnectors:[],connectors:[],activeConnector:void 0,filterByNamespace:void 0,activeConnectorIds:{...Bj},filterByNamespaceMap:{eip155:!0,solana:!0,polkadot:!0,bip122:!0,cosmos:!0}}),mpe={state:Mr,subscribe(t){return Wi(Mr,()=>{t(Mr)})},subscribeKey(t,e){return Ds(Mr,t,e)},initialize(t){t.forEach(e=>{const r=Oe.getConnectedConnectorId(e);r&&Fe.setConnectorId(r,e)})},setActiveConnector(t){t&&(Mr.activeConnector=Ph(t))},setConnectors(t){t.filter(i=>!Mr.allConnectors.some(s=>s.id===i.id&&Fe.getConnectorName(s.name)===Fe.getConnectorName(i.name)&&s.chain===i.chain)).forEach(i=>{i.type!=="MULTI_CHAIN"&&Mr.allConnectors.push(Ph(i))});const r=Fe.getEnabledNamespaces(),n=Fe.getEnabledConnectors(r);Mr.connectors=Fe.mergeMultiChainConnectors(n)},filterByNamespaces(t){Object.keys(Mr.filterByNamespaceMap).forEach(e=>{Mr.filterByNamespaceMap[e]=!1}),t.forEach(e=>{Mr.filterByNamespaceMap[e]=!0}),Fe.updateConnectorsForEnabledNamespaces()},filterByNamespace(t,e){Mr.filterByNamespaceMap[t]=e,Fe.updateConnectorsForEnabledNamespaces()},updateConnectorsForEnabledNamespaces(){const t=Fe.getEnabledNamespaces(),e=Fe.getEnabledConnectors(t),r=Fe.areAllNamespacesEnabled();Mr.connectors=Fe.mergeMultiChainConnectors(e),r?At.clearFilterByNamespaces():At.filterByNamespaces(t)},getEnabledNamespaces(){return Object.entries(Mr.filterByNamespaceMap).filter(([t,e])=>e).map(([t])=>t)},getEnabledConnectors(t){return Mr.allConnectors.filter(e=>t.includes(e.chain))},areAllNamespacesEnabled(){return Object.values(Mr.filterByNamespaceMap).every(t=>t)},mergeMultiChainConnectors(t){const e=Fe.generateConnectorMapByName(t),r=[];return e.forEach(n=>{const i=n[0],s=(i==null?void 0:i.id)===fe.CONNECTOR_ID.AUTH;n.length>1&&i?r.push({name:i.name,imageUrl:i.imageUrl,imageId:i.imageId,connectors:[...n],type:s?"AUTH":"MULTI_CHAIN",chain:"eip155",id:(i==null?void 0:i.id)||""}):i&&r.push(i)}),r},generateConnectorMapByName(t){const e=new Map;return t.forEach(r=>{const{name:n}=r,i=Fe.getConnectorName(n);if(!i)return;const s=e.get(i)||[];s.find(a=>a.chain===r.chain)||s.push(r),e.set(i,s)}),e},getConnectorName(t){return t&&({"Trust Wallet":"Trust"}[t]||t)},getUniqueConnectorsByName(t){const e=[];return t.forEach(r=>{e.find(n=>n.chain===r.chain)||e.push(r)}),e},addConnector(t){var e,r,n;if(t.id===fe.CONNECTOR_ID.AUTH){const i=t,s=kh(Ee.state),o=co.getSnapshot().themeMode,a=co.getSnapshot().themeVariables;(r=(e=i==null?void 0:i.provider)==null?void 0:e.syncDappData)==null||r.call(e,{metadata:s.metadata,sdkVersion:s.sdkVersion,projectId:s.projectId,sdkType:s.sdkType}),(n=i==null?void 0:i.provider)==null||n.syncTheme({themeMode:o,themeVariables:a,w3mThemeVariables:tu(a,o)}),Fe.setConnectors([t])}else Fe.setConnectors([t])},getAuthConnector(t){var n;const e=t||X.state.activeChain,r=Mr.connectors.find(i=>i.id===fe.CONNECTOR_ID.AUTH);if(r)return(n=r==null?void 0:r.connectors)!=null&&n.length?r.connectors.find(s=>s.chain===e):r},getAnnouncedConnectorRdns(){return Mr.connectors.filter(t=>t.type==="ANNOUNCED").map(t=>{var e;return(e=t.info)==null?void 0:e.rdns})},getConnectorById(t){return Mr.allConnectors.find(e=>e.id===t)},getConnector(t,e){return Mr.allConnectors.filter(n=>n.chain===X.state.activeChain).find(n=>{var i;return n.explorerId===t||((i=n.info)==null?void 0:i.rdns)===e})},syncIfAuthConnector(t){var s,o;if(t.id!=="ID_AUTH")return;const e=t,r=kh(Ee.state),n=co.getSnapshot().themeMode,i=co.getSnapshot().themeVariables;(o=(s=e==null?void 0:e.provider)==null?void 0:s.syncDappData)==null||o.call(s,{metadata:r.metadata,sdkVersion:r.sdkVersion,sdkType:r.s
2048dkType,projectId:r.projectId}),e.provider.syncTheme({themeMode:n,themeVariables:i,w3mThemeVariables:tu(i,n)})},getConnectorsByNamespace(t){const e=Mr.allConnectors.filter(r=>r.chain===t);return Fe.mergeMultiChainConnectors(e)},canSwitchToSmartAccount(t){return X.checkIfSmartAccountEnabled()&&Vo(t)===Pi.ACCOUNT_TYPES.EOA},selectWalletConnector(t){const e=Fe.getConnector(t.id,t.rdns);spe.handleMobileDeeplinkRedirect((e==null?void 0:e.explorerId)||t.id,X.state.activeChain),e?Lt.push("ConnectingExternal",{connector:e}):Lt.push("ConnectingWalletConnect",{wallet:t})},getConnectors(t){return t?Fe.getConnectorsByNamespace(t):Fe.mergeMultiChainConnectors(Mr.allConnectors)},setFilterByNamespace(t){Mr.filterByNamespace=t,Mr.connectors=Fe.getConnectors(t),At.setFilterByNamespace(t)},setConnectorId(t,e){t&&(Mr.activeConnectorIds={...Mr.activeConnectorIds,[e]:t},Oe.setConnectedConnectorId(e,t))},removeConnectorId(t){Mr.activeConnectorIds={...Mr.activeConnectorIds,[t]:void 0},Oe.deleteConnectedConnectorId(t)},getConnectorId(t){if(t)return Mr.activeConnectorIds[t]},isConnected(t){return t?!!Mr.activeConnectorIds[t]:Object.values(Mr.activeConnectorIds).some(e=>!!e)},resetConnectorIds(){Mr.activeConnectorIds={...Bj}}},Fe=ea(mpe),ype=1e3,u1={checkNamespaceConnectorId(t,e){return Fe.getConnectorId(t)===e},isSocialProvider(t){return Zr.DEFAULT_REMOTE_FEATURES.socials.includes(t)},connectWalletConnect({walletConnect:t,connector:e,closeModalOnConnect:r=!0,redirectViewOnModalClose:n="Connect",onOpen:i,onConnect:s}){return new Promise((o,a)=>{if(t&&Fe.setActiveConnector(e),i==null||i(it.isMobile()&&t),n){const l=Wr.subscribeKey("open",u=>{u||(Lt.state.view!==n&&Lt.replace(n),l(),a(new Error("Modal closed")))})}const c=X.subscribeKey("activeCaipAddress",l=>{l&&(s==null||s(),r&&Wr.close(),c(),o(Bs.parseCaipAddress(l)))})})},connectExternal(t){return new Promise((e,r)=>{const n=X.subscribeKey("activeCaipAddress",i=>{i&&(Wr.close(),n(),e(Bs.parseCaipAddress(i)))});We.connectExternal(t,t.chain).catch(()=>{n(),r(new Error("Connection rejected"))})})},connectSocial({social:t,closeModalOnConnect:e=!0,onOpenFarcaster:r,onConnect:n}){let i=ct.state.socialWindow,s=ct.state.socialProvider,o=!1,a=null;const c=X.subscribeKey("activeCaipAddress",l=>{l&&(e&&Wr.close(),c())});return new Promise((l,u)=>{async function f(p){var h,g;if((h=p.data)!=null&&h.resultUri)if(p.origin===fe.SECURE_SITE_SDK_ORIGIN){window.removeEventListener("message",f,!1);try{const y=Fe.getAuthConnector();if(y&&!o){i&&(i.close(),ct.setSocialWindow(void 0,X.state.activeChain),i=ct.state.socialWindow),o=!0;const x=p.data.resultUri;if(s&&on.sendEvent({type:"track",event:"SOCIAL_LOGIN_REQUEST_USER_DATA",properties:{provider:s}}),s){Oe.setConnectedSocialProvider(s),await We.connectExternal({id:y.id,type:y.type,socialUri:x},y.chain);const C=X.state.activeCaipAddress;if(!C){u(new Error("Failed to connect"));return}l(Bs.parseCaipAddress(C)),on.sendEvent({type:"track",event:"SOCIAL_LOGIN_SUCCESS",properties:{provider:s,caipNetworkId:(g=X.getActiveCaipNetwork())==null?void 0:g.caipNetworkId}})}}}catch{s&&on.sendEvent({type:"track",event:"SOCIAL_LOGIN_ERROR",properties:{provider:s}}),u(new Error("Failed to connect"))}}else s&&on.sendEvent({type:"track",event:"SOCIAL_LOGIN_ERROR",properties:{provider:s}})}async function d(){if(t&&(ct.setSocialProvider(t,X.state.activeChain),s=ct.state.socialProvider,on.sendEvent({type:"track",event:"SOCIAL_LOGIN_STARTED",properties:{provider:s}})),s==="farcaster"){r==null||r();const p=Wr.subscribeKey("open",g=>{!g&&t==="farcaster"&&(u(new Error("Popup closed")),n==null||n(),p())}),h=Fe.getAuthConnector();if(h&&!ct.state.farcasterUrl)try{const{url:g}=await h.provider.getFarcasterUri();ct.setFarcasterUrl(g,X.state.activeChain)}catch{u(new Error("Failed to connect to farcaster"))}}else{const p=Fe.getAuthConnector();a=it.returnOpenHref(`${fe.SECURE_SITE_SDK_ORIGIN}/loading`,"popupWindow","width=600,height=800,scrollbars=yes");try{if(p&&s){const{uri:h}=await p.provider.getSocialRedirectUri({provider:s});if(a&&h){ct.setSocialWindow(a,X.state.activeChain),i=ct.state.socialWindow,a.location.href=h;const g=setInterval(()=>
2048{i!=null&&i.closed&&!o&&(u(new Error("Popup closed")),clearInterval(g))},1e3);window.addEventListener("message",f,!1)}else a==null||a.close(),u(new Error("Failed to initiate social connection"))}}catch{u(new Error("Failed to initiate social connection")),a==null||a.close()}}}d()})},connectEmail({closeModalOnConnect:t=!0,redirectViewOnModalClose:e="Connect",onOpen:r,onConnect:n}){return new Promise((i,s)=>{if(r==null||r(),e){const a=Wr.subscribeKey("open",c=>{c||(Lt.state.view!==e&&Lt.replace(e),a(),s(new Error("Modal closed")))})}const o=X.subscribeKey("activeCaipAddress",a=>{a&&(n==null||n(),t&&Wr.close(),o(),i(Bs.parseCaipAddress(a)))})})},async updateEmail(){const t=Oe.getConnectedConnectorId(X.state.activeChain),e=Fe.getAuthConnector();if(!e)throw new Error("No auth connector found");if(t!==fe.CONNECTOR_ID.AUTH)throw new Error("Not connected to email or social");const r=e.provider.getEmail()??"";return Lt.push("UpdateEmailWallet",{email:r,redirectView:void 0}),new Promise((n,i)=>{const s=setInterval(()=>{const a=e.provider.getEmail()??"";a!==r&&(Wr.close(),clearInterval(s),o(),n({email:a}))},ype),o=Wr.subscribeKey("open",a=>{a||(Lt.state.view!=="Connect"&&Lt.push("Connect"),clearInterval(s),o(),i(new Error("Modal closed")))})})},canSwitchToSmartAccount(t){return X.checkIfSmartAccountEnabled()&&Vo(t)===Pi.ACCOUNT_TYPES.EOA}};function Fj(){var n,i;const t=((n=X.state.activeCaipNetwork)==null?void 0:n.chainNamespace)||"eip155",e=((i=X.state.activeCaipNetwork)==null?void 0:i.id)||1,r=Zr.NATIVE_TOKEN_ADDRESS[t];return`${t}:${e}:${r}`}function Vo(t){var r;return(r=X.getAccountData(t))==null?void 0:r.preferredAccountType}const $3={getConnectionStatus(t,e){const r=Fe.state.activeConnectorIds[e],n=We.getConnections(e);return!!r&&t.connectorId===r?"connected":n.some(o=>o.connectorId.toLowerCase()===t.connectorId.toLowerCase())?"active":"disconnected"},excludeConnectorAddressFromConnections({connections:t,connectorId:e,addresses:r}){return t.map(n=>{if((e?n.connectorId.toLowerCase()===e.toLowerCase():!1)&&r){const s=n.accounts.filter(o=>!r.some(c=>c.toLowerCase()===o.address.toLowerCase()));return{...n,accounts:s}}return n})},excludeExistingConnections(t,e){const r=new Set(t);return e.filter(n=>!r.has(n.connectorId))},getConnectionsByConnectorId(t,e){return t.filter(r=>r.connectorId.toLowerCase()===e.toLowerCase())},getConnectionsData(t){var a;const e=!!((a=Ee.state.remoteFeatures)!=null&&a.multiWallet),r=Fe.state.activeConnectorIds[t],n=We.getConnections(t),s=(We.state.recentConnections.get(t)??[]).filter(c=>Fe.getConnectorById(c.connectorId)),o=$3.excludeExistingConnections([...n.map(c=>c.connectorId),...r?[r]:[]],s);return e?{connections:n,recentConnections:o}:{connections:n.filter(c=>c.connectorId.toLowerCase()===(r==null?void 0:r.toLowerCase())),recentConnections:[]}}},Dd=Object.freeze({message:"",variant:"success",svg:void 0,open:!1,autoClose:!0}),vi=_n({...Dd}),bpe={state:vi,subscribeKey(t,e){return Ds(vi,t,e)},showLoading(t,e={}){this._showMessage({message:t,variant:"loading",...e})},showSuccess(t){this._showMessage({message:t,variant:"success"})},showSvg(t,e){this._showMessage({message:t,svg:e})},showError(t){const e=it.parseError(t);this._showMessage({message:e,variant:"error"})},hide(){vi.message=Dd.message,vi.variant=Dd.variant,vi.svg=Dd.svg,vi.open=Dd.open,vi.autoClose=Dd.autoClose},_showMessage({message:t,svg:e,variant:r="success",autoClose:n=Dd.autoClose}){vi.open?(vi.open=!1,setTimeout(()=>{vi.message=t,vi.variant=r,vi.svg=e,vi.open=!0,vi.autoClose=n},150)):(vi.message=t,vi.variant=r,vi.svg=e,vi.open=!0,vi.autoClose=n)}},Jc=bpe,On=_n({transactions:[],transactionsByYear:{},lastNetworkInView:void 0,loading:!1,empty:!1,next:void 0}),wpe={state:On,subscribe(t){return Wi(On,()=>t(On))},setLastNetworkInView(t){On.lastNetworkInView=t},async fetchTransactions(t){var e;if(!t)throw new Error("Transactions can't be fetched without an accountAddress");On.loading=!0;try{const r=await Tt.fetchTransactions({account:t,cursor:On.next,chainId:(e=X.state.activeCaipNetwork)==null?void 0:e.caipNetworkId}),n=hv.filterSpamTransactions(r.data),i=hv.filterByConnectedChain(n),s=[...On.transactions,...i];On.loading=!1,On.transactions=s,On.transactionsByYear=hv.groupTransactionsByYearAndMonth(On.transactionsByYear,i),On.empty=s.length===0,On.next=r.next?r.next:void 0}catch{const n=X.state.activeChain;on.sendEvent({type:"track",event:"ERROR_FETCH_TRANSACTIONS",properties:{address:t,projectId:Ee.state.projectId,cursor:On.next,isSmartAccount:Vo(n)===Pi.ACCOUNT_TYPES.SMART_ACCOUNT}}),Jc.showError("Failed to fetch transactions"),On.loading=!1,On.empty=!0,On.next=void 0}},groupTransactionsByYearAndMonth(t={},e=[]){const r=t;return e.forEach(n=>{const i=new Date(n.metadata.minedAt).getFullYear(),s=new Date(n.metadata.minedAt).getMonth(),o=r[i]??{},c=(o[s]??[]).filter(l=>
2048l.id!==n.id);r[i]={...o,[s]:[...c,n].sort((l,u)=>new Date(u.metadata.minedAt).getTime()-new Date(l.metadata.minedAt).getTime())}}),r},filterSpamTransactions(t){return t.filter(e=>!e.transfers.every(n=>{var i;return((i=n.nft_info)==null?void 0:i.flags.is_spam)===!0}))},filterByConnectedChain(t){var n;const e=(n=X.state.activeCaipNetwork)==null?void 0:n.caipNetworkId;return t.filter(i=>i.metadata.chain===e)},clearCursor(){On.next=void 0},resetTransactions(){On.transactions=[],On.transactionsByYear={},On.lastNetworkInView=void 0,On.loading=!1,On.empty=!1,On.next=void 0}},hv=ea(wpe,"API_ERROR"),Ir=_n({connections:new Map,recentConnections:new Map,isSwitchingConnection:!1,wcError:!1,buffering:!1,status:"disconnected"});let _d;const vpe={state:Ir,subscribe(t){return Wi(Ir,()=>t(Ir))},subscribeKey(t,e){return Ds(Ir,t,e)},_getClient(){return Ir._client},setClient(t){Ir._client=Ph(t)},initialize(t){const e=t.filter(r=>!!r.namespace).map(r=>r.namespace);We.syncStorageConnections(e)},syncStorageConnections(t){const e=Oe.getConnections(),r=t??Array.from(X.state.chains.keys());for(const n of r){const i=e[n]??[],s=new Map(Ir.recentConnections);s.set(n,i),Ir.recentConnections=s}},getConnections(t){return t?Ir.connections.get(t)??[]:[]},hasAnyConnection(t){const e=We.state.connections;return Array.from(e.values()).flatMap(r=>r).some(({connectorId:r})=>r===t)},async connectWalletConnect(){var t,e,r,n;if(it.isTelegram()||it.isSafari()&&it.isIos()){if(_d){await _d,_d=void 0;return}if(!it.isPairingExpired(Ir==null?void 0:Ir.wcPairingExpiry)){const i=Ir.wcUri;Ir.wcUri=i;return}_d=(e=(t=We._getClient())==null?void 0:t.connectWalletConnect)==null?void 0:e.call(t).catch(()=>{}),We.state.status="connecting",await _d,_d=void 0,Ir.wcPairingExpiry=void 0,We.state.status="connected"}else await((n=(r=We._getClient())==null?void 0:r.connectWalletConnect)==null?void 0:n.call(r))},async connectExternal(t,e,r=!0){var i,s;const n=await((s=(i=We._getClient())==null?void 0:i.connectExternal)==null?void 0:s.call(i,t));return r&&X.setActiveNamespace(e),n},async reconnectExternal(t){var r,n;await((n=(r=We._getClient())==null?void 0:r.reconnectExternal)==null?void 0:n.call(r,t));const e=t.chain||X.state.activeChain;e&&Fe.setConnectorId(t.id,e)},async setPreferredAccountType(t,e){var n;if(!e)return;Wr.setLoading(!0,X.state.activeChain);const r=Fe.getAuthConnector();r&&(ct.setPreferredAccountType(t,e),await r.provider.setPreferredAccount(t),Oe.setPreferredAccountTypes(Object.entries(X.state.chains).reduce((i,[s,o])=>{const a=s,c=Vo(a);return c!==void 0&&(i[a]=c),i},{})),await We.reconnectExternal(r),Wr.setLoading(!1,X.state.activeChain),on.sendEvent({type:"track",event:"SET_PREFERRED_ACCOUNT_TYPE",properties:{accountType:t,network:((n=X.state.activeCaipNetwork)==null?void 0:n.caipNetworkId)||""}}))},async signMessage(t){var e;return(e=We._getClient())==null?void 0:e.signMessage(t)},parseUnits(t,e){var r;return(r=We._getClient())==null?void 0:r.parseUnits(t,e)},formatUnits(t,e){var r;return(r=We._getClient())==null?void 0:r.formatUnits(t,e)},async sendTransaction(t){var e;return(e=We._getClient())==null?void 0:e.sendTransaction(t)},async getCapabilities(t){var e;return(e=We._getClient())==null?void 0:e.getCapabilities(t)},async grantPermissions(t){var e;return(e=We._getClient())==null?void 0:e.grantPermissions(t)},async walletGetAssets(t){var e;return((e=We._getClient())==null?void 0:e.walletGetAssets(t))??{}},async estimateGas(t){var e;return(e=We._getClient())==null?void 0:e.estimateGas(t)},async writeContract(t){var e;return(e=We._getClient())==null?void 0:e.writeContract(t)},async getEnsAddress(t){var e;return(e=We._getClient())==null?void 0:e.getEnsAddress(t)},async getEnsAvatar(t){var e;return(e=We._getClient())==null?void 0:e.getEnsAvatar(t)},checkInstalled(t){var e,r;return((r=(e=We._getClient())==null?void 0:e.checkInstalled)==null?void 0:r.call(e,t))||!1},resetWcConnection(){Ir.wcUri=void 0,Ir.wcPairingExpiry=void 0,Ir.wcLinking=void 0,Ir.recentWallet=void 0,Ir.status="disconnected",hv.resetTransactions(),Oe.deleteWalletConnectDeepLink()},resetUri(){Ir.wcUri=void 0,Ir.wcPairingExpiry=void 0,_d=void 0},finalizeWcConnection(){var r,n,i;const{wcLinking:t,recentWallet:e}=We.state;t&&Oe.setWalletConnectDeepLink(t),e&&Oe.setAppKitRecent(e),on.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:t?"mobile":"qrcode",name:((n=(r=Lt.state.data)==null?void 0:r.wallet)==null?void 0:n.name)||"Unknown",caipNetworkId:(i=X.getActiveCaipNetwork())==null?void 0:i.caipNetworkId}})},setWcBasic(t){Ir.wcBasic=t},setUri(t){Ir.wcUri=t,Ir.wcPairingExpiry=it.getPairingExpiry()},setWcLinking(t){Ir.wcLinking=t},setWcError(t){Ir.wcError=t,Ir.buffering=!1},setRecentWallet(t){Ir.recentWallet=t},setBuffering(t){Ir.buffering=t},setStatus(t){Ir.status=t},setIsSwitchingConnection(t){Ir.isSwitchingConnection=t},async disconnect({id:t,namespace:e,initialDisconnect:r}={}){var n;try{await((n=We._getClient())==null?void 0:n.disconnect({id:t,chainNamespace:e,initialDisconnect:r}))}catch(i){throw new ng("Failed to disconnect","INTERNAL_SDK_ERROR",i)}},setConnections(t,e){const r=new Map(Ir.connections);r.set(e,t),Ir.connections=r},async handleAuthAccountSwitch({address:t,namespace:e}){var i,s;const r=(s=(i=ct.state.user)==null?void 0:i.accounts)==null?void 0:s.find(o=>o.type==="smartAccount"),n=r&&r.address.toLowerCase()===t.toLowerCase()&&u1.canSwitchToSmartAccount(e)?"smartAccount":"eoa";await We.setPreferredAccountType(n,e)},async handleActiveConnection({connection:t,namespace:e,address:r}){const n=Fe.getConnectorById(t.connectorId),i=t.connectorId===fe.CONNECTOR_ID.AUTH;if(!n)throw new Error(`No connector found for connection: ${t.connectorId}`);if(i)i&&r&&await We.handleAuthAccountSwitch({address:r,namespace:e});else{const s=await We.connectExternal({id:n.id,type:n.type,provider:n.provider,address:r,chain:e},e);return s==null?void 0:s.address}return r},async handleDisconnectedConnection({connection:t,namespace:e,address:r,closeModalOnConnect:n}){var l,u;const i=Fe.getConnectorById(t.connectorId),s=(u=(l=t.auth)==null?void 0:l.name)==null?void 0:u.toLowerCase(),o=t.connectorId===fe.CONNECTOR_ID.AUTH,a=t.connectorId===fe.CONNECTOR_ID.WALLET_CONNECT;if(!i)throw new Error(`No connector found for connection: ${t.connectorId}`);let c;if(o)if(s&&u1.isSocialProvider(s)){const{address:f}=await u1.connectSocial({social:s,closeModalOnConnect:n,onOpenFarcaster(){Wr.open({view:"ConnectingFarcaster"})},onConnect(){Lt.replace("ProfileWallets")}});c=f}else{const{address:f}=await u1.connectEmail({closeModalOnConnect:n,onOpen(){Wr.open({view:"EmailLogin"})},onConnect(){Lt.replace("ProfileWallets")}});c=f}else if(a){const{address:f}=await u1.connectWalletConnect({walletConnect:!0,connector:i,closeModalOnConnect:n,onOpen(d){Wr.open({view:d?"AllWallets":"ConnectingWalletConnect"})},onConnect(){Lt.replace("ProfileWallets")}});c=f}else{const f=await We.connectExternal({id:i.id,type:i.type,provider:i.provider,chain:e},e);f&&(c=f.address)}return o&&r&&await We.handleAuthAccountSwitch({address:r,namespace:e}),c},async switchConnection({connection:t,address:e,namespace:r,closeModalOnConnect:n,onChange:i}){let s;const o=ct.getCaipAddress(r);if(o){const{address:c}=Bs.parseCaipAddress(o);s=c}const a=$3.getConnectionStatus(t,r);switch(a){case"connected":case"active":{const c=await We.handleActiveConnection({connection:t,namespace:r,address:e});if(s&&c){const l=c.toLowerCase()!==s.toLowerCase();i==null||i({address:c,namespace:r,hasSwitchedAccount:l,hasSwitchedWallet:
2048a==="active"})}break}case"disconnected":{const c=await We.handleDisconnectedConnection({connection:t,namespace:r,address:e,closeModalOnConnect:n});c&&(i==null||i({address:c,namespace:r,hasSwitchedAccount:!0,hasSwitchedWallet:!0}));break}default:throw new Error(`Invalid connection status: ${a}`)}}},We=ea(vpe),g0=_n({loading:!1,open:!1,selectedNetworkId:void 0,activeChain:void 0,initialized:!1}),sl={state:g0,subscribe(t){return Wi(g0,()=>t(g0))},subscribeOpen(t){return Ds(g0,"open",t)},set(t){Object.assign(g0,{...g0,...t})}},xpe={async getTokenList(){var n;const t=X.state.activeCaipNetwork,e=await Tt.fetchSwapTokens({chainId:t==null?void 0:t.caipNetworkId});return((n=e==null?void 0:e.tokens)==null?void 0:n.map(i=>({...i,eip2612:!1,quantity:{decimals:"0",numeric:"0"},price:0,value:0})))||[]},async fetchGasPrice(){var e;const t=X.state.activeCaipNetwork;if(!t)return null;try{switch(t.chainNamespace){case"solana":const r=(e=await(We==null?void 0:We.estimateGas({chainNamespace:"solana"})))==null?void 0:e.toString();return{standard:r,fast:r,instant:r};case"eip155":default:return await Tt.fetchGasPrice({chainId:t.caipNetworkId})}}catch{return null}},async fetchSwapAllowance({tokenAddress:t,userAddress:e,sourceTokenAmount:r,sourceTokenDecimals:n}){const i=await Tt.fetchSwapAllowance({tokenAddress:t,userAddress:e});if(i!=null&&i.allowance&&r&&n){const s=We.parseUnits(r,n)||0;return BigInt(i.allowance)>=s}return!1},async getMyTokensWithBalance(t){const e=await mS.getMyTokensWithBalance(t);return ct.setTokenBalance(e,X.state.activeChain),this.mapBalancesToSwapTokens(e)},mapBalancesToSwapTokens(t){return(t==null?void 0:t.map(e=>({...e,address:e!=null&&e.address?e.address:Fj(),decimals:parseInt(e.quantity.decimals,10),logoUri:e.iconUrl,eip2612:!1})))||[]}},nn=_n({tokenBalances:[],loading:!1}),Epe={state:nn,subscribe(t){return Wi(nn,()=>t(nn))},subscribeKey(t,e){return Ds(nn,t,e)},setToken(t){t&&(nn.token=Ph(t))},setTokenAmount(t){nn.sendTokenAmount=t},setReceiverAddress(t){nn.receiverAddress=t},setReceiverProfileImageUrl(t){nn.receiverProfileImageUrl=t},setReceiverProfileName(t){nn.receiverProfileName=t},setNetworkBalanceInUsd(t){nn.networkBalanceInUSD=t},setLoading(t){nn.loading=t},async sendToken(){var t;try{switch(Gr.setLoading(!0),(t=X.state.activeCaipNetwork)==null?void 0:t.chainNamespace){case"eip155":await Gr.sendEvmToken();return;case"solana":await Gr.sendSolanaToken();return;default:throw new Error("Unsupported chain")}}finally{Gr.setLoading(!1)}},async sendEvmToken(){var r,n,i;const t=X.state.activeChain;if(!t)throw new Error("SendController:sendEvmToken - activeChainNamespace is required");const e=Vo(t);if(!Gr.state.sendTokenAmount||!Gr.state.receiverAddress)throw new Error("An amount and receiver address are required");if(!Gr.state.token)throw new Error("A token is required");(r=Gr.state.token)!=null&&r.address?(on.sendEvent({type:"track",event:"SEND_INITIATED",properties:{isSmartAccount:e===Pi.ACCOUNT_TYPES.SMART_ACCOUNT,token:Gr.state.token.address,amount:Gr.state.sendTokenAmount,network:((n=X.state.activeCaipNetwork)==null?void 0:n.caipNetworkId)||""}}),await Gr.sendERC20Token({receiverAddress:Gr.state.receiverAddress,tokenAddress:Gr.state.token.address,sendTokenAmount:Gr.state.sendTokenAmount,decimals:Gr.state.token.quantity.decimals})):(on.sendEvent({type:"track",event:"SEND_INITIATED",properties:{isSmartAccount:e===Pi.ACCOUNT_TYPES.SMART_ACCOUNT,token:Gr.state.token.symbol||"",amount:Gr.state.sendTokenAmount,network:((i=X.state.activeCaipNetwork)==null?void 0:i.caipNetworkId)||""}}),await Gr.sendNativeToken({receiverAddress:Gr.state.receiverAddress,sendTokenAmount:Gr.state.sendTokenAmount,decimals:Gr.state.token.quantity.decimals}))},async fetchTokenBalance(t){var s,o;nn.loading=!0;const e=(s=X.state.activeCaipNetwork)==null?void 0:s.caipNetworkId,r=(o=X.state.activeCaipNetwork)==null?void 0:o.chainNamespace,n=X.state.activeCaipAddress,i=n?it.getPlainAddress(n):void 0;if(nn.lastRetry&&!it.isAllowedRetry(nn.lastRetry,30*Zr.ONE_SEC_MS))return nn.loading=!1,[];try{if(i&&e&&r){const a=await mS.getMyTokensWithBalance();return nn.tokenBalances=a,nn.lastRetry=void 0,a}}catch(a){nn.lastRetry=Date.now(),t==null||t(a),Jc.showError("Token Balance Unavailable")}finally{nn.loading=!1}return[]},fetchNetworkBalance(){if(nn.tokenBalances.length===0)return;const t=xpe.mapBalancesToSwapTokens(nn.tokenBalances);if(!t)return;const e=t.find(r=>r.address===Fj());e&&(nn.networkBalanceInUSD=e?W0e.multiply(e.quantity.numeric,e.price).toString():"0")},async sendNativeToken(t){var s,o,a;Lt.pushTransactionStack({});const e=t.receiverAddress,r=ct.state.address,n=We.parseUnits(t.sendTokenAmount.toString(),Number(t.decimals));await We.sendTransaction({chainNamespace:fe.CHAIN.EVM,to:e,address:r,data:"0x",value:n??BigInt(0)}),on.sendEvent({type:"track",event:"SEND_SUCCESS",properties:{isSmartAccount:Vo("eip155")===Pi.ACCOUNT_TYPES.SMART_ACCOUNT,token:((s=Gr.state.token)==null?void 0:s.symbol)||"",amount:t.
2048sendTokenAmount,network:((o=X.state.activeCaipNetwork)==null?void 0:o.caipNetworkId)||""}}),(a=We._getClient())==null||a.updateBalance("eip155"),Gr.resetSend()},async sendERC20Token(t){Lt.pushTransactionStack({onSuccess(){Lt.replace("Account")}});const e=We.parseUnits(t.sendTokenAmount.toString(),Number(t.decimals));if(ct.state.address&&t.sendTokenAmount&&t.receiverAddress&&t.tokenAddress){const r=it.getPlainAddress(t.tokenAddress);if(!r)throw new Error("SendController:sendERC20Token - tokenAddress is required");await We.writeContract({fromAddress:ct.state.address,tokenAddress:r,args:[t.receiverAddress,e??BigInt(0)],method:"transfer",abi:K0e.getERC20Abi(r),chainNamespace:fe.CHAIN.EVM}),Gr.resetSend()}},async sendSolanaToken(){var t;if(!Gr.state.sendTokenAmount||!Gr.state.receiverAddress)throw new Error("An amount and receiver address are required");Lt.pushTransactionStack({onSuccess(){Lt.replace("Account")}}),await We.sendTransaction({chainNamespace:"solana",to:Gr.state.receiverAddress,value:Gr.state.sendTokenAmount}),(t=We._getClient())==null||t.updateBalance("solana"),Gr.resetSend()},resetSend(){nn.token=void 0,nn.sendTokenAmount=void 0,nn.receiverAddress=void 0,nn.receiverProfileImageUrl=void 0,nn.receiverProfileName=void 0,nn.loading=!1,nn.tokenBalances=[]}},Gr=ea(Epe),xE={currentTab:0,tokenBalance:[],smartAccountDeployed:!1,addressLabels:new Map,user:void 0,preferredAccountType:void 0},nw={caipNetwork:void 0,supportsAllNetworks:!0,smartAccountEnabledNetworks:[]},Ge=_n({chains:D0e(),activeCaipAddress:void 0,activeChain:void 0,activeCaipNetwork:void 0,noAdapters:!1,universalAdapter:{networkControllerClient:void 0,connectionControllerClient:void 0},isSwitchingNamespace:!1}),Cpe={state:Ge,subscribe(t){return Wi(Ge,()=>{t(Ge)})},subscribeKey(t,e){return Ds(Ge,t,e)},subscribeChainProp(t,e,r){let n;return Wi(Ge.chains,()=>{var s;const i=r||Ge.activeChain;if(i){const o=(s=Ge.chains.get(i))==null?void 0:s[t];n!==o&&(n=o,e(o))}})},initialize(t,e,r){const{chainId:n,namespace:i}=Oe.getActiveNetworkProps(),s=e==null?void 0:e.find(u=>u.id.toString()===(n==null?void 0:n.toString())),a=t.find(u=>(u==null?void 0:u.namespace)===i)||(t==null?void 0:t[0]),c=t.map(u=>u.namespace).filter(u=>u!==void 0),l=Ee.state.enableEmbedded?new Set([...c]):new Set([...(e==null?void 0:e.map(u=>u.chainNamespace))??[]]);((t==null?void 0:t.length)===0||!a)&&(Ge.noAdapters=!0),Ge.noAdapters||(Ge.activeChain=a==null?void 0:a.namespace,Ge.activeCaipNetwork=s,X.setChainNetworkData(a==null?void 0:a.namespace,{caipNetwork:s}),Ge.activeChain&&sl.set({activeChain:a==null?void 0:a.namespace})),l.forEach(u=>{const f=e==null?void 0:e.filter(h=>h.chainNamespace===u),d=Oe.getPreferredAccountTypes()||{},p={...Ee.state.defaultAccountTypes,...d};X.state.chains.set(u,{namespace:u,networkState:_n({...nw,caipNetwork:f==null?void 0:f[0]}),accountState:_n({...xE,preferredAccountType:p[u]}),caipNetworks:f??[],...r}),X.setRequestedCaipNetworks(f??[],u)})},removeAdapter(t){var e,r;if(Ge.activeChain===t){const n=Array.from(Ge.chains.entries()).find(([i])=>i!==t);if(n){const i=(r=(e=n[1])==null?void 0:e.caipNetworks)==null?void 0:r[0];i&&X.setActiveCaipNetwork(i)}}Ge.chains.delete(t)},addAdapter(t,{networkControllerClient:e,connectionControllerClient:r},n){if(!t.namespace)throw new Error("ChainController:addAdapter - adapter must have a namespace");Ge.chains.set(t.namespace,{namespace:t.namespace,networkState:{...nw,caipNetwork:n[0]},accountState:xE,caipNetworks:n,connectionControllerClient:r,networkControllerClient:e}),X.setRequestedCaipNetworks((n==null?void 0:n.filter(i=>i.chainNamespace===t.namespace))??[],t.namespace)},addNetwork(t){var r;const e=Ge.chains.get(t.chainNamespace);if(e){const n=[...e.caipNetworks||[]];(r=e.caipNetworks)!=null&&r.find(i=>i.id===t.id)||n.push(t),Ge.chains.set(t.chainNamespace,{...e,caipNetworks:n}),X.setRequestedCaipNetworks(n,t.chainNamespace),Fe.filterByNamespace(t.chainNamespace,!0)}},removeNetwork(t,e){var n,i,s;const r=Ge.chains.get(t);if(r){const o=((n=Ge.activeCaipNetwork)==null?void 0:n.id)===e,a=[...((i=r.caipNetworks)==null?void 0:i.filter(c=>c.id!==e))||[]];
2048o&&((s=r==null?void 0:r.caipNetworks)!=null&&s[0])&&X.setActiveCaipNetwork(r.caipNetworks[0]),Ge.chains.set(t,{...r,caipNetworks:a}),X.setRequestedCaipNetworks(a||[],t),a.length===0&&Fe.filterByNamespace(t,!1)}},setAdapterNetworkState(t,e){const r=Ge.chains.get(t);r&&(r.networkState={...r.networkState||nw,...e},Ge.chains.set(t,r))},setChainAccountData(t,e,r=!0){if(!t)throw new Error("Chain is required to update chain account data");const n=Ge.chains.get(t);if(n){const i={...n.accountState||xE,...e};Ge.chains.set(t,{...n,accountState:i}),(Ge.chains.size===1||Ge.activeChain===t)&&(e.caipAddress&&(Ge.activeCaipAddress=e.caipAddress),ct.replaceState(i))}},setChainNetworkData(t,e){if(!t)return;const r=Ge.chains.get(t);if(r){const n={...r.networkState||nw,...e};Ge.chains.set(t,{...r,networkState:n})}},setAccountProp(t,e,r,n=!0){X.setChainAccountData(r,{[t]:e},n)},setActiveNamespace(t){var n,i;Ge.activeChain=t;const e=t?Ge.chains.get(t):void 0,r=(n=e==null?void 0:e.networkState)==null?void 0:n.caipNetwork;r!=null&&r.id&&t&&(Ge.activeCaipAddress=(i=e==null?void 0:e.accountState)==null?void 0:i.caipAddress,Ge.activeCaipNetwork=r,X.setChainNetworkData(t,{caipNetwork:r}),Oe.setActiveCaipNetworkId(r==null?void 0:r.caipNetworkId),sl.set({activeChain:t,selectedNetworkId:r==null?void 0:r.caipNetworkId}))},setActiveCaipNetwork(t){var n,i,s;if(!t)return;Ge.activeChain!==t.chainNamespace&&X.setIsSwitchingNamespace(!0);const e=Ge.chains.get(t.chainNamespace);Ge.activeChain=t.chainNamespace,Ge.activeCaipNetwork=t,X.setChainNetworkData(t.chainNamespace,{caipNetwork:t}),(n=e==null?void 0:e.accountState)!=null&&n.address?Ge.activeCaipAddress=`${t.chainNamespace}:${t.id}:${(i=e==null?void 0:e.accountState)==null?void 0:i.address}`:Ge.activeCaipAddress=void 0,X.setAccountProp("caipAddress",Ge.activeCaipAddress,t.chainNamespace),e&&ct.replaceState(e.accountState),Gr.resetSend(),sl.set({activeChain:Ge.activeChain,selectedNetworkId:(s=Ge.activeCaipNetwork)==null?void 0:s.caipNetworkId}),Oe.setActiveCaipNetworkId(t.caipNetworkId),!X.checkIfSupportedNetwork(t.chainNamespace)&&Ee.state.enableNetworkSwitch&&!Ee.state.allowUnsupportedChain&&!We.state.wcBasic&&X.showUnsupportedChainUI()},addCaipNetwork(t){var r;if(!t)return;const e=Ge.chains.get(t.chainNamespace);e&&((r=e==null?void 0:e.caipNetworks)==null||r.push(t))},async switchActiveNamespace(t){var i;if(!t)return;const e=t!==X.state.activeChain,r=(i=X.getNetworkData(t))==null?void 0:i.caipNetwork,n=X.getCaipNetworkByNamespace(t,r==null?void 0:r.id);e&&n&&await X.switchActiveNetwork(n)},async switchActiveNetwork(t){var s;const e=X.state.activeChain;if(!e)throw new Error("ChainController:switchActiveNetwork - namespace is required");const r=X.state.chains.get(e),n=!((s=r==null?void 0:r.caipNetworks)!=null&&s.some(o=>{var a;return o.id===((a=Ge.activeCaipNetwork)==null?void 0:a.id)})),i=X.getNetworkControllerClient(t.chainNamespace);if(i){try{await i.switchCaipNetwork(t),n&&Wr.close()}catch{Lt.goBack()}on.sendEvent({type:"track",event:"SWITCH_NETWORK",properties:{network:t.caipNetworkId}})}},getNetworkControllerClient(t){const e=t||Ge.activeChain;if(!e)throw new Error("ChainController:getNetworkControllerClient - chain is required");const r=Ge.chains.get(e);if(!r)throw new Error("Chain adapter not found");if(!r.networkControllerClient)throw new Error("NetworkController client not set");return r.networkControllerClient},getConnectionControllerClient(t){const e=t||Ge.activeChain;if(!e)throw new Error("Chain is required to get connection controller client");const r=Ge.chains.get(e);if(!(r!=null&&r.connectionControllerClient))throw new Error("ConnectionController client not set");return r.connectionControllerClient},getAccountProp(t,e){var i;let r=Ge.activeChain;if(e&&(r=e),!r)return;const n=(i=Ge.chains.get(r))==null?void 0:i.accountState;if(n)return n[t]},getNetworkProp(t,e){var n;const r=(n=Ge.chains.get(e))==null?void 0:n.networkState;if(r)return r[t]},getRequestedCaipNetworks(t){const e=Ge.chains.get(t),{approvedCaipNetworkIds:r=[],requestedCaipNetworks:n=[]}=(e==null?void 0:e.networkState)||{};return it.sortRequestedNetworks(r,n).filter(o=>o==null?void 0:o.id)},getAllRequestedCaipNetworks(){const t=[];
2048return Ge.chains.forEach(e=>{if(!e.namespace)throw new Error("ChainController:getAllRequestedCaipNetworks - chainAdapter must have a namespace");const r=X.getRequestedCaipNetworks(e.namespace);t.push(...r)}),t},setRequestedCaipNetworks(t,e){X.setAdapterNetworkState(e,{requestedCaipNetworks:t});const n=X.getAllRequestedCaipNetworks().map(s=>s.chainNamespace),i=Array.from(new Set(n));Fe.filterByNamespaces(i)},getAllApprovedCaipNetworkIds(){const t=[];return Ge.chains.forEach(e=>{if(!e.namespace)throw new Error("ChainController:getAllApprovedCaipNetworkIds - chainAdapter must have a namespace");const r=X.getApprovedCaipNetworkIds(e.namespace);t.push(...r)}),t},getActiveCaipNetwork(t){var e,r;return t?(r=(e=Ge.chains.get(t))==null?void 0:e.networkState)==null?void 0:r.caipNetwork:Ge.activeCaipNetwork},getActiveCaipAddress(){return Ge.activeCaipAddress},getApprovedCaipNetworkIds(t){var n;const e=Ge.chains.get(t);return((n=e==null?void 0:e.networkState)==null?void 0:n.approvedCaipNetworkIds)||[]},async setApprovedCaipNetworksData(t){const e=X.getNetworkControllerClient(),r=await(e==null?void 0:e.getApprovedCaipNetworksData());X.setAdapterNetworkState(t,{approvedCaipNetworkIds:r==null?void 0:r.approvedCaipNetworkIds,supportsAllNetworks:r==null?void 0:r.supportsAllNetworks})},checkIfSupportedNetwork(t,e){const r=e||Ge.activeCaipNetwork,n=X.getRequestedCaipNetworks(t);return n.length?n==null?void 0:n.some(i=>i.id===(r==null?void 0:r.id)):!0},checkIfSupportedChainId(t){if(!Ge.activeChain)return!0;const e=X.getRequestedCaipNetworks(Ge.activeChain);return e==null?void 0:e.some(r=>r.id===t)},setSmartAccountEnabledNetworks(t,e){X.setAdapterNetworkState(e,{smartAccountEnabledNetworks:t})},checkIfSmartAccountEnabled(){var n;const t=Dj.caipNetworkIdToNumber((n=Ge.activeCaipNetwork)==null?void 0:n.caipNetworkId),e=Ge.activeChain;if(!e||!t)return!1;const r=X.getNetworkProp("smartAccountEnabledNetworks",e);return!!(r!=null&&r.includes(Number(t)))},showUnsupportedChainUI(){Wr.open({view:"UnsupportedChain"})},checkIfNamesSupported(){const t=Ge.activeCaipNetwork;return!!(t!=null&&t.chainNamespace&&Zr.NAMES_SUPPORTED_CHAIN_NAMESPACES.includes(t.chainNamespace))},resetNetwork(t){X.setAdapterNetworkState(t,{approvedCaipNetworkIds:void 0,supportsAllNetworks:!0})},resetAccount(t){const e=t;if(!e)throw new Error("Chain is required to set account prop");const r=Ee.state.defaultAccountTypes[e],n=X.getAccountProp("preferredAccountType",e);Ge.activeCaipAddress=void 0,X.setChainAccountData(e,{smartAccountDeployed:!1,currentTab:0,caipAddress:void 0,address:void 0,balance:void 0,balanceSymbol:void 0,profileName:void 0,profileImage:void 0,addressExplorerUrl:void 0,tokenBalance:[],connectedWalletInfo:void 0,preferredAccountType:r||n,socialProvider:void 0,socialWindow:void 0,farcasterUrl:void 0,user:void 0,status:"disconnected"}),Fe.removeConnectorId(e)},setIsSwitchingNamespace(t){Ge.isSwitchingNamespace=t},getFirstCaipNetworkSupportsAuthConnector(){var r,n;const t=[];let e;if(Ge.chains.forEach(i=>{fe.AUTH_CONNECTOR_SUPPORTED_CHAINS.find(s=>s===i.namespace)&&i.namespace&&t.push(i.namespace)}),t.length>0){const i=t[0];return e=i?(n=(r=Ge.chains.get(i))==null?void 0:r.caipNetworks)==null?void 0:n[0]:void 0,e}},getAccountData(t){var e;return t?(e=X.state.chains.get(t))==null?void 0:e.accountState:ct.state},getNetworkData(t){var r;const e=t||Ge.activeChain;if(e)return(r=X.state.chains.get(e))==null?void 0:r.networkState},getCaipNetworkByNamespace(t,e){var i,s,o;if(!t)return;const r=X.state.chains.get(t),n=(i=r==null?void 0:r.caipNetworks)==null?void 0:i.find(a=>a.id===e);return n||((s=r==null?void 0:r.networkState)==null?void 0:s.caipNetwork)||((o=r==null?void 0:r.caipNetworks)==null?void 0:o[0])},getRequestedCaipNetworkIds(){const t=Fe.state.filterByNamespace;return(t?[Ge.chains.get(t)]:Array.from(Ge.chains.values())).flatMap(r=>(r==null?void 0:r.caipNetworks)||[]).map(r=>r.caipNetworkId)},getCaipNetworks(t){return t?X.getRequestedCaipNetworks(t):X.getAllRequestedCaipNetworks()},setLastConnectedSIWECaipNetwork(t){Ge.lastConnectedSIWECaipNetwork=t},getLastConnectedSIWECaipNetwork(){return Ge.lastConnectedSIWECaipNetwork}}
2048,X=ea(Cpe),_pe={purchaseCurrencies:[{id:"2b92315d-eab7-5bef-84fa-089a131333f5",name:"USD Coin",symbol:"USDC",networks:[{name:"ethereum-mainnet",display_name:"Ethereum",chain_id:"1",contract_address:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{name:"polygon-mainnet",display_name:"Polygon",chain_id:"137",contract_address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"}]},{id:"2b92315d-eab7-5bef-84fa-089a131333f5",name:"Ether",symbol:"ETH",networks:[{name:"ethereum-mainnet",display_name:"Ethereum",chain_id:"1",contract_address:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{name:"polygon-mainnet",display_name:"Polygon",chain_id:"137",contract_address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"}]}],paymentCurrencies:[{id:"USD",payment_method_limits:[{id:"card",min:"10.00",max:"7500.00"},{id:"ach_bank_account",min:"10.00",max:"25000.00"}]},{id:"EUR",payment_method_limits:[{id:"card",min:"10.00",max:"7500.00"},{id:"ach_bank_account",min:"10.00",max:"25000.00"}]}]},jj=it.getBlockchainApiUrl(),Xs=_n({clientId:null,api:new nb({baseUrl:jj,clientId:null}),supportedChains:{http:[],ws:[]}}),Tt={state:Xs,async get(t){const{st:e,sv:r}=Tt.getSdkProperties(),n=Ee.state.projectId,i={...t.params||{},st:e,sv:r,projectId:n};return Xs.api.get({...t,params:i})},getSdkProperties(){const{sdkType:t,sdkVersion:e}=Ee.state;return{st:t||"unknown",sv:e||"unknown"}},async isNetworkSupported(t){if(!t)return!1;try{Xs.supportedChains.http.length||await Tt.getSupportedNetworks()}catch{return!1}return Xs.supportedChains.http.includes(t)},async getSupportedNetworks(){try{const t=await Tt.get({path:"v1/supported-chains"});return Xs.supportedChains=t,t}catch{return Xs.supportedChains}},async fetchIdentity({address:t,caipNetworkId:e}){if(!await Tt.isNetworkSupported(e))return{avatar:"",name:""};const n=Oe.getIdentityFromCacheForAddress(t);if(n)return n;const i=await Tt.get({path:`/v1/identity/${t}`,params:{sender:X.state.activeCaipAddress?it.getPlainAddress(X.state.activeCaipAddress):void 0}});return Oe.updateIdentityCache({address:t,identity:i,timestamp:Date.now()}),i},async fetchTransactions({account:t,cursor:e,signal:r,cache:n,chainId:i}){var o;return await Tt.isNetworkSupported((o=X.state.activeCaipNetwork)==null?void 0:o.caipNetworkId)?Tt.get({path:`/v1/account/${t}/history`,params:{cursor:e,chainId:i},signal:r,cache:n}):{data:[],next:void 0}},async fetchSwapQuote({amount:t,userAddress:e,from:r,to:n,gasPrice:i}){var o;return await Tt.isNetworkSupported((o=X.state.activeCaipNetwork)==null?void 0:o.caipNetworkId)?Tt.get({path:"/v1/convert/quotes",headers:{"Content-Type":"application/json"},params:{amount:t,userAddress:e,from:r,to:n,gasPrice:i}}):{quotes:[]}},async fetchSwapTokens({chainId:t}){var r;return await Tt.isNetworkSupported((r=X.state.activeCaipNetwork)==null?void 0:r.caipNetworkId)?Tt.get({path:"/v1/convert/tokens",params:{chainId:t}}):{tokens:[]}},async fetchTokenPrice({addresses:t}){var r;return await Tt.isNetworkSupported((r=X.state.activeCaipNetwork)==null?void 0:r.caipNetworkId)?Xs.api.post({path:"/v1/fungible/price",body:{currency:"usd",addresses:t,projectId:Ee.state.projectId},headers:{"Content-Type":"application/json"}}):{fungibles:[]}},async fetchSwapAllowance({tokenAddress:t,userAddress:e}){var n;return await Tt.isNetworkSupported((n=X.state.activeCaipNetwork)==null?void 0:n.caipNetworkId)?Tt.get({path:"/v1/convert/allowance",params:{tokenAddress:t,userAddress:e},headers:{"Content-Type":"application/json"}}):{allowance:"0"}},async fetchGasPrice({chainId:t}){var i;const{st:e,sv:r}=Tt.getSdkProperties();if(!await Tt.isNetworkSupported((i=X.state.activeCaipNetwork)==null?void 0:i.caipNetworkId))throw new Error("Network not supported for Gas Price");return Tt.get({path:"/v1/convert/gas-price",headers:{"Content-Type":"application/json"},params:{chainId:t,st:e,sv:r}})},async generateSwapCalldata({amount:t,from:e,to:r,userAddress:n,disableEstimate:i}){var o;if(!await Tt.isNetworkSupported((o=X.state.activeCaipNetwork)==null?void 0:o.caipNetworkId))throw new Error("Network not supported for Swaps");return Xs.api.post({path:"/v1/convert/build-transaction",headers:{"Content-Type":"application/json"},body:{amount:t,eip155:{slippage:Zr.CONVERT_SLIPPAGE_TOLERANCE},projectId:Ee.state.projectId,from:e,to:r,userAddress:n,disableEstimate:i}})},async generateApproveCalldata({from:t,to:e,userAddress:r}){var o;const{st:n,sv:i}=Tt.getSdkProperties();if(!await Tt.isNetworkSupported((o=X.state.activeCaipNetwork)==null?void 0:o.caipNetworkId))throw new Error("Network not supported for Swaps");return Tt.get({path:"/v1/convert/build-approve",headers:{"Content-Type":"application/json"},params:{userAddress:r,from:t,to:e,st:n,sv:i}})},async getBalance(t,e,r){var l;const{st:n,sv:i}=Tt.getSdkProperties();if(!await Tt.isNetworkSupported((l=X.state.activeCaipNetwork)==null?void 0:l.caipNetworkId))return Jc.showError("Token Balance Unavailable"),{balances:[]};const o=`${e}:${t}`,a=Oe.getBalanceCacheForCaipAddress(o);if(a)return a;const c=await Tt.get({path:`/v1/account/${t}/balance`,params:{currency:"usd",chainId:e,forceUpdate:r,st:n,sv:i}});return Oe.updateBalanceCache({caipAddress:o,balance:c,timestamp:Date.now()}),c},async lookupEnsName(t){var r;return await Tt.isNetworkSupported((r=X.state.activeCaipNetwork)==null?void 0:r.caipNetworkId)?Tt.get({path:`/v1/profile/account/${t}`,params:{apiVersion:"2"}}):{addresses:{},attributes:[]}},async reverseLookupEnsName({address:t}){var r;return await Tt.isNetworkSupported((r=X.state.activeCaipNetwork)==null?void 0:r.caipNetworkId)?Tt.get({path:`/v1/profile/reverse/${t}`,params:{sender:ct.state.address,apiVersion:"2"}}):[]},async getEnsNameSuggestions(t){var r;return await Tt.isNetworkSupported((r=X.state.activeCaipNetwork)==null?void 0:r.caipNetworkId)?Tt.get({path:`/v1/profile/suggestions/${t}`,params:{zone:"reown.id"}}):{suggestions:[]}},async registerEnsName({coinType:t,address:e,message:r,signature:n}){var s;return await Tt.isNetworkSupported((s=X.state.activeCaipNetwork)==null?void 0:s.caipNetworkId)?Xs.api.post({path:"/v1/profile/account",body:{coin_type:t,address:e,message:r,signature:n},headers:{"Content-Type":"application/json"}}):{success:!1}},async generateOnRampURL({destinationWallets:t,partnerUserId:e,defaultNetwork:r,purchaseAmount:n,paymentAmount:i}){var a;return await Tt.isNetworkSupported((a=X.state.activeCaipNetwork)==null?void 0:a.caipNetworkId)?(await Xs.api.post({path:"/v1/generators/onrampurl",params:{projectId:Ee.state.projectId},body:{destinationWallets:t,defaultNetwork:r,partnerUserId:e,defaultExperience:"buy",presetCryptoAmount:n,presetFiatAmount:i}})).url:""},async getOnrampOptions(){var e;if(!await Tt.isNetworkSupported((e=X.state.activeCaipNetwork)==null?void 0:e.caipNetworkId))return{paymentCurrencies:[],purchaseCurrencies:[]};try{return await Tt.get({path:"/v1/onramp/options"})}catch{return _pe}},async getOnrampQuote({purchaseCurrency:t,paymentCurrency:e,amount:r,network:n}){var i;try{return await Tt.isNetworkSupported((i=X.state.activeCaipNetwork)==null?void 0:i.caipNetworkId)?await Xs.api.post({path:"/v1/onramp/quote",params:{projectId:Ee.state.projectId},body:{purchaseCurrency:t,paymentCurrency:e,amount:r,network:n}}):null}catch{return{networkFee:{amount:r,currency:e.id},paymentSubtotal:{amount:r,currency:e.id},paymentTotal:{amount:r,currency:e.id},purchaseAmount:{amount:r,currency:e.id},quoteId:"mocked-quote-id"}}},async getSmartSessions(t){var r;return await Tt.isNetworkSupported((r=X.state.activeCaipNetwork)==null?void 0:r.caipNetworkId)?Tt.get({path:`/v1/sessions/${t}`}):[]},async revokeSmartSession(t,e,r){var i;return await Tt.isNetworkSupported((i=X.state.activeCaipNetwork)==null?void 0:i.caipNetworkId)?Xs.api.post({path:`/v1/sessions/${t}/revoke`,params:{projectId:Ee.state.projectId},body:{pci:e,signature:r}}):{success:!1}},setClientId(t){Xs.clientId=t,Xs.api=new nb({baseUrl:jj,clientId:t})}};function Ape(t,{strict:e=!0}={}){return!t||typeof t!="string"?!1:e?/^0x[0-9a-fA-F]*$/.test(t):t.startsWith("0x")}function Fk(t){return Ape(t,{strict:!1})?Math.ceil((t.length-2)/2):t.length}const zj="2.32.0";let f1={getDocsUrl:({docsBaseUrl:t,docsPath:e="",docsSlug:r})=>e?`${t??"https://viem.sh"}${e}${r?`#${r}`:""}`:void 0,version:`viem@${zj}`}
2048,xc=class qC extends Error{constructor(e,r={}){var a;const n=(()=>{var c;return r.cause instanceof qC?r.cause.details:(c=r.cause)!=null&&c.message?r.cause.message:r.details})(),i=r.cause instanceof qC&&r.cause.docsPath||r.docsPath,s=(a=f1.getDocsUrl)==null?void 0:a.call(f1,{...r,docsPath:i}),o=[e||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...s?[`Docs: ${s}`]:[],...n?[`Details: ${n}`]:[],...f1.version?[`Version: ${f1.version}`]:[]].join(` 2049`);super(o,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=n,this.docsPath=i,this.metaMessages=r.metaMessages,this.name=r.name??this.name,this.shortMessage=e,this.version=zj}walk(e){return Wj(this,e)}};function Wj(t,e){return e!=null&&e(t)?t:t&&typeof t=="object"&&"cause"in t&&t.cause!==void 0?Wj(t.cause,e):e?null:t}class L$e extends xc{constructor({offset:e,position:r,size:n}){super(`Slice ${r==="start"?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${n}).`,{name:"SliceOffsetOutOfBoundsError"})}}let Hj=class extends xc{constructor({size:e,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${r}).`,{name:"SizeExceedsPaddingSizeError"})}};function dS(t,{dir:e,size:r=32}={}){return typeof t=="string"?Spe(t,{dir:e,size:r}):Npe(t,{dir:e,size:r})}function Spe(t,{dir:e,size:r=32}={}){if(r===null)return t;const n=t.replace("0x","");if(n.length>r*2)throw new Hj({size:Math.ceil(n.length/2),targetSize:r,type:"hex"});return`0x${n[e==="right"?"padEnd":"padStart"](r*2,"0")}`}function Npe(t,{dir:e,size:r=32}={}){if(r===null)return t;if(t.length>r)throw new Hj({size:t.length,targetSize:r,type:"bytes"});const n=new Uint8Array(r);for(let i=0;i<r;i++){const s=e==="right";n[s?i:r-i-1]=t[s?i:t.length-i-1]}return n}let Ipe=class extends xc{constructor({max:e,min:r,signed:n,size:i,value:s}){super(`Number "${s}" is not in safe ${i?`${i*8}-bit ${n?"signed":"unsigned"} `:""}integer range ${e?`(${r} to ${e})`:`(above ${r})`}`,{name:"IntegerOutOfRangeError"})}},Tpe=class extends xc{constructor({givenSize:e,maxSize:r}){super(`Size cannot exceed ${r} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}};function qj(t,{size:e}){if(Fk(t)>e)throw new Tpe({givenSize:Fk(t),maxSize:e})}const kpe=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function jk(t,e={}){return typeof t=="number"||typeof t=="bigint"?Rpe(t,e):typeof t=="string"?Kj(t,e):typeof t=="boolean"?Ppe(t,e):Vj(t,e)}function Ppe(t,e={}){const r=`0x${Number(t)}`;return typeof e.size=="number"?(qj(r,{size:e.size}),dS(r,{size:e.size})):r}function Vj(t,e={}){let r="";for(let i=0;i<t.length;i++)r+=kpe[t[i]];const n=`0x${r}`;return typeof e.size=="number"?(qj(n,{size:e.size}),dS(n,{dir:"right",size:e.size})):n}function Rpe(t,e={}){const{signed:r,size:n}=e,i=BigInt(t);let s;n?r?s=(1n<<BigInt(n)*8n-1n)-1n:s=2n**(BigInt(n)*8n)-1n:typeof t=="number"&&(s=BigInt(Number.MAX_SAFE_INTEGER));const o=typeof s=="bigint"&&r?-s-1n:0;if(s&&i>s||i<o){const c=typeof t=="bigint"?"n":"";throw new Ipe({max:s?`${s}${c}`:void 0,min:`${o}${c}`,signed:r,size:n,value:`${t}${c}`})}const a=`0x${(r&&i<0?(1n<<BigInt(n*8))+BigInt(i):i).toString(16)}`;return n?dS(a,{size:n}):a}const Ope=new TextEncoder;function Kj(t,e={}){const r=Ope.encode(t);return Vj(r,e)}let Dpe=class extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){const r=super.get(e);return super.has(e)&&r!==void 0&&(this.delete(e),super.set(e,r)),r}set(e,r){if(super.set(e,r),this.maxSize&&this.size>this.maxSize){const n=this.keys().next().value;n&&this.delete(n)}return this}};const dh=(t,e,r)=>JSON.stringify(t,(n,i)=>typeof i=="bigint"?i.toString():i,r);function Lpe(t,e){let r=t.toString();const n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(e,"0");let[i,s]=[r.slice(0,r.length-e),r.slice(r.length-e)];return s=s.replace(/(0+)$/,""),`${n?"-":""}${i||"0"}${s?`.${s}`:""}`}const hS=t=>t;class Sm extends xc{constructor({body:e,cause:r,details:n,headers:i,status:s,url:o}){super("HTTP request failed.",{cause:r,details:n,metaMessages:[s&&`Status: ${s}`,`URL: ${hS(o)}`,e&&`Request body: ${dh(e)}
2049`].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=e,this.headers=i,this.status=s,this.url=o}}class Gj extends xc{constructor({body:e,error:r,url:n}){super("RPC Request failed.",{cause:r,details:r.message,metaMessages:[`URL: ${hS(n)}`,`Request body: ${dh(e)}`],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=r.code,this.data=r.data}}class zk extends xc{constructor({body:e,url:r}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${hS(r)}`,`Request body: ${dh(e)}`],name:"TimeoutError"})}}const Mpe=-1;class ko extends xc{constructor(e,{code:r,docsPath:n,metaMessages:i,name:s,shortMessage:o}){super(o,{cause:e,docsPath:n,metaMessages:i||(e==null?void 0:e.metaMessages),name:s||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=s||e.name,this.code=e instanceof Gj?e.code:r??Mpe}}class ta extends ko{constructor(e,r){super(e,r),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=r.data}}class k2 extends ko{constructor(e){super(e,{code:k2.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(k2,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class P2 extends ko{constructor(e){super(e,{code:P2.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(P2,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class R2 extends ko{constructor(e,{method:r}={}){super(e,{code:R2.code,name:"MethodNotFoundRpcError",shortMessage:`The method${r?` "${r}"`:""} does not exist / is not available.`})}}Object.defineProperty(R2,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class O2 extends ko{constructor(e){super(e,{code:O2.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(` 2050`)})}}Object.defineProperty(O2,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class sg extends ko{constructor(e){super(e,{code:sg.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(sg,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class D2 extends ko{constructor(e){super(e,{code:D2.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(` 2051`)})}}Object.defineProperty(D2,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class L2 extends ko{constructor(e){super(e,{code:L2.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(L2,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class M2 extends ko{constructor(e){super(e,{code:M2.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(M2,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class og extends ko{constructor(e){super(e,{code:og.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(og,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class Zd extends ko{constructor(e,{method:r}={}){super(e,{code:Zd.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${r?` "${r}"`:""} is not supported.`})}}Object.defineProperty(Zd,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class ag extends ko{constructor(e){super(e,{code:ag.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(ag,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class $2 extends ko{constructor(e){super(e,{code:$2.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty($2,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class hh extends ta{constructor(e){super(e,{code:hh.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(hh,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class U2 extends ta{constructor(e){super(e,{code:U2.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(U2,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class B2 extends ta{constructor(e,{method:r}={}){super(e,{code:B2.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${r?` " ${r}"`:""}.`})}}Object.defineProperty(B2,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class F2 extends ta{constructor(e){super(e,{code:F2.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(F2,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});
2051class j2 extends ta{constructor(e){super(e,{code:j2.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(j2,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class z2 extends ta{constructor(e){super(e,{code:z2.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(z2,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class W2 extends ta{constructor(e){super(e,{code:W2.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}Object.defineProperty(W2,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class H2 extends ta{constructor(e){super(e,{code:H2.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}Object.defineProperty(H2,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class q2 extends ta{constructor(e){super(e,{code:q2.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}Object.defineProperty(q2,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class V2 extends ta{constructor(e){super(e,{code:V2.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}Object.defineProperty(V2,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class K2 extends ta{constructor(e){super(e,{code:K2.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}Object.defineProperty(K2,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class G2 extends ta{constructor(e){super(e,{code:G2.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}Object.defineProperty(G2,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});class Y2 extends ta{constructor(e){super(e,{code:Y2.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}Object.defineProperty(Y2,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class $pe extends ko{constructor(e){super(e,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}class pS extends xc{constructor({cause:e,message:r}={}){var i;const n=(i=r==null?void 0:r.replace("execution reverted: ",""))==null?void 0:i.replace("execution reverted","");super(`Execution reverted ${n?`with reason: ${n}`:"for an unknown reason"}.`,{cause:e,name:"ExecutionRevertedError"})}}Object.defineProperty(pS,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(pS,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});function Upe(){let t=()=>{},e=()=>{};return{promise:new Promise((n,i)=>{t=n,e=i}),resolve:t,reject:e}}const EE=new Map;function Bpe({fn:t,id:e,shouldSplitBatch:r,wait:n=0,sort:i}){const s=async()=>{const u=c();o();const f=u.map(({args:d})=>d);f.length!==0&&t(f).then(d=>{i&&Array.isArray(d)&&d.sort(i);for(let p=0;p<u.length;p++){const{resolve:h}=u[p];h==null||h([d[p],d])}}).catch(d=>{for(let p=0;p<u.length;p++){const{reject:h}=u[p];h==null||h(d)}})},o=()=>EE.delete(e),a=()=>c().map(({args:u})=>u),c=()=>EE.get(e)||[],l=u=>EE.set(e,[...c(),u]);return{flush:o,async schedule(u){const{promise:f,resolve:d,reject:p}=Upe();return(r==null?void 0:r([...a(),u]))&&s(),c().length>0?(l({args:u,resolve:d,reject:p}),f):(l({args:u,resolve:d,reject:p}),setTimeout(s,n),f)}}}async function Yj(t){return new Promise(e=>setTimeout(e,t))}const VC=256;let iw=VC,sw;function Fpe(t=11){if(!sw||iw+t>VC*2){sw="",iw=0;for(let e=0;e<VC;e++)sw+=(256+Math.random()*256|0).toString(16).substring(1)}return sw.substring(iw,iw+++t)}const ow=new Dpe(8192);function jpe(t,{enabled:e=!0,id:r}){if(!e||!r)return t();if(ow.get(r))return ow.get(r);const n=t().finally(()=>ow.delete(r));return ow.set(r,n),n}function zpe(t,{delay:e=100,retryCount:r=2,shouldRetry:n=()=>!0}={}){return new Promise((i,s)=>{const o=async({count:a=0}={})=>{const c=async({error:l})=>{const u=typeof e=="function"?e({count:a,error:l}):e;u&&await Yj(u),o({count:a+1})};try{const l=await t();i(l)}catch(l){if(a<r&&await n({count:a,error:l}))return c({error:l});s(l)}};o()})}function Wpe(t,e={}){return async(r,n={})=>{var f;const{dedupe:i=!1,methods:s,retryDelay:o=150,retryCount:a=3,uid:c}={...e,...n},{method:l}=r;if((f=s==null?void 0:s.exclude)!=null&&f.includes(l))throw new Zd(new Error("method not supported"),{method:l});if(s!=null&&s.include&&!s.include.includes(l))throw new Zd(new Error("method not supported"),{method:l});const u=i?Kj(`${c}.${dh(r)}`):void 0;return jpe(()=>zpe(async()=>{try{return await t(r)}catch(d){const p=d;switch(p.code){case k2.code:throw new k2(p);case P2.code:throw new P2(p);case R2.code:throw new R2(p,{method:r.method});case O2.code:throw new O2(p);case sg.code:throw new sg(p);case D2.code:throw new D2(p);case L2.code:throw new L2(p);case M2.code:throw new M2(p);case og.code:throw new og(p);case Zd.code:throw new Zd(p,{method:r.method});case ag.code:throw new ag(p);case $2.code:throw new $2(p);case hh.code:throw new hh(p);case U2.code:throw new U2(p);case B2.code:throw new B2(p);case F2.code:throw new F2(p);case j2.code:throw new j2(p);case z2.code:throw new z2(p);case W2.code:throw new W2(p);case H2.code:throw new H2(p);case q2.code:throw new q2(p);case V2.code:throw new V2(p);case K2.code:throw new K2(p);case G2.code:throw new G2(p);case Y2.code:throw new Y2(p);case 5e3:throw new hh(p);default:throw d instanceof xc?d:new $pe(p)}}},{delay:({count:d,error:p})=>{var h;if(p&&p instanceof Sm){const g=(h=p==null?void 0:p.headers)==null?void 0:h.get("Retry-After");if(g!=null&&g.match(/\d/))return Number.parseInt(g)*1e3}return~~(1<<d)*o},retryCount:a,shouldRetry:({error:d})=>Hpe(d)}),{enabled:i,id:u})}}function Hpe(t){return"code"in t&&typeof t.code=="number"?t.code===-1||t.code===ag.code||t.code===sg.code:t instanceof Sm&&t.status?t.status===403||t.status===408||t.status===4
205113||t.status===429||t.status===500||t.status===502||t.status===503||t.status===504:!0}function Zj({key:t,methods:e,name:r,request:n,retryCount:i=3,retryDelay:s=150,timeout:o,type:a},c){const l=Fpe();return{config:{key:t,methods:e,name:r,request:n,retryCount:i,retryDelay:s,timeout:o,type:a},request:Wpe(n,{methods:e,retryCount:i,retryDelay:s,uid:l}),value:c}}function Wk(t,e={}){const{key:r="fallback",name:n="Fallback",rank:i=!1,shouldThrow:s=qpe,retryCount:o,retryDelay:a}=e;return({chain:c,pollingInterval:l=4e3,timeout:u,...f})=>{let d=t,p=()=>{};const h=Zj({key:r,name:n,async request({method:g,params:y}){let x;const C=async(_=0)=>{const L=d[_]({...f,chain:c,retryCount:0,timeout:u});try{const P=await L.request({method:g,params:y});return p({method:g,params:y,response:P,transport:L,status:"success"}),P}catch(P){if(p({error:P,method:g,params:y,transport:L,status:"error"}),s(P)||_===d.length-1||(x??(x=d.slice(_+1).some(z=>{const{include:W,exclude:B}=z({chain:c}).config.methods||{};return W?W.includes(g):B?!B.includes(g):!0})),!x))throw P;return C(_+1)}};return C()},retryCount:o,retryDelay:a,type:"fallback"},{onResponse:g=>p=g,transports:d.map(g=>g({chain:c,retryCount:0}))});if(i){const g=typeof i=="object"?i:{};Vpe({chain:c,interval:g.interval??l,onTransports:y=>d=y,ping:g.ping,sampleCount:g.sampleCount,timeout:g.timeout,transports:d,weights:g.weights})}return h}}function qpe(t){return!!("code"in t&&typeof t.code=="number"&&(t.code===og.code||t.code===hh.code||pS.nodeMessage.test(t.message)||t.code===5e3))}function Vpe({chain:t,interval:e=4e3,onTransports:r,ping:n,sampleCount:i=10,timeout:s=1e3,transports:o,weights:a={}}){const{stability:c=.7,latency:l=.3}=a,u=[],f=async()=>{const d=await Promise.all(o.map(async g=>{const y=g({chain:t,retryCount:0,timeout:s}),x=Date.now();let C,_;try{await(n?n({transport:y}):y.request({method:"net_listening"})),_=1}catch{_=0}finally{C=Date.now()}return{latency:C-x,success:_}}));u.push(d),u.length>i&&u.shift();const p=Math.max(...u.map(g=>Math.max(...g.map(({latency:y})=>y)))),h=o.map((g,y)=>{const x=u.map(z=>z[y].latency),_=1-x.reduce((z,W)=>z+W,0)/x.length/p,L=u.map(z=>z[y].success),P=L.reduce((z,W)=>z+W,0)/L.length;return P===0?[0,y]:[l*_+c*P,y]}).sort((g,y)=>y[0]-g[0]);r(h.map(([,g])=>o[g])),await Yj(e),f()};f()}class Kpe extends xc{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}function Gpe(t,{errorInstance:e=new Error("timed out"),timeout:r,signal:n}){return new Promise((i,s)=>{(async()=>{let o;try{const a=new AbortController;r>0&&(o=setTimeout(()=>{n&&a.abort()},r)),i(await t({signal:(a==null?void 0:a.signal)||null}))}catch(a){(a==null?void 0:a.name)==="AbortError"&&s(e),s(a)}finally{clearTimeout(o)}})()})}function Ype(){return{current:0,take(){return this.current++},reset(){this.current=0}}}const Hk=Ype();function Zpe(t,e={}){return{async request(r){var f;const{body:n,onRequest:i=e.onRequest,onResponse:s=e.onResponse,timeout:o=e.timeout??1e4}=r,a={...e.fetchOptions??{},...r.fetchOptions??{}},{headers:c,method:l,signal:u}=a;try{const d=await Gpe(async({signal:h})=>{const g={...a,body:Array.isArray(n)?dh(n.map(_=>({jsonrpc:"2.0",id:_.id??Hk.take(),..._}))):dh({jsonrpc:"2.0",id:n.id??Hk.take(),...n}),headers:{"Content-Type":"application/json",...c},method:l||"POST",signal:u||(o>0?h:null)},y=new Request(t,g),x=await(i==null?void 0:i(y,g))??{...g,url:t};return await fetch(x.url??t,x)},{errorInstance:new zk({body:n,url:t}),timeout:o,signal:!0});s&&await s(d);let p;if((f=d.headers.get("Content-Type"))!=null&&f.startsWith("application/json"))p=await d.json();else{p=await d.text();try{p=JSON.parse(p||"{}")}catch(h){if(d.ok)throw h;p={error:p}}}if(!d.ok)throw new Sm({body:n,details:dh(p.error)||d.statusText,headers:d.headers,status:d.status,url:t});return p}catch(d){throw d instanceof Sm||d instanceof zk?d:new Sm({body:n,cause:d,url:t})}}}}function aw(t,e={}){const{batch:r,fetchOptions:n,key:i="http",methods:s,name:o="HTTP JSON-RPC",onFetchRequest:a,onFetchResponse:c,retryDelay:l,raw:u}=e;return({chain:f,retryCount:d,timeout:p})=>{const{batchSize:h=1e3,wait:g=0}=typeof r=="object"?r:{},y=e.retryCount??d,x=p??e.timeout??1e4,C=t||(f==null?void 0:f.rpcUrls.default.http[0]);if(!C)throw new Kpe;const _=Zpe(C,{fetchOptions:n,onRequest:a,onResponse:c,timeout:x});return Zj({key:i,methods:s,name:o,async request({method:L,params:P}){const z={method:L,params:P},{schedule:W}=Bpe({id:C,wait:g,shouldSplitBatch(D){return D.length>h},fn:D=>_.request({body:D}),sort:(D,O)=>D.id-O.id}),B=async D=>r?W(D):[await _.request({body:D})],[{error:I,result:j}]=await B(z);if(u)return{error:I,result:j};if(I)throw new Gj({body:z,error:I,url:C});return j},retryCount:y,retryDelay:l,timeout:x,type:"http"},{fetchOptions:n,url:C})}}function gS(t){return{formatters:void 0,fees:void 0,serializers:void 0,...t}}const CE={createBalance(t,e){const r={name:t.metadata.name||"",symbol
2051:t.metadata.symbol||"",decimals:t.metadata.decimals||0,value:t.metadata.value||0,price:t.metadata.price||0,iconUrl:t.metadata.iconUrl||""};return{name:r.name,symbol:r.symbol,chainId:e,address:t.address==="native"?void 0:this.convertAddressToCAIP10Address(t.address,e),value:r.value,price:r.price,quantity:{decimals:r.decimals.toString(),numeric:this.convertHexToBalance({hex:t.balance,decimals:r.decimals})},iconUrl:r.iconUrl}},convertHexToBalance({hex:t,decimals:e}){return Lpe(BigInt(t),e)},convertAddressToCAIP10Address(t,e){return`${e}:${t}`},createCAIP2ChainId(t,e){return`${e}:${parseInt(t,16)}`},getChainIdHexFromCAIP2ChainId(t){const e=t.split(":");if(e.length<2||!e[1])return"0x0";const r=e[1],n=parseInt(r,10);return isNaN(n)?"0x0":`0x${n.toString(16)}`},isWalletGetAssetsResponse(t){return typeof t!="object"||t===null?!1:Object.values(t).every(e=>Array.isArray(e)&&e.every(r=>this.isValidAsset(r)))},isValidAsset(t){return typeof t=="object"&&t!==null&&typeof t.address=="string"&&typeof t.balance=="string"&&(t.type==="ERC20"||t.type==="NATIVE")&&typeof t.metadata=="object"&&t.metadata!==null&&typeof t.metadata.name=="string"&&typeof t.metadata.symbol=="string"&&typeof t.metadata.decimals=="number"&&typeof t.metadata.price=="number"&&typeof t.metadata.iconUrl=="string"}},mS={async getMyTokensWithBalance(t){const e=ct.state.address,r=X.state.activeCaipNetwork,n=Fe.getConnectorId("eip155")===fe.CONNECTOR_ID.AUTH;if(!e||!r)return[];const i=`${r.caipNetworkId}:${e}`,s=Oe.getBalanceCacheForCaipAddress(i);if(s)return s.balances;if(r.chainNamespace===fe.CHAIN.EVM&&n){const a=await this.getEIP155Balances(e,r);if(a)return this.filterLowQualityTokens(a)}const o=await Tt.getBalance(e,r.caipNetworkId,t);return this.filterLowQualityTokens(o.balances)},async getEIP155Balances(t,e){var r,n;try{const i=CE.getChainIdHexFromCAIP2ChainId(e.caipNetworkId),s=await We.getCapabilities(t);if(!((n=(r=s==null?void 0:s[i])==null?void 0:r.assetDiscovery)!=null&&n.supported))return null;const o=await We.walletGetAssets({account:t,chainFilter:[i]});if(!CE.isWalletGetAssetsResponse(o))return null;const c=(o[i]||[]).map(l=>CE.createBalance(l,e.caipNetworkId));return Oe.updateBalanceCache({caipAddress:`${e.caipNetworkId}:${t}`,balance:{balances:c},timestamp:Date.now()}),c}catch{return null}},filterLowQualityTokens(t){return t.filter(e=>e.quantity.decimals!=="0")}},Nc=_n({currentTab:0,tokenBalance:[],smartAccountDeployed:!1,addressLabels:new Map}),Jpe={state:Nc,replaceState(t){t&&Object.assign(Nc,Ph(t))},subscribe(t){return X.subscribeChainProp("accountState",e=>{if(e)return t(e)})},subscribeKey(t,e,r){let n;return X.subscribeChainProp("accountState",i=>{if(i){const s=i[t];n!==s&&(n=s,e(s))}},r)},setStatus(t,e){X.setAccountProp("status",t,e)},getCaipAddress(t){return X.getAccountProp("caipAddress",t)},setCaipAddress(t,e){const r=t?it.getPlainAddress(t):void 0;e===X.state.activeChain&&(X.state.activeCaipAddress=t),X.setAccountProp("caipAddress",t,e),X.setAccountProp("address",r,e)},setBalance(t,e,r){X.setAccountProp("balance",t,r),X.setAccountProp("balanceSymbol",e,r)},setProfileName(t,e){X.setAccountProp("profileName",t,e)},setProfileImage(t,e){X.setAccountProp("profileImage",t,e)},setUser(t,e){X.setAccountProp("user",t,e)},setAddressExplorerUrl(t,e){X.setAccountProp("addressExplorerUrl",t,e)},setSmartAccountDeployed(t,e){X.setAccountProp("smartAccountDeployed",t,e)},setCurrentTab(t){X.setAccountProp("currentTab",t,X.state.activeChain)},setTokenBalance(t,e){t&&X.setAccountProp("tokenBalance",t,e)},setShouldUpdateToAddress(t,e){X.setAccountProp("shouldUpdateToAddress",t,e)},addAddressLabel(t,e,r){const n=X.getAccountProp("addressLabels",r)||new Map;n.set(t,e),X.setAccountProp("addressLabels",n,r)},removeAddressLabel(t,e){const r=X.getAccountProp("addressLabels",e)||new Map;r.delete(t),X.setAccountProp("addressLabels",r,e)},setConnectedWalletInfo(t,e){X.setAccountProp("connectedWalletInfo",t,e,!1)},setPreferredAccountType(t,e){X.setAccountProp("preferredAccountType",t,e)},setSocialProvider(t,e){t&&X.setAccountProp("socialProvider",t,e)},setSocialWindow(t,e){X.setAccountProp("socialWindow",t?Ph(t):void 0,e)},setFarcasterUrl(t,e){X.setAccountProp("farcasterUrl",t,e)},async fetchTokenBalance(t){var s,o;Nc.balanceLoading=!0;const e=(s=X.state.activeCaipNetwork)==null?void 0:s.caipNetworkId,r=(o=X.state.activeCaipNetwork)==null?void 0:o.chainNamespace,n=X.state.activeCaipAddress,i=n?it.getPlainAddress(n):void 0;if(Nc.lastRetry&&!it.isAllowedRetry(Nc.lastRetry,30*Zr.ONE_SEC_MS))return Nc.balanceLoading=!1,[];try{if(i&&e&&r){const a=await mS.getMyTokensWithBalance();return ct.setTokenBalance(a,r),Nc.lastRetry=void 0,Nc.balanceLoading=!1,a}}catch(a){Nc.lastRetry=Date.now(),t==null||t(a),Jc.showError("Token Balance Unavailable")}finally{Nc.balanceLoading=!1}return[]},resetAccount(t){X.resetAccount(t)}},ct=ea(Jpe),Qpe={onSwitchNetwork({network:t,ignoreSwitchConfirmation:e=!1}){const r=X.state.activeCaipNetwork,n=Lt.state.data;if(t.id===(r==null?void 0:r.id))return;const s=ct.getCaipAddress(X.state.activeChain),o=t.chainNamespace!==X.state.activeChain,a=ct.getCaipAddress(t.chainNamespace),l=Fe.getConnectorId(X.state.activeChain)===fe.CONNECTOR_ID.AUTH,u=fe.AUTH_CONNECTOR_SUPPORTED_CHAINS.find(f=>f===t.chainNamespace);e||l&&u?Lt.push("SwitchNetwork",{...n,network:t}):s&&o&&!a?Lt.push("SwitchActiveChain",{switchToChain:t.chainNamespace,navigateTo:"Connect",navigateWithReplace:!0,network:t}):Lt.push("SwitchNetwork",{...n,network:t})}},eo=_n({loading:!1,loadingNamespaceMap:new Map,open:!1,shake:!1,namespace:void 0}),Xpe={state:eo,subscribe(t){return Wi(eo,()=>t(eo))},subscribeKey(t,e){return Ds(eo,t,e)},async open(t){var s,o;const e=t==null?void 0:t.namespace,r=X.state.activeChain,n=e&&e!==r,i=(s=X.getAccountData(t==null?void 0:t.namespace))==null?void 0:s.caipAddress;if(We.state.wcBasic?At.prefetch({fetchNetworkImages:!1,fetchConnectorImages:!1}):await At.prefetch(),Fe.setFilterByNamespace(t==null?void 0:t.namespace),Wr.setLoading(!0,e),e&&n){const a=((o=X.getNetworkData(e))==null?void 0:o.caipNetwork)||X.getRequestedCaipNetworks(e)[0];a&&Qpe.onSwitchNetwork({network:a,ignoreSwitchConfirmation:!0})}else{const a=X.state.noAdapters;Ee.state.manualWCControl||a&&!i?it.isMobile()?Lt.reset("AllWallets"):Lt.reset("ConnectingWalletConnectBasic"):t!=null&&t.view?Lt.reset(t.view,t.data):i?Lt.reset("Account"):Lt.reset("Connect")}eo.open=!0,sl.set({open:!0}),on.sendEvent({type:"track",event:"MODAL_OPEN",properties:{connected:!!i}})},close(){const t=Ee.state.enableEmbedded,e=!!X.state.activeCaipAddress;eo.open&&on.sendEvent({type:"track",event:"MODAL_CLOSE",properties:{connected:e}}),eo.open=!1,Lt.reset("Connect"),Wr.clearLoading(),t?e?Lt.replace("Account"):Lt.push("Connect"):sl.set({open:!1}),We.resetUri()}
2051,setLoading(t,e){e&&eo.loadingNamespaceMap.set(e,t),eo.loading=t,sl.set({loading:t})},clearLoading(){eo.loadingNamespaceMap.clear(),eo.loading=!1},shake(){eo.shake||(eo.shake=!0,setTimeout(()=>{eo.shake=!1},500))}},Wr=ea(Xpe),Nm={id:"2b92315d-eab7-5bef-84fa-089a131333f5",name:"USD Coin",symbol:"USDC",networks:[{name:"ethereum-mainnet",display_name:"Ethereum",chain_id:"1",contract_address:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{name:"polygon-mainnet",display_name:"Polygon",chain_id:"137",contract_address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"}]},KC={id:"USD",payment_method_limits:[{id:"card",min:"10.00",max:"7500.00"},{id:"ach_bank_account",min:"10.00",max:"25000.00"}]},ege={providers:$j,selectedProvider:null,error:null,purchaseCurrency:Nm,paymentCurrency:KC,purchaseCurrencies:[Nm],paymentCurrencies:[],quotesLoading:!1},Or=_n(ege),tge={state:Or,subscribe(t){return Wi(Or,()=>t(Or))},subscribeKey(t,e){return Ds(Or,t,e)},setSelectedProvider(t){if(t&&t.name==="meld"){const e=X.state.activeChain,r=e===fe.CHAIN.SOLANA?"SOL":"USDC",n=X.getAccountProp("address",e)??"",i=new URL(t.url);i.searchParams.append("publicKey",G0e),i.searchParams.append("destinationCurrencyCode",r),i.searchParams.append("walletAddress",n),i.searchParams.append("externalCustomerId",Ee.state.projectId),Or.selectedProvider={...t,url:i.toString()}}else Or.selectedProvider=t},setOnrampProviders(t){if(Array.isArray(t)&&t.every(e=>typeof e=="string")){const e=t,r=$j.filter(n=>e.includes(n.name));Or.providers=r}else Or.providers=[]},setPurchaseCurrency(t){Or.purchaseCurrency=t},setPaymentCurrency(t){Or.paymentCurrency=t},setPurchaseAmount(t){GC.state.purchaseAmount=t},setPaymentAmount(t){GC.state.paymentAmount=t},async getAvailableCurrencies(){const t=await Tt.getOnrampOptions();Or.purchaseCurrencies=t.purchaseCurrencies,Or.paymentCurrencies=t.paymentCurrencies,Or.paymentCurrency=t.paymentCurrencies[0]||KC,Or.purchaseCurrency=t.purchaseCurrencies[0]||Nm,await At.fetchCurrencyImages(t.paymentCurrencies.map(e=>e.id)),await At.fetchTokenImages(t.purchaseCurrencies.map(e=>e.symbol))},async getQuote(){var t,e;Or.quotesLoading=!0;try{const r=await Tt.getOnrampQuote({purchaseCurrency:Or.purchaseCurrency,paymentCurrency:Or.paymentCurrency,amount:((t=Or.paymentAmount)==null?void 0:t.toString())||"0",network:(e=Or.purchaseCurrency)==null?void 0:e.symbol});return Or.quotesLoading=!1,Or.purchaseAmount=Number(r==null?void 0:r.purchaseAmount.amount),r}catch(r){return Or.error=r.message,Or.quotesLoading=!1,null}finally{Or.quotesLoading=!1}},resetState(){Or.selectedProvider=null,Or.error=null,Or.purchaseCurrency=Nm,Or.paymentCurrency=KC,Or.purchaseCurrencies=[Nm],Or.paymentCurrencies=[],Or.paymentAmount=void 0,Or.purchaseAmount=void 0,Or.quotesLoading=!1}},GC=ea(tge),qk=2147483648,rge={convertEVMChainIdToCoinType(t){if(t>=qk)throw new Error("Invalid chainId");return(qk|t)>>>0}},ia=_n({suggestions:[],loading:!1}),nge={state:ia,subscribe(t){return Wi(ia,()=>t(ia))},subscribeKey(t,e){return Ds(ia,t,e)},async resolveName(t){var e,r;try{return await Tt.lookupEnsName(t)}catch(n){const i=n;throw new Error(((r=(e=i==null?void 0:i.reasons)==null?void 0:e[0])==null?void 0:r.description)||"Error resolving name")}},async isNameRegistered(t){try{return await Tt.lookupEnsName(t),!0}catch{return!1}},async getSuggestions(t){try{ia.loading=!0,ia.suggestions=[];const e=await Tt.getEnsNameSuggestions(t);return ia.suggestions=e.suggestions.map(r=>({...r,name:r.name}))||[],ia.suggestions}catch(e){const r=Im.parseEnsApiError(e,"Error fetching name suggestions");throw new Error(r)}finally{ia.loading=!1}},async getNamesForAddress(t){try{if(!X.state.activeCaipNetwork)return[];const r=Oe.getEnsFromCacheForAddress(t);if(r)return r;const n=await Tt.reverseLookupEnsName({address:t});return Oe.updateEnsCache({address:t,ens:n,timestamp:Date.now()}),n}catch(e){const r=Im.parseEnsApiError(e,"Error fetching names for address");throw new Error(r)}},async registerName(t){const e=X.state.activeCaipNetwork,r=ct.state.address,n=Fe.getAuthConnector();if(!e)throw new Error("Network not found");if(!r||!n)throw new Error("Address or auth connector not found");ia.loading=!0;try{const i=JSON.stringify({name:t,attributes:{},timestamp:Math.floor(Date.now()/1e3)});Lt.pushTransactionStack({onCancel(){Lt.replace("RegisterAccountName")}});const s=await We.signMessage(i);ia.loading=!1;const o=e.id;if(!o)throw new Error("Network not found");const a=rge.convertEVMChainIdToCoinType(Number(o));await Tt.registerEnsName({coinType:a,address:r,signature:s,message:i}),ct.setProfileName(t,e.chainNamespace),Lt.replace("RegisterAccountNameSuccess")}catch(i){const s=Im.parseEnsApiError(i,`Error registering name ${t}`);throw Lt.replace("RegisterAccountName"),new Error(s)}finally{ia.loading=!1}},validateName(t){return/^[a-zA-Z0-9-]{4,}$/u.test(t)},parseEnsApiError(t,e){var n,i;const r=t;return((i=(n=r==null?void 0:r.reasons)==null?void 0:n[0])==null?void 0:i.description)||e}}
vendor: 7,052 bytes, lines 2051-2064
2051,Im=ea(nge);var yS={exports:{}},Rp=typeof Reflect=="object"?Reflect:null,Vk=Rp&&typeof Rp.apply=="function"?Rp.apply:function(e,r,n){return Function.prototype.apply.call(e,r,n)},pv;Rp&&typeof Rp.ownKeys=="function"?pv=Rp.ownKeys:Object.getOwnPropertySymbols?pv=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:pv=function(e){return Object.getOwnPropertyNames(e)};function ige(t){console&&console.warn&&console.warn(t)}var Jj=Number.isNaN||function(e){return e!==e};function hn(){hn.init.call(this)}yS.exports=hn;yS.exports.once=cge;hn.EventEmitter=hn;hn.prototype._events=void 0;hn.prototype._eventsCount=0;hn.prototype._maxListeners=void 0;var Kk=10;function vx(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(hn,"defaultMaxListeners",{enumerable:!0,get:function(){return Kk},set:function(t){if(typeof t!="number"||t<0||Jj(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");Kk=t}});hn.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};hn.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||Jj(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function Qj(t){return t._maxListeners===void 0?hn.defaultMaxListeners:t._maxListeners}hn.prototype.getMaxListeners=function(){return Qj(this)};hn.prototype.emit=function(e){for(var r=[],n=1;n<arguments.length;n++)r.push(arguments[n]);var i=e==="error",s=this._events;if(s!==void 0)i=i&&s.error===void 0;else if(!i)return!1;if(i){var o;if(r.length>0&&(o=r[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var c=s[e];if(c===void 0)return!1;if(typeof c=="function")Vk(c,this,r);else for(var l=c.length,u=nz(c,l),n=0;n<l;++n)Vk(u[n],this,r);return!0};function Xj(t,e,r,n){var i,s,o;if(vx(r),s=t._events,s===void 0?(s=t._events=Object.create(null),t._eventsCount=0):(s.newListener!==void 0&&(t.emit("newListener",e,r.listener?r.listener:r),s=t._events),o=s[e]),o===void 0)o=s[e]=r,++t._eventsCount;else if(typeof o=="function"?o=s[e]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),i=Qj(t),i>0&&o.length>i&&!o.warned){o.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=t,a.type=e,a.count=o.length,ige(a)}return t}hn.prototype.addListener=function(e,r){return Xj(this,e,r,!1)};hn.prototype.on=hn.prototype.addListener;hn.prototype.prependListener=function(e,r){return Xj(this,e,r,!0)};function sge(){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 ez(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=sge.bind(n);return i.listener=r,n.wrapFn=i,i}hn.prototype.once=function(e,r){return vx(r),this.on(e,ez(this,e,r)),this};hn.prototype.prependOnceListener=function(e,r){return vx(r),this.prependListener(e,ez(this,e,r)),this};hn.prototype.removeListener=function(e,r){var n,i,s,o,a;if(vx(r),i=this._events,i===void 0)return this;if(n=i[e],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||r));else if(typeof n!="function"){for(s=-1,o=n.length-1;o>=0;o--)if(n[o]===r||n[o].listener===r){a=n[o].listener,s=o;break}if(s<0)return this;s===0?n.shift():oge(n,s),n.length===1&&(i[e]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",e,a||r)}return this};hn.prototype.off=hn.prototype.removeListener;hn.prototype.removeAllListeners=function(e){var r,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var s=Object.keys(n),o;for(i=0;i<s.length;++i)o=s[i],o!=="removeListener"&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=n[e],typeof r=="function")this.removeListener(e,r);else if(r!==void 0)for(i=r.length-1;i>=0;i--)this.removeListener(e,r[i]);return this};function tz(t,e,r){var n=t._events;if(n===void 0)return[];var i=n[e];return i===void 0?[]:typeof i=="function"?r?[i.listener||i]:[i]:r?age(i):nz(i,i.length)}hn.prototype.listeners=function(e){return tz(this,e,!0)};hn.prototype.rawListeners=function(e){return tz(this,e,!1)};hn.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):rz.call(t,e)};hn.prototype.listenerCount=rz;function rz(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}hn.prototype.eventNames=function(){return this._eventsCount>0?pv(this._events):[]};function nz(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function oge(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}function age(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}function cge(t,e){return new Promise(function(r,n){function i(o){t.removeListener(e,s),n(o)}function s(){typeof t.removeListener=="function"&&t.removeListener("error",i),r([].slice.call(arguments))}iz(t,e,s,{once:!0}),e!=="error"&&lge(t,i,{once:!0})})}function lge(t,e,r){typeof t.on=="function"&&iz(t,"error",e,r)}function iz(t,e,r,n){if(typeof t.on=="function")n.once?t.once(e,r):t.on(e,r);else if(typeof t.addEventListener=="function")t.addEventListener(e,function i(s){n.once&&t.removeEventListener(e,i),r(s)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}var ka=yS.exports;const bS=is(ka);var Ue={};/*! ***************************************************************************** 2052Copyright (c) Microsoft Corporation. 2053 2054Permission to use, copy, modify, and/or distribute this software for any 2055purpose with or without fee is hereby granted. 2056 2057THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 2058REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 2059AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 2060INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 2061LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 2062OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 2063PERFORMANCE OF THIS SOFTWARE. 2064***************************************************************************** */var YC=function(t,e){return YC=Object.
vendor: 4,864 bytes, line 2064
2064setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},YC(t,e)};function uge(t,e){YC(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var ZC=function(){return ZC=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},ZC.apply(this,arguments)};function fge(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function dge(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s}function hge(t,e){return function(r,n){e(r,n,t)}}function pge(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function gge(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})}function mge(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(u){return c([l,u])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;switch(i=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){r.label=l[1];break}if(l[0]===6&&r.label<s[1]){r.label=s[1],s=l;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(l);break}s[2]&&r.ops.pop(),r.trys.pop();continue}l=e.call(t,r)}catch(u){l=[6,u],i=0}finally{n=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function yge(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}function bge(t,e){for(var r in t)r!=="default"&&!e.hasOwnProperty(r)&&(e[r]=t[r])}function JC(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function sz(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s}function wge(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(sz(arguments[e]));return t}function vge(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var n=Array(t),i=0,e=0;e<r;e++)for(var s=arguments[e],o=0,a=s.length;o<a;o++,i++)n[i]=s[o];return n}function Z2(t){return this instanceof Z2?(this.v=t,this):new Z2(t)}function xge(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),i,s=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(d){n[d]&&(i[d]=function(p){return new Promise(function(h,g){s.push([d,p,h,g])>1||a(d,p)})})}function a(d,p){try{c(n[d](p))}catch(h){f(s[0][3],h)}}function c(d){d.value instanceof Z2?Promise.resolve(d.value.v).then(l,u):f(s[0][2],d)}function l(d){a("next",d)}function u(d){a("throw",d)}function f(d,p){d(p),s.shift(),s.length&&a(s[0][0],s[0][1])}}function Ege(t){var e,r;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,s){e[i]=t[i]?function(o){return(r=!r)?{value:Z2(t[i](o)),done:i==="return"}:s?s(o):o}:s}}function Cge(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof JC=="function"?JC(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);
2064function n(s){r[s]=t[s]&&function(o){return new Promise(function(a,c){o=t[s](o),i(a,c,o.done,o.value)})}}function i(s,o,a,c){Promise.resolve(c).then(function(l){s({value:l,done:a})},o)}}function _ge(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function Age(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function Sge(t){return t&&t.__esModule?t:{default:t}}function Nge(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function Ige(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}const Tge=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return ZC},__asyncDelegator:Ege,__asyncGenerator:xge,__asyncValues:Cge,__await:Z2,__awaiter:gge,__classPrivateFieldGet:Nge,__classPrivateFieldSet:Ige,__createBinding:yge,__decorate:dge,__exportStar:bge,__extends:uge,__generator:mge,__importDefault:Sge,__importStar:Age,__makeTemplateOb
vendor: 9,352 bytes, line 2064
2064ject:_ge,__metadata:pge,__param:hge,__read:sz,__rest:fge,__spread:wge,__spreadArrays:vge,__values:JC},Symbol.toStringTag,{value:"Module"})),ib=Vn(Tge);var _E={},d1={},Gk;function kge(){if(Gk)return d1;Gk=1,Object.defineProperty(d1,"__esModule",{value:!0}),d1.delay=void 0;function t(e){return new Promise(r=>{setTimeout(()=>{r(!0)},e)})}return d1.delay=t,d1}var Ad={},AE={},Sd={},Yk;function Pge(){return Yk||(Yk=1,Object.defineProperty(Sd,"__esModule",{value:!0}),Sd.ONE_THOUSAND=Sd.ONE_HUNDRED=void 0,Sd.ONE_HUNDRED=100,Sd.ONE_THOUSAND=1e3),Sd}var SE={},Zk;function Rge(){return Zk||(Zk=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_YEAR=t.FOUR_WEEKS=t.THREE_WEEKS=t.TWO_WEEKS=t.ONE_WEEK=t.THIRTY_DAYS=t.SEVEN_DAYS=t.FIVE_DAYS=t.THREE_DAYS=t.ONE_DAY=t.TWENTY_FOUR_HOURS=t.TWELVE_HOURS=t.SIX_HOURS=t.THREE_HOURS=t.ONE_HOUR=t.SIXTY_MINUTES=t.THIRTY_MINUTES=t.TEN_MINUTES=t.FIVE_MINUTES=t.ONE_MINUTE=t.SIXTY_SECONDS=t.THIRTY_SECONDS=t.TEN_SECONDS=t.FIVE_SECONDS=t.ONE_SECOND=void 0,t.ONE_SECOND=1,t.FIVE_SECONDS=5,t.TEN_SECONDS=10,t.THIRTY_SECONDS=30,t.SIXTY_SECONDS=60,t.ONE_MINUTE=t.SIXTY_SECONDS,t.FIVE_MINUTES=t.ONE_MINUTE*5,t.TEN_MINUTES=t.ONE_MINUTE*10,t.THIRTY_MINUTES=t.ONE_MINUTE*30,t.SIXTY_MINUTES=t.ONE_MINUTE*60,t.ONE_HOUR=t.SIXTY_MINUTES,t.THREE_HOURS=t.ONE_HOUR*3,t.SIX_HOURS=t.ONE_HOUR*6,t.TWELVE_HOURS=t.ONE_HOUR*12,t.TWENTY_FOUR_HOURS=t.ONE_HOUR*24,t.ONE_DAY=t.TWENTY_FOUR_HOURS,t.THREE_DAYS=t.ONE_DAY*3,t.FIVE_DAYS=t.ONE_DAY*5,t.SEVEN_DAYS=t.ONE_DAY*7,t.THIRTY_DAYS=t.ONE_DAY*30,t.ONE_WEEK=t.SEVEN_DAYS,t.TWO_WEEKS=t.ONE_WEEK*2,t.THREE_WEEKS=t.ONE_WEEK*3,t.FOUR_WEEKS=t.ONE_WEEK*4,t.ONE_YEAR=t.ONE_DAY*365}(SE)),SE}var Jk;function oz(){return Jk||(Jk=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=ib;e.__exportStar(Pge(),t),e.__exportStar(Rge(),t)}(AE)),AE}var Qk;function Oge(){if(Qk)return Ad;Qk=1,Object.defineProperty(Ad,"__esModule",{value:!0}),Ad.fromMiliseconds=Ad.toMiliseconds=void 0;const t=oz();function e(n){return n*t.ONE_THOUSAND}Ad.toMiliseconds=e;function r(n){return Math.floor(n/t.ONE_THOUSAND)}return Ad.fromMiliseconds=r,Ad}var Xk;function Dge(){return Xk||(Xk=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=ib;e.__exportStar(kge(),t),e.__exportStar(Oge(),t)}(_E)),_E}var m0={},eP;function Lge(){if(eP)return m0;eP=1,Object.defineProperty(m0,"__esModule",{value:!0}),m0.Watch=void 0;class t{constructor(){this.timestamps=new Map}start(r){if(this.timestamps.has(r))throw new Error(`Watch already started for label: ${r}`);this.timestamps.set(r,{started:Date.now()})}stop(r){const n=this.get(r);if(typeof n.elapsed<"u")throw new Error(`Watch already stopped for label: ${r}`);const i=Date.now()-n.started;this.timestamps.set(r,{started:n.started,elapsed:i})}get(r){const n=this.timestamps.get(r);if(typeof n>"u")throw new Error(`No timestamp found for label: ${r}`);return n}elapsed(r){const n=this.get(r);return n.elapsed||Date.now()-n.started}}return m0.Watch=t,m0.default=t,m0}var NE={},h1={},tP;function Mge(){if(tP)return h1;tP=1,Object.defineProperty(h1,"__esModule",{value:!0}),h1.IWatch=void 0;class t{}return h1.IWatch=t,h1}var rP;function $ge(){return rP||(rP=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),ib.__exportStar(Mge(),t)}(NE)),NE}(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=ib;e.__exportStar(Dge(),t),e.__exportStar(Lge(),t),e.__exportStar($ge(),t),e.__exportStar(oz(),t)})(Ue);class r0{}let Uge=class extends r0{constructor(e){super()}};const nP=Ue.FIVE_SECONDS,n0={pulse:"heartbeat_pulse"};let Bge=class az extends Uge{constructor(e){super(e),this.events=new ka.EventEmitter,this.interval=nP,this.interval=(e==null?void 0:e.interval)||nP}static async init(e){const r=new az(e);return await r.init(),r}async init(){await this.initialize()}stop(){clearInterval(this.intervalRef)}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}async initialize(){this.intervalRef=setInterval(()=>this.pulse(),Ue.toMiliseconds(this.interval))}pulse(){this.events.emit(n0.pulse)}};const Fge=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,jge=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,zge=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function Wge(t,e){if(t==="__proto__"||t==="constructor"&&e&&typeof e=="object"&&"prototype"in e){Hge(t);return}return e}function Hge(t){console.warn(`[destr] Dropping "${t}" key to prevent prototype pollution.`)}function cw(t,e={}){if(typeof t!="string")return t;if(t[0]==='"'&&t[t.length-1]==='"'&&t.indexOf("\\")===-1)return t.slice(1,-1);const r=t.trim();if(r.length<=9)switch(r.toLowerCase()){case"true":return!0;case"false":return!1;case"undefined":return;case"null":return null;case"nan":return Number.NaN;case"infinity":return Number.POSITIVE_INFINITY;case"-infinity":return Number.NEGATIVE_INFINITY}if(!zge.test(t)){if(e.strict)throw new SyntaxError("[destr] Invalid JSON");return t}try{if(Fge.test(t)||jge.test(t)){if(e.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(t,Wge)}return JSON.parse(t)}catch(n){if(e.strict)throw n;return t}}function qge(t){return!t||typeof t.then!="function"?Promise.resolve(t):t}function Di(t,...e){try{return qge(t(...e))}catch(r){return Promise.reject(r)}}function Vge(t){const e=typeof t;return t===null||e!=="object"&&e!=="function"}function Kge(t){const e=Object.getPrototypeOf(t);return!e||e.isPrototypeOf(Object)}function gv(t){if(Vge(t))return String(t);if(Kge(t)||Array.isArray(t))return JSON.stringify(t);if(typeof t.toJSON=="function")return gv(t.toJSON());throw new Error("[unstorage] Cannot stringify value!")}const QC="base64:";function Gge(t){return typeof t=="string"?t:QC+Jge(t)}function Yge(t){return typeof t!="string"||!t.startsWith(QC)?t:Zge(t.slice(QC.length))}function Zge(t){return globalThis.Buffer?Buffer.from(t,"base64"):Uint8Array.from(globalThis.atob(t),e=>e.codePointAt(0))}function Jge(t){return globalThis.Buffer?Buffer.from(t).toString("base64"):globalThis.btoa(String.fromCodePoint(...t))}function oo(t){var e;return t&&((e=t.split("?")[0])==null?void 0:e.replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""))||""}function Qge(...t){return oo(t.join(":"))}function lw(t){return t=oo(t),t?t+":":""}function Xge(t,e){if(e===void 0)return!0;let r=0,n=t.indexOf(":");for(;n>-1;)r++,n=t.indexOf(":",n+1);return r<=e}function e1e(t,e){return e?t.startsWith(e)&&t[t.length-1]!=="$":t[t.length-1]!=="$"}const t1e="memory",r1e=()=>{const t=new Map;return{name:t1e,getInstance:()=>t,hasItem(e){return t.has(e)},getItem(e){return t.get(e)??null},getItemRaw(e){return t.get(e)??null},setItem(e,r){t.set(e,r)},setItemRaw(e,r){t.set(e,r)},removeItem(e){t.delete(e)},getKeys(){return[...t.keys()]},clear(){t.clear()},dispose(){t.clear()}}};function n1e(t={}){const e={mounts:{"":t.driver||r1e()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},r=l=>{for(const u of e.mountpoints)if(l.startsWith(u))return{base:u,relativeKey:l.slice(u.length),driver:e.mounts[u]};return{base:"",relativeKey:l,driver:e.mounts[""]}},n=(l,u)=>e.mountpoints.filter(f=>f.startsWith(l)||u&&l.startsWith(f)).map(f=>({relativeBase:l.length>f.length?l.slice(f.length):void 0,mountpoint:f,driver:e.mounts[f]})),i=(l,u)=>{if(e.watching){u=oo(u);for(const f of e.watchListeners)f(l,u)}},s=async()=>{if(!e.watching){e.watching=!0;for(const l in e.mounts)e.unwatch[l]=await iP(e.mounts[l],i,l)}},o=async()=>{if(e.watching){for(const l in e.unwatch)await e.unwatch[l]();e.unwatch={},e.watching=!1}},a=(l,u,f)=>{const d=new Map,p=h=>{let g=d.get(h.base);return g||(g={driver:h.driver,base:h.base,items:[]},d.set(h.base,g)),g};for(const h of l){const g=typeof h=="string",y=oo(g?h:h.key),x=g?void 0:h.value,C=g||!h.options?u:{...u,...h.options},_=r(y);p(_).items.push({key:y,value:x,relativeKey:_.relativeKey,options:C})}return Promise.all([...d.values()].map(h=>f(h))).then(h=>h.flat())},c={hasItem(l,u={}){l=oo(l);const{relativeKey:f,driver:d}=r(l);return Di(d.hasItem,f,u)},getItem(l,u={}){l=oo(l);const{relativeKey:f,driver:d}=r(l);return Di(d.getItem,f,u).then(p=>cw(p))},getItems(l,u={}){return a(l,u,f=>f.driver.getItems?Di(f.driver.getItems,f.items.map(d=>({key:d.relativeKey,options:d.options})),u).then(d=>d.map(p=>({key:Qge(f.base,p.key),value:cw(p.value)}))):Promise.all(f.items.map(d=>Di(f.driver.getItem,d.relativeKey,d.options).then(p=>({key:d.key,value:cw(p)})))))},getItemRaw(l,u={}){l=oo(l);const{relativeKey:f,driver:d}=r(l);return d.getItemRaw?Di(d.getItemRaw,f,u):Di(d.getItem,f,u).then(p=>Yge(p))},async setItem(l,u,f={}){if(u===void 0)return c.removeItem(l);l=oo(l);const{relativeKey:d,driver:p}=r(l);p.setItem&&(await Di(p.setItem,d,gv(u),f),p.watch||i("update",l))},async setItems(l,u){await a(l,u,async f=>{if(f.driver.setItems)return Di(f.driver.setItems,f.items.map(d=>({key:d.relativeKey,value:gv(d.value),options:d.options})),u);f.driver.setItem&&await Promise.all(f.items.map(d=>Di(f.driver.setItem,d.relativeKey,gv(d.value),d.options)))})},async setItemRaw(l,u,f={}){if(u===void 0)return c.removeItem(l,f);l=oo(l);const{relativeKey:d,driver:p}=r(l);
vendor: 8,560 bytes, line 2064
2064if(p.setItemRaw)await Di(p.setItemRaw,d,u,f);else if(p.setItem)await Di(p.setItem,d,Gge(u),f);else return;p.watch||i("update",l)},async removeItem(l,u={}){typeof u=="boolean"&&(u={removeMeta:u}),l=oo(l);const{relativeKey:f,driver:d}=r(l);d.removeItem&&(await Di(d.removeItem,f,u),(u.removeMeta||u.removeMata)&&await Di(d.removeItem,f+"$",u),d.watch||i("remove",l))},async getMeta(l,u={}){typeof u=="boolean"&&(u={nativeOnly:u}),l=oo(l);const{relativeKey:f,driver:d}=r(l),p=Object.create(null);if(d.getMeta&&Object.assign(p,await Di(d.getMeta,f,u)),!u.nativeOnly){const h=await Di(d.getItem,f+"$",u).then(g=>cw(g));h&&typeof h=="object"&&(typeof h.atime=="string"&&(h.atime=new Date(h.atime)),typeof h.mtime=="string"&&(h.mtime=new Date(h.mtime)),Object.assign(p,h))}return p},setMeta(l,u,f={}){return this.setItem(l+"$",u,f)},removeMeta(l,u={}){return this.removeItem(l+"$",u)},async getKeys(l,u={}){var y;l=lw(l);const f=n(l,!0);let d=[];const p=[];let h=!0;for(const x of f){(y=x.driver.flags)!=null&&y.maxDepth||(h=!1);const C=await Di(x.driver.getKeys,x.relativeBase,u);for(const _ of C){const L=x.mountpoint+oo(_);d.some(P=>L.startsWith(P))||p.push(L)}d=[x.mountpoint,...d.filter(_=>!_.startsWith(x.mountpoint))]}const g=u.maxDepth!==void 0&&!h;return p.filter(x=>(!g||Xge(x,u.maxDepth))&&e1e(x,l))},async clear(l,u={}){l=lw(l),await Promise.all(n(l,!1).map(async f=>{if(f.driver.clear)return Di(f.driver.clear,f.relativeBase,u);if(f.driver.removeItem){const d=await f.driver.getKeys(f.relativeBase||"",u);return Promise.all(d.map(p=>f.driver.removeItem(p,u)))}}))},async dispose(){await Promise.all(Object.values(e.mounts).map(l=>sP(l)))},async watch(l){return await s(),e.watchListeners.push(l),async()=>{e.watchListeners=e.watchListeners.filter(u=>u!==l),e.watchListeners.length===0&&await o()}},async unwatch(){e.watchListeners=[],await o()},mount(l,u){if(l=lw(l),l&&e.mounts[l])throw new Error(`already mounted at ${l}`);return l&&(e.mountpoints.push(l),e.mountpoints.sort((f,d)=>d.length-f.length)),e.mounts[l]=u,e.watching&&Promise.resolve(iP(u,i,l)).then(f=>{e.unwatch[l]=f}).catch(console.error),c},async unmount(l,u=!0){var f,d;l=lw(l),!(!l||!e.mounts[l])&&(e.watching&&l in e.unwatch&&((d=(f=e.unwatch)[l])==null||d.call(f),delete e.unwatch[l]),u&&await sP(e.mounts[l]),e.mountpoints=e.mountpoints.filter(p=>p!==l),delete e.mounts[l])},getMount(l=""){l=oo(l)+":";const u=r(l);return{driver:u.driver,base:u.base}},getMounts(l="",u={}){return l=oo(l),n(l,u.parents).map(d=>({driver:d.driver,base:d.mountpoint}))},keys:(l,u={})=>c.getKeys(l,u),get:(l,u={})=>c.getItem(l,u),set:(l,u,f={})=>c.setItem(l,u,f),has:(l,u={})=>c.hasItem(l,u),del:(l,u={})=>c.removeItem(l,u),remove:(l,u={})=>c.removeItem(l,u)};return c}function iP(t,e,r){return t.watch?t.watch((n,i)=>e(n,r+i)):()=>{}}async function sP(t){typeof t.dispose=="function"&&await Di(t.dispose)}function i0(t){return new Promise((e,r)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>r(t.error)})}function cz(t,e){const r=indexedDB.open(t);r.onupgradeneeded=()=>r.result.createObjectStore(e);const n=i0(r);return(i,s)=>n.then(o=>s(o.transaction(e,i).objectStore(e)))}let IE;function sb(){return IE||(IE=cz("keyval-store","keyval")),IE}function oP(t,e=sb()){return e("readonly",r=>i0(r.get(t)))}function i1e(t,e,r=sb()){return r("readwrite",n=>(n.put(e,t),i0(n.transaction)))}function s1e(t,e=sb()){return e("readwrite",r=>(r.delete(t),i0(r.transaction)))}function o1e(t=sb()){return t("readwrite",e=>(e.clear(),i0(e.transaction)))}function a1e(t,e){return t.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue())},i0(t.transaction)}function c1e(t=sb()){return t("readonly",e=>{if(e.getAllKeys)return i0(e.getAllKeys());const r=[];return a1e(e,n=>r.push(n.key)).then(()=>r)})}const l1e=t=>JSON.stringify(t,(e,r)=>typeof r=="bigint"?r.toString()+"n":r),u1e=t=>{const e=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,r=t.replace(e,'$1"$2n"$3');return JSON.parse(r,(n,i)=>typeof i=="string"&&i.match(/^\d+n$/)?BigInt(i.substring(0,i.length-1)):i)};function Oh(t){if(typeof t!="string")throw new Error(`Cannot safe json parse value of type ${typeof t}`);try{return u1e(t)}catch{return t}}function wu(t){return typeof t=="string"?t:l1e(t)||""}const f1e="idb-keyval";var d1e=(t={})=>{const e=t.base&&t.base.length>0?`${t.base}:`:"",r=i=>e+i;let n;return t.dbName&&t.storeName&&(n=cz(t.dbName,t.storeName)),{name:f1e,options:t,async hasItem(i){return!(typeof await oP(r(i),n)>"u")},async getItem(i){return await oP(r(i),n)??null},setItem(i,s){return i1e(r(i),s,n)},removeItem(i){return s1e(r(i),n)},getKeys(){return c1e(n)},clear(){return o1e(n)}}};const h1e="WALLET_CONNECT_V2_INDEXED_DB",p1e="keyvaluestorage";let g1e=class{constructor(){this.indexedDb=n1e({driver:d1e({dbName:h1e,storeName:p1e})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map(e=>[e.key,e.value])}async getItem(e){const r=await this.indexedDb.getItem(e);if(r!==null)return r}async setItem(e,r){await this.indexedDb.setItem(e,wu(r))}async removeItem(e){await this.indexedDb.removeItem(e)}};var TE=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},mv={exports:{}};(function(){let t;function e(){}t=e,t.prototype.getItem=function(r){return this.hasOwnProperty(r)?String(this[r]):null},t.prototype.setItem=function(r,n){this[r]=String(n)},t.prototype.removeItem=function(r){delete this[r]},t.prototype.clear=function(){const r=this;Object.keys(r).forEach(function(n){r[n]=void 0,delete r[n]})},t.prototype.key=function(r){return r=r||0,Object.keys(this)[r]},t.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof TE<"u"&&TE.localStorage?mv.exports=TE.localStorage:typeof window<"u"&&window.localStorage?mv.exports=window.localStorage:mv.exports=new e})();function m1e(t){var e;return[t[0],Oh((e=t[1])!=null?e:"")]}let y1e=class{constructor(){this.localStorage=mv.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(m1e)}async getItem(e){const r=this.localStorage.getItem(e);if(r!==null)return Oh(r)}async setItem(e,r){this.localStorage.setItem(e,wu(r))}async removeItem(e){this.localStorage.removeItem(e)}};const b1e="wc_storage_version",aP=1,w1e=async(t,e,r)=>{const n=b1e,i=await e.getItem(n);if(i&&i>=aP){r(e);return}const s=await t.getKeys();if(!s.length){r(e);return}const o=[];for(;s.length;){const a=s.shift();if(!a)continue;const c=a.toLowerCase();if(c.includes("wc@")||c.includes("walletconnect")||c.includes("wc_")||c.includes("wallet_connect")){const l=await t.getItem(a);await e.setItem(a,l),o.push(a)}}await e.setItem(n,aP),r(e),v1e(t,o)},v1e=async(t,e)=>{e.length&&e.forEach(async r=>{await t.removeItem(r)})};let x1e=class{constructor(){this.initialized=!1,this.setInitialized=r=>{this.storage=r,this.initialized=!0};const e=new y1e;this.storage=e;try{const r=new g1e;w1e(e,r,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(e){return await this.initialize(),this.storage.getItem(e)}async setItem(e,r){return await this.initialize(),this.storage.setItem(e,r)}async removeItem(e){return await this.initialize(),this.storage.removeItem(e)}async initialize(){this.initialized||await new Promise(e=>{const r=setInterval(()=>{this.initialized&&(clearInterval(r),e())},20)})}};function E1e(t){try{return JSON.stringify(t)}catch{return'"[Circular]"'}}var C1e=_1e;function _1e(t,e,r){var n=r&&r.stringify||E1e,i=1;if(typeof t=="object"&&t!==null){var s=e.length+i;if(s===1)return t;var o=new Array(s);o[0]=n(t);for(var a=1;a<s;a++)o[a]=n(e[a]);return o.join(" ")}if(typeof t!="string")return t;var c=e.length;if(c===0)return t;for(var l="",u=1-i,f=-1,d=t&&t.length||0,p=0;p<d;){if(t.charCodeAt(p)===37&&p+1<d){switch(f=f>-1?f:0,t.charCodeAt(p+1)){case 100:case 102:if(u>=c||e[u]==null)break;f<p&&(l+=t.slice(f,p)),l+=Number(e[u]),f=p+2,p++;break;case 105:if(u>=c||e[u]==null)break;f<p&&(l+=t.slice(f,p)),l+=Math.floor(Number(e[u])),f=p+2,p++;break;case 79:case 111:case 106:if(u>=c||e[u]===void 0)break;f<p&&(l+=t.slice(f,p));var h=typeof e[u];
2064if(h==="string"){l+="'"+e[u]+"'",f=p+2,p++;break}if(h==="function"){l+=e[u].name||"<anonymous>",f=p+2,p++;break}l+=n(e[u]),f=p+2,p++;break;case 115:if(u>=c)break;f<p&&(l+=t.slice(f,p)),l+=String(e[u]),f=p+2,p++;break;case 37:f<p&&(l+=t.slice(f,p)),l+="%",f=p+2,p++,u--;break}++u}++p}return f===-1?t:(f<d&&(l+=t.slice(f)),l)}const cP=C1e;var H0=ol;const J2=D1e().console||{},A1e={mapHttpRequest:uw,mapHttpResponse:uw,wrapRequestSerializer:kE,wrapResponseSerializer:kE,wrapErrorSerializer:kE,req:uw,res:uw,err:k1e};function S1e(t,e){return Array.isArray(t)?t.filter(function(n){return n!=="!stdSerializers.err"}):t===!0?Object.keys(e):!1}function ol(t){t=t||{},t.browser=t.browser||{};const e=t.browser.transmit;if(e&&typeof e.send!="function")throw Error("pino: transmit option must have a send function");const r=t.browser.write||J2;t.browser.write&&(t.browser.asObject=!0);const n=t.serializers||{},i=S1e(t.browser.serialize,n);let s=t.browser.serialize;Array.isArray(t.browser.serialize)&&t.browser.serialize.indexOf("!stdSerializers.err")>-1&&(s=!1);const o=["error","fatal","warn","info","debug","trace"];typeof r=="function"&&(r.error=r.fatal=r.warn=r.info=r.debug=r.trace=r),t.enabled===!1&&(t.level="silent");const a=t.level||"info",c=Object.create(r);c.log||(c.log=Q2),Object.defineProperty(c,"levelVal",{get:u}),Object.defineProperty(c,"level",{get:f,set:d});const l={transmit:e,serialize:i,asObject:t.browser.asObject,levels:o,timestamp:P1e(t)};c.levels=ol.levels,c.level=a,c.setMaxListeners=c.getMaxListeners=c.emit=c.addListener=c.on=c.prependListener=c.once=c.prependOnceListener=c.removeListener=c.removeAllListeners=c.listeners=c.listenerCount=c.eventNames=c.write=c.flush=Q2,c.serializers=n,c._serialize=i,c._stdErrSerialize=s,c.child=p,e&&(c._logEvent=XC());function u(){return this.level==="silent"?1/0:this.levels.values[this.level]}function f(){return this._level}function d(h){if(h!=="silent"&&!this.levels.values[h])throw Error("unknown level "+h);this._level=h,y0(l,c,"error","log"),y0(l,c,"fatal","error"),y0(l,c,"warn","error"),y0(l,c,"info","log"),y0(l,c,"debug","log"),y0(l,c,"trace","log")}function p(h,g){if(!h)throw new Error("missing bindings for child Pino");g=g||{},i&&h.serializers&&(g.serializers=h.serializers);const y=g.serializers;if(i&&y){var x=Object.assign({},n,y),C=t.browser.serialize===!0?Object.keys(x):i;delete h.serializers,xx([h],C,x,this._stdErrSerialize)}function _(L){this._childLevel=(L._childLevel|0)+1,this.error=b0(L,h,"error"),this.fatal=b0(L,h,"fatal"),this.warn=b0(L,h,"warn"),this.info=b0(L,h,"info"),this.debug=b0(L,h,"debug"),this.trace=b0(L,h,"trace"),x&&(this.serializers=x,this._serialize=C),e&&(this._logEvent=XC([].concat(L._logEvent.bindings,h)))}return _.prototype=this,new _(this)}return c}ol.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}};ol.stdSerializers=A1e;ol.stdTimeFunctions=Object.assign({},{nullTime:lz,epochTime:uz,unixTime:R1e,isoTime:O1e});function y0(t,e,r,n){const i=Object.getPrototypeOf(e);e[r]=e.levelVal>e.levels.values[r]?Q2:i[r]?i[r]:J2[r]||J2[n]||Q2,N1e(t,e,r)}function N1e(t,e,r){!t.transmit&&e[r]===Q2||(e[r]=function(n){return function(){const s=t.timestamp(),o=new Array(arguments.length),a=Object.getPrototypeOf&&Object.getPrototypeOf(this)===J2?J2:this;for(var c=0;c<o.length;c++)o[c]=arguments[c];if(t.serialize&&!t.asObject&&xx(o,this._serialize,this.serializers,this._stdErrSerialize),t.asObject?n.call(a,I1e(this,r,o,s)):n.apply(a,o),t.transmit){const l=t.transmit.level||e.level,u=ol.levels.values[l],f=ol.levels.values[r];if(f<u)return;T1e(this,{ts:s,methodLevel:r,methodValue:f,transmitValue:ol.levels.values[t.transmit.level||e.level],send:t.transmit.send,val:e.levelVal},o)}}}(e[r]))}function I1e(t,e,r,n){t._serialize&&xx(r,t._serialize,t.serializers,t._stdErrSerialize);const i=r.slice();let s=i[0];const o={};n&&(o.time=n),o.level=ol.levels.values[e];let a=(t._childLevel|0)+1;if(a<1&&(a=1),s!==null&&typeof s=="object"){for(;a--&&typeof i[0]=="object";)Object.assign(o,i.shift());s=i.length?cP(i.shift(),i):void 0}else typeof s=="string"&&(s=cP(i.shift(),i));return s!==void 0&&(o.msg=s),o}function xx(t,e,r,n){for(const i in t)if(n&&t[i]instanceof Error)t[i]=ol.stdSerializers.err(t[i]);else if(typeof t[i]=="object"&&!Array.isArray(t[i]))for(const s in t[i])e&&e.indexOf(s)>-1&&s in r&&(t[i][s]=r[s](t[i][s]))}function b0(t,e,r){return function(){const n=new Array(1+arguments.length);n[0]=e;for(var i=1;i<n.length;i++)n[i]=arguments[i-1];return t[r].apply(this,n)}}function T1e(t,e,r){const n=e.send,i=e.ts,s=e.methodLevel,o=e.methodValue,a=e.val,c=t._logEvent.bindings;xx(r,t._serialize||Object.keys(t.serializers),t.serializers,t._stdErrSerialize===void 0?!0:t._stdErrSerialize),t._logEvent.ts=i,t._logEvent.messages=r.filter(function(l){return c.indexOf(l)===-1}),t._logEvent.level.label=s,t._logEvent.level.value=o,n(s,t._logEvent,a),t._logEvent=XC(c)}function XC(t){return{ts:0,messages:[],bindings:t||[],level:{label:"",value:0}}}function k1e(t){const e={type:t.constructor.name,msg:t.message,stack:t.stack};for(const r in t)e[r]===void 0&&(e[r]=t[r]);return e}function P1e(t){return typeof t.timestamp=="function"?t.timestamp:t.timestamp===!1?lz:uz}function uw(){return{}}function kE(t){return t}function Q2(){}function lz(){return!1}function uz(){return Date.now()}function R1e(){return Math.round(Date.now()/1e3)}function O1e(){return new Date(Date.now()).toISOString()}function D1e(){function t(e){return typeof e<"u"&&e}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return t(self)||t(window)||t(this)||{}}}const ob=is(H0),L1e={level:"info"},ab="custom_context",wS=1e3*1024;let M1e=class{constructor(e){this.nodeValue=e,this.sizeInBytes=new TextEncoder().encode(this.nodeValue).length,this.next=null}get value(){return this.nodeValue}get size(){return this.sizeInBytes}},lP=class{constructor(e){this.head=null,this.tail=null,this.lengthInNodes=0,this.maxSizeInBytes=e,this.sizeInBytes=0}append(e){const r=new M1e(e);if(r.size>this.maxSizeInBytes)throw new Error(`[LinkedList] Value too big to insert into list: ${e} with size ${r.size}`);for(;this.size+r.size>this.maxSizeInBytes;)this.shift();this.head?(this.tail&&(this.tail.next=r),this.tail=r):(this.head=r,this.tail=r),this.lengthInNodes++,this.sizeInBytes+=r.
vendor: 10,354 bytes, line 2064
2064size}shift(){if(!this.head)return;const e=this.head;this.head=this.head.next,this.head||(this.tail=null),this.lengthInNodes--,this.sizeInBytes-=e.size}toArray(){const e=[];let r=this.head;for(;r!==null;)e.push(r.value),r=r.next;return e}get length(){return this.lengthInNodes}get size(){return this.sizeInBytes}toOrderedArray(){return Array.from(this)}[Symbol.iterator](){let e=this.head;return{next:()=>{if(!e)return{done:!0,value:null};const r=e.value;return e=e.next,{done:!1,value:r}}}}},fz=class{constructor(e,r=wS){this.level=e??"error",this.levelValue=H0.levels.values[this.level],this.MAX_LOG_SIZE_IN_BYTES=r,this.logs=new lP(this.MAX_LOG_SIZE_IN_BYTES)}forwardToConsole(e,r){r===H0.levels.values.error?console.error(e):r===H0.levels.values.warn?console.warn(e):r===H0.levels.values.debug?console.debug(e):r===H0.levels.values.trace?console.trace(e):console.log(e)}appendToLogs(e){this.logs.append(wu({timestamp:new Date().toISOString(),log:e}));const r=typeof e=="string"?JSON.parse(e).level:e.level;r>=this.levelValue&&this.forwardToConsole(e,r)}getLogs(){return this.logs}clearLogs(){this.logs=new lP(this.MAX_LOG_SIZE_IN_BYTES)}getLogArray(){return Array.from(this.logs)}logsToBlob(e){const r=this.getLogArray();return r.push(wu({extraMetadata:e})),new Blob(r,{type:"application/json"})}},$1e=class{constructor(e,r=wS){this.baseChunkLogger=new fz(e,r)}write(e){this.baseChunkLogger.appendToLogs(e)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(e){return this.baseChunkLogger.logsToBlob(e)}downloadLogsBlobInBrowser(e){const r=URL.createObjectURL(this.logsToBlob(e)),n=document.createElement("a");n.href=r,n.download=`walletconnect-logs-${new Date().toISOString()}.txt`,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(r)}},U1e=class{constructor(e,r=wS){this.baseChunkLogger=new fz(e,r)}write(e){this.baseChunkLogger.appendToLogs(e)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(e){return this.baseChunkLogger.logsToBlob(e)}};var B1e=Object.defineProperty,F1e=Object.defineProperties,j1e=Object.getOwnPropertyDescriptors,uP=Object.getOwnPropertySymbols,z1e=Object.prototype.hasOwnProperty,W1e=Object.prototype.propertyIsEnumerable,fP=(t,e,r)=>e in t?B1e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,U3=(t,e)=>{for(var r in e||(e={}))z1e.call(e,r)&&fP(t,r,e[r]);if(uP)for(var r of uP(e))W1e.call(e,r)&&fP(t,r,e[r]);return t},B3=(t,e)=>F1e(t,j1e(e));function Lg(t){return B3(U3({},t),{level:(t==null?void 0:t.level)||L1e.level})}function H1e(t,e=ab){return t[e]||""}function q1e(t,e,r=ab){return t[r]=e,t}function Po(t,e=ab){let r="";return typeof t.bindings>"u"?r=H1e(t,e):r=t.bindings().context||"",r}function V1e(t,e,r=ab){const n=Po(t,r);return n.trim()?`${n}/${e}`:e}function Ls(t,e,r=ab){const n=V1e(t,e,r),i=t.child({context:n});return q1e(i,n,r)}function K1e(t){var e,r;const n=new $1e((e=t.opts)==null?void 0:e.level,t.maxSizeInBytes);return{logger:ob(B3(U3({},t.opts),{level:"trace",browser:B3(U3({},(r=t.opts)==null?void 0:r.browser),{write:i=>n.write(i)})})),chunkLoggerController:n}}function G1e(t){var e;const r=new U1e((e=t.opts)==null?void 0:e.level,t.maxSizeInBytes);return{logger:ob(B3(U3({},t.opts),{level:"trace"}),r),chunkLoggerController:r}}function vS(t){return typeof t.loggerOverride<"u"&&typeof t.loggerOverride!="string"?{logger:t.loggerOverride,chunkLoggerController:null}:typeof window<"u"?K1e(t):G1e(t)}var Y1e=Object.defineProperty,Z1e=(t,e,r)=>e in t?Y1e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,dP=(t,e,r)=>Z1e(t,typeof e!="symbol"?e+"":e,r);let J1e=class extends r0{constructor(e){super(),this.opts=e,dP(this,"protocol","wc"),dP(this,"version",2)}};var Q1e=Object.defineProperty,X1e=(t,e,r)=>e in t?Q1e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,eme=(t,e,r)=>X1e(t,e+"",r);let tme=class extends r0{constructor(e,r){super(),this.core=e,this.logger=r,eme(this,"records",new Map)}},rme=class{constructor(e,r){this.logger=e,this.core=r}},nme=class extends r0{constructor(e,r){super(),this.relayer=e,this.logger=r}},ime=class extends r0{constructor(e){super()}},sme=class{constructor(e,r,n,i){this.core=e,this.logger=r,this.name=n}},ome=class extends r0{constructor(e,r){super(),this.relayer=e,this.logger=r}},ame=class extends r0{constructor(e,r){super(),this.core=e,this.logger=r}},cme=class{constructor(e,r,n){this.core=e,this.logger=r,this.store=n}},lme=class{constructor(e,r){this.projectId=e,this.logger=r}},ume=class{constructor(e,r,n){this.core=e,this.logger=r,this.telemetryEnabled=n}};var fme=Object.defineProperty,dme=(t,e,r)=>e in t?fme(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,hP=(t,e,r)=>dme(t,typeof e!="symbol"?e+"":e,r);let hme=class{constructor(e){this.opts=e,hP(this,"protocol","wc"),hP(this,"version",2)}},pme=class{constructor(e){this.client=e}};function gme(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function dz(t,...e){if(!gme(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function pP(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function mme(t,e){dz(t);const r=e.outputLen;if(t.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}const w0=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const PE=t=>new DataView(t.buffer,t.byteOffset,t.byteLength);function yme(t){if(typeof t!="string")throw new Error("utf8ToBytes expected string, got "+typeof t);return new Uint8Array(new TextEncoder().encode(t))}function hz(t){return typeof t=="string"&&(t=yme(t)),dz(t),t}let bme=class{clone(){return this._cloneInto()}};function wme(t){const e=n=>t().update(hz(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function pz(t=32){if(w0&&typeof w0.getRandomValues=="function")return w0.getRandomValues(new Uint8Array(t));if(w0&&typeof w0.randomBytes=="function")return w0.randomBytes(t);throw new Error("crypto.getRandomValues must be defined")}function vme(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);const i=BigInt(32),s=BigInt(4294967295),o=Number(r>>i&s),a=Number(r&s),c=n?4:0,l=n?0:4;t.setUint32(e+c,o,n),t.setUint32(e+l,a,n)}let xme=class extends bme{constructor(e,r,n,i){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=PE(this.buffer)}update(e){pP(this);const{view:r,buffer:n,blockLen:i}=this;e=hz(e);const s=e.length;for(let o=0;o<s;){const a=Math.min(i-this.pos,s-o);if(a===i){const c=PE(e);for(;i<=s-o;o+=i)this.process(c,o);continue}n.set(e.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===i&&(this.process(r,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){pP(this),mme(e,this),this.finished=!0;const{buffer:r,view:n,blockLen:i,isLE:s}=this;let{pos:o}=this;r[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>i-o&&(this.process(n,0),o=0);for(let f=o;f<i;f++)r[f]=0;vme(n,i-8,BigInt(this.length*8),s),this.process(n,0);const a=PE(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,u=this.get();if(l>u.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;f<l;f++)a.setUint32(4*f,u[f],s)}digest(){const{buffer:e,outputLen:r}=this;this.digestInto(e);const n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:r,buffer:n,length:i,finished:s,destroyed:o,pos:a}=this;return e.length=i,e.pos=a,e.finished=s,e.destroyed=o,i%r&&e.buffer.set(n),e}};const fw=BigInt(2**32-1),e_=BigInt(32);function gz(t,e=!1){return e?{h:Number(t&fw),l:Number(t>>e_&fw)}:{h:Number(t>>e_&fw)|0,l:Number(t&fw)|0}}function Eme(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let i=0;i<t.length;i++){const{h:s,l:o}=gz(t[i],e);[r[i],n[i]]=[s,o]}return[r,n]}const Cme=(t,e)=>BigInt(t>>>0)<<e_|BigInt(e>>>0),_me=(t,e,r)=>t>>>r,Ame=(t,e,r)=>t<<32-r|e>>>r,Sme=(t,e,r)=>t>>>r|e<<32-r,Nme=(t,e,r)=>t<<32-r|e>>>r,Ime=(t,e,r)=>t<<64-r|e>>>r-32,Tme=(t,e,r)=>t>>>r-32|e<<64-r,kme=(t,e)=>e,Pme=(t,e)=>t,Rme=(t,e,r)=>t<<r|e>>>32-r,Ome=(t,e,r)=>e<<r|t>>>32-r,Dme=(t,e,r)=>e<<r-32|t>>>64-r,Lme=(t,e,r)=>t<<r-32|e>>>64-r;function Mme(t,e,r,n){const i=(e>>>0)+(n>>>0);return{h:t+r+(i/2**32|0)|0,l:i|0}}const $me=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),Ume=(t,e,r,n)=>e+r+n+(t/2**32|0)|0,Bme=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),Fme=(t,e,r,n,i)=>e+r+n+i+(t/2**32|0)|0,jme=(t,e,r,n,i)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(i>>>0),zme=(t,e,r,n,i,s)=>e+r+n+i+s+(t/2**32|0)|0,nr={fromBig:gz,split:Eme,toBig:Cme,shrSH:_me,shrSL:Ame,rotrSH:Sme,rotrSL:Nme,rotrBH:Ime,rotrBL:Tme,rotr32H:kme,rotr32L:Pme,rotlSH:Rme,rotlSL:Ome,rotlBH:Dme,rotlBL:Lme,add:Mme,add3L:$me,add3H:Ume,add4L:Bme,add4H:Fme,add5H:zme,add5L:jme},[Wme,Hme]=nr.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e3585
20645771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))),Bu=new Uint32Array(80),Fu=new Uint32Array(80);let qme=class extends xme{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:r,Bh:n,Bl:i,Ch:s,Cl:o,Dh:a,Dl:c,Eh:l,El:u,Fh:f,Fl:d,Gh:p,Gl:h,Hh:g,Hl:y}=this;return[e,r,n,i,s,o,a,c,l,u,f,d,p,h,g,y]}set(e,r,n,i,s,o,a,c,l,u,f,d,p,h,g,y){this.Ah=e|0,this.Al=r|0,this.Bh=n|0,this.Bl=i|0,this.Ch=s|0,this.Cl=o|0,this.Dh=a|0,this.Dl=c|0,this.Eh=l|0,this.El=u|0,this.Fh=f|0,this.Fl=d|0,this.Gh=p|0,this.Gl=h|0,this.Hh=g|0,this.Hl=y|0}process(e,r){for(let _=0;_<16;_++,r+=4)Bu[_]=e.getUint32(r),Fu[_]=e.getUint32(r+=4);for(let _=16;_<80;_++){const L=Bu[_-15]|0,P=Fu[_-15]|0,z=nr.rotrSH(L,P,1)^nr.rotrSH(L,P,8)^nr.shrSH(L,P,7),W=nr.rotrSL(L,P,1)^nr.rotrSL(L,P,8)^nr.shrSL(L,P,7),B=Bu[_-2]|0,I=Fu[_-2]|0,j=nr.rotrSH(B,I,19)^nr.rotrBH(B,I,61)^nr.shrSH(B,I,6),D=nr.rotrSL(B,I,19)^nr.rotrBL(B,I,61)^nr.shrSL(B,I,6),O=nr.add4L(W,D,Fu[_-7],Fu[_-16]),T=nr.add4H(O,z,j,Bu[_-7],Bu[_-16]);Bu[_]=T|0,Fu[_]=O|0}let{Ah:n,Al:i,Bh:s,Bl:o,Ch:a,Cl:c,Dh:l,Dl:u,Eh:f,El:d,Fh:p,Fl:h,Gh:g,Gl:y,Hh:x,Hl:C}=this;for(let _=0;_<80;_++){const L=nr.rotrSH(f,d,14)^nr.rotrSH(f,d,18)^nr.rotrBH(f,d,41),P=nr.rotrSL(f,d,14)^nr.rotrSL(f,d,18)^nr.rotrBL(f,d,41),z=f&p^~f&g,W=d&h^~d&y,B=nr.add5L(C,P,W,Hme[_],Fu[_]),I=nr.add5H(B,x,L,z,Wme[_],Bu[_]),j=B|0,D=nr.rotrSH(n,i,28)^nr.rotrBH(n,i,34)^nr.rotrBH(n,i,39),O=nr.rotrSL(n,i,28)^nr.rotrBL(n,i,34)^nr.rotrBL(n,i,39),T=n&s^n&a^s&a,m=i&o^i&c^o&c;x=g|0,C=y|0,g=p|0,y=h|0,p=f|0,h=d|0,{h:f,l:d}=nr.add(l|0,u|0,I|0,j|0),l=a|0,u=c|0,a=s|0,c=o|0,s=n|0,o=i|0;const b=nr.add3L(j,O,m);n=nr.add3H(b,I,D,T),i=b|0}({h:n,l:i}=nr.add(this.Ah|0,this.Al|0,n|0,i|0)),{h:s,l:o}=nr.add(this.Bh|0,this.Bl|0,s|0,o|0),{h:a,l:c}=nr.add(this.Ch|0,this.Cl|0,a|0,c|0),{h:l,l:u}=nr.add(this.Dh|0,this.Dl|0,l|0,u|0),{h:f,l:d}=nr.add(this.Eh|0,this.El|0,f|0,d|0),{h:p,l:h}=nr.add(this.Fh|0,this.Fl|0,p|0,h|0),{h:g,l:y}=nr.add(this.Gh|0,this.Gl|0,g|0,y|0),{h:x,l:C}=nr.add(this.Hh|0,this.Hl|0,x|0,C|0),this.set(n,i,s,o,a,c,l,u,f,d,p,h,g,y,x,C)}roundClean(){Bu.fill(0),Fu.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}};const Vme=wme(()=>new qme);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const xS=BigInt(0),mz=BigInt(1),Kme=BigInt(2);function ES(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function CS(t){if(!ES(t))throw new Error("Uint8Array expected")}function RE(t,e){if(typeof e!="boolean")throw new Error(t+" boolean expected, got "+e)}const Gme=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function _S(t){CS(t);let e="";for(let r=0;r<t.length;r++)e+=Gme[t[r]];return e}function yz(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return t===""?xS:BigInt("0x"+t)}const Dl={_0:48,_9:57,A:65,F:70,a:97,f:102};function gP(t){if(t>=Dl._0&&t<=Dl._9)return t-Dl._0;if(t>=Dl.A&&t<=Dl.F)return t-(Dl.A-10);if(t>=Dl.a&&t<=Dl.f)return t-(Dl.a-10)}function bz(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);const e=t.length,r=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);const n=new Uint8Array(r);for(let i=0,s=0;i<r;i++,s+=2){const o=gP(t.charCodeAt(s)),a=gP(t.charCodeAt(s+1));if(o===void 0||a===void 0){const c=t[s]+t[s+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+s)}n[i]=o*16+a}return n}function Yme(t){return yz(_S(t))}function yv(t){return CS(t),yz(_S(Uint8Array.from(t).reverse()))}function wz(t,e){return bz(t.toString(16).padStart(e*2,"0"))}function t_(t,e){return wz(t,e).reverse()}function Ll(t,e,r){let n;if(typeof e=="string")try{n=bz(e)}catch(s){throw new Error(t+" must be hex string or Uint8Array, cause: "+s)}else if(ES(e))n=Uint8Array.from(e);else throw new Error(t+" must be hex string or Uint8Array");const i=n.length;if(typeof r=="number"&&i!==r)throw new Error(t+" of length "+r+" expected, got "+i);return n}function mP(...t){let e=0;for(let n=0;n<t.length;n++){const i=t[n];CS(i),e+=i.length}
vendor: 4,334 bytes, line 2064
2064const r=new Uint8Array(e);for(let n=0,i=0;n<t.length;n++){const s=t[n];r.set(s,i),i+=s.length}return r}const OE=t=>typeof t=="bigint"&&xS<=t;function Zme(t,e,r){return OE(t)&&OE(e)&&OE(r)&&e<=t&&t<r}function p1(t,e,r,n){if(!Zme(e,r,n))throw new Error("expected valid "+t+": "+r+" <= n < "+n+", got "+e)}function Jme(t){let e;for(e=0;t>xS;t>>=mz,e+=1);return e}const Qme=t=>(Kme<<BigInt(t-1))-mz,Xme={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",stringOrUint8Array:t=>typeof t=="string"||ES(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function AS(t,e,r={}){const n=(i,s,o)=>{const a=Xme[s];if(typeof a!="function")throw new Error("invalid validator function");const c=t[i];if(!(o&&c===void 0)&&!a(c,t))throw new Error("param "+String(i)+" is invalid. Expected "+s+", got "+c)};for(const[i,s]of Object.entries(e))n(i,s,!1);for(const[i,s]of Object.entries(r))n(i,s,!0);return t}function yP(t){const e=new WeakMap;return(r,...n)=>{const i=e.get(r);if(i!==void 0)return i;const s=t(r,...n);return e.set(r,s),s}}const Fi=BigInt(0),fi=BigInt(1),$d=BigInt(2),e2e=BigInt(3),r_=BigInt(4),bP=BigInt(5),wP=BigInt(8);function Ni(t,e){const r=t%e;return r>=Fi?r:e+r}function t2e(t,e,r){if(e<Fi)throw new Error("invalid exponent, negatives unsupported");if(r<=Fi)throw new Error("invalid modulus");if(r===fi)return Fi;let n=fi;for(;e>Fi;)e&fi&&(n=n*t%r),t=t*t%r,e>>=fi;return n}function Ic(t,e,r){let n=t;for(;e-- >Fi;)n*=n,n%=r;return n}function vP(t,e){if(t===Fi)throw new Error("invert: expected non-zero number");if(e<=Fi)throw new Error("invert: expected positive modulus, got "+e);let r=Ni(t,e),n=e,i=Fi,s=fi;for(;r!==Fi;){const o=n/r,a=n%r,c=i-s*o;n=r,r=a,i=s,s=c}if(n!==fi)throw new Error("invert: does not exist");return Ni(i,e)}function r2e(t){const e=(t-fi)/$d;let r,n,i;for(r=t-fi,n=0;r%$d===Fi;r/=$d,n++);for(i=$d;i<t&&t2e(i,e,t)!==t-fi;i++)if(i>1e3)throw new Error("Cannot find square root: likely non-prime P");if(n===1){const o=(t+fi)/r_;return function(a,c){const l=a.pow(c,o);if(!a.eql(a.sqr(l),c))throw new Error("Cannot find square root");return l}}const s=(r+fi)/$d;return function(o,a){if(o.pow(a,e)===o.neg(o.ONE))throw new Error("Cannot find square root");let c=n,l=o.pow(o.mul(o.ONE,i),r),u=o.pow(a,s),f=o.pow(a,r);for(;!o.eql(f,o.ONE);){if(o.eql(f,o.ZERO))return o.ZERO;let d=1;for(let h=o.sqr(f);d<c&&!o.eql(h,o.ONE);d++)h=o.sqr(h);const p=o.pow(l,fi<<BigInt(c-d-1));l=o.sqr(p),u=o.mul(u,p),f=o.mul(f,l),c=d}return u}}function n2e(t){if(t%r_===e2e){const e=(t+fi)/r_;return function(r,n){const i=r.pow(n,e);if(!r.eql(r.sqr(i),n))throw new Error("Cannot find square root");return i}}if(t%wP===bP){const e=(t-bP)/wP;return function(r,n){const i=r.mul(n,$d),s=r.pow(i,e),o=r.mul(n,s),a=r.mul(r.mul(o,$d),s),c=r.mul(o,r.sub(a,r.ONE));if(!r.eql(r.sqr(c),n))throw new Error("Cannot find square root");return c}}return r2e(t)}const i2e=(t,e)=>(Ni(t,e)&fi)===fi,s2e=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function o2e(t){const e={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=s2e.reduce((n,i)=>(n[i]="function",n),e);return AS(t,r)}function a2e(t,e,r){if(r<Fi)throw new Error("invalid exponent, negatives unsupported");if(r===Fi)return t.ONE;if(r===fi)return e;let n=t.ONE,i=e;for(;r>Fi;)r&fi&&(n=t.mul(n,i)),i=t.sqr(i),r>>=fi;return n}function c2e(t,e){const r=new Array(e.length),n=e.reduce((s,o,a)=>t.is0(o)?s:(r[a]=s,t.mul(s,o)),t.ONE),i=t.inv(n);return e.reduceRight((s,o,a)=>t.is0(o)?s:(r[a]=t.mul(s,r[a]),t.mul(s,o)),i),r}function vz(t,e){const r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function xz(t,e,r=!1,n={}){if(t<=Fi)throw new Error("invalid field: expected ORDER > 0, got "+t);const{nBitLength:i,nByteLength:s}=vz(t,e);if(s>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let o;const a=Object.freeze({ORDER:t,isLE:r,BITS:i,BYTES:s,MASK:Qme(i),ZERO:Fi,ONE:fi,create:c=>Ni(c,t),isValid:c=>{if(typeof c!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof c);return Fi<=c&&c<t},is0:c=>c===Fi,isOdd:c=>(c&fi)===fi,neg:c=>
vendor: 4,163 bytes, line 2064
2064Ni(-c,t),eql:(c,l)=>c===l,sqr:c=>Ni(c*c,t),add:(c,l)=>Ni(c+l,t),sub:(c,l)=>Ni(c-l,t),mul:(c,l)=>Ni(c*l,t),pow:(c,l)=>a2e(a,c,l),div:(c,l)=>Ni(c*vP(l,t),t),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>vP(c,t),sqrt:n.sqrt||(c=>(o||(o=n2e(t)),o(a,c))),invertBatch:c=>c2e(a,c),cmov:(c,l,u)=>u?l:c,toBytes:c=>r?t_(c,s):wz(c,s),fromBytes:c=>{if(c.length!==s)throw new Error("Field.fromBytes: expected "+s+" bytes, got "+c.length);return r?yv(c):Yme(c)}});return Object.freeze(a)}const xP=BigInt(0),dw=BigInt(1);function DE(t,e){const r=e.negate();return t?r:e}function Ez(t,e){if(!Number.isSafeInteger(t)||t<=0||t>e)throw new Error("invalid window size, expected [1.."+e+"], got W="+t)}function LE(t,e){Ez(t,e);const r=Math.ceil(e/t)+1,n=2**(t-1);return{windows:r,windowSize:n}}function l2e(t,e){if(!Array.isArray(t))throw new Error("array expected");t.forEach((r,n)=>{if(!(r instanceof e))throw new Error("invalid point at index "+n)})}function u2e(t,e){if(!Array.isArray(t))throw new Error("array of scalars expected");t.forEach((r,n)=>{if(!e.isValid(r))throw new Error("invalid scalar at index "+n)})}const ME=new WeakMap,Cz=new WeakMap;function $E(t){return Cz.get(t)||1}function f2e(t,e){return{constTimeNegate:DE,hasPrecomputes(r){return $E(r)!==1},unsafeLadder(r,n,i=t.ZERO){let s=r;for(;n>xP;)n&dw&&(i=i.add(s)),s=s.double(),n>>=dw;return i},precomputeWindow(r,n){const{windows:i,windowSize:s}=LE(n,e),o=[];let a=r,c=a;for(let l=0;l<i;l++){c=a,o.push(c);for(let u=1;u<s;u++)c=c.add(a),o.push(c);a=c.double()}return o},wNAF(r,n,i){const{windows:s,windowSize:o}=LE(r,e);let a=t.ZERO,c=t.BASE;const l=BigInt(2**r-1),u=2**r,f=BigInt(r);for(let d=0;d<s;d++){const p=d*o;let h=Number(i&l);i>>=f,h>o&&(h-=u,i+=dw);const g=p,y=p+Math.abs(h)-1,x=d%2!==0,C=h<0;h===0?c=c.add(DE(x,n[g])):a=a.add(DE(C,n[y]))}return{p:a,f:c}},wNAFUnsafe(r,n,i,s=t.ZERO){const{windows:o,windowSize:a}=LE(r,e),c=BigInt(2**r-1),l=2**r,u=BigInt(r);for(let f=0;f<o;f++){const d=f*a;if(i===xP)break;let p=Number(i&c);if(i>>=u,p>a&&(p-=l,i+=dw),p===0)continue;let h=n[d+Math.abs(p)-1];p<0&&(h=h.negate()),s=s.add(h)}return s},getPrecomputes(r,n,i){let s=ME.get(n);return s||(s=this.precomputeWindow(n,r),r!==1&&ME.set(n,i(s))),s},wNAFCached(r,n,i){const s=$E(r);return this.wNAF(s,this.getPrecomputes(s,r,i),n)},wNAFCachedUnsafe(r,n,i,s){const o=$E(r);return o===1?this.unsafeLadder(r,n,s):this.wNAFUnsafe(o,this.getPrecomputes(o,r,i),n,s)},setWindowSize(r,n){Ez(n,e),Cz.set(r,n),ME.delete(r)}}}function d2e(t,e,r,n){if(l2e(r,t),u2e(n,e),r.length!==n.length)throw new Error("arrays of points and scalars must have equal length");const i=t.ZERO,s=Jme(BigInt(r.length)),o=s>12?s-3:s>4?s-2:s?2:1,a=(1<<o)-1,c=new Array(a+1).fill(i),l=Math.floor((e.BITS-1)/o)*o;let u=i;for(let f=l;f>=0;f-=o){c.fill(i);for(let p=0;p<n.length;p++){const h=n[p],g=Number(h>>BigInt(f)&BigInt(a));c[g]=c[g].add(r[p])}let d=i;for(let p=c.length-1,h=i;p>0;p--)h=h.add(c[p]),d=d.add(h);if(u=u.add(d),f!==0)for(let p=0;p<o;p++)u=u.double()}return u}function h2e(t){return o2e(t.Fp),AS(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...vz(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}const $a=BigInt(0),to=BigInt(1),hw=BigInt(2),p2e=BigInt(8),g2e={zip215:!0};function m2e(t){const e=h2e(t);return AS(t,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...e})}function y2e(t){const e=m2e(t),{Fp:r,n,prehash:i,hash:s,randomBytes:o,nByteLength:a,h:c}=e,l=hw<<BigInt(a*8)-to,u=r.create,f=xz(e.n,e.nBitLength),d=e.uvRatio||((b,E)=>{try{return{isValid:!0,value:r.sqrt(b*r.inv(E))}}catch{return{isValid:!1,value:$a}}}),p=e.adjustScalarBytes||(b=>b),h=e.domain||((b,E,k)=>{if(RE("phflag",k),E.length||k)throw new Error("Contexts/pre-hash are not supported");return b});function g(b,E){p1("coordinate "+b,E,$a,l)}function y(b){if(!(b instanceof _))throw new Error("ExtendedPoint expected")}const x=yP((b,E)=>{const{ex:k,ey:R,ez:M}=b,H=b.is0();E==null&&(E=H?p2e:r.inv(M));const N=u(k*E),v=u(R*E),U=u(M*E);if(H)return{x:$a,y:to};
vendor: 20,859 bytes, line 2064
2064if(U!==to)throw new Error("invZ was invalid");return{x:N,y:v}}),C=yP(b=>{const{a:E,d:k}=e;if(b.is0())throw new Error("bad point: ZERO");const{ex:R,ey:M,ez:H,et:N}=b,v=u(R*R),U=u(M*M),G=u(H*H),S=u(G*G),J=u(v*E),ne=u(G*u(J+U)),Z=u(S+u(k*u(v*U)));if(ne!==Z)throw new Error("bad point: equation left != right (1)");const Q=u(R*M),ee=u(H*N);if(Q!==ee)throw new Error("bad point: equation left != right (2)");return!0});class _{constructor(E,k,R,M){this.ex=E,this.ey=k,this.ez=R,this.et=M,g("x",E),g("y",k),g("z",R),g("t",M),Object.freeze(this)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(E){if(E instanceof _)throw new Error("extended point not allowed");const{x:k,y:R}=E||{};return g("x",k),g("y",R),new _(k,R,to,u(k*R))}static normalizeZ(E){const k=r.invertBatch(E.map(R=>R.ez));return E.map((R,M)=>R.toAffine(k[M])).map(_.fromAffine)}static msm(E,k){return d2e(_,f,E,k)}_setWindowSize(E){z.setWindowSize(this,E)}assertValidity(){C(this)}equals(E){y(E);const{ex:k,ey:R,ez:M}=this,{ex:H,ey:N,ez:v}=E,U=u(k*v),G=u(H*M),S=u(R*v),J=u(N*M);return U===G&&S===J}is0(){return this.equals(_.ZERO)}negate(){return new _(u(-this.ex),this.ey,this.ez,u(-this.et))}double(){const{a:E}=e,{ex:k,ey:R,ez:M}=this,H=u(k*k),N=u(R*R),v=u(hw*u(M*M)),U=u(E*H),G=k+R,S=u(u(G*G)-H-N),J=U+N,ne=J-v,Z=U-N,Q=u(S*ne),ee=u(J*Z),re=u(S*Z),ie=u(ne*J);return new _(Q,ee,ie,re)}add(E){y(E);const{a:k,d:R}=e,{ex:M,ey:H,ez:N,et:v}=this,{ex:U,ey:G,ez:S,et:J}=E;if(k===BigInt(-1)){const gr=u((H-M)*(G+U)),Ut=u((H+M)*(G-U)),ur=u(Ut-gr);if(ur===$a)return this.double();const hi=u(N*hw*J),Bt=u(v*hw*S),Ht=Bt+hi,Pn=Ut+gr,Je=Bt-hi,ut=u(Ht*ur),xt=u(Pn*Je),vt=u(Ht*Je),ar=u(ur*Pn);return new _(ut,xt,ar,vt)}const ne=u(M*U),Z=u(H*G),Q=u(v*R*J),ee=u(N*S),re=u((M+H)*(U+G)-ne-Z),ie=ee-Q,me=ee+Q,le=u(Z-k*ne),ye=u(re*ie),$t=u(me*le),wt=u(re*le),ze=u(ie*me);return new _(ye,$t,ze,wt)}subtract(E){return this.add(E.negate())}wNAF(E){return z.wNAFCached(this,E,_.normalizeZ)}multiply(E){const k=E;p1("scalar",k,to,n);const{p:R,f:M}=this.wNAF(k);return _.normalizeZ([R,M])[0]}multiplyUnsafe(E,k=_.ZERO){const R=E;return p1("scalar",R,$a,n),R===$a?P:this.is0()||R===to?this:z.wNAFCachedUnsafe(this,R,_.normalizeZ,k)}isSmallOrder(){return this.multiplyUnsafe(c).is0()}isTorsionFree(){return z.unsafeLadder(this,n).is0()}toAffine(E){return x(this,E)}clearCofactor(){const{h:E}=e;return E===to?this:this.multiplyUnsafe(E)}static fromHex(E,k=!1){const{d:R,a:M}=e,H=r.BYTES;E=Ll("pointHex",E,H),RE("zip215",k);const N=E.slice(),v=E[H-1];N[H-1]=v&-129;const U=yv(N),G=k?l:r.ORDER;p1("pointHex.y",U,$a,G);const S=u(U*U),J=u(S-to),ne=u(R*S-M);let{isValid:Z,value:Q}=d(J,ne);if(!Z)throw new Error("Point.fromHex: invalid y coordinate");const ee=(Q&to)===to,re=(v&128)!==0;if(!k&&Q===$a&&re)throw new Error("Point.fromHex: x=0 and x_0=1");return re!==ee&&(Q=u(-Q)),_.fromAffine({x:Q,y:U})}static fromPrivateKey(E){return I(E).point}toRawBytes(){const{x:E,y:k}=this.toAffine(),R=t_(k,r.BYTES);return R[R.length-1]|=E&to?128:0,R}toHex(){return _S(this.toRawBytes())}}_.BASE=new _(e.Gx,e.Gy,to,u(e.Gx*e.Gy)),_.ZERO=new _($a,to,to,$a);const{BASE:L,ZERO:P}=_,z=f2e(_,a*8);function W(b){return Ni(b,n)}function B(b){return W(yv(b))}function I(b){const E=r.BYTES;b=Ll("private key",b,E);const k=Ll("hashed private key",s(b),2*E),R=p(k.slice(0,E)),M=k.slice(E,2*E),H=B(R),N=L.multiply(H),v=N.toRawBytes();return{head:R,prefix:M,scalar:H,point:N,pointBytes:v}}function j(b){return I(b).pointBytes}function D(b=new Uint8Array,...E){const k=mP(...E);return B(s(h(k,Ll("context",b),!!i)))}function O(b,E,k={}){b=Ll("message",b),i&&(b=i(b));const{prefix:R,scalar:M,pointBytes:H}=I(E),N=D(k.context,R,b),v=L.multiply(N).toRawBytes(),U=D(k.context,v,H,b),G=W(N+U*M);p1("signature.s",G,$a,n);const S=mP(v,t_(G,r.BYTES));return Ll("result",S,r.BYTES*2)}const T=g2e;function m(b,E,k,R=T){const{context:M,zip215:H}=R,N=r.BYTES;b=Ll("signature",b,2*N),E=Ll("message",E),k=Ll("publicKey",k,N),H!==void 0&&RE("zip215",H),i&&(E=i(E));const v=yv(b.slice(N,2*N));let U,G,S;try{U=_.fromHex(k,H),G=_.fromHex(b.slice(0,N),H),S=L.multiplyUnsafe(v)}catch{return!1}if(!H&&U.isSmallOrder())return!1;const J=D(M,G.toRawBytes(),U.toRawBytes(),E);return G.add(U.multiplyUnsafe(J)).subtract(S).clearCofactor().equals(_.ZERO)}return L._setWindowSize(8),{CURVE:e,getPublicKey:j,sign:O,verify:m,ExtendedPoint:_,utils:{getExtendedPublicKey:I,randomPrivateKey:()=>o(r.BYTES),precompute(b=8,E=_.BASE){return E._setWindowSize(b),E.multiply(BigInt(3)),E}}}}BigInt(0),BigInt(1);const SS=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),EP=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");BigInt(0);const b2e=BigInt(1),CP=BigInt(2);BigInt(3);const w2e=BigInt(5),v2e=BigInt(8);function x2e(t){const e=BigInt(10),r=BigInt(20),n=BigInt(40),i=BigInt(80),s=SS,o=t*t%s*t%s,a=Ic(o,CP,s)*o%s,c=Ic(a,b2e,s)*t%s,l=Ic(c,w2e,s)*c%s,u=Ic(l,e,s)*l%s,f=Ic(u,r,s)*u%s,d=Ic(f,n,s)*f%s,p=Ic(d,i,s)*d%s,h=Ic(p,i,s)*d%s,g=Ic(h,e,s)*l%s;return{pow_p_5_8:Ic(g,CP,s)*t%s,b2:o}}function E2e(t){return t[0]&=248,t[31]&=127,t[31]|=64,t}function C2e(t,e){const r=SS,n=Ni(e*e*e,r),i=Ni(n*n*e,r),s=x2e(t*i).pow_p_5_8;let o=Ni(t*n*s,r);const a=Ni(e*o*o,r),c=o,l=Ni(o*EP,r),u=a===t,f=a===Ni(-t,r),d=a===Ni(-t*EP,r);return u&&(o=c),(f||d)&&(o=l),i2e(o,r)&&(o=Ni(-o,r)),{isValid:u||f,value:o}}const _2e=xz(SS,void 0,!0),A2e={a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:_2e,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:v2e,Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:Vme,randomBytes:pz,adjustScalarBytes:E2e,uvRatio:C2e},_z=y2e(A2e),S2e="EdDSA",N2e="JWT",F3=".",Ex="base64url",Az="utf8",Sz="utf8",I2e=":",T2e="did",k2e="key",_P="base58btc",P2e="z",R2e="K36",O2e=32;function NS(t){return globalThis.Buffer!=null?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function Nz(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?NS(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}function Iz(t,e){e||(e=t.reduce((i,s)=>i+s.length,0));const r=Nz(e);let n=0;for(const i of t)r.set(i,n),n+=i.length;return NS(r)}function D2e(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<t.length;i++){var s=t.charAt(i),o=s.charCodeAt(0);if(r[o]!==255)throw new TypeError(s+" is ambiguous");r[o]=i}var a=t.length,c=t.charAt(0),l=Math.log(a)/Math.log(256),u=Math.log(256)/Math.log(a);function f(h){if(h instanceof Uint8Array||(ArrayBuffer.isView(h)?h=new Uint8Array(h.buffer,h.byteOffset,h.byteLength):Array.isArray(h)&&(h=Uint8Array.from(h))),!(h instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(h.length===0)return"";for(var g=0,y=0,x=0,C=h.length;x!==C&&h[x]===0;)x++,g++;for(var _=(C-x)*u+1>>>0,L=new Uint8Array(_);x!==C;){for(var P=h[x],z=0,W=_-1;(P!==0||z<y)&&W!==-1;W--,z++)P+=256*L[W]>>>0,L[W]=P%a>>>0,P=P/a>>>0;if(P!==0)throw new Error("Non-zero carry");y=z,x++}for(var B=_-y;B!==_&&L[B]===0;)B++;for(var I=c.repeat(g);B<_;++B)I+=t.charAt(L[B]);return I}function d(h){if(typeof h!="string")throw new TypeError("Expected String");if(h.length===0)return new Uint8Array;var g=0;if(h[g]!==" "){for(var y=0,x=0;h[g]===c;)y++,g++;for(var C=(h.length-g)*l+1>>>0,_=new Uint8Array(C);h[g];){var L=r[h.charCodeAt(g)];if(L===255)return;for(var P=0,z=C-1;(L!==0||P<x)&&z!==-1;z--,P++)L+=a*_[z]>>>0,_[z]=L%256>>>0,L=L/256>>>0;if(L!==0)throw new Error("Non-zero carry");x=P,g++}if(h[g]!==" "){for(var W=C-x;W!==C&&_[W]===0;)W++;for(var B=new Uint8Array(y+(C-W)),I=y;W!==C;)B[I++]=_[W++];return B}}}function p(h){var g=d(h);if(g)return g;throw new Error(`Non-${e} character`)}return{encode:f,decodeUnsafe:d,decode:p}}var L2e=D2e,M2e=L2e;const Tz=t=>{if(t instanceof Uint8Array&&t.constructor.name==="Uint8Array")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")},$2e=t=>new TextEncoder().encode(t),U2e=t=>new TextDecoder().decode(t);let B2e=class{constructor(e,r,n){this.name=e,this.prefix=r,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}},F2e=class{constructor(e,r,n){if(this.name=e,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return kz(this,e)}},j2e=class{constructor(e){this.decoders=e}or(e){return kz(this,e)}decode(e){const r=e[0],n=this.decoders[r];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}};const kz=(t,e)=>new j2e({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});let z2e=class{constructor(e,r,n,i){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new B2e(e,r,n),this.decoder=new F2e(e,r,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}};const Cx=({name:t,prefix:e,encode:r,decode:n})=>new z2e(t,e,r,n),cb=({prefix:t,name:e,alphabet:r})=>{const{encode:n,decode:i}=M2e(r,e);return Cx({prefix:t,name:e,encode:n,decode:s=>Tz(i(s))})},W2e=(t,e,r,n)=>{const i={};for(let u=0;u<e.length;++u)i[e[u]]=u;let s=t.length;for(;t[s-1]==="=";)--s;const o=new Uint8Array(s*r/8|0);let a=0,c=0,l=0;for(let u=0;u<s;++u){const f=i[t[u]];if(f===void 0)throw new SyntaxError(`Non-${n} character`);c=c<<r|f,a+=r,a>=8&&(a-=8,o[l++]=255&c>>a)}if(a>=r||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return o},H2e=(t,e,r)=>{const n=e[e.length-1]==="=",i=(1<<r)-1;let s="",o=0,a=0;for(let c=0;c<t.length;++c)for(a=a<<8|t[c],o+=8;o>r;)o-=r,s+=e[i&a>>o];if(o&&(s+=e[i&a<<r-o]),n)for(;s.length*r&7;)s+="=";return s},ss=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>Cx({prefix:e,name:t,encode(i){return H2e(i,n,r)},decode(i){return W2e(i,n,r,t)}}),q2e=Cx({prefix:"\0",name:"identity",encode:t=>U2e(t),decode:t=>$2e(t)});var V2e=Object.freeze({__proto__:null,identity:q2e});const K2e=ss({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var G2e=Object.freeze({__proto__:null,base2:K2e});const Y2e=ss({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var Z2e=Object.freeze({__proto__:null,base8:Y2e});const J2e=cb({prefix:"9",name:"base10",alphabet:"0123456789"});var Q2e=Object.freeze({__proto__:null,base10:J2e});const X2e=ss({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),eye=ss({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var tye=Object.freeze({__proto__:null,base16:X2e,base16upper:eye});const rye=ss({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),nye=ss({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),iye=ss({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),sye=ss({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),oye=ss({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),aye=ss({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),cye=ss({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),lye=ss({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),uye=ss({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var fye=Object.freeze({__proto__:null,base32:rye,base32upper:nye,base32pad:iye,base32padupper:sye,base32hex:oye,base32hexupper:aye,base32hexpad:cye,base32hexpadupper:lye,base32z:uye});const dye=cb({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),hye=cb({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var pye=Object.freeze({__proto__:null,base36:dye,base36upper:hye});const gye=cb({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),mye=cb({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var yye=Object.freeze({__proto__:null,base58btc:gye,base58flickr:mye});const bye=ss({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),wye=ss({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),vye=ss({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),xye=ss({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Eye=Object.freeze({__proto__:null,base64:bye,base64pad:wye,base64url:vye,base64urlpad:xye});const Pz=Array.from("ððªâð°ðððððððððððððâð»ð¥ð¾ð¿ðâ¤ðð¤£ððððððð
ððð¥ð¥°ðððð¢ð¤ðððªðâºðð¤ððððð¹ð¤¦ððââ¨ð¤·ð±ðð¸ððððððððð¤©ððð¤ðð¯ððð¶ðð¤â£ððððªðð¥ððð©ð¡ð¤ªðð¥³ð¥ð¤¤ððð³âððð´ðð¬ððð·ð»ðââ
ð¥ºððð¤ð¦âð£ððâ¹ððð âððºðð»ððððð¹ð£ð«ðððµð¤ðð´ð¤ð¼ð«â½ð¤âðð¤«ðð®ðð»ðð¶ðð²ð¿ð§¡ðâ¡ððââðð°ð¤¨ð¶ð¤ð¶ð°ðð¢ð¤ðð¨ð¨ð¤¬âððºð¤ððð±ðð¶ð¥´â¶â¡âðð¸â¬ð¨ðð¦ð·ðºâ ð
ððµðð¤²ð¤ ð¤§ððµð
ð§ð¾ððð¤ðð¤¯ð·âð§ð¯ððð¤ððâð´ð£ð¸ððð¥ð¤¢ð
ð¡ð©ðð¸ð»ð¤ð¤®ð¼ð¥µð©ððð¼ðð£ð¥"),Cye=Pz.reduce((t,e,r)=>(t[r]=e,t),[]),_ye=Pz.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);function Aye(t){return t.reduce((e,r)=>(e+=Cye[r],e),"")}function Sye(t){const e=[];for(const r of t){const n=_ye[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}const Nye=Cx({prefix:"ð",name:"base256emoji",encode:Aye,decode:Sye});var Iye=Object.freeze({__proto__:null,base256emoji:Nye}),Tye=Rz,AP=128,kye=-128,Pye=Math.pow(2,31);function Rz(t,e,r){e=e||[],r=r||0;for(var n=r;t>=Pye;)e[r++]=t&255|AP,t/=128;for(;t&kye;)e[r++]=t&255|AP,t>>>=7;return e[r]=t|0,Rz.bytes=r-n+1,e}var Rye=n_,Oye=128,SP=127;function n_(t,n){var r=0,n=n||0,i=0,s=n,o,a=t.length;do{if(s>=a)throw n_.bytes=0,new RangeError("Could not decode varint");o=t[s++],r+=i<28?(o&SP)<<i:(o&SP)*Math.pow(2,i),i+=7}while(o>=Oye);return n_.bytes=s-n,r}var Dye=Math.pow(2,7),Lye=Math.pow(2,14),Mye=Math.pow(2,21),$ye=Math.pow(2,28),Uye=Math.pow(2,35),Bye=Math.pow(2,42),Fye=Math.pow(2,49),jye=Math.pow(2,56),zye=Math.pow(2,63),Wye=function(t){return t<Dye?1:t<Lye?2:t<Mye?3:t<$ye?4:t<Uye?5:t<Bye?6:t<Fye?7:t<jye?8:t<zye?9:10},Hye={encode:Tye,decode:Rye,encodingLength:Wye},Oz=Hye;const NP=(t,e,r=0)=>(Oz.encode(t,e,r),e),IP=t=>Oz.encodingLength(t),i_=(t,e)=>{const r=e.byteLength,n=IP(t),i=n+IP(r),s=new Uint8Array(i+r);return NP(t,s,0),NP(r,s,n),s.set(e,i),new qye(t,r,e,s)};let qye=class{constructor(e,r,n,i){this.code=e,this.size=r,this.digest=n,this.bytes=i}};const Dz=({name:t,code:e,encode:r})=>new Vye(t,e,r);let Vye=class{constructor(e,r,n){this.name=e,this.code=r,this.encode=n}digest(e){if(e instanceof Uint8Array){const r=this.encode(e);return r instanceof Uint8Array?i_(this.code,r):r.then(n=>i_(this.code,n))}else throw Error("Unknown type, must be binary type")}};const Lz=t=>async e=>new Uint8Array(await crypto.subtle.digest(t,e)),Kye=Dz({name:"sha2-256",code:18,encode:Lz("SHA-256")}),Gye=Dz({name:"sha2-512",code:19,encode:Lz("SHA-512")});var Yye=Object.freeze({__proto__:null,sha256:Kye,sha512:Gye});const Mz=0,Zye="identity",$z=Tz,Jye=t=>i_(Mz,$z(t)),Qye={code:Mz,name:Zye,encode:$z,digest:Jye};var Xye=Object.freeze({__proto__:null,identity:Qye});new TextEncoder,new TextDecoder;const TP={...V2e,...G2e,...Z2e,...Q2e,...tye,...fye,...pye,...yye,...Eye,...Iye};({...Yye,...Xye});function Uz(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const kP=Uz("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),UE=Uz("ascii","a",t=>{let e="a";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},t=>{t=t.substring(1);const e=Nz(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}),Bz={utf8:kP,"utf-8":kP,hex:TP.base16,latin1:UE,ascii:UE,binary:UE,...TP};function _x(t,e="utf8"){const r=Bz[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString("utf8"):r.encoder.encode(t).substring(1)}function Mg(t,e="utf8"){const r=Bz[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?NS(globalThis.Buffer.from(t,"utf-8")):r.decoder.decode(`${r.prefix}${t}`)}function PP(t){return Oh(_x(Mg(t,Ex),Az))}function j3(t){return _x(Mg(wu(t),Az),Ex)}function Fz(t){const e=Mg(R2e,_P),r=P2e+_x(Iz([e,t]),_P);return[T2e,k2e,r].join(I2e)}function ebe(t){return _x(t,Ex)}function tbe(t){return Mg(t,Ex)}function rbe(t){return Mg([j3(t.header),j3(t.payload)].join(F3),Sz)}function nbe(t){return[j3(t.header),j3(t.payload),ebe(t.signature)].join(F3)}function s_(t){const e=t.split(F3),r=PP(e[0]),n=PP(e[1]),i=tbe(e[2]),s=Mg(e.slice(0,2).join(F3),Sz);return{header:r,payload:n,signature:i,data:s}}function RP(t=pz(O2e)){const e=_z.getPublicKey(t);return{secretKey:Iz([t,e]),publicKey:e}}async function ibe(t,e,r,n,i=Ue.fromMiliseconds(Date.now())){const s={alg:S2e,typ:N2e},o=Fz(n.publicKey),a=i+r,c={iss:o,sub:t,aud:e,iat:i,exp:a},l=rbe({header:s,payload:c}),u=_z.sign(l,n.secretKey.slice(0,32));return nbe({header:s,payload:c,signature:u})}var OP=function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,s;n<i;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return t.concat(s||Array.prototype.slice.call(e))},sbe=function(){function t(e,r,n){this.name=e,this.version=r,this.os=n,this.type="browser"}return t}(),obe=function(){function t(e){this.version=e,this.type="node",this.name="node",this.os=process.platform}return t}(),abe=function(){function t(e,r,n,i){this.name=e,this.version=r,this.os=n,this.bot=i,this.type="bot-device"}return t}(),cbe=function(){function t(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return t}(),lbe=function(){function t(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return t}(),ube=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,fbe=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,DP=3,dbe=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;
2064\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",ube]],LP=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function hbe(t){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new lbe:typeof navigator<"u"?gbe(navigator.userAgent):ybe()}function pbe(t){return t!==""&&dbe.reduce(function(e,r){var n=r[0],i=r[1];if(e)return e;var s=i.exec(t);return!!s&&[n,s]},!1)}function gbe(t){var e=pbe(t);if(!e)return null;var r=e[0],n=e[1];if(r==="searchbot")return new cbe;var i=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);i?i.length<DP&&(i=OP(OP([],i,!0),bbe(DP-i.length),!0)):i=[];var s=i.join("."),o=mbe(t),a=fbe.exec(t);return a&&a[1]?new abe(r,s,o,a[1]):new sbe(r,s,o)}function mbe(t){for(var e=0,r=LP.length;e<r;e++){var n=LP[e],i=n[0],s=n[1],o=s.exec(t);if(o)return i}return null}function ybe(){var t=typeof process<"u"&&process.version;return t?new obe(process.version.slice(1)):null}function bbe(t){for(var e=[],r=0;r<t;r++)e.push("0");return e}var xn={};Object.defineProperty(xn,"__esModule",{value:!0});xn.getLocalStorage=xn.getLocalStorageOrThrow=xn.getCrypto=xn.getCryptoOrThrow=jz=xn.getLocation=xn.getLocationOrThrow=IS=xn.getNavigator=xn.getNavigatorOrThrow=Dh=xn.getDocument=xn.getDocumentOrThrow=xn.getFromWindowOrThrow=xn.getFromWindow=void 0;function s0(t){let e;return typeof window<"u"&&typeof window[t]<"u"&&(e=window[t]),e}xn.getFromWindow=s0;function $g(t){const e=s0(t);if(!e)throw new Error(`${t} is not defined in Window`);return e}xn.getFromWindowOrThrow=$g;function wbe(){return $g("document")}xn.getDocumentOrThrow=wbe;function vbe(){return s0("document")}var Dh=xn.getDocument=vbe;function xbe(){return $g("navigator")}xn.getNavigatorOrThrow=xbe;function Ebe(){return s0("navigator")}var IS=xn.getNavigator=Ebe;function Cbe(){return $g("location")}xn.getLocationOrThrow=Cbe;function _be(){return s0("location")}var jz=xn.getLocation=_be;function Abe(){return $g("crypto")}xn.getCryptoOrThrow=Abe;function Sbe(){return s0("crypto")}xn.getCrypto=Sbe;function Nbe(){return $g("localStorage")}xn.getLocalStorageOrThrow=Nbe;function Ibe(){return s0("localStorage")}xn.getLocalStorage=Ibe;var TS={};Object.defineProperty(TS,"__esModule",{value:!0});var zz=TS.getWindowMetadata=void 0;const MP=xn;function Tbe(){let t,e;try{t=MP.getDocumentOrThrow(),e=MP.getLocationOrThrow()}catch{return null}function r(){const f=t.getElementsByTagName("link"),d=[];for(let p=0;p<f.length;p++){const h=f[p],g=h.getAttribute("rel");if(g&&g.toLowerCase().indexOf("icon")>-1){const y=h.getAttribute("href");if(y)if(y.toLowerCase().indexOf("https:")===-1&&y.toLowerCase().indexOf("http:")===-1&&y.indexOf("//")!==0){let x=e.protocol+"//"+e.host;if(y.indexOf("/")===0)x+=y;else{const C=e.pathname.split("/");C.pop();const _=C.join("/");x+=_+"/"+y}d.push(x)}else if(y.indexOf("//")===0){const x=e.protocol+y;d.push(x)}else d.push(y)}}return d}function n(...f){const d=t.getElementsByTagName("meta");for(let p=0;p<d.length;p++){const h=d[p],g=["itemprop","property","name"].map(y=>h.getAttribute(y)).filter(y=>y?f.includes(y):!1);if(g.length&&g){const y=h.getAttribute("content");
2064if(y)return y}}return""}function i(){let f=n("name","og:site_name","og:title","twitter:title");return f||(f=t.title),f}function s(){return n("description","og:description","twitter:description","keywords")}const o=i(),a=s(),c=e.origin,l=r();return{description:a,url:c,icons:l,name:o}}zz=TS.getWindowMetadata=Tbe;function X2(t,{strict:e=!0}={}){return!t||typeof t!="string"?!1:e?/^0x[0-9a-fA-F]*$/.test(t):t.startsWith("0x")}function o_(t){return X2(t,{strict:!1})?Math.ceil((t.length-2)/2):t.length}const Wz="2.31.0";let g1={getDocsUrl:({docsBaseUrl:t,docsPath:e="",docsSlug:r})=>e?`${t??"https://viem.sh"}${e}${r?`#${r}`:""}`:void 0,version:`viem@${Wz}`};class Lh extends Error{constructor(e,r={}){var a;const n=(()=>{var c;return r.cause instanceof Lh?r.cause.details:(c=r.cause)!=null&&c.message?r.cause.message:r.details})(),i=r.cause instanceof Lh&&r.cause.docsPath||r.docsPath,s=(a=g1.getDocsUrl)==null?void 0:a.call(g1,{...r,docsPath:i}),o=[e||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...s?[`Docs: ${s}`]:[],...n?[`Details: ${n}`]:[],...g1.version?[`Version: ${g1.version}`]:[]].join(` 2065`);super(o,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=n,this.docsPath=i,this.metaMessages=r.metaMessages,this.name=r.name??this.name,this.shortMessage=e,this.version=Wz}walk(e){return Hz(this,e)}}function Hz(t,e){return e!=null&&e(t)?t:t&&typeof t=="object"&&"cause"in t&&t.cause!==void 0?Hz(t.cause,e):e?null:t}class qz extends Lh{constructor({size:e,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${r}).`,{name:"SizeExceedsPaddingSizeError"})}}function Ug(t,{dir:e,size:r=32}={}){return typeof t=="string"?kbe(t,{dir:e,size:r}):Pbe(t,{dir:e,size:r})}function kbe(t,{dir:e,size:r=32}={}){if(r===null)return t;const n=t.replace("0x","");if(n.length>r*2)throw new qz({size:Math.ceil(n.length/2),targetSize:r,type:"hex"});return`0x${n[e==="right"?"padEnd":"padStart"](r*2,"0")}`}function Pbe(t,{dir:e,size:r=32}={}){if(r===null)return t;if(t.length>r)throw new qz({size:t.length,targetSize:r,type:"bytes"});const n=new Uint8Array(r);for(let i=0;i<r;i++){const s=e==="right";n[s?i:r-i-1]=t[s?i:t.length-i-1]}return n}class Rbe extends Lh{constructor({max:e,min:r,signed:n,size:i,value:s}){super(`Number "${s}" is not in safe ${i?`${i*8}-bit ${n?"signed":"unsigned"} `:""}integer range ${e?`(${r} to ${e})`:`(above ${r})`}`,{name:"IntegerOutOfRangeError"})}}class Obe extends Lh{constructor({givenSize:e,maxSize:r}){super(`Size cannot exceed ${r} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}function Bg(t,{size:e}){if(o_(t)>e)throw new Obe({givenSize:o_(t),maxSize:e})}function a_(t,e={}){const{signed:r}=e;e.size&&Bg(t,{size:e.size});const n=BigInt(t);if(!r)return n;const i=(t.length-2)/2,s=(1n<<BigInt(i)*8n-1n)-1n;return n<=s?n:n-BigInt(`0x${"f".padStart(i*2,"f")}`)-1n}function Dbe(t,e={}){return Number(a_(t,e))}const Lbe=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function c_(t,e={}){return typeof t=="number"||typeof t=="bigint"?Kz(t,e):typeof t=="string"?Ube(t,e):typeof t=="boolean"?Mbe(t,e):Vz(t,e)}function Mbe(t,e={}){const r=`0x${Number(t)}`;return typeof e.size=="number"?(Bg(r,{size:e.size}),Ug(r,{size:e.size})):r}function Vz(t,e={}){let r="";for(let i=0;i<t.length;i++)r+=Lbe[t[i]];const n=`0x${r}`;return typeof e.size=="number"?(Bg(n,{size:e.size}),Ug(n,{dir:"right",size:e.size})):n}function Kz(t,e={}){const{signed:r,size:n}=e,i=BigInt(t);let s;n?r?s=(1n<<BigInt(n)*8n-1n)-1n:s=2n**(BigInt(n)*8n)-1n:typeof t=="number"&&(s=BigInt(Number.MAX_SAFE_INTEGER));const o=typeof s=="bigint"&&r?-s-1n:0;if(s&&i>s||i<o){const c=typeof t=="bigint"?"n":"";throw new Rbe({max:s?`${s}${c}`:void 0,min:`${o}${c}`,signed:r,size:n,value:`${t}${c}`})}const a=`0x${(r&&i<0?(1n<<BigInt(n*8))+BigInt(i):i).toString(16)}`;return n?Ug(a,{size:n}):a}const $be=new TextEncoder;function Ube(t,e={}){const r=$be.encode(t);return Vz(r,e)}const Bbe=new TextEncoder;function Fbe(t,e={}){return typeof t=="number"||typeof t=="bigint"?zbe(t,e):typeof t=="boolean"?jbe(t,e):X2(t)?Gz(t,e):Yz(t,e)}function jbe(t,e={}
2065){const r=new Uint8Array(1);return r[0]=Number(t),typeof e.size=="number"?(Bg(r,{size:e.size}),Ug(r,{size:e.size})):r}const Ml={zero:48,nine:57,A:65,F:70,a:97,f:102};function $P(t){if(t>=Ml.zero&&t<=Ml.nine)return t-Ml.zero;if(t>=Ml.A&&t<=Ml.F)return t-(Ml.A-10);if(t>=Ml.a&&t<=Ml.f)return t-(Ml.a-10)}function Gz(t,e={}){let r=t;e.size&&(Bg(r,{size:e.size}),r=Ug(r,{dir:"right",size:e.size}));let n=r.slice(2);n.length%2&&(n=`0${n}`);const i=n.length/2,s=new Uint8Array(i);for(let o=0,a=0;o<i;o++){const c=$P(n.charCodeAt(a++)),l=$P(n.charCodeAt(a++));if(c===void 0||l===void 0)throw new Lh(`Invalid byte sequence ("${n[a-2]}${n[a-1]}" in "${n}").`);s[o]=c*16+l}return s}function zbe(t,e){const r=Kz(t,e);return Gz(r)}function Yz(t,e={}){const r=Bbe.encode(t);return typeof e.size=="number"?(Bg(r,{size:e.size}),Ug(r,{dir:"right",size:e.size})):r}const pw=BigInt(2**32-1),UP=BigInt(32);function Wbe(t,e=!1){return e?{h:Number(t&pw),l:Number(t>>UP&pw)}:{h:Number(t>>UP&pw)|0,l:Number(t&pw)|0}}function Hbe(t,e=!1){const r=t.length;let n=new Uint32Array(r),i=new Uint32Array(r);for(let s=0;s<r;s++){const{h:o,l:a}=Wbe(t[s],e);[n[s],i[s]]=[o,a]}return[n,i]}const qbe=(t,e,r)=>t<<r|e>>>32-r,Vbe=(t,e,r)=>e<<r|t>>>32-r,Kbe=(t,e,r)=>e<<r-32|t>>>64-r,Gbe=(t,e,r)=>t<<r-32|e>>>64-r,v0=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Ybe(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function z3(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function ey(t,...e){if(!Ybe(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function yUe(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");z3(t.outputLen),z3(t.blockLen)}function BP(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function Zbe(t,e){ey(t);const r=e.outputLen;if(t.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}function Jbe(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function Zz(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function bUe(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function wUe(t,e){return t<<32-e|t>>>e}const Qbe=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Xbe(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}function ewe(t){for(let e=0;e<t.length;e++)t[e]=Xbe(t[e]);return t}const FP=Qbe?t=>t:ewe;function twe(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}function Jz(t){return typeof t=="string"&&(t=twe(t)),ey(t),t}function vUe(...t){let e=0;for(let n=0;n<t.length;n++){const i=t[n];ey(i),e+=i.length}const r=new Uint8Array(e);for(let n=0,i=0;n<t.length;n++){const s=t[n];r.set(s,i),i+=s.length}return r}class rwe{}function nwe(t){const e=n=>t().update(Jz(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function xUe(t=32){if(v0&&typeof v0.getRandomValues=="function")return v0.getRandomValues(new Uint8Array(t));if(v0&&typeof v0.randomBytes=="function")return Uint8Array.from(v0.randomBytes(t));throw new Error("crypto.getRandomValues must be defined")}const iwe=BigInt(0),m1=BigInt(1),swe=BigInt(2),owe=BigInt(7),awe=BigInt(256),cwe=BigInt(113),Qz=[],Xz=[],eW=[];for(let t=0,e=m1,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],Qz.push(2*(5*n+r)),Xz.push((t+1)*(t+2)/2%64);let i=iwe;for(let s=0;s<7;s++)e=(e<<m1^(e>>owe)*cwe)%awe,e&swe&&(i^=m1<<(m1<<BigInt(s))-m1);eW.push(i)}const tW=Hbe(eW,!0),lwe=tW[0],uwe=tW[1],jP=(t,e,r)=>r>32?Kbe(t,e,r):qbe(t,e,r),zP=(t,e,r)=>r>32?Gbe(t,e,r):Vbe(t,e,r);function fwe(t,e=24){const r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let o=0;o<10;o++)r[o]=t[o]^t[o+10]^t[o+20]^t[o+30]^t[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,c=(o+2)%10,l=r[c],u=r[c+1],f=jP(l,u,1)^r[a],d=zP(l,u,1)^r[a+1];for(let p=0;p<50;p+=10)t[o+p]^=f,t[o+p+1]^=d}let i=t[2],s=t[3];for(let o=0;o<24;o++){const a=Xz[o],c=jP(i,s,a),l=zP(i,s,a),u=Qz[o];i=t[u],s=t[u+1],t[u]=c,t[u+1]=l}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)r[a]=t[o+a];for(let a=0;a<10;a++)t[o+a]^=~r[(a+2)%10]&r[(a+4)%10]}t[0]^=lwe[n],t[1]^=uwe[n]}Zz(r)}class kS extends rwe{constructor(e,r,n,i=!1,s=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=i,this.rounds=s,z3(n),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=Jbe(this.state)}clone(){return this._cloneInto()}keccak(){FP(this.state32),fwe(this.state32,this.rounds),FP(this.state32),this.posOut=0,this.pos=0}update(e){BP(this),e=Jz(e),ey(e);const{blockLen:r,state:n}=this,i=e.length;for(let s=0;s<i;){const o=Math.min(r-this.pos,i-s);for(let a=0;a<o;a++)n[this.pos++]^=e[s++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:r,pos:n,blockLen:i}=this;e[n]^=r,r&128&&n===i-1&&this.keccak(),e[i-1]^=128,this.keccak()}writeInto(e){BP(this,!1),ey(e),this.finish();const r=this.state,{blockLen:n}=this;for(let i=0,s=e.length;i<s;){this.posOut>=n&&this.keccak();const o=Math.min(n-this.posOut,s-i);e.set(r.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return z3(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(Zbe(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,Zz(this.state)}_cloneInto(e){const{blockLen:r,suffix:n,outputLen:i,rounds:s,enableXOF:o}=this;return e||(e=new kS(r,n,i,o,s)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=s,e.suffix=n,e.outputLen=i,e.enableXOF=o,e.destroyed=this.destroyed,e}}const dwe=(t,e,r)=>nwe(()=>new kS(e,t,r)),hwe=dwe(1,136,256/8);function rW(t,e){const r=e||"hex",n=hwe(X2(t,{strict:!1})?Fbe(t):t);return r==="bytes"?n:c_(n)}class pwe extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){const r=super.get(e);return super.has(e)&&r!==void 0&&(this.delete(e),super.set(e,r)),r}set(e,r){if(super.set(e,r),this.maxSize&&this.size>this.maxSize){const n=this.keys().next().value;n&&this.delete(n)}return this}}const BE=new pwe(8192);function gwe(t,e){if(BE.has(`${t}.${e}`))return BE.get(`${t}.${e}`);const r=t.substring(2).toLowerCase(),n=rW(Yz(r),"bytes"),i=r.split("");for(let o=0;o<40;o+=2)n[o>>1]>>4>=8&&i[o]&&(i[o]=i[o].toUpperCase()),(n[o>>1]&15)>=8&&i[o+1]&&(i[o+1]=i[o+1].toUpperCase());const s=`0x${i.join("")}`;return BE.set(`${t}.${e}`,s),s}function mwe(t){const e=rW(`0x${t.substring(4)}`).substring(26);return gwe(`0x${e}`)}async function ywe({hash:t,signature:e}){const r=X2(t)?t:c_(t),{secp256k1:n}=await Ie(async()=>{const{secp256k1:o}=await import("./secp256k1-Co0OTIGI.js");return{secp256k1:o}},[]);return`0x${(()=>{if(typeof e=="object"&&"r"in e&&"s"in e){const{r:l,s:u,v:f,yParity:d}=e,p=Number(d??f),h=WP(p);return new n.Signature(a_(l),a_(u)).addRecoveryBit(h)}const o=X2(e)?e:c_(e);if(o_(o)!==65)throw new Error("invalid signature length");const a=Dbe(`0x${o.slice(130)}`),c=WP(a);return n.Signature.fromCompact(o.substring(2,130)).addRecoveryBit(c)})().recoverPublicKey(r.substring(2)).toHex(!1)}`}function WP(t){if(t===0||t===1)return t;if(t===27)return 0;if(t===28)return 1;throw new Error("Invalid yParityOrV value")}async function bwe({hash:t,signature:e}){return mwe(await ywe({hash:t,signature:e}))}function wwe(t){if(t.length>=255)throw new TypeError("Alphabet too long");const e=new Uint8Array(256);for(let l=0;l<e.length;l++)e[l]=255;for(let l=0;l<t.length;l++){const u=t.charAt(l),f=u.charCodeAt(0);if(e[f]!==255)throw new TypeError(u+" is ambiguous");e[f]=l}const r=t.length,n=t.charAt(0),i=Math.log(r)/Math.log(256),s=Math.log(256)/Math.log(r);function o(l){if(l instanceof Uint8Array||(ArrayBuffer.isView(l)?l=new Uint8Array(l.buffer,l.byteOffset,l.byteLength):Array.isArray(l)&&(l=Uint8Array.from(l))),!(l instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(l.length===0)return"";let u=0,f=0,d=0;const p=l.length;for(;d!==p&&l[d]===0;)d++,u++;const h=(p-d)*s+1>>>0,g=new Uint8Array(h);for(;d!==p;){let C=l[d],_=0;for(let L=h-1;(C!==0||_<f)&&L!==-1;L--,_++)C+=256*g[L]>>>0,g[L]=C%r>>>0,C=C/r>>>0;if(C!==0)throw new Error("Non-zero carry");f=_,d++}let y=h-f;for(;y!==h&&g[y]===0;)y++;let x=n.repeat(u);for(;y<h;++y)x+=t.charAt(g[y]);return x}function a(l){if(typeof l!="string")throw new TypeError("Expected String");if(l.length===0)return new Uint8Array;let u=0,f=0,d=0;for(;l[u]===n;)f++,u++;const p=(l.length-u)*i+1>>>0,h=new Uint8Array(p);for(;u<l.length;){const C=l.charCodeAt(u);if(C>255)return;let _=e[C];if(_===255)return;let L=0;for(let P=p-1;(_!==0||L<d)&&P!==-1;P--,L++)_+=r*h[P]>>>0,h[P]=_%256>>>0,_=_/256>>>0;if(_!==0)throw new Error("Non-zero carry");d=L,u++}let g=p-d;for(;g!==p&&h[g]===0;)g++;const y=new Uint8Array(f+(p-g));let x=f;
2065for(;g!==p;)y[x++]=h[g++];return y}function c(l){const u=a(l);if(u)return u;throw new Error("Non-base"+r+" character")}return{encode:o,decodeUnsafe:a,decode:c}}var vwe="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";const Fg=wwe(vwe);function xwe(t){const e=t.length;let r=0,n=0;for(;n<e;){let i=t.charCodeAt(n++);if(i&4294967168)if(!(i&4294965248))r+=2;else{if(i>=55296&&i<=56319&&n<e){const s=t.charCodeAt(n);(s&64512)===56320&&(++n,i=((i&1023)<<10)+(s&1023)+65536)}i&4294901760?r+=4:r+=3}else{r++;continue}}return r}function Ewe(t,e,r){const n=t.length;let i=r,s=0;for(;s<n;){let o=t.charCodeAt(s++);if(o&4294967168)if(!(o&4294965248))e[i++]=o>>6&31|192;else{if(o>=55296&&o<=56319&&s<n){const a=t.charCodeAt(s);(a&64512)===56320&&(++s,o=((o&1023)<<10)+(a&1023)+65536)}o&4294901760?(e[i++]=o>>18&7|240,e[i++]=o>>12&63|128,e[i++]=o>>6&63|128):(e[i++]=o>>12&15|224,e[i++]=o>>6&63|128)}else{e[i++]=o;continue}e[i++]=o&63|128}}const Cwe=new TextEncoder,_we=50;function Awe(t,e,r){Cwe.encodeInto(t,e.subarray(r))}function Swe(t,e,r){t.length>_we?Awe(t,e,r):Ewe(t,e,r)}const Nwe=4096;function nW(t,e,r){let n=e;const i=n+r,s=[];let o="";for(;n<i;){const a=t[n++];if(!(a&128))s.push(a);else if((a&224)===192){const c=t[n++]&63;s.push((a&31)<<6|c)}else if((a&240)===224){const c=t[n++]&63,l=t[n++]&63;s.push((a&31)<<12|c<<6|l)}else if((a&248)===240){const c=t[n++]&63,l=t[n++]&63,u=t[n++]&63;let f=(a&7)<<18|c<<12|l<<6|u;f>65535&&(f-=65536,s.push(f>>>10&1023|55296),f=56320|f&1023),s.push(f)}else s.push(a);s.length>=Nwe&&(o+=String.fromCharCode(...s),s.length=0)}return s.length>0&&(o+=String.fromCharCode(...s)),o}const Iwe=new TextDecoder,Twe=200;function kwe(t,e,r){const n=t.subarray(e,e+r);return Iwe.decode(n)}function Pwe(t,e,r){return r>Twe?kwe(t,e,r):nW(t,e,r)}class gw{constructor(e,r){this.type=e,this.data=r}}class $o extends Error{constructor(e){super(e);const r=Object.create($o.prototype);Object.setPrototypeOf(this,r),Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:$o.name})}}const y1=4294967295;function Rwe(t,e,r){const n=r/4294967296,i=r;t.setUint32(e,n),t.setUint32(e+4,i)}function iW(t,e,r){const n=Math.floor(r/4294967296),i=r;t.setUint32(e,n),t.setUint32(e+4,i)}function sW(t,e){const r=t.getInt32(e),n=t.getUint32(e+4);return r*4294967296+n}function Owe(t,e){const r=t.getUint32(e),n=t.getUint32(e+4);return r*4294967296+n}const Dwe=-1,Lwe=4294967296-1,Mwe=17179869184-1;function $we({sec:t,nsec:e}){if(t>=0&&e>=0&&t<=Mwe)if(e===0&&t<=Lwe){const r=new Uint8Array(4);return new DataView(r.buffer).setUint32(0,t),r}else{const r=t/4294967296,n=t&4294967295,i=new Uint8Array(8),s=new DataView(i.buffer);return s.setUint32(0,e<<2|r&3),s.setUint32(4,n),i}else{const r=new Uint8Array(12),n=new DataView(r.buffer);return n.setUint32(0,e),iW(n,4,t),r}}function Uwe(t){const e=t.getTime(),r=Math.floor(e/1e3),n=(e-r*1e3)*1e6,i=Math.floor(n/1e9);return{sec:r+i,nsec:n-i*1e9}}function Bwe(t){if(t instanceof Date){const e=Uwe(t);return $we(e)}else return null}function Fwe(t){const e=new DataView(t.buffer,t.byteOffset,t.byteLength);switch(t.byteLength){case 4:return{sec:e.getUint32(0),nsec:0};case 8:{const r=e.getUint32(0),n=e.getUint32(4),i=(r&3)*4294967296+n,s=r>>>2;return{sec:i,nsec:s}}case 12:{const r=sW(e,4),n=e.getUint32(0);return{sec:r,nsec:n}}default:throw new $o(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${t.length}`)}}function jwe(t){const e=Fwe(t);return new Date(e.sec*1e3+e.nsec/1e6)}const zwe={type:Dwe,encode:Bwe,decode:jwe};class W3{constructor(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(zwe)}register({type:e,encode:r,decode:n}){if(e>=0)this.encoders[e]=r,this.decoders[e]=n;else{const i=-1-e;this.builtInEncoders[i]=r,this.builtInDecoders[i]=n}}tryToEncode(e,r){for(let n=0;n<this.builtInEncoders.length;n++){const i=this.builtInEncoders[n];if(i!=null){const s=i(e,r);if(s!=null){const o=-1-n;return new gw(o,s)}}}for(let n=0;n<this.encoders.length;n++){const i=this.encoders[n];if(i!=null){const s=i(e,r);if(s!=null){const o=n;return new gw(o,s)}}}return e instanceof gw?e:null}decode(e,r,n){const i=r<0?this.builtInDecoders[-1-r]:this.decoders[r];return i?i(e,r,n):new gw(r,e)}}W3.defaultCodec=new W3;function Wwe(t){return t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer}function l_(t){return t instanceof Uint8Array?t:ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Wwe(t)?new Uint8Array(t):Uint8Array.from(t)}const Hwe=100,qwe=2048;let Vwe=class oW{constructor(e){this.entered=!1,this.extensionCodec=(e==null?void 0:e.extensionCodec)??W3.defaultCodec,this.context=e==null?void 0:e.context,this.useBigInt64=(e==null?void 0:e.useBigInt64)??!1,this.maxDepth=(e==null?void 0:e.maxDepth)??Hwe,this.initialBufferSize=(e==null?void 0:e.initialBufferSize)??qwe,this.sortKeys=(e==null?void 0:e.sortKeys)??!1,this.forceFloat32=(e==null?void 0:e.forceFloat32)??!1,this.ignoreUndefined=(e==null?void 0:e.ignoreUndefined)??!1,this.forceIntegerToFloat=(e==null?void 0:e.forceIntegerToFloat)??!1,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}clone(){return new oW({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,maxDepth:this.maxDepth,initialBufferSize:this.initialBufferSize,sortKeys:this.sortKeys,forceFloat32:this.forceFloat32,ignoreUndefined:this.ignoreUndefined,forceIntegerToFloat:this.forceIntegerToFloat})}reinitializeState(){this.pos=0}encodeSharedRef(e){if(this.entered)return this.clone().encodeSharedRef(e);try{return this.entered=!0,this.reinitializeState(),this.doEncode(e,1),this.bytes.subarray(0,this.pos)}finally{this.entered=!1}}encode(e){if(this.entered)return this.clone().encode(e);try{return this.entered=!0,this.reinitializeState(),this.doEncode(e,1),this.bytes.slice(0,this.pos)}finally{this.entered=!1}}doEncode(e,r){if(r>this.maxDepth)throw new Error(`Too deep objects in depth ${r}`);e==null?this.encodeNil():typeof e=="boolean"?this.encodeBoolean(e):typeof e=="number"?this.forceIntegerToFloat?this.encodeNumberAsFloat(e):this.encodeNumber(e):typeof e=="string"?this.encodeString(e):this.useBigInt64&&typeof e=="bigint"?this.encodeBigInt64(e):this.encodeObject(e,r)}ensureBufferSizeToWrite(e){const r=this.pos+e;this.view.byteLength<r&&this.resizeBuffer(r*2)}resizeBuffer(e){const r=new ArrayBuffer(e),n=new Uint8Array(r),i=new DataView(r);n.set(this.bytes),this.view=i,this.bytes=n}encodeNil(){this.writeU8(192)}encodeBoolean(e){e===!1?this.writeU8(194):this.writeU8(195)}encodeNumber(e){!this.forceIntegerToFloat&&Number.isSafeInteger(e)?e>=0?e<128?this.writeU8(e):e<256?(this.writeU8(204),this.writeU8(e)):e<65536?(this.writeU8(205),this.writeU16(e)):e<4294967296?(this.writeU8(206),this.writeU32(e)):this.useBigInt64?this.encodeNumberAsFloat(e):(this.writeU8(207),this.writeU64(e)):e>=-32?this.writeU8(224|e+32):e>=-128?(this.writeU8(208),this.writeI8(e)):e>
vendor: 21,658 bytes, line 2065
2065=-32768?(this.writeU8(209),this.writeI16(e)):e>=-2147483648?(this.writeU8(210),this.writeI32(e)):this.useBigInt64?this.encodeNumberAsFloat(e):(this.writeU8(211),this.writeI64(e)):this.encodeNumberAsFloat(e)}encodeNumberAsFloat(e){this.forceFloat32?(this.writeU8(202),this.writeF32(e)):(this.writeU8(203),this.writeF64(e))}encodeBigInt64(e){e>=BigInt(0)?(this.writeU8(207),this.writeBigUint64(e)):(this.writeU8(211),this.writeBigInt64(e))}writeStringHeader(e){if(e<32)this.writeU8(160+e);else if(e<256)this.writeU8(217),this.writeU8(e);else if(e<65536)this.writeU8(218),this.writeU16(e);else if(e<4294967296)this.writeU8(219),this.writeU32(e);else throw new Error(`Too long string: ${e} bytes in UTF-8`)}encodeString(e){const n=xwe(e);this.ensureBufferSizeToWrite(5+n),this.writeStringHeader(n),Swe(e,this.bytes,this.pos),this.pos+=n}encodeObject(e,r){const n=this.extensionCodec.tryToEncode(e,this.context);if(n!=null)this.encodeExtension(n);else if(Array.isArray(e))this.encodeArray(e,r);else if(ArrayBuffer.isView(e))this.encodeBinary(e);else if(typeof e=="object")this.encodeMap(e,r);else throw new Error(`Unrecognized object: ${Object.prototype.toString.apply(e)}`)}encodeBinary(e){const r=e.byteLength;if(r<256)this.writeU8(196),this.writeU8(r);else if(r<65536)this.writeU8(197),this.writeU16(r);else if(r<4294967296)this.writeU8(198),this.writeU32(r);else throw new Error(`Too large binary: ${r}`);const n=l_(e);this.writeU8a(n)}encodeArray(e,r){const n=e.length;if(n<16)this.writeU8(144+n);else if(n<65536)this.writeU8(220),this.writeU16(n);else if(n<4294967296)this.writeU8(221),this.writeU32(n);else throw new Error(`Too large array: ${n}`);for(const i of e)this.doEncode(i,r+1)}countWithoutUndefined(e,r){let n=0;for(const i of r)e[i]!==void 0&&n++;return n}encodeMap(e,r){const n=Object.keys(e);this.sortKeys&&n.sort();const i=this.ignoreUndefined?this.countWithoutUndefined(e,n):n.length;if(i<16)this.writeU8(128+i);else if(i<65536)this.writeU8(222),this.writeU16(i);else if(i<4294967296)this.writeU8(223),this.writeU32(i);else throw new Error(`Too large map object: ${i}`);for(const s of n){const o=e[s];this.ignoreUndefined&&o===void 0||(this.encodeString(s),this.doEncode(o,r+1))}}encodeExtension(e){if(typeof e.data=="function"){const n=e.data(this.pos+6),i=n.length;if(i>=4294967296)throw new Error(`Too large extension object: ${i}`);this.writeU8(201),this.writeU32(i),this.writeI8(e.type),this.writeU8a(n);return}const r=e.data.length;if(r===1)this.writeU8(212);else if(r===2)this.writeU8(213);else if(r===4)this.writeU8(214);else if(r===8)this.writeU8(215);else if(r===16)this.writeU8(216);else if(r<256)this.writeU8(199),this.writeU8(r);else if(r<65536)this.writeU8(200),this.writeU16(r);else if(r<4294967296)this.writeU8(201),this.writeU32(r);else throw new Error(`Too large extension object: ${r}`);this.writeI8(e.type),this.writeU8a(e.data)}writeU8(e){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,e),this.pos++}writeU8a(e){const r=e.length;this.ensureBufferSizeToWrite(r),this.bytes.set(e,this.pos),this.pos+=r}writeI8(e){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,e),this.pos++}writeU16(e){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,e),this.pos+=2}writeI16(e){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,e),this.pos+=2}writeU32(e){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,e),this.pos+=4}writeI32(e){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,e),this.pos+=4}writeF32(e){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,e),this.pos+=4}writeF64(e){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,e),this.pos+=8}writeU64(e){this.ensureBufferSizeToWrite(8),Rwe(this.view,this.pos,e),this.pos+=8}writeI64(e){this.ensureBufferSizeToWrite(8),iW(this.view,this.pos,e),this.pos+=8}writeBigUint64(e){this.ensureBufferSizeToWrite(8),this.view.setBigUint64(this.pos,e),this.pos+=8}writeBigInt64(e){this.ensureBufferSizeToWrite(8),this.view.setBigInt64(this.pos,e),this.pos+=8}};function Kwe(t,e){return new Vwe(e).encodeSharedRef(t)}function FE(t){return`${t<0?"-":""}0x${Math.abs(t).toString(16).padStart(2,"0")}`}const Gwe=16,Ywe=16;class Zwe{constructor(e=Gwe,r=Ywe){this.hit=0,this.miss=0,this.maxKeyLength=e,this.maxLengthPerKey=r,this.caches=[];for(let n=0;n<this.maxKeyLength;n++)this.caches.push([])}canBeCached(e){return e>0&&e<=this.maxKeyLength}find(e,r,n){const i=this.caches[n-1];e:for(const s of i){const o=s.bytes;for(let a=0;a<n;a++)if(o[a]!==e[r+a])continue e;return s.str}return null}store(e,r){const n=this.caches[e.length-1],i={bytes:e,str:r};n.length>=this.maxLengthPerKey?n[Math.random()*n.length|0]=i:n.push(i)}decode(e,r,n){const i=this.find(e,r,n);if(i!=null)return this.hit++,i;this.miss++;const s=nW(e,r,n),o=Uint8Array.prototype.slice.call(e,r,r+n);return this.store(o,s),s}}const u_="array",Tm="map_key",aW="map_value",Jwe=t=>{if(typeof t=="string"||typeof t=="number")return t;throw new $o("The type of key must be string or number but "+typeof t)};class Qwe{constructor(){this.stack=[],this.stackHeadPosition=-1}get length(){return this.stackHeadPosition+1}top(){return this.stack[this.stackHeadPosition]}pushArrayState(e){const r=this.getUninitializedStateFromPool();r.type=u_,r.position=0,r.size=e,r.array=new Array(e)}pushMapState(e){const r=this.getUninitializedStateFromPool();r.type=Tm,r.readCount=0,r.size=e,r.map={}}getUninitializedStateFromPool(){if(this.stackHeadPosition++,this.stackHeadPosition===this.stack.length){const e={type:void 0,size:0,array:void 0,position:0,readCount:0,map:void 0,key:null};this.stack.push(e)}return this.stack[this.stackHeadPosition]}release(e){if(this.stack[this.stackHeadPosition]!==e)throw new Error("Invalid stack state. Released state is not on top of the stack.");if(e.type===u_){const n=e;n.size=0,n.array=void 0,n.position=0,n.type=void 0}if(e.type===Tm||e.type===aW){const n=e;n.size=0,n.map=void 0,n.readCount=0,n.type=void 0}this.stackHeadPosition--}reset(){this.stack.length=0,this.stackHeadPosition=-1}}const b1=-1,PS=new DataView(new ArrayBuffer(0)),Xwe=new Uint8Array(PS.buffer);try{PS.getInt8(0)}catch(t){if(!(t instanceof RangeError))throw new Error("This module is not supported in the current JavaScript engine because DataView does not throw RangeError on out-of-bounds access")}const HP=new RangeError("Insufficient data"),eve=new Zwe;let tve=class cW{constructor(e){this.totalPos=0,this.pos=0,this.view=PS,this.bytes=Xwe,this.headByte=b1,this.stack=new Qwe,this.entered=!1,this.extensionCodec=(e==null?void 0:e.extensionCodec)??W3.defaultCodec,this.context=e==null?void 0:e.context,this.useBigInt64=(e==null?void 0:e.useBigInt64)??!1,this.rawStrings=(e==null?void 0:e.rawStrings)??!1,this.maxStrLength=(e==null?void 0:e.maxStrLength)??y1,this.maxBinLength=(e==null?void 0:e.maxBinLength)??y1,this.maxArrayLength=(e==null?void 0:e.maxArrayLength)??y1,this.maxMapLength=(e==null?void 0:e.maxMapLength)??y1,this.maxExtLength=(e==null?void 0:e.maxExtLength)??y1,this.keyDecoder=(e==null?void 0:e.keyDecoder)!==void 0?e.keyDecoder:eve,this.mapKeyConverter=(e==null?void 0:e.mapKeyConverter)??Jwe}clone(){return new cW({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,rawStrings:this.rawStrings,maxStrLength:this.maxStrLength,maxBinLength:this.maxBinLength,maxArrayLength:this.maxArrayLength,maxMapLength:this.maxMapLength,maxExtLength:this.maxExtLength,keyDecoder:this.keyDecoder})}reinitializeState(){this.totalPos=0,this.headByte=b1,this.stack.reset()}setBuffer(e){const r=l_(e);this.bytes=r,this.view=new DataView(r.buffer,r.byteOffset,r.byteLength),this.pos=0}appendBuffer(e){if(this.headByte===b1&&!this.hasRemaining(1))this.setBuffer(e);else{const r=this.bytes.subarray(this.pos),n=l_(e),i=new Uint8Array(r.length+n.length);i.set(r),i.set(n,r.length),this.setBuffer(i)}}hasRemaining(e){return this.view.byteLength-this.pos>=e}createExtraByteError(e){const{view:r,pos:n}=this;return new RangeError(`Extra ${r.byteLength-n} of ${r.byteLength} byte(s) found at buffer[${e}]`)}decode(e){if(this.entered)return this.clone().decode(e);try{this.entered=!0,this.reinitializeState(),this.setBuffer(e);const r=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return r}finally{this.entered=!1}}*decodeMulti(e){if(this.entered){yield*this.clone().decodeMulti(e);return}try{for(this.entered=!0,this.reinitializeState(),this.setBuffer(e);this.hasRemaining(1);)yield this.doDecodeSync()}finally{this.entered=!1}}async decodeAsync(e){if(this.entered)return this.clone().decodeAsync(e);try{this.entered=!0;let r=!1,n;for await(const a of e){if(r)throw this.entered=!1,this.createExtraByteError(this.totalPos);this.appendBuffer(a);try{n=this.doDecodeSync(),r=!0}catch(c){if(!(c instanceof RangeError))throw c}this.totalPos+=this.pos}if(r){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return n}const{headByte:i,pos:s,totalPos:o}=this;throw new RangeError(`Insufficient data in parsing ${FE(i)} at ${o} (${s} in the current buffer)`)}finally{this.entered=!1}}decodeArrayStream(e){return this.decodeMultiAsync(e,!0)}decodeStream(e){return this.decodeMultiAsync(e,!1)}async*decodeMultiAsync(e,r){if(this.entered){yield*this.clone().decodeMultiAsync(e,r);return}try{this.entered=!0;let n=r,i=-1;for await(const s of e){if(r&&i===0)throw this.createExtraByteError(this.totalPos);this.appendBuffer(s),n&&(i=this.readArraySize(),n=!1,this.complete());try{for(;yield this.doDecodeSync(),--i!==0;);}catch(o){if(!(o instanceof RangeError))throw o}this.totalPos+=this.pos}}finally{this.entered=!1}}doDecodeSync(){e:for(;;){const e=this.readHeadByte();let r;if(e>=224)r=e-256;else if(e<192)if(e<128)r=e;else if(e<144){const i=e-128;if(i!==0){this.pushMapState(i),this.complete();continue e}else r={}}else if(e<160){const i=e-144;if(i!==0){this.pushArrayState(i),this.complete();continue e}else r=[]}else{const i=e-160;r=this.decodeString(i,0)}else if(e===192)r=null;else if(e===194)r=!1;else if(e===195)r=!0;else if(e===202)r=this.readF32();else if(e===203)r=this.readF64();else if(e===204)r=this.readU8();else if(e===205)r=this.readU16();else if(e===206)r=this.readU32();else if(e===207)this.useBigInt64?r=this.readU64AsBigInt():r=this.readU64();else if(e===208)r=this.readI8();else if(e===209)r=this.readI16();else if(e===210)r=this.readI32();else if(e===211)this.useBigInt64?r=this.readI64AsBigInt():r=this.readI64();else if(e===217){const i=this.lookU8();r=this.decodeString(i,1)}else if(e===218){const i=this.lookU16();r=this.decodeString(i,2)}else if(e===219){const i=this.lookU32();r=this.decodeString(i,4)}else if(e===220){const i=this.readU16();if(i!==0){this.pushArrayState(i),this.complete();continue e}else r=[]}else if(e===221){const i=this.readU32();if(i!==0){this.pushArrayState(i),this.complete();continue e}else r=[]}else if(e===222){const i=this.readU16();if(i!==0){this.pushMapState(i),this.complete();continue e}else r={}}else if(e===223){const i=this.readU32();if(i!==0){this.pushMapState(i),this.complete();continue e}else r={}}else if(e===196){const i=this.lookU8();r=this.decodeBinary(i,1)}else if(e===197){const i=this.lookU16();r=this.decodeBinary(i,2)}else if(e===198){const i=this.lookU32();r=this.decodeBinary(i,4)}else if(e===212)r=this.decodeExtension(1,0);else if(e===213)r=this.decodeExtension(2,0);else if(e===214)r=this.decodeExtension(4,0);else if(e===215)r=this.decodeExtension(8,0);else if(e===216)r=this.decodeExtension(16,0);else if(e===199){const i=this.lookU8();r=this.decodeExtension(i,1)}else if(e===200){const i=this.lookU16();r=this.decodeExtension(i,2)}else if(e===201){const i=this.lookU32();r=this.decodeExtension(i,4)}else throw new $o(`Unrecognized type byte: ${FE(e)}`);this.complete();const n=this.stack;for(;n.length>0;){const i=n.top();if(i.type===u_)if(i.array[i.position]=r,i.position++,i.position===i.size)r=i.array,n.release(i);else continue e;else if(i.type===Tm){if(r==="__proto__")throw new $o("The key __proto__ is not allowed");i.key=this.mapKeyConverter(r),i.type=aW;continue e}else if(i.map[i.key]=r,i.readCount++,i.readCount===i.size)r=i.map,n.release(i);else{i.key=null,i.type=Tm;continue e}}return r}}readHeadByte(){return this.headByte===b1&&(this.headByte=this.readU8()),this.headByte}complete(){this.headByte=b1}readArraySize(){const e=this.readHeadByte();switch(e){case 220:return this.readU16();case 221:return this.readU32();default:{if(e<160)return e-144;throw new $o(`Unrecognized array type byte: ${FE(e)}`)}}}pushMapState(e){if(e>this.maxMapLength)throw new $o(`Max length exceeded: map length (${e}) > maxMapLengthLength (${this.maxMapLength})`);this.stack.pushMapState(e)}pushArrayState(e){if(e>this.maxArrayLength)throw new $o(`Max length exceeded: array length (${e}) > maxArrayLength (${this.maxArrayLength})`);this.stack.pushArrayState(e)}decodeString(e,r){return!this.rawStrings||this.stateIsMapKey()?this.decodeUtf8String(e,r):this.decodeBinary(e,r)}decodeUtf8String(e,r){var s;if(e>this.maxStrLength)throw new $o(`Max length exceeded: UTF-8 byte length (${e}) > maxStrLength (${this.maxStrLength})`);if(this.bytes.byteLength<this.pos+r+e)throw HP;const n=this.pos+r;let i;return this.stateIsMapKey()&&((s=this.keyDecoder)!=null&&s.canBeCached(e))?i=this.keyDecoder.decode(this.bytes,n,e):i=Pwe(this.bytes,n,e),this.pos+=r+e,i}stateIsMapKey(){return this.stack.length>0?this.stack.top().type===Tm:!1}decodeBinary(e,r){if(e>this.maxBinLength)throw new $o(`Max length exceeded: bin length (${e}) > maxBinLength (${this.maxBinLength})`);if(!this.hasRemaining(e+r))throw HP;const n=this.pos+r,i=this.bytes.subarray(n,n+e);return this.pos+=r+e,i}decodeExtension(e,r){if(e>this.maxExtLength)throw new $o(`Max length exceeded: ext length (${e}) > maxExtLength (${this.maxExtLength})`);const n=this.view.getInt8(this.pos+r),i=this.decodeBinary(e,r+1);return this.extensionCodec.decode(i,n,this.context)}lookU8(){return this.view.getUint8(this.pos)}lookU16(){return this.view.getUint16(this.pos)}lookU32(){return this.view.getUint32(this.pos)}readU8(){const e=this.view.getUint8(this.pos);return this.pos++,e}readI8(){const e=this.view.getInt8(this.pos);return this.pos++,e}readU16(){const e=this.view.getUint16(this.pos);return this.pos+=2,e}readI16(){const e=this.view.getInt16(this.pos);return this.pos+=2,e}readU32(){const e=this.view.getUint32(this.pos);return this.pos+=4,e}readI32(){const e=this.view.getInt32(this.pos);return this.pos+=4,e}readU64(){const e=Owe(this.view,this.pos);return this.pos+=8,e}readI64(){const e=sW(this.view,this.pos);return this.pos+=8,e}readU64AsBigInt(){const e=this.view.getBigUint64(this.pos);return this.pos+=8,e}readI64AsBigInt(){const e=this.view.getBigInt64(this.pos);return this.pos+=8,e}readF32(){const e=this.view.getFloat32(this.pos);return this.pos+=4,e}readF64(){const e=this.view.getFloat64(this.pos);return this.pos+=8,e}};function rve(t,e){return new tve(e).decode(t)}/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */function nve(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function lW(t,e){return Array.isArray(e)?e.length===0?!0:t?e.every(r=>typeof r=="string"):e.every(r=>Number.isSafeInteger(r)):!1}function H3(t,e){if(typeof e!="string")throw new Error(`${t}: string expected`);return!0}function RS(t){if(!Number.isSafeInteger(t))throw new Error(`invalid integer: ${t}`)}function f_(t){if(!Array.isArray(t))throw new Error("array expected")}function q3(t,e){if(!lW(!0,e))throw new Error(`${t}: array of strings expected`)}function ive(t,e){if(!lW(!1,e))throw new Error(`${t}: array of numbers expected`)}function sve(...t){const e=s=>s,r=(s,o)=>a=>s(o(a)),n=t.map(s=>s.encode).reduceRight(r,e),i=t.map(s=>s.decode).reduce(r,e);return{encode:n,decode:i}}function ove(t){const e=typeof t=="string"?t.split(""):t,r=e.length;q3("alphabet",e);const n=new Map(e.map((i,s)=>[i,s]));return{encode:i=>(f_(i),i.map(s=>{if(!Number.isSafeInteger(s)||s<0||s>=r)throw new Error(`alphabet.encode: digit index outside alphabet "${s}". Allowed: ${t}`);return e[s]})),decode:i=>(f_(i),i.map(s=>{H3("alphabet.decode",s);const o=n.get(s);if(o===void 0)throw new Error(`Unknown letter: "${s}". Allowed: ${t}`);return o}))}}function ave(t=""){return H3("join",t),{encode:e=>(q3("join.decode",e),e.join(t)),decode:e=>(H3("join.decode",e),e.split(t))}}function cve(t,e="="){return RS(t),H3("padding",e),{encode(r){for(q3("padding.encode",r);r.length*t%8;)r.push(e);return r},decode(r){q3("padding.decode",r);let n=r.length;if(n*t%8)throw new Error("padding: invalid, string should have whole number of bytes");for(;n>0&&r[n-1]===e;n--)if((n-1)*t%8===0)throw new Error("padding: invalid, string has too much padding");return r.slice(0,n)}}}const uW=(t,e)=>e===0?t:uW(e,t%e),V3=(t,e)=>t+(e-uW(t,e)),jE=(()=>{let t=[];for(let e=0;e<40;e++)t.push(2**e);return t})();function qP(t,e,r,n){if(f_(t),e<=0||e>32)throw new Error(`convertRadix2: wrong from=${e}`);if(r<=0||r>32)throw new Error(`convertRadix2: wrong to=${r}`);if(V3(e,r)>32)throw new Error(`convertRadix2: carry overflow from=${e} to=${r} carryBits=${V3(e,r)}`);let i=0,s=0;const o=jE[e],a=jE[r]-1,c=[];for(const l of t){if(RS(l),l>=o)throw new Error(`convertRadix2: invalid data word=${l} from=${e}`);if(i=i<<e|l,s+e>32)throw new Error(`convertRadix2: carry overflow pos=${s} from=${e}`);for(s+=e;s>=r;s-=r)c.push((i>>s-r&a)>>>0);const u=jE[s];if(u===void 0)throw new Error("invalid carry");i&=u-1}if(i=i<<r-s&a,!n&&s>=e)throw new Error("Excess padding");if(!n&&i>0)throw new Error(`Non-zero padding: ${i}`);return n&&s>0&&c.push(i>>>0),c}function lve(t,e=!1){if(RS(t),t<=0||t>32)throw new Error("radix2: bits should be in (0..32]");if(V3(8,t)>32||V3(t,8)>32)throw new Error("radix2: carry overflow");return{encode:r=>{if(!nve(r))throw new Error("radix2.encode input should be Uint8Array");return qP(Array.from(r),8,t,!e)},decode:r=>(ive("radix2.decode",r),Uint8Array.from(qP(r,t,8,e)))}}const uve=sve(lve(5),ove("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),cve(5),ave(""));function OS(t){return globalThis.Buffer!=null?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function fW(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?OS(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}function km(t,e){e||(e=t.reduce((i,s)=>i+s.length,0));const r=fW(e);let n=0;for(const i of t)r.set(i,n),n+=i.length;return OS(r)}function fve(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<t.length;i++){var s=t.charAt(i),o=s.charCodeAt(0);if(r[o]!==255)throw new TypeError(s+" is ambiguous");r[o]=i}var a=t.length,c=t.charAt(0),l=Math.log(a)/Math.log(256),u=Math.log(256)/Math.log(a);function f(h){if(h instanceof Uint8Array||(ArrayBuffer.isView(h)?h=new Uint8Array(h.buffer,h.byteOffset,h.byteLength):Array.isArray(h)&&(h=Uint8Array.from(h))),!(h instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(h.length===0)return"";for(var g=0,y=0,x=0,C=h.length;x!==C&&h[x]===0;)x++,g++;for(var _=(C-x)*u+1>>>0,L=new Uint8Array(_);x!==C;){for(var P=h[x],z=0,W=_-1;(P!==0||z<y)&&W!==-1;W--,z++)P+=256*L[W]>>>0,L[W]=P%a>>>0,P=P/a>>>0;if(P!==0)throw new Error("Non-zero carry");y=z,x++}for(var B=_-y;B!==_&&L[B]===0;)B++;for(var I=c.repeat(g);B<_;++B)I+=t.charAt(L[B]);return I}function d(h){if(typeof h!="string")throw new TypeError("Expected String");if(h.length===0)return new Uint8Array;var g=0;if(h[g]!==" "){for(var y=0,x=0;h[g]===c;)y++,g++;for(var C=(h.length-g)*l+1>>>0,_=new Uint8Array(C);h[g];){var L=r[h.charCodeAt(g)];if(L===255)return;for(var P=0,z=C-1;(L!==0||P<x)&&z!==-1;z--,P++)L+=a*_[z]>>>0,_[z]=L%256>>>0,L=L/256>>>0;if(L!==0)throw new Error("Non-zero carry");x=P,g++}if(h[g]!==" "){for(var W=C-x;W!==C&&_[W]===0;)W++;for(var B=new Uint8Array(y+(C-W)),I=y;W!==C;)B[I++]=_[W++];return B}}}function p(h){var g=d(h);if(g)return g;throw new Error(`Non-${e} character`)}return{encode:f,decodeUnsafe:d,decode:p}}var dve=fve,hve=dve;const pve=t=>{if(t instanceof Uint8Array&&t.constructor.name==="Uint8Array")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")},gve=t=>new TextEncoder().encode(t),mve=t=>new TextDecoder().decode(t);class yve{constructor(e,r,n){this.name=e,this.prefix=r,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class bve{constructor(e,r,n){if(this.name=e,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return dW(this,e)}}class wve{constructor(e){this.decoders=e}or(e){return dW(this,e)}decode(e){const r=e[0],n=this.decoders[r];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const dW=(t,e)=>new wve({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class vve{constructor(e,r,n,i){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new yve(e,r,n),this.decoder=new bve(e,r,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}
2065const Ax=({name:t,prefix:e,encode:r,decode:n})=>new vve(t,e,r,n),lb=({prefix:t,name:e,alphabet:r})=>{const{encode:n,decode:i}=hve(r,e);return Ax({prefix:t,name:e,encode:n,decode:s=>pve(i(s))})},xve=(t,e,r,n)=>{const i={};for(let u=0;u<e.length;++u)i[e[u]]=u;let s=t.length;for(;t[s-1]==="=";)--s;const o=new Uint8Array(s*r/8|0);let a=0,c=0,l=0;for(let u=0;u<s;++u){const f=i[t[u]];if(f===void 0)throw new SyntaxError(`Non-${n} character`);c=c<<r|f,a+=r,a>=8&&(a-=8,o[l++]=255&c>>a)}if(a>=r||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return o},Eve=(t,e,r)=>{const n=e[e.length-1]==="=",i=(1<<r)-1;let s="",o=0,a=0;for(let c=0;c<t.length;++c)for(a=a<<8|t[c],o+=8;o>r;)o-=r,s+=e[i&a>>o];if(o&&(s+=e[i&a<<r-o]),n)for(;s.length*r&7;)s+="=";return s},os=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>Ax({prefix:e,name:t,encode(i){return Eve(i,n,r)},decode(i){return xve(i,n,r,t)}}),Cve=Ax({prefix:"\0",name:"identity",encode:t=>mve(t),decode:t=>gve(t)}),_ve=Object.freeze(Object.defineProperty({__proto__:null,identity:Cve},Symbol.toStringTag,{value:"Module"})),Ave=os({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),Sve=Object.freeze(Object.defineProperty({__proto__:null,base2:Ave},Symbol.toStringTag,{value:"Module"})),Nve=os({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),Ive=Object.freeze(Object.defineProperty({__proto__:null,base8:Nve},Symbol.toStringTag,{value:"Module"})),Tve=lb({prefix:"9",name:"base10",alphabet:"0123456789"}),kve=Object.freeze(Object.defineProperty({__proto__:null,base10:Tve},Symbol.toStringTag,{value:"Module"})),Pve=os({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Rve=os({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),Ove=Object.freeze(Object.defineProperty({__proto__:null,base16:Pve,base16upper:Rve},Symbol.toStringTag,{value:"Module"})),Dve=os({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Lve=os({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Mve=os({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),$ve=os({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Uve=os({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Bve=os({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Fve=os({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),jve=os({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),zve=os({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),Wve=Object.freeze(Object.defineProperty({__proto__:null,base32:Dve,base32hex:Uve,base32hexpad:Fve,base32hexpadupper:jve,base32hexupper:Bve,base32pad:Mve,base32padupper:$ve,base32upper:Lve,base32z:zve},Symbol.toStringTag,{value:"Module"})),Hve=lb({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),qve=lb({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),Vve=Object.freeze(Object.defineProperty({__proto__:null,base36:Hve,base36upper:qve},Symbol.toStringTag,{value:"Module"})),Kve=lb({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Gve=lb({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),Yve=Object.freeze(Object.defineProperty({__proto__:null,base58btc:Kve,base58flickr:Gve},Symbol.toStringTag,{value:"Module"})),Zve=os({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Jve=os({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Qve=os({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Xve=os({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),e3e=Object.freeze(Object.defineProperty({__proto__:null,base64:Zve,base64pad:Jve,base64url:Qve,base64urlpad:Xve},Symbol.toStringTag,{value:"Module"})),hW=Array.from("ððªâð°ðððððððððððððâð»ð¥ð¾ð¿ðâ¤ðð¤£ððððððð
ððð¥ð¥°ðððð¢ð¤ðððªðâºðð¤ððððð¹ð¤¦ððââ¨ð¤·ð±ðð¸ððððððððð¤©ððð¤ðð¯ðð
2065ð¶ðð¤â£ððððªðð¥ððð©ð¡ð¤ªðð¥³ð¥ð¤¤ððð³âððð´ðð¬ððð·ð»ðââ ð¥ºððð¤ð¦âð£ððâ¹ððð âððºðð»ððððð¹ð£ð«ðððµð¤ðð´ð¤ð¼ð«â½ð¤âðð¤«ðð®ðð»ðð¶ðð²ð¿ð§¡ðâ¡ððââðð°ð¤¨ð¶ð¤ð¶ð°ðð¢ð¤ðð¨ð¨ð¤¬âððºð¤ððð±ðð¶ð¥´â¶â¡âðð¸â¬ð¨ðð¦ð·ðºâ ð ððµðð¤²ð¤ ð¤§ððµð ð§ð¾ððð¤ðð¤¯ð·âð§ð¯ððð¤ððâð´ð£ð¸ððð¥ð¤¢ð ð¡ð©ðð¸ð»ð¤ð¤®ð¼ð¥µð©ððð¼ðð£ð¥"),t3e=hW.reduce((t,e,r)=>(t[r]=e,t),[]),r3e=hW.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);function n3e(t){return t.reduce((e,r)=>(e+=t3e[r],e),"")}function i3e(t){const e=[];for(const r of t){const n=r3e[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}const s3e=Ax({prefix:"ð",name:"base256emoji",encode:n3e,decode:i3e}),o3e=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:s3e},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;const VP={..._ve,...Sve,...Ive,...kve,...Ove,...Wve,...Vve,...Yve,...e3e,...o3e};function pW(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const KP=pW("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),zE=pW("ascii","a",t=>{let e="a";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},t=>{t=t.substring(1);const e=fW(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}),gW={utf8:KP,"utf-8":KP,hex:VP.base16,latin1:zE,ascii:zE,binary:zE,...VP};function xa(t,e="utf8"){const r=gW[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?OS(globalThis.Buffer.from(t,"utf-8")):r.decoder.decode(`${r.prefix}${t}`)}function No(t,e="utf8"){const r=gW[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString("utf8"):r.encoder.encode(t).substring(1)}const a3e={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe",batchFetchMessages:"waku_batchFetchMessages"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe",batchFetchMessages:"irn_batchFetchMessages"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe",batchFetchMessages:"iridium_batchFetchMessages"}},c3e="Input must be an string, Buffer or Uint8Array";function l3e(t){let e;if(t instanceof Uint8Array)e=t;else if(typeof t=="string")e=new TextEncoder().encode(t);else throw new Error(c3e);return e}function u3e(t){return Array.prototype.map.call(t,function(e){return(e<16?"0":"")+e.toString(16)}).join("")}function mw(t){return(4294967296+t).toString(16).substring(1)}function f3e(t,e,r){let n=` 2066`+t+" = ";for(let i=0;i<e.length;i+=2){if(r===32)n+=mw(e[i]).toUpperCase(),n+=" ",n+=mw(e[i+1]).toUpperCase();else if(r===64)n+=mw(e[i+1]).toUpperCase(),n+=mw(e[i]).toUpperCase();else throw new Error("Invalid size "+r);i%6===4?n+=` 2067`+new Array(t.length+4).join(" "):i<e.length-2&&(n+=" ")}console.log(n)}function d3e(t,e,r){let n=new Date().getTime();const i=new Uint8Array(e);for(let o=0;o<e;o++)i[o]=o%256;const s=new Date().getTime();console.log("Generated random input in "+(s-n)+"ms"),n=s;for(let o=0;o<r;o++){const a=t(i),c=new Date().getTime(),l=c-n;n=c,console.log("Hashed in "+l+"ms: "+a.substring(0,20)+"..."),console.log(Math.round(e/(1<<20)
vendor: 4,105 bytes, line 2067
2067/(l/1e3)*100)/100+" MB PER SECOND")}}var mW={normalizeInput:l3e,toHex:u3e,debugPrint:f3e,testSpeed:d3e};const bv=mW;function yw(t,e,r){const n=t[e]+t[r];let i=t[e+1]+t[r+1];n>=4294967296&&i++,t[e]=n,t[e+1]=i}function GP(t,e,r,n){let i=t[e]+r;r<0&&(i+=4294967296);let s=t[e+1]+n;i>=4294967296&&s++,t[e]=i,t[e+1]=s}function yW(t,e){return t[e]^t[e+1]<<8^t[e+2]<<16^t[e+3]<<24}function ju(t,e,r,n,i,s){const o=Z1[i],a=Z1[i+1],c=Z1[s],l=Z1[s+1];yw(Jt,t,e),GP(Jt,t,o,a);let u=Jt[n]^Jt[t],f=Jt[n+1]^Jt[t+1];Jt[n]=f,Jt[n+1]=u,yw(Jt,r,n),u=Jt[e]^Jt[r],f=Jt[e+1]^Jt[r+1],Jt[e]=u>>>24^f<<8,Jt[e+1]=f>>>24^u<<8,yw(Jt,t,e),GP(Jt,t,c,l),u=Jt[n]^Jt[t],f=Jt[n+1]^Jt[t+1],Jt[n]=u>>>16^f<<16,Jt[n+1]=f>>>16^u<<16,yw(Jt,r,n),u=Jt[e]^Jt[r],f=Jt[e+1]^Jt[r+1],Jt[e]=f>>>31^u<<1,Jt[e+1]=u>>>31^f<<1}const bW=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),h3e=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3],gs=new Uint8Array(h3e.map(function(t){return t*2})),Jt=new Uint32Array(32),Z1=new Uint32Array(32);function wW(t,e){let r=0;for(r=0;r<16;r++)Jt[r]=t.h[r],Jt[r+16]=bW[r];for(Jt[24]=Jt[24]^t.t,Jt[25]=Jt[25]^t.t/4294967296,e&&(Jt[28]=~Jt[28],Jt[29]=~Jt[29]),r=0;r<32;r++)Z1[r]=yW(t.b,4*r);for(r=0;r<12;r++)ju(0,8,16,24,gs[r*16+0],gs[r*16+1]),ju(2,10,18,26,gs[r*16+2],gs[r*16+3]),ju(4,12,20,28,gs[r*16+4],gs[r*16+5]),ju(6,14,22,30,gs[r*16+6],gs[r*16+7]),ju(0,10,20,30,gs[r*16+8],gs[r*16+9]),ju(2,12,22,24,gs[r*16+10],gs[r*16+11]),ju(4,14,16,26,gs[r*16+12],gs[r*16+13]),ju(6,8,18,28,gs[r*16+14],gs[r*16+15]);for(r=0;r<16;r++)t.h[r]=t.h[r]^Jt[r]^Jt[r+16]}const zu=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function vW(t,e,r,n){if(t===0||t>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(e&&e.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(r&&r.length!==16)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(n&&n.length!==16)throw new Error("Illegal personal, expected Uint8Array with length is 16");const i={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:t};zu.fill(0),zu[0]=t,e&&(zu[1]=e.length),zu[2]=1,zu[3]=1,r&&zu.set(r,32),n&&zu.set(n,48);for(let s=0;s<16;s++)i.h[s]=bW[s]^yW(zu,s*4);return e&&(DS(i,e),i.c=128),i}function DS(t,e){for(let r=0;r<e.length;r++)t.c===128&&(t.t+=t.c,wW(t,!1),t.c=0),t.b[t.c++]=e[r]}function xW(t){for(t.t+=t.c;t.c<128;)t.b[t.c++]=0;wW(t,!0);const e=new Uint8Array(t.outlen);for(let r=0;r<t.outlen;r++)e[r]=t.h[r>>2]>>8*(r&3);return e}function EW(t,e,r,n,i){r=r||64,t=bv.normalizeInput(t),n&&(n=bv.normalizeInput(n)),i&&(i=bv.normalizeInput(i));const s=vW(r,e,n,i);return DS(s,t),xW(s)}function p3e(t,e,r,n,i){const s=EW(t,e,r,n,i);return bv.toHex(s)}var g3e={blake2b:EW,blake2bHex:p3e,blake2bInit:vW,blake2bUpdate:DS,blake2bFinal:xW};const CW=mW;function m3e(t,e){return t[e]^t[e+1]<<8^t[e+2]<<16^t[e+3]<<24}function Wu(t,e,r,n,i,s){Fr[t]=Fr[t]+Fr[e]+i,Fr[n]=bw(Fr[n]^Fr[t],16),Fr[r]=Fr[r]+Fr[n],Fr[e]=bw(Fr[e]^Fr[r],12),Fr[t]=Fr[t]+Fr[e]+s,Fr[n]=bw(Fr[n]^Fr[t],8),Fr[r]=Fr[r]+Fr[n],Fr[e]=bw(Fr[e]^Fr[r],7)}function bw(t,e){return t>>>e^t<<32-e}const _W=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ms=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,
20676,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0]),Fr=new Uint32Array(16),qi=new Uint32Array(16);function AW(t,e){let r=0;for(r=0;r<8;r++)Fr[r]=t.h[r],Fr[r+8]=_W[r];for(Fr[12]^=t.t,Fr[13]^=t.t/4294967296,e&&(Fr[14]=~Fr[14]),r=0;r<16;r++)qi[r]=m3e(t.b,4*r);for(r=0;r<10;r++)Wu(0,4,8,12,qi[ms[r*16+0]],qi[ms[r*16+1]]),Wu(1,5,9,13,qi[ms[r*16+2]],qi[ms[r*16+3]]),Wu(2,6,10,14,qi[ms[r*16+4]],qi[ms[r*16+5]]),Wu(3,7,11,15,qi[ms[r*16+6]],qi[ms[r*16+7]]),Wu(0,5,10,15,qi[ms[r*16+8]],qi[ms[r*16+9]]),Wu(1,6,11,12,qi[ms[r*16+10]],qi[ms[r*16+11]]),Wu(2,7,8,13,qi[ms[r*16+12]],qi[ms[r*16+13]]),Wu(3,4,9,14,qi[ms[r*16+14]],qi[ms[r*16+15]]);for(r=0;r<8;r++)t.h[r]^=Fr[r]^Fr[r+8]}function SW(t,e){if(!(t>0&&t<=32))throw new Error("Incorrect output length, should be in [1, 32]");const r=e?e.length:0;if(e&&!(r>0&&r<=32))throw new Error("Incorrect key length, should be in [1, 32]");const n={h:new Uint32Array(_W),b:new Uint8Array(64),c:0,t:0,outlen:t};return n.h[0]^=16842752^r<<8^t,r>0&&(LS(n,e),n.c=64),n}function LS(t,e){for(let r=0;r<e.length;r++)t.c===64&&(t.t+=t.c,AW(t,!1),t.c=0),t.b[t.c++]=e[r]}function NW(t){for(t.t+=t.c;t.c<64;)t.b[t.c++]=0;AW(t,!0);const e=new Uint8Array(t.outlen);for(let r=0;r<t.outlen;r++)e[r]=t.h[r>>2]>>8*(r&3)&255;return e}function IW(t,e,r){r=r||32,t=CW.normalizeInput(t);const n=SW(r,e);return LS(n,t),NW(n)}function y3e(t,e,r){const n=IW(t,e,r);return CW.toHex(n)}var b3e={blake2s:IW,blake2sHex:y3e,blake2sInit:SW,blake2sUpdate:LS,blake2sFinal:NW};const w1=g3e,v1=b3e;var w3e={blake2b:w1.blake2b,blake2bHex:w1.blake2bHex,blake2bInit:w1.blake2bInit,blake2bUpdate:w1.blake2bUpdate,blake2bFinal:w1.blake2bFinal,blake2s:v1.blake2s,blake2sHex:v1.blake2sHex,blake2sInit:v1.blake2sInit,blake2sUpdate:v1.blake2sUpdate,blake2sFinal:v1.blake2sFinal},v3e={};const x3e=":";function wv(t){const[e,r]=t.split(x3e);return{namespace:e,reference:r}}function TW(t,e){return t.includes(":")?[t]:e.chains||[]}var E3e=Object.defineProperty,C3e=Object.defineProperties,_3e=Object.getOwnPropertyDescriptors,YP=Object.getOwnPropertySymbols,A3e=Object.prototype.hasOwnProperty,S3e=Object.prototype.propertyIsEnumerable,ZP=(t,e,r)=>e in t?E3e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,JP=(t,e)=>{for(var r in e||(e={}))A3e.call(e,r)&&ZP(t,r,e[r]);if(YP)for(var r of YP(e))S3e.call(e,r)&&ZP(t,r,e[r]);return t},N3e=(t,e)=>C3e(t,_3e(e));const I3e="ReactNative",Wo={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},T3e="js";function K3(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function wd(){return!Dh()&&!!IS()&&navigator.product===I3e}function k3e(){return wd()&&typeof global<"u"&&typeof(global==null?void 0:global.Platform)<"u"&&(global==null?void 0:global.Platform.OS)==="android"}function P3e(){return wd()&&typeof global<"u"&&typeof(global==null?void 0:global.Platform)<"u"&&(global==null?void 0:global.Platform.OS)==="ios"}function jg(){return!K3()&&!!IS()&&!!Dh()}function ub(){return wd()?Wo.reactNative:K3()?Wo.node:jg()?Wo.browser:Wo.unknown}function QP(){var t;try{return wd()&&typeof global<"u"&&typeof(global==null?void 0:global.Application)<"u"?(t=global.Application)==null?void 0:t.applicationId:void 0}catch{return}}function R3e(t,e){const r=new URLSearchParams(t);for(const n of Object.keys(e).sort())if(e.hasOwnProperty(n)){const i=e[n];i!==void 0&&r.set(n,i)}return r.toString()}function O3e(t){var e,r;const n=kW();try{return t!=null&&t.url&&n.url&&new URL(t.url).host!==new URL(n.url).host&&(console.warn(`The configured WalletConnect 'metadata.url':${t.url} differs from the actual page url:${n.url}. This is probably unintended and can lead to issues.`),t.url=n.url),(e=t==null?void 0:t.icons)!=null&&e.length&&t.icons.length>0&&(t.icons=t.icons.filter(i=>i!=="")),N3e(JP(JP({},n),t),{url:(t==null?void 0:t.url)||n.url,name:(t==null?void 0:t.name)||n.name,description:(t==null?void 0:t.description)||n.description,icons:(r=t==null?void 0:t.icons)!=null&&r.length&&t.icons.length>0?t.icons:n.icons})}catch(i){return console.warn("Error populating app metadata",i),t||n}}function kW(){return zz()||{name:"",description:"",url:"",icons:[""]}}function D3e(){if(ub()===Wo.reactNative&&typeof global<"u"&&typeof(global==null?void 0:global.Platform)<"u"){const{OS:r,Version:n}=global.Platform;return[r,n].join("-")}const t=hbe();if(t===null)return"unknown";const e=t.os?t.os.replace(" ","").toLowerCase():"unknown";return t.type==="browser"?[e,t.name,t.version].join("-"):[e,t.version].join("-")}function L3e(){var t;const e=ub();return e===Wo.browser?[e,((t=jz())==null?void 0:t.host)||"unknown"].join(":"):e}function PW(t,e,r){const n=D3e(),i=L3e();return[[t,e].join("-"),[T3e,r].join("-"),n,i].join("/")}function M3e({protocol:t,version:e,relayUrl:r,sdkVersion:n,auth:i,projectId:s,useOnCloseEvent:o,bundleId:a,packageName:c}){const l=r.split("?"),u=PW(t,e,n),f={auth:i,ua:u,projectId:s,useOnCloseEvent:o,packageName:c||void 0,bundleId:a||void 0},d=R3e(l[1]||"",f);return l[0]+"?"+d}function Jd(t,e){return t.filter(r=>e.includes(r)).length===t.length}function d_(t){return Object.fromEntries(t.entries())}function h_(t){return new Map(Object.entries(t))}function Ld(t=Ue.FIVE_MINUTES,e){const r=Ue.toMiliseconds(t||Ue.FIVE_MINUTES);let n,i,s,o;return{resolve:a=>{s&&n&&(clearTimeout(s),n(a),o=Promise.resolve(a))},reject:a=>
vendor: 15,074 bytes, line 2067
2067{s&&i&&(clearTimeout(s),i(a))},done:()=>new Promise((a,c)=>{if(o)return a(o);s=setTimeout(()=>{const l=new Error(e);o=Promise.reject(l),c(l)},r),n=a,i=c})}}function Nf(t,e,r){return new Promise(async(n,i)=>{const s=setTimeout(()=>i(new Error(r)),e);try{const o=await t;n(o)}catch(o){i(o)}clearTimeout(s)})}function RW(t,e){if(typeof e=="string"&&e.startsWith(`${t}:`))return e;if(t.toLowerCase()==="topic"){if(typeof e!="string")throw new Error('Value must be "string" for expirer target type: topic');return`topic:${e}`}else if(t.toLowerCase()==="id"){if(typeof e!="number")throw new Error('Value must be "number" for expirer target type: id');return`id:${e}`}throw new Error(`Unknown expirer target type: ${t}`)}function $3e(t){return RW("topic",t)}function U3e(t){return RW("id",t)}function OW(t){const[e,r]=t.split(":"),n={id:void 0,topic:void 0};if(e==="topic"&&typeof r=="string")n.topic=r;else if(e==="id"&&Number.isInteger(Number(r)))n.id=Number(r);else throw new Error(`Invalid target, expected id:number or topic:string, got ${e}:${r}`);return n}function _i(t,e){return Ue.fromMiliseconds(Date.now()+Ue.toMiliseconds(t))}function cf(t){return Date.now()>=Ue.toMiliseconds(t)}function Qr(t,e){return`${t}${e?`:${e}`:""}`}function ph(t=[],e=[]){return[...new Set([...t,...e])]}async function B3e({id:t,topic:e,wcDeepLink:r}){var n;try{if(!r)return;const i=typeof r=="string"?JSON.parse(r):r,s=i==null?void 0:i.href;if(typeof s!="string")return;const o=F3e(s,t,e),a=ub();if(a===Wo.browser){if(!((n=Dh())!=null&&n.hasFocus())){console.warn("Document does not have focus, skipping deeplink.");return}j3e(o)}else a===Wo.reactNative&&typeof(global==null?void 0:global.Linking)<"u"&&await global.Linking.openURL(o)}catch(i){console.error(i)}}function F3e(t,e,r){const n=`requestId=${e}&sessionTopic=${r}`;t.endsWith("/")&&(t=t.slice(0,-1));let i=`${t}`;if(t.startsWith("https://t.me")){const s=t.includes("?")?"&startapp=":"?startapp=";i=`${i}${s}${q3e(n,!0)}`}else i=`${i}/wc?${n}`;return i}function j3e(t){let e="_self";H3e()?e="_top":(W3e()||t.startsWith("https://")||t.startsWith("http://"))&&(e="_blank"),window.open(t,e,"noreferrer noopener")}async function z3e(t,e){let r="";try{if(jg()&&(r=localStorage.getItem(e),r))return r;r=await t.getItem(e)}catch(n){console.error(n)}return r}function XP(t,e){if(!t.includes(e))return null;const r=t.split(/([&,?,=])/),n=r.indexOf(e);return r[n+2]}function eR(){return typeof crypto<"u"&&crypto!=null&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/gu,t=>{const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}function MS(){return typeof process<"u"&&v3e.IS_VITEST==="true"}function W3e(){return typeof window<"u"&&(!!window.TelegramWebviewProxy||!!window.Telegram||!!window.TelegramWebviewProxyProto)}function H3e(){try{return window.self!==window.top}catch{return!1}}function q3e(t,e=!1){const r=Buffer.from(t).toString("base64");return e?r.replace(/[=]/g,""):r}function DW(t){return Buffer.from(t,"base64").toString("utf-8")}function V3e(t){return new Promise(e=>setTimeout(e,t))}const ww=BigInt(2**32-1),tR=BigInt(32);function LW(t,e=!1){return e?{h:Number(t&ww),l:Number(t>>tR&ww)}:{h:Number(t>>tR&ww)|0,l:Number(t&ww)|0}}function MW(t,e=!1){const r=t.length;let n=new Uint32Array(r),i=new Uint32Array(r);for(let s=0;s<r;s++){const{h:o,l:a}=LW(t[s],e);[n[s],i[s]]=[o,a]}return[n,i]}const rR=(t,e,r)=>t>>>r,nR=(t,e,r)=>t<<32-r|e>>>r,lf=(t,e,r)=>t>>>r|e<<32-r,uf=(t,e,r)=>t<<32-r|e>>>r,J1=(t,e,r)=>t<<64-r|e>>>r-32,Q1=(t,e,r)=>t>>>r-32|e<<64-r,K3e=(t,e)=>e,G3e=(t,e)=>t,Y3e=(t,e,r)=>t<<r|e>>>32-r,Z3e=(t,e,r)=>e<<r|t>>>32-r,J3e=(t,e,r)=>e<<r-32|t>>>64-r,Q3e=(t,e,r)=>t<<r-32|e>>>64-r;function Va(t,e,r,n){const i=(e>>>0)+(n>>>0);return{h:t+r+(i/2**32|0)|0,l:i|0}}const $S=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),US=(t,e,r,n)=>e+r+n+(t/2**32|0)|0,X3e=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),e4e=(t,e,r,n,i)=>e+r+n+i+(t/2**32|0)|0,t4e=(t,e,r,n,i)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(i>>>0),r4e=(t,e,r,n,i,s)=>e+r+n+i+s+(t/2**32|0)|0,x0=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;function BS(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function vu(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function Sa(t,...e){if(!BS(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function FS(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");vu(t.outputLen),vu(t.blockLen)}function sd(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function jS(t,e){Sa(t);const r=e.outputLen;if(t.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}function ty(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function Na(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function WE(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function Tc(t,e){return t<<32-e|t>>>e}const $W=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function UW(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}const jl=$W?t=>t:t=>UW(t);function n4e(t){for(let e=0;e<t.length;e++)t[e]=UW(t[e]);return t}const ff=$W?t=>t:n4e,BW=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",i4e=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function ry(t){if(Sa(t),BW)return t.toHex();let e="";for(let r=0;r<t.length;r++)e+=i4e[t[r]];return e}const $l={_0:48,_9:57,A:65,F:70,a:97,f:102};function iR(t){if(t>=$l._0&&t<=$l._9)return t-$l._0;if(t>=$l.A&&t<=$l.F)return t-($l.A-10);if(t>=$l.a&&t<=$l.f)return t-($l.a-10)}function zS(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);if(BW)return Uint8Array.fromHex(t);const e=t.length,r=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);const n=new Uint8Array(r);for(let i=0,s=0;i<r;i++,s+=2){const o=iR(t.charCodeAt(s)),a=iR(t.charCodeAt(s+1));if(o===void 0||a===void 0){const c=t[s]+t[s+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+s)}n[i]=o*16+a}return n}function s4e(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}function uc(t){return typeof t=="string"&&(t=s4e(t)),Sa(t),t}function Qd(...t){let e=0;for(let n=0;n<t.length;n++){const i=t[n];Sa(i),e+=i.length}const r=new Uint8Array(e);for(let n=0,i=0;n<t.length;n++){const s=t[n];r.set(s,i),i+=s.length}return r}let Sx=class{};function fb(t){const e=n=>t().update(uc(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function o4e(t){const e=(n,i)=>t(i).update(uc(n)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=n=>t(n),e}function zg(t=32){if(x0&&typeof x0.getRandomValues=="function")return x0.getRandomValues(new Uint8Array(t));if(x0&&typeof x0.randomBytes=="function")return Uint8Array.from(x0.randomBytes(t));throw new Error("crypto.getRandomValues must be defined")}const a4e=BigInt(0),x1=BigInt(1),c4e=BigInt(2),l4e=BigInt(7),u4e=BigInt(256),f4e=BigInt(113),FW=[],jW=[],zW=[];for(let t=0,e=x1,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],FW.push(2*(5*n+r)),jW.push((t+1)*(t+2)/2%64);let i=a4e;for(let s=0;s<7;s++)e=(e<<x1^(e>>l4e)*f4e)%u4e,e&c4e&&(i^=x1<<(x1<<BigInt(s))-x1);zW.push(i)}const WW=MW(zW,!0),d4e=WW[0],h4e=WW[1],sR=(t,e,r)=>r>32?J3e(t,e,r):Y3e(t,e,r),oR=(t,e,r)=>r>32?Q3e(t,e,r):Z3e(t,e,r);function p4e(t,e=24){const r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let o=0;o<10;o++)r[o]=t[o]^t[o+10]^t[o+20]^t[o+30]^t[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,c=(o+2)%10,l=r[c],u=r[c+1],f=sR(l,u,1)^r[a],d=oR(l,u,1)^r[a+1];for(let p=0;p<50;p+=10)t[o+p]^=f,t[o+p+1]^=d}let i=t[2],s=t[3];for(let o=0;o<24;o++){const a=jW[o],c=sR(i,s,a),l=oR(i,s,a),u=FW[o];i=t[u],s=t[u+1],t[u]=c,t[u+1]=l}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)r[a]=t[o+a];for(let a=0;a<10;a++)t[o+a]^=~r[(a+2)%10]&r[(a+4)%10]}t[0]^=d4e[n],t[1]^=h4e[n]}Na(r)}let g4e=class HW extends Sx{constructor(e,r,n,i=!1,s=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=i,this.rounds=s,vu(n),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=ty(this.state)}clone(){return this._cloneInto()}keccak(){ff(this.state32),p4e(this.state32,this.rounds),ff(this.state32),this.posOut=0,this.pos=0}update(e){sd(this),e=uc(e),Sa(e);const{blockLen:r,state:n}=this,i=e.length;for(let s=0;s<i;){const o=Math.min(r-this.pos,i-s);for(let a=0;a<o;a++)n[this.pos++]^=e[s++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:r,pos:n,blockLen:i}=this;e[n]^=r,r&128&&n===i-1&&this.keccak(),e[i-1]^=128,this.keccak()}writeInto(e){sd(this,!1),Sa(e),this.finish();const r=this.state,{blockLen:n}=this;for(let i=0,s=e.length;i<s;){this.posOut>=n&&this.keccak();const o=Math.min(n-this.posOut,s-i);e.set(r.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return vu(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(jS(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,Na(this.state)}_cloneInto(e){const{blockLen:r,suffix:n,outputLen:i,rounds:s,enableXOF:o}=this;return e||(e=new HW(r,n,i,o,s)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=s,e.suffix=n,e.outputLen=i,e.enableXOF=o,e.destroyed=this.destroyed,e}};const m4e=(t,e,r)=>fb(()=>new g4e(e,t,r)),y4e=m4e(1,136,256/8);function b4e(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);const i=BigInt(32),s=BigInt(4294967295),o=Number(r>>i&s),a=Number(r&s),c=n?4:0,l=n?0:4;t.setUint32(e+c,o,n),t.setUint32(e+l,a,n)}function w4e(t,e,r){return t&e^~t&r}function v4e(t,e,r){return t&e^t&r^e&r}let qW=class extends Sx{constructor(e,r,n,i){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=i,this.buffer=new Uint8Array(e),this.view=WE(this.buffer)}update(e){sd(this),e=uc(e),Sa(e);const{view:r,buffer:n,blockLen:i}=this,s=e.length;for(let o=0;o<s;){const a=Math.min(i-this.pos,s-o);if(a===i){const c=WE(e);for(;i<=s-o;o+=i)this.process(c,o);continue}n.set(e.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===i&&(this.process(r,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){sd(this),jS(e,this),this.finished=!0;const{buffer:r,view:n,blockLen:i,isLE:s}=this;let{pos:o}=this;r[o++]=128,Na(this.buffer.subarray(o)),this.padOffset>i-o&&(this.process(n,0),o=0);for(let f=o;f<i;f++)r[f]=0;b4e(n,i-8,BigInt(this.length*8),s),this.process(n,0);const a=WE(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,u=this.get();if(l>u.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;f<l;f++)a.setUint32(4*f,u[f],s)}digest(){const{buffer:e,outputLen:r}=this;this.digestInto(e);const n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:r,buffer:n,length:i,finished:s,destroyed:o,pos:a}=this;return e.destroyed=o,e.finished=s,e.length=i,e.pos=a,i%r&&e.buffer.set(n),e}clone(){return this._cloneInto()}};const Hu=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ys=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),bs=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),x4e=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),qu=new Uint32Array(64);let E4e=class extends qW{constructor(e=32){super(64,e,8,!1),this.A=Hu[0]|0,this.B=Hu[1]|0,this.C=Hu[2]|0,this.D=Hu[3]|0,this.E=Hu[4]|0,this.F=Hu[5]|0,this.G=Hu[6]|0,this.H=Hu[7]|0}get(){const{A:e,B:r,C:n,D:i,E:s,F:o,G:a,H:c}=this;return[e,r,n,i,s,o,a,c]}set(e,r,n,i,s,o,a,c){this.A=e|0,this.B=r|0,this.C=n|0,this.D=i|0,this.E=s|0,this.F=o|0,this.G=a|0,this.H=c|0}process(e,r){for(let f=0;f<16;f++,r+=4)qu[f]=e.getUint32(r,!1);for(let f=16;f<64;f++){const d=qu[f-15],p=qu[f-2],h=Tc(d,7)^Tc(d,18)^d>>>3,g=Tc(p,17)^Tc(p,19)^p>>>10;qu[f]=g+qu[f-7]+h+qu[f-16]|0}let{A:n,B:i,C:s,D:o,E:a,F:c,G:l,H:u}=this;for(let f=0;f<64;f++){const d=Tc(a,6)^Tc(a,11)^Tc(a,25),p=u+d+w4e(a,c,l)+x4e[f]+qu[f]|0,h=(Tc(n,2)^Tc(n,13)^Tc(n,22))+v4e(n,i,s)|0;u=l,l=c,c=a,a=o+p|0,o=s,s=i,i=n,n=p+h|0}n=n+this.A|0,i=i+this.B|0,s=s+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(n,i,s,o,a,c,l,u)}roundClean(){Na(qu)}destroy(){this.set(0,0,0,0,0,0,0,0),Na(this.buffer)}};const VW=MW(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e3585
20675771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))),C4e=VW[0],_4e=VW[1],Vu=new Uint32Array(80),Ku=new Uint32Array(80);let WS=class extends qW{constructor(e=64){super(128,e,16,!1),this.Ah=bs[0]|0,this.Al=bs[1]|0,this.Bh=bs[2]|0,this.Bl=bs[3]|0,this.Ch=bs[4]|0,this.Cl=bs[5]|0,this.Dh=bs[6]|0,this.Dl=bs[7]|0,this.Eh=bs[8]|0,this.El=bs[9]|0,this.Fh=bs[10]|0,this.Fl=bs[11]|0,this.Gh=bs[12]|0,this.Gl=bs[13]|0,this.Hh=bs[14]|0,this.Hl=bs[15]|0}get(){const{Ah:e,Al:r,Bh:n,Bl:i,Ch:s,Cl:o,Dh:a,Dl:c,Eh:l,El:u,Fh:f,Fl:d,Gh:p,Gl:h,Hh:g,Hl:y}=this;return[e,r,n,i,s,o,a,c,l,u,f,d,p,h,g,y]}set(e,r,n,i,s,o,a,c,l,u,f,d,p,h,g,y){this.Ah=e|0,this.Al=r|0,this.Bh=n|0,this.Bl=i|0,this.Ch=s|0,this.Cl=o|0,this.Dh=a|0,this.Dl=c|0,this.Eh=l|0,this.El=u|0,this.Fh=f|0,this.Fl=d|0,this.Gh=p|0,this.Gl=h|0,this.Hh=g|0,this.Hl=y|0}process(e,r){for(let _=0;_<16;_++,r+=4)Vu[_]=e.getUint32(r),Ku[_]=e.getUint32(r+=4);for(let _=16;_<80;_++){const L=Vu[_-15]|0,P=Ku[_-15]|0,z=lf(L,P,1)^lf(L,P,8)^rR(L,P,7),W=uf(L,P,1)^uf(L,P,8)^nR(L,P,7),B=Vu[_-2]|0,I=Ku[_-2]|0,j=lf(B,I,19)^J1(B,I,61)^rR(B,I,6),D=uf(B,I,19)^Q1(B,I,61)^nR(B,I,6),O=X3e(W,D,Ku[_-7],Ku[_-16]),T=e4e(O,z,j,Vu[_-7],Vu[_-16]);Vu[_]=T|0,Ku[_]=O|0}let{Ah:n,Al:i,Bh:s,Bl:o,Ch:a,Cl:c,Dh:l,Dl:u,Eh:f,El:d,Fh:p,Fl:h,Gh:g,Gl:y,Hh:x,Hl:C}=this;for(let _=0;_<80;_++){const L=lf(f,d,14)^lf(f,d,18)^J1(f,d,41),P=uf(f,d,14)^uf(f,d,18)^Q1(f,d,41),z=f&p^~f&g,W=d&h^~d&y,B=t4e(C,P,W,_4e[_],Ku[_]),I=r4e(B,x,L,z,C4e[_],Vu[_]),j=B|0,D=lf(n,i,28)^J1(n,i,34)^J1(n,i,39),O=uf(n,i,28)^Q1(n,i,34)^Q1(n,i,39),T=n&s^n&a^s&a,m=i&o^i&c^o&c;x=g|0,C=y|0,g=p|0,y=h|0,p=f|0,h=d|0,{h:f,l:d}=Va(l|0,u|0,I|0,j|0),l=a|0,u=c|0,a=s|0,c=o|0,s=n|0,o=i|0;const b=$S(j,O,m);n=US(b,I,D,T),i=b|0}({h:n,l:i}=Va(this.Ah|0,this.Al|0,n|0,i|0)),{h:s,l:o}=Va(this.Bh|0,this.Bl|0,s|0,o|0),{h:a,l:c}=Va(this.Ch|0,this.Cl|0,a|0,c|0),{h:l,l:u}=Va(this.Dh|0,this.Dl|0,l|0,u|0),{h:f,l:d}=Va(this.Eh|0,this.El|0,f|0,d|0),{h:p,l:h}=Va(this.Fh|0,this.Fl|0,p|0,h|0),{h:g,l:y}=Va(this.Gh|0,this.Gl|0,g|0,y|0),{h:x,l:C}=Va(this.Hh|0,this.Hl|0,x|0,C|0),this.set(n,i,s,o,a,c,l,u,f,d,p,h,g,y,x,C)}roundClean(){Na(Vu,Ku)}destroy(){Na(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}},A4e=class extends WS{constructor(){super(48),this.Ah=ys[0]|0,this.Al=ys[1]|0,this.Bh=ys[2]|0,this.Bl=ys[3]|0,this.Ch=ys[4]|0,this.Cl=ys[5]|0,this.Dh=ys[6]|0,this.Dl=ys[7]|0,this.Eh=ys[8]|0,this.El=ys[9]|0,this.Fh=ys[10]|0,this.Fl=ys[11]|0,this.Gh=ys[12]|0,this.Gl=ys[13]|0,this.Hh=ys[14]|0,this.Hl=ys[15]|0}};const ws=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);let S4e=class extends WS{constructor(){super(32),this.Ah=ws[0]|0,this.Al=ws[1]|0,this.Bh=ws[2]|0,this.Bl=ws[3]|0,this.Ch=ws[4]|0,this.Cl=ws[5]|0,this.Dh=ws[6]|0,this.Dl=ws[7]|0,this.Eh=ws[8]|0,this.El=ws[9]|0,this.Fh=ws[10]|0,this.Fl=ws[11]|0,this.Gh=ws[12]|0,this.Gl=ws[13]|0,this.Hh=ws[14]|0,this.Hl=ws[15]|0}};const Nx=fb(()=>new E4e),N4e=fb(()=>new WS),I4e=fb(()=>new A4e),T4e=fb(()=>new S4e),k4e=Uint8Array.from([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9]),xi=Uint32Array.from([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),Ye=new Uint32Array(32);function Gu(t,e,r,n,i,s){const o=i[s],a=i[s+1];let c=Ye[2*t],l=Ye[2*t+1],u=Ye[2*e],f=Ye[2*e+1],d=Ye[2*r],p=Ye[2*r+1],h=Ye[2*n],g=Ye[2*n+1],y=$S(c,u,o);l=US(y,l,f,a),c=y|0,{Dh:g,Dl:h}={Dh:g^l,Dl:h^c},{Dh:g,Dl:h}={Dh:K3e(g,h),Dl:G3e(g)},{h:p,l:d}=Va(p,d,g,h),{Bh:f,Bl:u}={Bh:f^p,Bl:u^d},{Bh:f,Bl:u}={Bh:lf(f,u,24),Bl:uf(f,u,24)},Ye[2*t]=c,Ye[2*t+1]=l,Ye[2*e]=u,Ye[2*e+1]=f,Ye[2*r]=d,Ye[2*r+1]=p,Ye[2*n]=h,Ye[2*n+1]=g}function Yu(t,e,r,n,i,s){const o=i[s],a=i[s+1];let c=Ye[2*t],l=Ye[2*t+1],u=Ye[2*e],f=Ye[2*e+1],d=Ye[2*r],p=Ye[2*r+1],h=Ye[2*n],g=Ye[2*n+1],y=$S(c,u,o);l=US(y,l,f,a),c=y|0,{Dh:g,Dl:h}={Dh:g^l,Dl:h^c},{Dh:g,Dl:h}={Dh:lf(g,h,16),Dl:uf(g,h,16)},{h:p,l:d}=Va(p,d,g,h),{Bh:f,Bl:u}={Bh:f^p,Bl:u^d},{Bh:f,Bl:u}={Bh:J1(f,u,63),Bl:Q1(f,u,63)},Ye[2*t]=c,Ye[2*t+1]=l,Ye[2*e]=u,Ye[2*e+1]=f,Ye[2*r]=d,Ye[2*r+1]=p,Ye[2*n]=h,Ye[2*n+1]=g}function P4e(t,e={},r,n,i){if(vu(r),t<0||t>r)throw new Error("outputLen bigger than keyLen");const{key:s,salt:o,personalization:a}=e;if(s!==void 0&&(s.length<1||s.length>r))throw new Error("key length must be undefined or 1.."+r);if(o!==void 0&&o.length!==n)throw new Error("salt must be undefined or "+n);if(a!==void 0&&a.length!==i)throw new Error("personalization must be undefined or "+i)}let R4e=class extends Sx{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,this.length=0,this.pos=0,vu(e),vu(r),this.blockLen=e,this.outputLen=r,this.buffer=new Uint8Array(e),this.buffer32=ty(this.buffer)}update(e){sd(this),e=uc(e),Sa(e);const{blockLen:r,buffer:n,buffer32:i}=this,s=e.length,o=e.byteOffset,a=e.buffer;for(let c=0;c<s;){this.pos===r&&(ff(i),this.compress(i,0,!1),ff(i),this.pos=0);const l=Math.min(r-this.pos,s-c),u=o+c;if(l===r&&!(u%4)&&c+l<s){const f=new Uint32Array(a,u,Math.floor((s-c)/4));ff(f);for(let d=0;c+r<s;d+=i.length,c+=r)this.length+=r,this.compress(f,d,!1);ff(f);continue}n.set(e.subarray(c,c+l),this.pos),this.pos+=l,this.length+=l,c+=l}return this}digestInto(e){sd(this),jS(e,this);const{pos:r,buffer32:n}=this;this.finished=!0,Na(this.buffer.subarray(r)),ff(n),this.compress(n,0,!0),ff(n);const i=ty(e);
vendor: 24,793 bytes, lines 2067-2070
2067this.get().forEach((s,o)=>i[o]=jl(s))}digest(){const{buffer:e,outputLen:r}=this;this.digestInto(e);const n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){const{buffer:r,length:n,finished:i,destroyed:s,outputLen:o,pos:a}=this;return e||(e=new this.constructor({dkLen:o})),e.set(...this.get()),e.buffer.set(r),e.destroyed=s,e.finished=i,e.length=n,e.pos=a,e.outputLen=o,e}clone(){return this._cloneInto()}},O4e=class extends R4e{constructor(e={}){const r=e.dkLen===void 0?64:e.dkLen;super(128,r),this.v0l=xi[0]|0,this.v0h=xi[1]|0,this.v1l=xi[2]|0,this.v1h=xi[3]|0,this.v2l=xi[4]|0,this.v2h=xi[5]|0,this.v3l=xi[6]|0,this.v3h=xi[7]|0,this.v4l=xi[8]|0,this.v4h=xi[9]|0,this.v5l=xi[10]|0,this.v5h=xi[11]|0,this.v6l=xi[12]|0,this.v6h=xi[13]|0,this.v7l=xi[14]|0,this.v7h=xi[15]|0,P4e(r,e,64,16,16);let{key:n,personalization:i,salt:s}=e,o=0;if(n!==void 0&&(n=uc(n),o=n.length),this.v0l^=this.outputLen|o<<8|65536|1<<24,s!==void 0){s=uc(s);const a=ty(s);this.v4l^=jl(a[0]),this.v4h^=jl(a[1]),this.v5l^=jl(a[2]),this.v5h^=jl(a[3])}if(i!==void 0){i=uc(i);const a=ty(i);this.v6l^=jl(a[0]),this.v6h^=jl(a[1]),this.v7l^=jl(a[2]),this.v7h^=jl(a[3])}if(n!==void 0){const a=new Uint8Array(this.blockLen);a.set(n),this.update(a)}}get(){let{v0l:e,v0h:r,v1l:n,v1h:i,v2l:s,v2h:o,v3l:a,v3h:c,v4l:l,v4h:u,v5l:f,v5h:d,v6l:p,v6h:h,v7l:g,v7h:y}=this;return[e,r,n,i,s,o,a,c,l,u,f,d,p,h,g,y]}set(e,r,n,i,s,o,a,c,l,u,f,d,p,h,g,y){this.v0l=e|0,this.v0h=r|0,this.v1l=n|0,this.v1h=i|0,this.v2l=s|0,this.v2h=o|0,this.v3l=a|0,this.v3h=c|0,this.v4l=l|0,this.v4h=u|0,this.v5l=f|0,this.v5h=d|0,this.v6l=p|0,this.v6h=h|0,this.v7l=g|0,this.v7h=y|0}compress(e,r,n){this.get().forEach((c,l)=>Ye[l]=c),Ye.set(xi,16);let{h:i,l:s}=LW(BigInt(this.length));Ye[24]=xi[8]^s,Ye[25]=xi[9]^i,n&&(Ye[28]=~Ye[28],Ye[29]=~Ye[29]);let o=0;const a=k4e;for(let c=0;c<12;c++)Gu(0,4,8,12,e,r+2*a[o++]),Yu(0,4,8,12,e,r+2*a[o++]),Gu(1,5,9,13,e,r+2*a[o++]),Yu(1,5,9,13,e,r+2*a[o++]),Gu(2,6,10,14,e,r+2*a[o++]),Yu(2,6,10,14,e,r+2*a[o++]),Gu(3,7,11,15,e,r+2*a[o++]),Yu(3,7,11,15,e,r+2*a[o++]),Gu(0,5,10,15,e,r+2*a[o++]),Yu(0,5,10,15,e,r+2*a[o++]),Gu(1,6,11,12,e,r+2*a[o++]),Yu(1,6,11,12,e,r+2*a[o++]),Gu(2,7,8,13,e,r+2*a[o++]),Yu(2,7,8,13,e,r+2*a[o++]),Gu(3,4,9,14,e,r+2*a[o++]),Yu(3,4,9,14,e,r+2*a[o++]);this.v0l^=Ye[0]^Ye[16],this.v0h^=Ye[1]^Ye[17],this.v1l^=Ye[2]^Ye[18],this.v1h^=Ye[3]^Ye[19],this.v2l^=Ye[4]^Ye[20],this.v2h^=Ye[5]^Ye[21],this.v3l^=Ye[6]^Ye[22],this.v3h^=Ye[7]^Ye[23],this.v4l^=Ye[8]^Ye[24],this.v4h^=Ye[9]^Ye[25],this.v5l^=Ye[10]^Ye[26],this.v5h^=Ye[11]^Ye[27],this.v6l^=Ye[12]^Ye[28],this.v6h^=Ye[13]^Ye[29],this.v7l^=Ye[14]^Ye[30],this.v7h^=Ye[15]^Ye[31],Na(Ye)}destroy(){this.destroyed=!0,Na(this.buffer32),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}};const D4e=o4e(t=>new O4e(t)),L4e="https://rpc.walletconnect.org/v1";function KW(t){const e=`�Ethereum Signed Message: 2068${t.length}`,r=new TextEncoder().encode(e+t);return"0x"+Buffer.from(y4e(r)).toString("hex")}async function M4e(t,e,r,n,i,s){switch(r.t){case"eip191":return await $4e(t,e,r.s);case"eip1271":return await U4e(t,e,r.s,n,i,s);default:throw new Error(`verifySignature failed: Attempted to verify CacaoSignature with unknown type: ${r.t}`)}}async function $4e(t,e,r){return(await bwe({hash:KW(e),signature:r})).toLowerCase()===t.toLowerCase()}async function U4e(t,e,r,n,i,s){const o=wv(n);if(!o.namespace||!o.reference)throw new Error(`isValidEip1271Signature failed: chainId must be in CAIP-2 format, received: ${n}`);try{const a="0x1626ba7e",c="0000000000000000000000000000000000000000000000000000000000000040",l=r.substring(2),u=(l.length/2).toString(16).padStart(64,"0"),f=(e.startsWith("0x")?e:KW(e)).substring(2),d=a+f+c+u+l,p=await fetch(`${s||L4e}/?chainId=${n}&projectId=${i}`,{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({id:B4e(),jsonrpc:"2.0",method:"eth_call",params:[{to:t,data:d},"latest"]})}),{result:h}=await p.json();return h?h.slice(0,a.length).toLowerCase()===a.toLowerCase():!1}catch(a){return console.error("isValidEip1271Signature: ",a),!1}}function B4e(){return Date.now()+Math.floor(Math.random()*1e3)}function F4e(t){const e=atob(t),r=new Uint8Array(e.length);for(let o=0;o<e.length;o++)r[o]=e.charCodeAt(o);const n=r[0];if(n===0)throw new Error("No signatures found");const i=1+n*64;if(r.length<i)throw new Error("Transaction data too short for claimed signature count");if(r.length<100)throw new Error("Transaction too short");const s=Buffer.from(t,"base64").slice(1,65);return Fg.encode(s)}function j4e(t){const e=new Uint8Array(Buffer.from(t,"base64")),r=Array.from("TransactionData::").map(s=>s.charCodeAt(0)),n=new Uint8Array(r.length+e.length);n.set(r),n.set(e,r.length);const i=D4e(n,{dkLen:32});return Fg.encode(i)}function aR(t){const e=new Uint8Array(Nx(z4e(t)));return Fg.encode(e)}function z4e(t){if(t instanceof Uint8Array)return t;if(Array.isArray(t))return new Uint8Array(t);if(typeof t=="object"&&t!=null&&t.data)return new Uint8Array(Object.values(t.data));if(typeof t=="object"&&t)return new Uint8Array(Object.values(t));throw new Error("getNearUint8ArrayFromBytes: Unexpected result type from bytes array")}function cR(t){const e=Buffer.from(t,"base64"),r=rve(e).txn;if(!r)throw new Error("Invalid signed transaction: missing 'txn' field");const n=Kwe(r),i=Buffer.from("TX"),s=Buffer.concat([i,Buffer.from(n)]),o=T4e(s);return uve.encode(o).replace(/=+$/,"")}function HE(t){const e=[];let r=BigInt(t);for(;r>=BigInt(128);)e.push(Number(r&BigInt(127)|BigInt(128))),r>>=BigInt(7);return e.push(Number(r)),Buffer.from(e)}function W4e(t){const e=Buffer.from(t.signed.bodyBytes,"base64"),r=Buffer.from(t.signed.authInfoBytes,"base64"),n=Buffer.from(t.signature.signature,"base64"),i=[];i.push(Buffer.from([10])),i.push(HE(e.length)),i.push(e),i.push(Buffer.from([18])),i.push(HE(r.length)),i.push(r),i.push(Buffer.from([26])),i.push(HE(n.length)),i.push(n);const s=Buffer.concat(i),o=Nx(s);return Buffer.from(o).toString("hex").toUpperCase()}var H4e=Object.defineProperty,q4e=Object.defineProperties,V4e=Object.getOwnPropertyDescriptors,lR=Object.getOwnPropertySymbols,K4e=Object.prototype.hasOwnProperty,G4e=Object.prototype.propertyIsEnumerable,uR=(t,e,r)=>e in t?H4e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Y4e=(t,e)=>{for(var r in e||(e={}))K4e.call(e,r)&&uR(t,r,e[r]);if(lR)for(var r of lR(e))G4e.call(e,r)&&uR(t,r,e[r]);return t},Z4e=(t,e)=>q4e(t,V4e(e));const J4e="did:pkh:",HS=t=>t==null?void 0:t.split(":"),Q4e=t=>{const e=t&&HS(t);if(e)return t.includes(J4e)?e[3]:e[1]},p_=t=>{const e=t&&HS(t);if(e)return e[2]+":"+e[3]},G3=t=>{const e=t&&HS(t);if(e)return e.pop()};async function fR(t){const{cacao:e,projectId:r}=t,{s:n,p:i}=e,s=GW(i,i.iss),o=G3(i.iss);return await M4e(o,s,n,p_(i.iss),r)}const GW=(t,e)=>{const r=`${t.domain} wants you to sign in with your Ethereum account:`,n=G3(e);if(!t.aud&&!t.uri)throw new Error("Either `aud` or `uri` is required to construct the message");let i=t.statement||void 0;const s=`URI: ${t.aud||t.uri}`,o=`Version: ${t.version}`,a=`Chain ID: ${Q4e(e)}`,c=`Nonce: ${t.nonce}`,l=`Issued At: ${t.iat}`,u=t.exp?`Expiration Time: ${t.exp}`:void 0,f=t.nbf?`Not Before: ${t.nbf}`:void 0,d=t.requestId?`Request ID: ${t.requestId}`:void 0,p=t.resources?`Resources:${t.resources.map(g=>` 2069- ${g}`).join("")}`:void 0,h=vv(t.resources);if(h){const g=ny(h);i=axe(i,g)}return[r,n,"",i,"",s,o,a,c,l,u,f,d,p].filter(g=>g!=null).join(` 2070`)};function X4e(t){return Buffer.from(JSON.stringify(t)).toString("base64")}function exe(t){return JSON.parse(Buffer.from(t,"base64").toString("utf-8"))}function Mh(t){if(!t)throw new Error("No recap provided, value is undefined");if(!t.att)throw new Error("No `att` property found");const e=Object.keys(t.att);if(!(e!=null&&e.length))throw new Error("No resources found in `att` property");e.forEach(r=>{const n=t.att[r];if(Array.isArray(n))throw new Error(`Resource must be an object: ${r}`);if(typeof n!="object")throw new Error(`Resource must be an object: ${r}`);if(!Object.keys(n).length)throw new Error(`Resource object is empty: ${r}`);Object.keys(n).forEach(i=>{const s=n[i];if(!Array.isArray(s))throw new Error(`Ability limits ${i} must be an array of objects, found: ${s}`);if(!s.length)throw new Error(`Value of ${i} is empty array, must be an array with objects`);s.forEach(o=>{if(typeof o!="object")throw new Error(`Ability limits (${i}) must be an array of objects, found: ${o}`)})})})}function txe(t,e,r,n={}){return r==null||r.sort((i,s)=>i.localeCompare(s)),{att:{[t]:rxe(e,r,n)}}}function rxe(t,e,r={}){e=e==null?void 0:e.sort((i,s)=>i.localeCompare(s));const n=e.map(i=>({[`${t}/${i}`]:[r]}));return Object.assign({},...n)}function YW(t){return Mh(t),`urn:recap:${X4e(t).replace(/=/g,"")}`}function ny(t){const e=exe(t.replace("urn:recap:",""));return Mh(e),e}function nxe(t,e,r){const n=txe(t,e,r);return YW(n)}function ixe(t){return t&&t.includes("urn:recap:")}function sxe(t,e){const r=ny(t),n=ny(e),i=oxe(r,n);return YW(i)}function oxe(t,e){Mh(t),Mh(e);const r=Object.keys(t.att).concat(Object.keys(e.att)).sort((i,s)=>i.localeCompare(s)),n={att:{}};return r.forEach(i=>{var s,o;Object.keys(((s=t.att)==null?void 0:s[i])||{}).concat(Object.keys(((o=e.att)==null?void 0:o[i])||{})).sort((a,c)=>a.localeCompare(c)).forEach(a=>{var c,l;n.att[i]=Z4e(Y4e({},n.att[i]),{[a]:((c=t.att[i])==null?void 0:c[a])||((l=e.att[i])==null?void 0:l[a])})})}),n}function axe(t="",e){Mh(e);const r="I further authorize the stated URI to perform the following actions on my behalf: ";if(t.includes(r))return t;const n=[];let i=0;Object.keys(e.att).forEach(a=>{const c=Object.keys(e.att[a]).map(f=>({ability:f.split("/")[0],action:f.split("/")[1]}));c.sort((f,d)=>f.action.localeCompare(d.action));const l={};c.forEach(f=>{l[f.ability]||(l[f.ability]=[]),l[f.ability].push(f.action)});const u=Object.keys(l).map(f=>(i++,`(${i}) '${f}': '${l[f].join("', '")}' for '${a}'.`));n.push(u.join(", ").replace(".,","."))});const s=n.join(" "),o=`${r}${s}`;return`${t?t+" ":""}${o}`}function dR(t){var e;const r=ny(t);Mh(r);const n=(e=r.att)==null?void 0:e.eip155;return n?Object.keys(n).map(i=>i.split("/")[1]):[]}function hR(t){const e=ny(t);Mh(e);const r=[];return Object.values(e.att).forEach(n=>{Object.values(n).forEach(i=>{var s;(s=i==null?void 0:i[0])!=null&&s.chains&&r.push(i[0].chains)})}),[...new Set(r.flat())]}function vv(t){if(!t)return;const e=t==null?void 0:t[t.length-1];return ixe(e)?e:void 0}/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */function ZW(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function g_(t){if(typeof t!="boolean")throw new Error(`boolean expected, not ${t}`)}function qE(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function ho(t,...e){if(!ZW(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function pR(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function cxe(t,e){ho(t);const r=e.outputLen;if(t.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}function Wf(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function cg(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function lxe(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}const uxe=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function fxe(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}function m_(t){if(typeof t=="string")t=fxe(t);else if(ZW(t))t=y_(t);else throw new Error("Uint8Array expected, got "+typeof t);return t}function dxe(t,e){if(e==null||typeof e!="object")throw new Error("options must be defined");return Object.assign(t,e)}function hxe(t,e){if(t.length!==e.length)return!1;let r=0;for(let n=0;n<t.length;n++)r|=t[n]^e[n];return r===0}const pxe=(t,e)=>{function r(n,...i){if(ho(n),!uxe)throw new Error("Non little-endian hardware is not yet supported");if(t.nonceLength!==void 0){const l=i[0];if(!l)throw new Error("nonce / iv required");t.varSizeNonce?ho(l):ho(l,t.nonceLength)}const s=t.tagLength;s&&i[1]!==void 0&&ho(i[1]);const o=e(n,...i),a=(l,u)=>{if(u!==void 0){if(l!==2)throw new Error("cipher output not supported");ho(u)}};let c=!1;return{encrypt(l,u){if(c)throw new Error("cannot encrypt() twice with same key + nonce");return c=!0,ho(l),a(o.encrypt.length,u),o.encrypt(l,u)},decrypt(l,u){if(ho(l),s&&l.length<s)throw new Error("invalid ciphertext length: smaller than tagLength="+s);return a(o.decrypt.length,u),o.decrypt(l,u)}}}return Object.assign(r,t),r};function gR(t,e,r=!0){if(e===void 0)return new Uint8Array(t);if(e.length!==t)throw new Error("invalid output length, expected "+t+", got: "+e.length);if(r&&!mxe(e))throw new Error("invalid output, must be aligned");return e}function mR(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);const i=BigInt(32),s=BigInt(4294967295),o=Number(r>>i&s),a=Number(r&s);t.setUint32(e+4,o,n),t.setUint32(e+0,a,n)}function gxe(t,e,r){g_(r);const n=new Uint8Array(16),i=lxe(n);return mR(i,0,BigInt(e),r),mR(i,8,BigInt(t),r),n}function mxe(t){return t.byteOffset%4===0}function y_(t){return Uint8Array.from(t)}const JW=t=>Uint8Array.from(t.split("").map(e=>e.charCodeAt(0))),yxe=JW("expand 16-byte k"),bxe=JW("expand 32-byte k"),wxe=Wf(yxe),vxe=Wf(bxe);function $r(t,e){return t<<e|t>>>32-e}function b_(t){return t.byteOffset%4===0}const vw=64,xxe=16,QW=2**32-1,yR=new Uint32Array;function Exe(t,e,r,n,i,s,o,a){const c=i.length,l=new Uint8Array(vw),u=Wf(l),f=b_(i)&&b_(s),d=f?Wf(i):yR,p=f?Wf(s):yR;for(let h=0;h<c;o++){if(t(e,r,n,u,o,a),o>=QW)throw new Error("arx: counter overflow");const g=Math.min(vw,c-h);if(f&&g===vw){const y=h/4;if(h%4!==0)throw new Error("arx: invalid block position");for(let x=0,C;x<xxe;x++)C=y+x,p[C]=d[C]^u[x];h+=vw;continue}for(let y=0,x;y<g;y++)x=h+y,s[x]=i[x]^l[y];h+=g}}function Cxe(t,e){const{allowShortKeys:r,extendNonceFn:n,counterLength:i,counterRight:s,rounds:o}=dxe({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},e);if(typeof t!="function")throw new Error("core must be a function");return qE(i),qE(o),g_(s),g_(r),(a,c,l,u,f=0)=>{ho(a),ho(c),ho(l);const d=l.length;if(u===void 0&&(u=new Uint8Array(d)),ho(u),qE(f),f<0||f>=QW)throw new Error("arx: counter overflow");if(u.length<d)throw new Error(`arx: output (${u.length}) is shorter than data (${d})`);const p=[];let h=a.length,g,y;if(h===32)p.push(g=y_(a)),y=vxe;else if(h===16&&r)g=new Uint8Array(32),g.set(a),g.set(a,16),y=wxe,p.push(g);else throw new Error(`arx: invalid 32-byte key, got length=${h}`);b_(c)||p.push(c=y_(c));const x=Wf(g);if(n){if(c.length!==24)throw new Error("arx: extended nonce must be 24 bytes");n(y,x,Wf(c.subarray(0,16)),x),c=c.subarray(16)}const C=16-i;if(C!==c.length)throw new Error(`arx: nonce must be ${C} or 16 bytes`);if(C!==12){const L=new Uint8Array(12);L.set(c,s?0:12-c.length),c=L,p.push(c)}const _=Wf(c);return Exe(t,y,x,_,l,u,f,o),cg(...p),u}}const Vi=(t,e)=>t[e++]&255|(t[e++]&255)<<8;let _xe=class{constructor(e){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,e=m_(e),ho(e,32);const r=Vi(e,0),n=Vi(e,2),i=Vi(e,4),s=Vi(e,6),o=Vi(e,8),a=Vi(e,10),c=Vi(e,12),l=Vi(e,14);this.r[0]=r&8191,this.r[1]=(r>>>13|n<<3)&8191,this.r[2]=(n>>>10|i<<6)&7939,this.r[3]=(i>>>7|s<<9)&8191,this.r[4]=(s>>>4|o<<12)&255,this.r[5]=o>>>1&8190,this.r[6]=(o>>>14|a<<2)&8191,this.r[7]=(a>>>11|c<<5)&8065,this.r[8]=(c>>>8|l<<8)&8191,this.r[9]=l>>>5&127;for(let u=0;u<8;u++)this.pad[u]=Vi(e,16+2*u)}process(e,r,n=!1){const i=n?0:2048,{h:s,r:o}=this,a=o[0],c=o[1],l=o[2],u=o[3],f=o[4],d=o[5],p=o[6],h=o[7],g=o[8],y=o[9],x=Vi(e,r+0),C=Vi(e,r+2),_=Vi(e,r+4),L=Vi(e,r+6),P=Vi(e,r+8),z=Vi(e,r+10),W=Vi(e,r+12),B=Vi(e,r+14);let I=s[0]+(x&8191),j=s[1]+((x>>>13|C<<3)&8191),D=s[2]+((C>>>10|_<<6)&8191),O=s[3]+((_>>>7|L<<9)&8191),T=s[4]+((L>>>4|P<<12)&8191),m=s[5]+(P>>>1&8191),b=s[6]+((P>>>14|z<<2)&8191),E=s[7]+((z>>>11|W<<5)&8191),k=s[8]+((W>>>8|B<<8)&8191),R=s[9]+(B>>>5|i),M=0,H=M+I*a+j*(5*y)+D*(5*g)+O*(5*h)+T*(5*p);M=H>>>13,H&=8191,H+=m*(5*d)+b*(5*f)+E*(5*u)+k*(5*l)+R*(5*c),M+=H>>>13,H&=8191;let N=M+I*c+j*a+D*(5*y)+O*(5*g)+T*(5*h);M=N>>>13,N&=8191,N+=m*(5*p)+b*(5*d)+E*(5*f)+k*(5*u)+R*(5*l),M+=N>>>13,N&=8191;let v=M+I*l+j*c+D*a+O*(5*y)+T*(5*g);M=v>>>13,v&=8191,v+=m*(5*h)+b*(5*p)+E*(5*d)+k*(5*f)+R*(5*u),M+=v>>>13,v&=8191;let U=M+I*u+j*l+D*c+O*a+T*(5*y);M=U>>>13,U&=8191,U+=m*(5*g)+b*(5*h)+E*(5*p)+k*(5*d)+R*(5*f),M+=U>>>13,U&=8191;let G=M+I*f+j*u+D*l+O*c+T*a;M=G>>>13,G&=8191,G+=m*(5*y)+b*(5*g)+E*(5*h)+k*(5*p)+R*(5*d),M+=G>>>13,G&=8191;let S=M+I*d+j*f+D*u+O*l+T*c;M=S>>>13,S&=8191,S+=m*a+b*(5*y)+E*(5*g)+k*(5*h)+R*(5*p),M+=S>>>13,S&=8191;let J=M+I*p+j*d+D*f+O*u+T*l;M=J>>>13,J&=8191,J+=m*c+b*a+E*(5*y)+k*(5*g)+R*(5*h),M+=J>>>13,J&=8191;let ne=M+I*h+j*p+D*d+O*f+T*u;M=ne>>>13,ne&=8191,ne+=m*l+b*c+E*a+k*(5*y)+R*(5*g),M+=ne>>>13,ne&=8191;let Z=M+I*g+j*h+D*p+O*d+T*f;M=Z>>>13,Z&=8191,Z+=m*u+b*l+E*c+k*a+R*(5*y),M+=Z>>>13,Z&=8191;let Q=M+I*y+j*g+D*h+O*p+T*d;M=Q>>>13,Q&=8191,Q+=m*f+b*u+E*l+k*c+R*a,M+=Q>>>13,Q&=8191,M=(M<<2)+M|0,M=M+H|0,H=M&8191,M=M>>>13,N+=M,s[0]=H,s[1]=N,s[2]=v,s[3]=U,s[4]=G,s[5]=S,s[6]=J,s[7]=ne,s[8]=Z,s[9]=Q}finalize(){const{h:e,pad:r}=this,n=new Uint16Array(10);let i=e[1]>>>13;e[1]&=8191;for(let a=2;a<10;a++)e[a]+=i,i=e[a]>>>13,e[a]&=8191;e[0]+=i*5,i=e[0]>>>13,e[0]&=8191,e[1]+=i,i=e[1]>>>13,e[1]&=8191,e[2]+=i,n[0]=e[0]+5,i=n[0]>>>13,n[0]&=8191;for(let a=1;a<10;a++)n[a]=e[a]+i,i=n[a]>>>13,n[a]&=8191;n[9]-=8192;let s=(i^1)-1;for(let a=0;a<10;a++)n[a]&=s;s=~s;for(let a=0;a<10;a++)e[a]=e[a]&s|n[a];e[0]=(e[0]|e[1]<<13)&65535,e[1]=(e[1]>>>3|e[2]<<10)&65535,e[2]=(e[2]>>>6|e[3]<<7)&65535,e[3]=(e[3]>>>9|e[4]<<4)&65535,e[4]=(e[4]>>>12|e[5]<<1|e[6]<<14)&65535,e[5]=(e[6]>>>2|e[7]<<11)&65535,e[6]=(e[7]>>>5|e[8]<<8)&65535,e[7]=(e[8]>>>8|e[9]<<5)&65535;let o=e[0]+r[0];e[0]=o&65535;for(let a=1;a<8;a++)o=(e[a]+r[a]|0)+(o>>>16)|0,e[a]=o&65535;cg(n)}update(e){pR(this),e=m_(e),ho(e);const{buffer:r,blockLen:n}=this,i=e.length;for(let s=0;s<i;){const o=Math.min(n-this.pos,i-s);if(o===n){for(;n<=i-s;s+=n)this.process(e,s);continue}r.set(e.subarray(s,s+o),this.pos),this.pos+=o,s+=o,this.pos===n&&(this.process(r,0,!1),this.pos=0)}return this}destroy(){cg(this.h,this.r,this.buffer,this.pad)}digestInto(e){pR(this),cxe(e,this),this.finished=!0;const{buffer:r,h:n}=this;let{pos:i}=this;if(i){for(r[i++]=1;i<16;i++)r[i]=0;this.process(r,0,!0)}this.finalize();let s=0;for(let o=0;o<8;o++)e[s++]=n[o]>>>0,e[s++]=n[o]>>>8;return e}digest(){const{buffer:e,outputLen:r}=this;this.digestInto(e);const n=e.slice(0,r);return this.destroy(),n}};function Axe(t){const e=(n,i)=>t(i).update(m_(n)).digest(),r=t(new Uint8Array(32));return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=n=>t(n),e}const Sxe=Axe(t=>new _xe(t));function Nxe(t,e,r,n,i,s=20){let o=t[0],a=t[1],c=t[2],l=t[3],u=e[0],f=e[1],d=e[2],p=e[3],h=e[4],g=e[5],y=e[6],x=e[7],C=i,_=r[0],L=r[1],P=r[2],z=o,W=a,B=c,I=l,j=u,D=f,O=d,T=p,m=h,b=g,E=y,k=x,R=C,M=_,H=L,N=P;for(let U=0;U<s;U+=2)z=z+j|0,R=$r(R^z,16),m=m+R|0,j=$r(j^m,12),z=z+j|0,R=$r(R^z,8),m=m+R|0,j=$r(j^m,7),W=W+D|0,M=$r(M^W,16),b=b+M|0,D=$r(D^b,12),W=W+D|0,M=$r(M^W,8),b=b+M|0,D=$r(D^b,7),B=B+O|0,H=$r(H^B,16),E=E+H|0,O=$r(O^E,12),B=B+O|0,H=$r(H^B,8),E=E+H|0,O=$r(O^E,7),I=I+T|0,N=$r(N^I,16),k=k+N|0,T=$r(T^k,12),I=I+T|0,N=$r(N^I,8),k=k+N|0,T=$r(T^k,7),z=z+D|0,N=$r(N^z,16),E=E+N|0,D=$r(D^E,12),z=z+D|0,N=$r(N^z,8),E=E+N|0,D=$r(D^E,7),W=W+O|0,R=$r(R^W,16),k=k+R|0,O=$r(O^k,12),W=W+O|0,R=$r(R^W,8),k=k+R|0,O=$r(O^k,7),B=B+T|0,M=$r(M^B,16),m=m+M|0,T=$r(T^m,12),B=B+T|0,M=$r(M^B,8),m=m+M|0,T=$r(T^m,7),I=I+j|0,H=$r(H^I,16),b=b+H|0,j=$r(j^b,12),I=I+j|0,H=$r(H^I,8),b=b+H|0,j=$r(j^b,7);let v=0;n[v++]=o+z|0,n[v++]=a+W|0,n[v++]=c+B|0,n[v++]=l+I|0,n[v++]=u+j|0,n[v++]=f+D|0,n[v++]=d+O|0,n[v++]=p+T|0,n[v++]=h+m|0,n[v++]=g+b|0,n[v++]=y+E|0,n[v++]=x+k|0,n[v++]=C+R|0,n[v++]=_+M|0,n[v++]=L+H|0,n[v++]=P+N|0}const Ixe=Cxe(Nxe,{counterRight:!1,counterLength:4,allowShortKeys:!1}),Txe=new Uint8Array(16),bR=(t,e)=>{t.update(e);const r=e.length%16;r&&t.update(Txe.subarray(r))},kxe=new Uint8Array(32);function wR(t,e,r,n,i){const s=t(e,r,kxe),o=Sxe.create(s);i&&bR(o,i),bR(o,n);const a=gxe(n.length,i?i.length:0,!0);o.update(a);const c=o.digest();return cg(s,a),c}const Pxe=t=>(e,r,n)=>({encrypt(i,s){const o=i.length;s=gR(o+16,s,!1),s.set(i);const a=s.subarray(0,-16);t(e,r,a,a,1);const c=wR(t,e,r,a,n);return s.set(c,o),cg(c),s},decrypt(i,s){s=gR(i.length-16,s,!1);const o=i.subarray(0,-16),a=i.subarray(-16),c=wR(t,e,r,o,n);if(!hxe(a,c))throw new Error("invalid tag");return s.set(i.subarray(0,-16)),t(e,r,s,s,1),cg(c),s}}),XW=pxe({blockSize:64,nonceLength:12,tagLength:16},Pxe(Ixe));let eH=class extends Sx{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,FS(e);const n=uc(r);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,s=new Uint8Array(i);s.set(n.length>i?e.create().update(n).digest():n);for(let o=0;o<s.length;o++)s[o]^=54;this.iHash.update(s),this.oHash=e.create();for(let o=0;o<s.length;o++)s[o]^=106;this.oHash.update(s),Na(s)}update(e){return sd(this),this.iHash.update(e),this}digestInto(e){sd(this),Sa(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:r,iHash:n,finished:i,destroyed:s,blockLen:o,outputLen:a}=this;return e=e,e.finished=i,e.destroyed=s,e.blockLen=o,e.outputLen=a,e.oHash=r._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}};const Ix=(t,e,r)=>new eH(t,e).update(r).digest();Ix.create=(t,e)=>new eH(t,e);function Rxe(t,e,r){return FS(t),r===void 0&&(r=new Uint8Array(t.outputLen)),Ix(t,uc(r),uc(e))}const VE=Uint8Array.from([0]),vR=Uint8Array.of();function Oxe(t,e,r,n=32){FS(t),vu(n);const i=t.outputLen;if(n>255*i)throw new Error("Length should be <= 255*HashLen");const s=Math.ceil(n/i);r===void 0&&(r=vR);const o=new Uint8Array(s*i),a=Ix.create(t,e),c=a._cloneInto(),l=new Uint8Array(a.outputLen);for(let u=0;u<s;u++)VE[0]=u+1,c.update(u===0?vR:l).update(r).update(VE).digestInto(l),o.set(l,i*u),a._cloneInto(c);return a.destroy(),c.destroy(),Na(l,VE),o.slice(0,n)}const Dxe=(t,e,r,n,i)=>Oxe(t,Rxe(t,e,r),n,i),Tx=Nx,qS=BigInt(0),w_=BigInt(1);function Y3(t,e){if(typeof e!="boolean")throw new Error(t+" boolean expected, got "+e)}function xw(t){const e=t.toString(16);return e.length&1?"0"+e:e}function tH(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return t===""?qS:BigInt("0x"+t)}function kx(t){return tH(ry(t))}function Z3(t){return Sa(t),tH(ry(Uint8Array.from(t).reverse()))}function VS(t,e){return zS(t.toString(16).padStart(e*2,"0"))}function KS(t,e){return VS(t,e).reverse()}function lo(t,e,r){let n;if(typeof e=="string")try{n=zS(e)}catch(s){throw new Error(t+" must be hex string or Uint8Array, cause: "+s)}else if(BS(e))n=Uint8Array.from(e);else throw new Error(t+" must be hex string or Uint8Array");const i=n.length;if(typeof r=="number"&&i!==r)throw new Error(t+" of length "+r+" expected, got "+i);return n}const KE=t=>typeof t=="bigint"&&qS<=t;function Lxe(t,e,r){return KE(t)&&KE(e)&&KE(r)&&e<=t&&t<r}function v_(t,e,r,n){if(!Lxe(e,r,n))throw new Error("expected valid "+t+": "+r+" <= n < "+n+", got "+e)}function Mxe(t){let e;for(e=0;t>qS;t>>=w_,e+=1);return e}const Px=t=>(w_<<BigInt(t))-w_;function $xe(t,e,r){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");const n=d=>new Uint8Array(d),i=d=>Uint8Array.of(d);let s=n(t),o=n(t),a=0;const c=()=>{s.fill(1),o.fill(0),a=0},l=(...d)=>r(o,s,...d),u=(d=n(0))=>{o=l(i(0),d),s=l(),d.length!==0&&(o=l(i(1),d),s=l())},f=()=>{if(a++>=1e3)throw new Error("drbg: tried 1000 values");let d=0;const p=[];for(;d<e;){s=l();const h=s.slice();p.push(h),d+=s.length}return Qd(...p)};return(d,p)=>{c(),u(d);let h;for(;!(h=p(f()));)u();return c(),h}}function Rx(t,e,r={}){if(!t||typeof t!="object")throw new Error("expected valid options object");function n(i,s,o){const a=t[i];if(o&&a===void 0)return;const c=typeof a;if(c!==s||a===null)throw new Error(`param "${i}
2070" is invalid: expected ${s}, got ${c}`)}Object.entries(e).forEach(([i,s])=>n(i,s,!1)),Object.entries(r).forEach(([i,s])=>n(i,s,!0))}function xR(t){const e=new WeakMap;return(r,...n)=>{const i=e.get(r);if(i!==void 0)return i;const s=t(r,...n);return e.set(r,s),s}}const vo=BigInt(0),Ws=BigInt(1),Xd=BigInt(2),Uxe=BigInt(3),rH=BigInt(4),nH=BigInt(5),iH=BigInt(8);function pa(t,e){const r=t%e;return r>=vo?r:e+r}function Wa(t,e,r){let n=t;for(;e-- >vo;)n*=n,n%=r;return n}function ER(t,e){if(t===vo)throw new Error("invert: expected non-zero number");if(e<=vo)throw new Error("invert: expected positive modulus, got "+e);let r=pa(t,e),n=e,i=vo,s=Ws;for(;r!==vo;){const o=n/r,a=n%r,c=i-s*o;n=r,r=a,i=s,s=c}if(n!==Ws)throw new Error("invert: does not exist");return pa(i,e)}function sH(t,e){const r=(t.ORDER+Ws)/rH,n=t.pow(e,r);if(!t.eql(t.sqr(n),e))throw new Error("Cannot find square root");return n}function Bxe(t,e){const r=(t.ORDER-nH)/iH,n=t.mul(e,Xd),i=t.pow(n,r),s=t.mul(e,i),o=t.mul(t.mul(s,Xd),i),a=t.mul(s,t.sub(o,t.ONE));if(!t.eql(t.sqr(a),e))throw new Error("Cannot find square root");return a}function Fxe(t){if(t<BigInt(3))throw new Error("sqrt is not defined for small field");let e=t-Ws,r=0;for(;e%Xd===vo;)e/=Xd,r++;let n=Xd;const i=Wg(t);for(;CR(i,n)===1;)if(n++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(r===1)return sH;let s=i.pow(n,e);const o=(e+Ws)/Xd;return function(a,c){if(a.is0(c))return c;if(CR(a,c)!==1)throw new Error("Cannot find square root");let l=r,u=a.mul(a.ONE,s),f=a.pow(c,e),d=a.pow(c,o);for(;!a.eql(f,a.ONE);){if(a.is0(f))return a.ZERO;let p=1,h=a.sqr(f);for(;!a.eql(h,a.ONE);)if(p++,h=a.sqr(h),p===l)throw new Error("Cannot find square root");const g=Ws<<BigInt(l-p-1),y=a.pow(u,g);l=p,u=a.sqr(y),f=a.mul(f,u),d=a.mul(d,y)}return d}}function jxe(t){return t%rH===Uxe?sH:t%iH===nH?Bxe:Fxe(t)}const zxe=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Wxe(t){const e={ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"},r=zxe.reduce((n,i)=>(n[i]="function",n),e);return Rx(t,r),t}function Hxe(t,e,r){if(r<vo)throw new Error("invalid exponent, negatives unsupported");if(r===vo)return t.ONE;if(r===Ws)return e;let n=t.ONE,i=e;for(;r>vo;)r&Ws&&(n=t.mul(n,i)),i=t.sqr(i),r>>=Ws;return n}function oH(t,e,r=!1){const n=new Array(e.length).fill(r?t.ZERO:void 0),i=e.reduce((o,a,c)=>t.is0(a)?o:(n[c]=o,t.mul(o,a)),t.ONE),s=t.inv(i);return e.reduceRight((o,a,c)=>t.is0(a)?o:(n[c]=t.mul(o,n[c]),t.mul(o,a)),s),n}function CR(t,e){const r=(t.ORDER-Ws)/Xd,n=t.pow(e,r),i=t.eql(n,t.ONE),s=t.eql(n,t.ZERO),o=t.eql(n,t.neg(t.ONE));if(!i&&!s&&!o)throw new Error("invalid Legendre symbol result");return i?1:s?0:-1}function qxe(t,e){e!==void 0&&vu(e);const r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function Wg(t,e,r=!1,n={}){if(t<=vo)throw new Error("invalid field: expected ORDER > 0, got "+t);let i,s;if(typeof e=="object"&&e!=null){if(n.sqrt||r)throw new Error("cannot specify opts in two arguments");const u=e;u.BITS&&(i=u.BITS),u.sqrt&&(s=u.sqrt),typeof u.isLE=="boolean"&&(r=u.isLE)}else typeof e=="number"&&(i=e),n.sqrt&&(s=n.sqrt);const{nBitLength:o,nByteLength:a}=qxe(t,i);if(a>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let c;const l=Object.freeze({ORDER:t,isLE:r,BITS:o,BYTES:a,MASK:Px(o),ZERO:vo,ONE:Ws,create:u=>pa(u,t),isValid:u=>{if(typeof u!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof u);return vo<=u&&u<t},is0:u=>u===vo,isValidNot0:u=>!l.is0(u)&&l.isValid(u),isOdd:u=>(u&Ws)===Ws,neg:u=>pa(-u,t),eql:(u,f)=>u===f,sqr:u=>pa(u*u,t),add:(u,f)=>pa(u+f,t),sub:(u,f)=>pa(u-f,t),mul:(u,f)=>pa(u*f,t),pow:(u,f)=>Hxe(l,u,f),div:(u,f)=>pa(u*ER(f,t),t),sqrN:u=>u*u,addN:(u,f)=>u+f,subN:(u,f)=>u-f,mulN:(u,f)=>u*f,inv:u=>ER(u,t),sqrt:s||(u=>(c||(c=jxe(t)),c(l,u))),toBytes:u=>r?KS(u,a):VS(u,a),fromBytes:u=>{if(u.length!==a)throw new Error("Field.fromBytes: expected "+a+" bytes, got "+u.length);return r?Z3(u):kx(u)},invertBatch:u=>oH(l,u),cmov:(u,f,d)=>d?f:u});return Object.freeze(l)}function aH(t){if(typeof t!="bigint")throw new Error("field order must be bigint");const e=t.toString(2).length;return Math.ceil(e/8)}function cH(t){const e=aH(t);return e+Math.ceil(e/2)}function Vxe(t,e,r=!1){const n=t.length,i=aH(e),s=cH(e);if(n<16||n<s||n>1024)throw new Error("expected "+s+"-1024 bytes of input, got "+n);const o=r?Z3(t):kx(t),a=pa(o,e-Ws)+Ws;return r?KS(a,i):VS(a,i)}const lg=BigInt(0),eh=BigInt(1);function Pm(t,e){const r=e.negate();return t?r:e}function Kxe(t,e,r){const n=s=>s.pz,i=oH(t.Fp,r.map(n));return r.map((s,o)=>
vendor: 5,878 bytes, line 2070
2070s.toAffine(i[o])).map(t.fromAffine)}function lH(t,e){if(!Number.isSafeInteger(t)||t<=0||t>e)throw new Error("invalid window size, expected [1.."+e+"], got W="+t)}function GE(t,e){lH(t,e);const r=Math.ceil(e/t)+1,n=2**(t-1),i=2**t,s=Px(t),o=BigInt(t);return{windows:r,windowSize:n,mask:s,maxNumber:i,shiftBy:o}}function _R(t,e,r){const{windowSize:n,mask:i,maxNumber:s,shiftBy:o}=r;let a=Number(t&i),c=t>>o;a>n&&(a-=s,c+=eh);const l=e*n,u=l+Math.abs(a)-1,f=a===0,d=a<0,p=e%2!==0;return{nextN:c,offset:u,isZero:f,isNeg:d,isNegF:p,offsetF:l}}function Gxe(t,e){if(!Array.isArray(t))throw new Error("array expected");t.forEach((r,n)=>{if(!(r instanceof e))throw new Error("invalid point at index "+n)})}function Yxe(t,e){if(!Array.isArray(t))throw new Error("array of scalars expected");t.forEach((r,n)=>{if(!e.isValid(r))throw new Error("invalid scalar at index "+n)})}const YE=new WeakMap,uH=new WeakMap;function ZE(t){return uH.get(t)||1}function AR(t){if(t!==lg)throw new Error("invalid wNAF")}function Zxe(t,e){return{constTimeNegate:Pm,hasPrecomputes(r){return ZE(r)!==1},unsafeLadder(r,n,i=t.ZERO){let s=r;for(;n>lg;)n&eh&&(i=i.add(s)),s=s.double(),n>>=eh;return i},precomputeWindow(r,n){const{windows:i,windowSize:s}=GE(n,e),o=[];let a=r,c=a;for(let l=0;l<i;l++){c=a,o.push(c);for(let u=1;u<s;u++)c=c.add(a),o.push(c);a=c.double()}return o},wNAF(r,n,i){let s=t.ZERO,o=t.BASE;const a=GE(r,e);for(let c=0;c<a.windows;c++){const{nextN:l,offset:u,isZero:f,isNeg:d,isNegF:p,offsetF:h}=_R(i,c,a);i=l,f?o=o.add(Pm(p,n[h])):s=s.add(Pm(d,n[u]))}return AR(i),{p:s,f:o}},wNAFUnsafe(r,n,i,s=t.ZERO){const o=GE(r,e);for(let a=0;a<o.windows&&i!==lg;a++){const{nextN:c,offset:l,isZero:u,isNeg:f}=_R(i,a,o);if(i=c,!u){const d=n[l];s=s.add(f?d.negate():d)}}return AR(i),s},getPrecomputes(r,n,i){let s=YE.get(n);return s||(s=this.precomputeWindow(n,r),r!==1&&(typeof i=="function"&&(s=i(s)),YE.set(n,s))),s},wNAFCached(r,n,i){const s=ZE(r);return this.wNAF(s,this.getPrecomputes(s,r,i),n)},wNAFCachedUnsafe(r,n,i,s){const o=ZE(r);return o===1?this.unsafeLadder(r,n,s):this.wNAFUnsafe(o,this.getPrecomputes(o,r,i),n,s)},setWindowSize(r,n){lH(n,e),uH.set(r,n),YE.delete(r)}}}function Jxe(t,e,r,n){let i=e,s=t.ZERO,o=t.ZERO;for(;r>lg||n>lg;)r&eh&&(s=s.add(i)),n&eh&&(o=o.add(i)),i=i.double(),r>>=eh,n>>=eh;return{p1:s,p2:o}}function Qxe(t,e,r,n){Gxe(r,t),Yxe(n,e);const i=r.length,s=n.length;if(i!==s)throw new Error("arrays of points and scalars must have equal length");const o=t.ZERO,a=Mxe(BigInt(i));let c=1;a>12?c=a-3:a>4?c=a-2:a>0&&(c=2);const l=Px(c),u=new Array(Number(l)+1).fill(o),f=Math.floor((e.BITS-1)/c)*c;let d=o;for(let p=f;p>=0;p-=c){u.fill(o);for(let g=0;g<s;g++){const y=n[g],x=Number(y>>BigInt(p)&l);u[x]=u[x].add(r[g])}let h=o;for(let g=u.length-1,y=o;g>0;g--)y=y.add(u[g]),h=h.add(y);if(d=d.add(h),p!==0)for(let g=0;g<c;g++)d=d.double()}return d}function SR(t,e){if(e){if(e.ORDER!==t)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return Wxe(e),e}else return Wg(t)}function Xxe(t,e,r={}){if(!e||typeof e!="object")throw new Error(`expected valid ${t} CURVE object`);for(const o of["p","n","h"]){const a=e[o];if(!(typeof a=="bigint"&&a>lg))throw new Error(`CURVE.${o} must be positive bigint`)}const n=SR(e.p,r.Fp),i=SR(e.n,r.Fn),s=["Gx","Gy","a","b"];for(const o of s)if(!n.isValid(e[o]))throw new Error(`CURVE.${o} must be valid field element of CURVE.Fp`);return{Fp:n,Fn:i}}BigInt(0),BigInt(1),BigInt(2),BigInt(8);const E1=BigInt(0),E0=BigInt(1),Ew=BigInt(2);function e5e(t){return Rx(t,{adjustScalarBytes:"function",powPminus2:"function"}),Object.freeze({...t})}function t5e(t){const e=e5e(t),{P:r,type:n,adjustScalarBytes:i,powPminus2:s,randomBytes:o}=e,a=n==="x25519";if(!a&&n!=="x448")throw new Error("invalid type");const c=o||zg,l=a?255:448,u=a?32:56,f=BigInt(a?9:5),d=BigInt(a?121665:39081),p=a?Ew**BigInt(254):Ew**BigInt(447),h=a?BigInt(8)*Ew**BigInt(251)-E0:BigInt(4)*Ew**BigInt(445)-E0,g=p+h+E0,y=I=>pa(I,r),x=C(f);function C(I){return KS(y(I),u)}function _(I){const j=lo("u coordinate",I,u);return a&&(j[31]&=127),y(Z3(j))}function L(I){return Z3(i(lo("scalar",I,u)))}function P(I,j){const D=B(_(j),L(I));if(D===E1)throw new Error("invalid private or public key received");return C(D)}function z(I){return P(I,x)}function W(I,j,D){const O=y(I*(j-D));return j=y(j-O),D=y(D+O),{x_2:j,x_3:D}}function B(I,j){v_("u",I,E1,r),v_("scalar",j,p,g);const D=j,O=I;let T=E0,m=E1,b=I,E=E0,k=E1;for(let M=BigInt(l-1);M>=E1;M--){const H=D>>M&E0;k^=H,{x_2:T,x_3:b}=W(k,T,b),{x_2:m,x_3:E}=W(k,m,E),k=H;const N=T+m,v=y(N*N),U=T-m,G=y(U*U),S=v-G,J=b+E,ne=b-E,Z=y(ne*N),Q=y(J*U),ee=Z+Q,re=Z-Q;b=y(ee*ee),E=y(O*y(re*re)),T=y(v*G),m=y(S*(v+y(d*S)))}({x_2:T,x_3:b}=W(k,T,b)),{x_2:m,x_3:E}=W(k,m,E);const R=s(m);return y(T*R)}return{scalarMult:P,scalarMultBase:z,getSharedSecret:(I,j)=>P(I,j),getPublicKey:I=>z(I),utils:{randomPrivateKey:()=>c(u)},GuBytes:x.slice()}}BigInt(0);const r5e=BigInt(1),NR=BigInt(2),n5e=BigInt(3),i5e=BigInt(5);BigInt(8);const fH={p:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function s5e(t){const e=BigInt(10),r=BigInt(20),n=BigInt(40),i=BigInt(80),s=fH.p,o=t*t%s*t%s,a=Wa(o,NR,s)*o%s,c=Wa(a,r5e,s)*t%s,l=Wa(c,i5e,s)*c%s,u=Wa(l,e,s)*l%s,f=Wa(u,r,s)*u%s,d=Wa(f,n,s)*f%s,p=Wa(d,i,s)*d%s,h=Wa(p,i,s)*d%s,g=Wa(h,e,s)*l%s;return{pow_p_5_8:Wa(g,NR,s)*t%s,b2:o}}function o5e(t){return t[0]&=248,t[31]&=127,t[31]|=64,t}const x_=(()=>{const t=fH.p;return t5e({P:t,type:"x25519",powPminus2:e=>{const{pow_p_5_8:r,b2:n}
2070=s5e(e);return pa(Wa(r,n5e,t)*n,t)},adjustScalarBytes:o5e})})();function IR(t){t.lowS!==void 0&&Y3("lowS",t.lowS),t.prehash!==void 0&&Y3("prehash",t.prehash)}let a5e=class extends Error{constructor(e=""){super(e)}};const Zl={Err:a5e,_tlv:{encode:(t,e)=>{const{Err:r}=Zl;if(t<0||t>256)throw new r("tlv.encode: wrong tag");if(e.length&1)throw new r("tlv.encode: unpadded data");const n=e.length/2,i=xw(n);if(i.length/2&128)throw new r("tlv.encode: long form length too big");const s=n>127?xw(i.length/2|128):"";return xw(t)+s+i+e},decode(t,e){const{Err:r}=Zl;let n=0;if(t<0||t>256)throw new r("tlv.encode: wrong tag");if(e.length<2||e[n++]!==t)throw new r("tlv.decode: wrong tlv");const i=e[n++],s=!!(i&128);let o=0;if(!s)o=i;else{const c=i&127;if(!c)throw new r("tlv.decode(long): indefinite length not supported");if(c>4)throw new r("tlv.decode(long): byte length is too big");const l=e.subarray(n,n+c);if(l.length!==c)throw new r("tlv.decode: length bytes not complete");if(l[0]===0)throw new r("tlv.decode(long): zero leftmost byte");for(const u of l)o=o<<8|u;if(n+=c,o<128)throw new r("tlv.decode(long): not minimal encoding")}const a=e.subarray(n,n+o);if(a.length!==o)throw new r("tlv.decode: wrong value length");return{v:a,l:e.subarray(n+o)}}},_int:{encode(t){const{Err:e}=Zl;if(t<Rm)throw new e("integer: negative integers are not allowed");let r=xw(t);if(Number.parseInt(r[0],16)&8&&(r="00"+r),r.length&1)throw new e("unexpected DER parsing assertion: unpadded hex");return r},decode(t){const{Err:e}=Zl;if(t[0]&128)throw new e("invalid signature integer: negative");if(t[0]===0&&!(t[1]&128))throw new e("invalid signature integer: unnecessary leading zero");return kx(t)}},toSig(t){const{Err:e,_int:r,_tlv:n}=Zl,i=lo("signature",t),{v:s,l:o}=n.decode(48,i);if(o.length)throw new e("invalid signature: left bytes after parsing");const{v:a,l:c}=n.decode(2,s),{v:l,l:u}=n.decode(2,c);if(u.length)throw new e("invalid signature: left bytes after parsing");return{r:r.decode(a),s:r.decode(l)}},hexFromSig(t){const{_tlv:e,_int:r}=Zl,n=e.encode(2,r.encode(t.r)),i=e.encode(2,r.encode(t.s)),s=n+i;return e.encode(48,s)}},Rm=BigInt(0),Om=BigInt(1),c5e=BigInt(2),Cw=BigInt(3),l5e=BigInt(4);function u5e(t,e,r){function n(i){const s=t.sqr(i),o=t.mul(s,i);return t.add(t.add(o,t.mul(i,e)),r)}return n}function dH(t,e,r){const{BYTES:n}=t;function i(s){let o;if(typeof s=="bigint")o=s;else{let a=lo("private key",s);if(e){if(!e.includes(a.length*2))throw new Error("invalid private key");const c=new Uint8Array(n);c.set(a,c.length-a.length),a=c}try{o=t.fromBytes(a)}catch{throw new Error(`invalid private key: expected ui8a of size ${n}, got ${typeof s}`)}}if(r&&(o=t.create(o)),!t.isValidNot0(o))throw new Error("invalid private key: out of range [1..N-1]");return o}return i}function f5e(t,e={}){const{Fp:r,Fn:n}=Xxe("weierstrass",t,e),{h:i,n:s}=t;Rx(e,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});const{endo:o}=e;if(o&&(!r.is0(t.a)||typeof o.beta!="bigint"||typeof o.splitScalar!="function"))throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function');function a(){if(!r.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}function c(B,I,j){const{x:D,y:O}=I.toAffine(),T=r.toBytes(D);if(Y3("isCompressed",j),j){a();const m=!r.isOdd(O);return Qd(hH(m),T)}else return Qd(Uint8Array.of(4),T,r.toBytes(O))}function l(B){Sa(B);const I=r.BYTES,j=I+1,D=2*I+1,O=B.length,T=B[0],m=B.subarray(1);if(O===j&&(T===2||T===3)){const b=r.fromBytes(m);if(!r.isValid(b))throw new Error("bad point: is not on curve, wrong x");const E=d(b);let k;try{k=r.sqrt(E)}catch(M){const H=M instanceof Error?": "+M.message:"";throw new Error("bad point: is not on curve, sqrt error"+H)}a();const R=r.isOdd(k);return(T&1)===1!==R&&(k=r.neg(k)),{x:b,y:k}}else if(O===D&&T===4){const b=r.fromBytes(m.subarray(I*0,I*1)),E=r.fromBytes(m.subarray(I*1,I*2));if(!p(b,E))throw new Error("bad point: is not on curve");return{x:b,y:E}}else throw new Error(`bad point: got length ${O}, expected compressed=${j} or uncompressed=${D}`)}const u=e.toBytes||c,f=e.fromBytes||l,d=u5e(r,t.a,t.b);function p(B,I){const j=r.sqr(I),D=d(B);return r.eql(j,D)}if(!p(t.Gx,t.Gy))throw new Error("bad curve params: generator point");const h=r.mul(r.pow(t.a,Cw),l5e),g=r.mul(r.sqr(t.b),BigInt(27));if(r.is0(r.add(h,g)))throw new Error("bad curve params: a or b");function y(B,I,j=!1){if(!r.isValid(I)||j&&r.is0(I))throw new Error(`bad point coordinate ${B}`);return I}function x(B){if(!(B instanceof P))throw new Error("ProjectivePoint expected")}const C=xR((B,I)=>{const{px:j,py:D,pz:O}=B;if(r.eql(O,r.ONE))return{x:j,y:D};const T=B.is0();I==null&&(I=T?r.ONE:r.inv(O));const m=r.mul(j,I),b=r.mul(D,I),E=r.mul(O,I);if(T)return{x:r.ZERO,y:r.ZERO};
2070if(!r.eql(E,r.ONE))throw new Error("invZ was invalid");return{x:m,y:b}}),_=xR(B=>{if(B.is0()){if(e.allowInfinityPoint&&!r.is0(B.py))return;throw new Error("bad point: ZERO")}const{x:I,y:j}=B.toAffine();if(!r.isValid(I)||!r.isValid(j))throw new Error("bad point: x or y not field elements");if(!p(I,j))throw new Error("bad point: equation left != right");if(!B.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});function L(B,I,j,D,O){return j=new P(r.mul(j.px,B),j.py,j.pz),I=Pm(D,I),j=Pm(O,j),I.add(j)}class P{constructor(I,j,D){this.px=y("x",I),this.py=y("y",j,!0),this.pz=y("z",D),Object.freeze(this)}static fromAffine(I){const{x:j,y:D}=I||{};if(!I||!r.isValid(j)||!r.isValid(D))throw new Error("invalid affine point");if(I instanceof P)throw new Error("projective point not allowed");return r.is0(j)&&r.is0(D)?P.ZERO:new P(j,D,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(I){return Kxe(P,"pz",I)}static fromBytes(I){return Sa(I),P.fromHex(I)}static fromHex(I){const j=P.fromAffine(f(lo("pointHex",I)));return j.assertValidity(),j}static fromPrivateKey(I){const j=dH(n,e.allowedPrivateKeyLengths,e.wrapPrivateKey);return P.BASE.multiply(j(I))}static msm(I,j){return Qxe(P,n,I,j)}precompute(I=8,j=!0){return W.setWindowSize(this,I),j||this.multiply(Cw),this}_setWindowSize(I){this.precompute(I)}assertValidity(){_(this)}hasEvenY(){const{y:I}=this.toAffine();if(!r.isOdd)throw new Error("Field doesn't support isOdd");return!r.isOdd(I)}equals(I){x(I);const{px:j,py:D,pz:O}=this,{px:T,py:m,pz:b}=I,E=r.eql(r.mul(j,b),r.mul(T,O)),k=r.eql(r.mul(D,b),r.mul(m,O));return E&&k}negate(){return new P(this.px,r.neg(this.py),this.pz)}double(){const{a:I,b:j}=t,D=r.mul(j,Cw),{px:O,py:T,pz:m}=this;let b=r.ZERO,E=r.ZERO,k=r.ZERO,R=r.mul(O,O),M=r.mul(T,T),H=r.mul(m,m),N=r.mul(O,T);return N=r.add(N,N),k=r.mul(O,m),k=r.add(k,k),b=r.mul(I,k),E=r.mul(D,H),E=r.add(b,E),b=r.sub(M,E),E=r.add(M,E),E=r.mul(b,E),b=r.mul(N,b),k=r.mul(D,k),H=r.mul(I,H),N=r.sub(R,H),N=r.mul(I,N),N=r.add(N,k),k=r.add(R,R),R=r.add(k,R),R=r.add(R,H),R=r.mul(R,N),E=r.add(E,R),H=r.mul(T,m),H=r.add(H,H),R=r.mul(H,N),b=r.sub(b,R),k=r.mul(H,M),k=r.add(k,k),k=r.add(k,k),new P(b,E,k)}add(I){x(I);const{px:j,py:D,pz:O}=this,{px:T,py:m,pz:b}=I;let E=r.ZERO,k=r.ZERO,R=r.ZERO;const M=t.a,H=r.mul(t.b,Cw);let N=r.mul(j,T),v=r.mul(D,m),U=r.mul(O,b),G=r.add(j,D),S=r.add(T,m);G=r.mul(G,S),S=r.add(N,v),G=r.sub(G,S),S=r.add(j,O);let J=r.add(T,b);return S=r.mul(S,J),J=r.add(N,U),S=r.sub(S,J),J=r.add(D,O),E=r.add(m,b),J=r.mul(J,E),E=r.add(v,U),J=r.sub(J,E),R=r.mul(M,S),E=r.mul(H,U),R=r.add(E,R),E=r.sub(v,R),R=r.add(v,R),k=r.mul(E,R),v=r.add(N,N),v=r.add(v,N),U=r.mul(M,U),S=r.mul(H,S),v=r.add(v,U),U=r.sub(N,U),U=r.mul(M,U),S=r.add(S,U),N=r.mul(v,S),k=r.add(k,N),N=r.mul(J,S),E=r.mul(G,E),E=r.sub(E,N),N=r.mul(G,v),R=r.mul(J,R),R=r.add(R,N),new P(E,k,R)}subtract(I){return this.add(I.negate())}is0(){return this.equals(P.ZERO)}multiply(I){const{endo:j}=e;if(!n.isValidNot0(I))throw new Error("invalid scalar: out of range");let D,O;const T=m=>W.wNAFCached(this,m,P.normalizeZ);if(j){const{k1neg:m,k1:b,k2neg:E,k2:k}=j.splitScalar(I),{p:R,f:M}=T(b),{p:H,f:N}=T(k);O=M.add(N),D=L(j.beta,R,H,m,E)}else{const{p:m,f:b}=T(I);D=m,O=b}return P.normalizeZ([D,O])[0]}multiplyUnsafe(I){const{endo:j}=e,D=this;if(!n.isValid(I))throw new Error("invalid scalar: out of range");if(I===Rm||D.is0())return P.ZERO;if(I===Om)return D;if(W.hasPrecomputes(this))return this.multiply(I);if(j){const{k1neg:O,k1:T,k2neg:m,k2:b}=j.splitScalar(I),{p1:E,p2:k}=Jxe(P,D,T,b);return L(j.beta,E,k,O,m)}else return W.wNAFCachedUnsafe(D,I)}multiplyAndAddUnsafe(I,j,D){const O=this.multiplyUnsafe(j).add(I.multiplyUnsafe(D));return O.is0()?void 0:O}toAffine(I){return C(this,I)}isTorsionFree(){const{isTorsionFree:I}=e;return i===Om?!0:I?I(P,this):W.wNAFCachedUnsafe(this,s).is0()}clearCofactor(){const{clearCofactor:I}=e;return i===Om?this:I?I(P,this):this.multiplyUnsafe(i)}toBytes(I=!0){return Y3("isCompressed",I),this.assertValidity(),u(P,this,I)}toRawBytes(I=!0){return this.toBytes(I)}toHex(I=!0){return ry(this.toBytes(I))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}P.BASE=new P(t.Gx,t.Gy,r.ONE),P.ZERO=new P(r.ZERO,r.ONE,r.ZERO),P.Fp=r,P.Fn=n;const z=n.BITS,W=Zxe(P,e.endo?Math.ceil(z/2):z);return P}function hH(t){return Uint8Array.of(t?2:3)}function d5e(t,e,r={}){Rx(e,{hash:"function"},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});const n=e.randomBytes||zg,i=e.hmac||((D,...O)=>Ix(e.hash,D,Qd(...O))),{Fp:s,Fn:o}=t,{ORDER:a,BITS:c}=o;function l(D){const O=a>>Om;return D>O}function u(D){return l(D)?o.neg(D):D}function f(D,O){if(!o.isValidNot0(O))throw new Error(`invalid signature ${D}: out of range 1..CURVE.n`)}class d{constructor(O,T,m){f("r",O),f("s",T),this.r=O,this.s=T,m!=null&&(this.recovery=m),Object.freeze(this)}static fromCompact(O){const T=o.BYTES,m=lo("compactSignature",O,T*2);return new d(o.fromBytes(m.subarray(0,T)),o.fromBytes(m.subarray(T,T*2)))}static fromDER(O){const{r:T,s:m}=Zl.toSig(lo("DER",O));return new d(T,m)}assertValidity(){}addRecoveryBit(O){return new d(this.r,this.s,O)}recoverPublicKey(O){const T=s.ORDER,{r:m,s:b,recovery:E}=this;if(E==null||![0,1,2,3].includes(E))throw new Error("recovery id invalid");if(a*c5e<T&&E>1)throw new Error("recovery id is ambiguous for h>1 curve");const k=E===2||E===3?m+a:m;if(!s.isValid(k))throw new Error("recovery id 2 or 3 invalid");const R=s.toBytes(k),M=t.fromHex(Qd(hH((E&1)===0),R)),H=o.inv(k),N=_(lo("msgHash",O)),v=o.create(-N*H),U=o.create(b*H),G=t.BASE.multiplyUnsafe(v).add(M.multiplyUnsafe(U));if(G.is0())throw new Error("point at infinify");return G.assertValidity(),G}hasHighS(){return l(this.s)}normalizeS(){return this.hasHighS()?new d(this.r,o.neg(this.s),this.recovery):this}toBytes(O){if(O==="compact")return Qd(o.toBytes(this.r),o.toBytes(this.s));if(O==="der")return zS(Zl.hexFromSig(this));throw new Error("invalid format")}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return ry(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return ry(this.toBytes("compact"))}}const p=dH(o,r.allowedPrivateKeyLengths,r.wrapPrivateKey),h={isValidPrivateKey(D){try{return p(D),!0}catch{return!1}},normPrivateKeyToScalar:p,randomPrivateKey:()=>{const D=a;return Vxe(n(cH(D)),D)},precompute(D=8,O=t.BASE){return O.precompute(D,!1)}};function g(D,O=!0){return t.fromPrivateKey(D).toBytes(O)}
vendor: 6,734 bytes, line 2070
2070function y(D){if(typeof D=="bigint")return!1;if(D instanceof t)return!0;const O=lo("key",D).length,T=s.BYTES,m=T+1,b=2*T+1;if(!(r.allowedPrivateKeyLengths||o.BYTES===m))return O===m||O===b}function x(D,O,T=!0){if(y(D)===!0)throw new Error("first arg must be private key");if(y(O)===!1)throw new Error("second arg must be public key");return t.fromHex(O).multiply(p(D)).toBytes(T)}const C=e.bits2int||function(D){if(D.length>8192)throw new Error("input is too large");const O=kx(D),T=D.length*8-c;return T>0?O>>BigInt(T):O},_=e.bits2int_modN||function(D){return o.create(C(D))},L=Px(c);function P(D){return v_("num < 2^"+c,D,Rm,L),o.toBytes(D)}function z(D,O,T=W){if(["recovered","canonical"].some(G=>G in T))throw new Error("sign() legacy options not supported");const{hash:m}=e;let{lowS:b,prehash:E,extraEntropy:k}=T;b==null&&(b=!0),D=lo("msgHash",D),IR(T),E&&(D=lo("prehashed msgHash",m(D)));const R=_(D),M=p(O),H=[P(M),P(R)];if(k!=null&&k!==!1){const G=k===!0?n(s.BYTES):k;H.push(lo("extraEntropy",G))}const N=Qd(...H),v=R;function U(G){const S=C(G);if(!o.isValidNot0(S))return;const J=o.inv(S),ne=t.BASE.multiply(S).toAffine(),Z=o.create(ne.x);if(Z===Rm)return;const Q=o.create(J*o.create(v+Z*M));if(Q===Rm)return;let ee=(ne.x===Z?0:2)|Number(ne.y&Om),re=Q;return b&&l(Q)&&(re=u(Q),ee^=1),new d(Z,re,ee)}return{seed:N,k2sig:U}}const W={lowS:e.lowS,prehash:!1},B={lowS:e.lowS,prehash:!1};function I(D,O,T=W){const{seed:m,k2sig:b}=z(D,O,T);return $xe(e.hash.outputLen,o.BYTES,i)(m,b)}t.BASE.precompute(8);function j(D,O,T,m=B){const b=D;O=lo("msgHash",O),T=lo("publicKey",T),IR(m);const{lowS:E,prehash:k,format:R}=m;if("strict"in m)throw new Error("options.strict was renamed to lowS");if(R!==void 0&&!["compact","der","js"].includes(R))throw new Error('format must be "compact", "der" or "js"');const M=typeof b=="string"||BS(b),H=!M&&!R&&typeof b=="object"&&b!==null&&typeof b.r=="bigint"&&typeof b.s=="bigint";if(!M&&!H)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let N,v;try{if(H)if(R===void 0||R==="js")N=new d(b.r,b.s);else throw new Error("invalid format");if(M){try{R!=="compact"&&(N=d.fromDER(b))}catch(ee){if(!(ee instanceof Zl.Err))throw ee}!N&&R!=="der"&&(N=d.fromCompact(b))}v=t.fromHex(T)}catch{return!1}if(!N||E&&N.hasHighS())return!1;k&&(O=e.hash(O));const{r:U,s:G}=N,S=_(O),J=o.inv(G),ne=o.create(S*J),Z=o.create(U*J),Q=t.BASE.multiplyUnsafe(ne).add(v.multiplyUnsafe(Z));return Q.is0()?!1:o.create(Q.x)===U}return Object.freeze({getPublicKey:g,getSharedSecret:x,sign:I,verify:j,utils:h,Point:t,Signature:d})}function h5e(t){const e={a:t.a,b:t.b,p:t.Fp.ORDER,n:t.n,h:t.h,Gx:t.Gx,Gy:t.Gy},r=t.Fp,n=Wg(e.n,t.nBitLength),i={Fp:r,Fn:n,allowedPrivateKeyLengths:t.allowedPrivateKeyLengths,allowInfinityPoint:t.allowInfinityPoint,endo:t.endo,wrapPrivateKey:t.wrapPrivateKey,isTorsionFree:t.isTorsionFree,clearCofactor:t.clearCofactor,fromBytes:t.fromBytes,toBytes:t.toBytes};return{CURVE:e,curveOpts:i}}function p5e(t){const{CURVE:e,curveOpts:r}=h5e(t),n={hash:t.hash,hmac:t.hmac,randomBytes:t.randomBytes,lowS:t.lowS,bits2int:t.bits2int,bits2int_modN:t.bits2int_modN};return{CURVE:e,curveOpts:r,ecdsaOpts:n}}function g5e(t,e){return Object.assign({},e,{ProjectivePoint:e.Point,CURVE:t})}function m5e(t){const{CURVE:e,curveOpts:r,ecdsaOpts:n}=p5e(t),i=f5e(e,r),s=d5e(i,n,r);return g5e(t,s)}function E_(t,e){const r=n=>m5e({...t,hash:n});return{...r(e),create:r}}const pH={p:BigInt("0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff"),n:BigInt("0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551"),h:BigInt(1),a:BigInt("0xffffffff00000001000000000000000000000000fffffffffffffffffffffffc"),b:BigInt("0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b"),Gx:BigInt("0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296"),Gy:BigInt("0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5")},gH={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff"),n:BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973"),h:BigInt(1),a:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000fffffffc"),b:BigInt("0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef"),Gx:BigInt("0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7"),Gy:BigInt("0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f")},mH={p:BigInt("0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),n:BigInt("0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386409"),h:BigInt(1),a:BigInt("0x1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc"),b:BigInt("0x0051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00"),Gx:BigInt("0x00c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66"),Gy:BigInt("0x011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650")},y5e=Wg(pH.p),b5e=Wg(gH.p),w5e=Wg(mH.p),v5e=E_({...pH,Fp:y5e,lowS:!1},Nx);E_({...gH,Fp:b5e,lowS:!1},I4e),E_({...mH,Fp:w5e,lowS:!1,allowedPrivateKeyLengths:[130,131,132]},N4e);const x5e=v5e,yH="base10",Hs="base16",rc="base64pad",wf="base64url",db="utf8",bH=0,au=1,hb=2,E5e=0,TR=1,Dm=12,GS=32;function C5e(){const t=x_.utils.randomPrivateKey(),e=x_.getPublicKey(t);return{privateKey:No(t,Hs),publicKey:No(e,Hs)}}function C_(){const t=zg(GS);return No(t,Hs)}function _5e(t,e){const r=x_.getSharedSecret(xa(t,Hs),xa(e,Hs)),n=Dxe(Tx,r,void 0,void 0,GS);return No(n,Hs)}function xv(t){const e=Tx(xa(t,Hs));return No(e,Hs)}function zc(t){const e=Tx(xa(t,db));return No(e,Hs)}function wH(t){return xa(`${t}`,yH)}function $h(t){return Number(No(t,yH))}function vH(t){return t.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function xH(t){const e=t.replace(/-/g,"+").replace(/_/g,"/"),r=(4-e.length%4)%4;return e+"=".repeat(r)}function A5e(t){const e=wH(typeof t.type<"u"?t.type:bH);if($h(e)===au&&typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const r=typeof t.senderPublicKey<"u"?xa(t.senderPublicKey,Hs):void 0,n=typeof t.iv<"u"?xa(t.iv,Hs):zg(Dm),i=xa(t.symKey,Hs),s=XW(i,n).encrypt
2070(xa(t.message,db)),o=EH({type:e,sealed:s,iv:n,senderPublicKey:r});return t.encoding===wf?vH(o):o}function S5e(t){const e=xa(t.symKey,Hs),{sealed:r,iv:n}=iy({encoded:t.encoded,encoding:t.encoding}),i=XW(e,n).decrypt(r);if(i===null)throw new Error("Failed to decrypt");return No(i,db)}function N5e(t,e){const r=wH(hb),n=zg(Dm),i=xa(t,db),s=EH({type:r,sealed:i,iv:n});return e===wf?vH(s):s}function I5e(t,e){const{sealed:r}=iy({encoded:t,encoding:e});return No(r,db)}function EH(t){if($h(t.type)===hb)return No(km([t.type,t.sealed]),rc);if($h(t.type)===au){if(typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return No(km([t.type,t.senderPublicKey,t.iv,t.sealed]),rc)}return No(km([t.type,t.iv,t.sealed]),rc)}function iy(t){const e=(t.encoding||rc)===wf?xH(t.encoded):t.encoded,r=xa(e,rc),n=r.slice(E5e,TR),i=TR;if($h(n)===au){const c=i+GS,l=c+Dm,u=r.slice(i,c),f=r.slice(c,l),d=r.slice(l);return{type:n,sealed:d,iv:f,senderPublicKey:u}}if($h(n)===hb){const c=r.slice(i),l=zg(Dm);return{type:n,sealed:c,iv:l}}const s=i+Dm,o=r.slice(i,s),a=r.slice(s);return{type:n,sealed:a,iv:o}}function T5e(t,e){const r=iy({encoded:t,encoding:e==null?void 0:e.encoding});return CH({type:$h(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?No(r.senderPublicKey,Hs):void 0,receiverPublicKey:e==null?void 0:e.receiverPublicKey})}function CH(t){const e=(t==null?void 0:t.type)||bH;if(e===au){if(typeof(t==null?void 0:t.senderPublicKey)>"u")throw new Error("missing sender public key");if(typeof(t==null?void 0:t.receiverPublicKey)>"u")throw new Error("missing receiver public key")}return{type:e,senderPublicKey:t==null?void 0:t.senderPublicKey,receiverPublicKey:t==null?void 0:t.receiverPublicKey}}function kR(t){return t.type===au&&typeof t.senderPublicKey=="string"&&typeof t.receiverPublicKey=="string"}function PR(t){return t.type===hb}function k5e(t){const e=Buffer.from(t.x,"base64"),r=Buffer.from(t.y,"base64");return km([new Uint8Array([4]),e,r])}function P5e(t,e){const[r,n,i]=t.split("."),s=Buffer.from(xH(i),"base64");if(s.length!==64)throw new Error("Invalid signature length");const o=s.slice(0,32),a=s.slice(32,64),c=`${r}.${n}`,l=Tx(c),u=k5e(e);if(!x5e.verify(km([o,a]),l,u))throw new Error("Invalid signature");return s_(t).payload}const R5e="irn";function J3(t){return(t==null?void 0:t.relay)||{protocol:R5e}}function X1(t){const e=a3e[t];if(typeof e>"u")throw new Error(`Relay Protocol not supported: ${t}`);return e}function O5e(t,e="-"){const r={},n="relay"+e;return Object.keys(t).forEach(i=>{if(i.startsWith(n)){const s=i.replace(n,""),o=t[i];r[s]=o}}),r}function RR(t){if(!t.includes("wc:")){const l=DW(t);l!=null&&l.includes("wc:")&&(t=l)}t=t.includes("wc://")?t.replace("wc://",""):t,t=t.includes("wc:")?t.replace("wc:",""):t;const e=t.indexOf(":"),r=t.indexOf("?")!==-1?t.indexOf("?"):void 0,n=t.substring(0,e),i=t.substring(e+1,r).split("@"),s=typeof r<"u"?t.substring(r):"",o=new URLSearchParams(s),a={};o.forEach((l,u)=>{a[u]=l});
2070const c=typeof a.methods=="string"?a.methods.split(","):void 0;return{protocol:n,topic:D5e(i[0]),version:parseInt(i[1],10),symKey:a.symKey,relay:O5e(a),methods:c,expiryTimestamp:a.expiryTimestamp?parseInt(a.expiryTimestamp,10):void 0}}function D5e(t){return t.startsWith("//")?t.substring(2):t}function L5e(t,e="-"){const r="relay",n={};return Object.keys(t).forEach(i=>{const s=i,o=r+e+s;t[s]&&(n[o]=t[s])}),n}function OR(t){const e=new URLSearchParams,r=L5e(t.relay);Object.keys(r).sort().forEach(i=>{e.set(i,r[i])}),e.set("symKey",t.symKey),t.expiryTimestamp&&e.set("expiryTimestamp",t.expiryTimestamp.toString()),t.methods&&e.set("methods",t.methods.join(","));const n=e.toString();return`${t.protocol}:${t.topic}@${t.version}?${n}`}function _w(t,e,r){return`${t}?wc_ev=${r}&topic=${e}`}var M5e=Object.defineProperty,$5e=Object.defineProperties,U5e=Object.getOwnPropertyDescriptors,DR=Object.getOwnPropertySymbols,B5e=Object.prototype.hasOwnProperty,F5e=Object.prototype.propertyIsEnumerable,LR=(t,e,r)=>e in t?M5e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,j5e=(t,e)=>{for(var r in e||(e={}))B5e.call(e,r)&&LR(t,r,e[r]);if(DR)for(var r of DR(e))F5e.call(e,r)&&LR(t,r,e[r]);return t},z5e=(t,e)=>$5e(t,U5e(e));function Hg(t){const e=[];return t.forEach(r=>{const[n,i]=r.split(":");e.push(`${n}:${i}`)}),e}function W5e(t){const e=[];return Object.values(t).forEach(r=>{e.push(...Hg(r.accounts))}),e}function H5e(t,e){const r=[];return Object.values(t).forEach(n=>{Hg(n.accounts).includes(e)&&r.push(...n.methods)}),r}function q5e(t,e){const r=[];return Object.values(t).forEach(n=>{Hg(n.accounts).includes(e)&&r.push(...n.events)}),r}function _H(t){return t.includes(":")}function V5e(t){return _H(t)?t.split(":")[0]:t}function MR(t){var e,r,n;const i={};if(!sy(t))return i;for(const[s,o]of Object.entries(t)){const a=_H(s)?[s]:o.chains,c=o.methods||[],l=o.events||[],u=V5e(s);i[u]=z5e(j5e({},i[u]),{chains:ph(a,(e=i[u])==null?void 0:e.chains),methods:ph(c,(r=i[u])==null?void 0:r.methods),events:ph(l,(n=i[u])==null?void 0:n.events)})}return i}function K5e(t){const e={};return t==null||t.forEach(r=>{var n;const[i,s]=r.split(":");e[i]||(e[i]={accounts:[],chains:[],events:[],methods:[]}),e[i].accounts.push(r),(n=e[i].chains)==null||n.push(`${i}:${s}`)}),e}function $R(t,e){e=e.map(n=>n.replace("did:pkh:",""));const r=K5e(e);for(const[n,i]of Object.entries(r))i.methods?i.methods=ph(i.methods,t):i.methods=t,i.events=["chainChanged","accountsChanged"];return r}function G5e(t,e){var r,n,i,s,o,a;const c=MR(t),l=MR(e),u={},f=Object.keys(c).concat(Object.keys(l));for(const d of f)u[d]={chains:ph((r=c[d])==null?void 0:r.chains,(n=l[d])==null?void 0:n.chains),methods:ph((i=c[d])==null?void 0:i.methods,(s=l[d])==null?void 0:s.methods),events:ph((o=c[d])==null?void 0:o.events,(a=l[d])==null?void 0:a.events)};return u}const Y5e={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},Z5e={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function je(t,e){const{message:r,code:n}=Z5e[t];return{message:e?`${r} ${e}`:r,code:n}}function Xn(t,e){const{message:r,code:n}=Y5e[t];return{message:e?`${r} ${e}`:r,code:n}}function ug(t,e){return Array.isArray(t)?typeof e<"u"&&t.length?t.every(e):!0:!1}function sy(t){return Object.getPrototypeOf(t)===Object.prototype&&Object.keys(t).length}function es(t){return typeof t>"u"}function mi(t,e){return e&&es(t)?!0:typeof t=="string"&&!!t.trim().length}function YS(t,e){return e&&es(t)?!0:typeof t=="number"&&!isNaN(t)}function J5e(t,e){const{requiredNamespaces:r}=e,n=Object.keys(t.namespaces),i=Object.keys(r);let s=!0;return Jd(i,n)?(n.forEach(o=>{const{accounts:a,methods:c,events:l}=t.namespaces[o],u=Hg(a),f=r[o];(!Jd(TW(o,f),u)||!Jd(f.methods,c)||!Jd(f.events,l))&&(s=!1)}),s):!1}function Q3(t){return mi(t,!1)&&t.includes(":")?t.split(":").length===2:!1}function Q5e(t){if(mi(t,!1)&&t.includes(":")){const e=t.split(":");if(e.length===3){const r=e[0]+":"+e[1];return!!e[2]&&Q3(r)}}return!1}function X5e(t){function e(r){try{return typeof new URL(r)<"u"}catch{return!1}}try{if(mi(t,!1)){if(e(t))return!0;const r=DW(t);return e(r)}}catch{}return!1}function eEe(t){var e;return(e=t==null?void 0:t.proposer)==null?void 0:e.publicKey}function tEe(t){return t==null?void 0:t.topic}function rEe(t,e){let r=null;return mi(t==null?void 0:t.publicKey,!1)||(r=je("MISSING_OR_INVALID",`${e} controller public key should be a string`)),r}function UR(t){let e=!0;return ug(t)?t.length&&(e=t.every(r=>mi(r,!1))):e=!1,e}function nEe(t,e,r){let n=null;return ug(e)&&e.length?e.forEach(i=>
2070{n||Q3(i)||(n=Xn("UNSUPPORTED_CHAINS",`${r}, chain ${i} should be a string and conform to "namespace:chainId" format`))}):Q3(t)||(n=Xn("UNSUPPORTED_CHAINS",`${r}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),n}function iEe(t,e,r){let n=null;return Object.entries(t).forEach(([i,s])=>{if(n)return;const o=nEe(i,TW(i,s),`${e} ${r}`);o&&(n=o)}),n}function sEe(t,e){let r=null;return ug(t)?t.forEach(n=>{r||Q5e(n)||(r=Xn("UNSUPPORTED_ACCOUNTS",`${e}, account ${n} should be a string and conform to "namespace:chainId:address" format`))}):r=Xn("UNSUPPORTED_ACCOUNTS",`${e}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),r}function oEe(t,e){let r=null;return Object.values(t).forEach(n=>{if(r)return;const i=sEe(n==null?void 0:n.accounts,`${e} namespace`);i&&(r=i)}),r}function aEe(t,e){let r=null;return UR(t==null?void 0:t.methods)?UR(t==null?void 0:t.events)||(r=Xn("UNSUPPORTED_EVENTS",`${e}, events should be an array of strings or empty array for no events`)):r=Xn("UNSUPPORTED_METHODS",`${e}, methods should be an array of strings or empty array for no methods`),r}function AH(t,e){let r=null;return Object.values(t).forEach(n=>{if(r)return;const i=aEe(n,`${e}, namespace`);i&&(r=i)}),r}function cEe(t,e,r){let n=null;if(t&&sy(t)){const i=AH(t,e);i&&(n=i);const s=iEe(t,e,r);s&&(n=s)}else n=je("MISSING_OR_INVALID",`${e}, ${r} should be an object with data`);return n}function JE(t,e){let r=null;if(t&&sy(t)){const n=AH(t,e);n&&(r=n);const i=oEe(t,e);i&&(r=i)}else r=je("MISSING_OR_INVALID",`${e}, namespaces should be an object with data`);return r}function SH(t){return mi(t.protocol,!0)}function lEe(t,e){let r=!1;return t?t&&ug(t)&&t.length&&t.forEach(n=>{r=SH(n)}):r=!0,r}function uEe(t){return typeof t=="number"}function ao(t){return typeof t<"u"&&typeof t!==null}function fEe(t){return!(!t||typeof t!="object"||!t.code||!YS(t.code,!1)||!t.message||!mi(t.message,!1))}function dEe(t){return!(es(t)||!mi(t.method,!1))}function hEe(t){return!(es(t)||es(t.result)&&es(t.error)||!YS(t.id,!1)||!mi(t.jsonrpc,!1))}function pEe(t){return!(es(t)||!mi(t.name,!1))}function BR(t,e){return!(!Q3(e)||!W5e(t).includes(e))}function gEe(t,e,r){return mi(r,!1)?H5e(t,e).includes(r):!1}function mEe(t,e,r){return mi(r,!1)?q5e(t,e).includes(r):!1}function FR(t,e,r){let n=null;const i=yEe(t),s=bEe(e),o=Object.keys(i),a=Object.keys(s),c=jR(Object.keys(t)),l=jR(Object.keys(e)),u=c.filter(f=>!l.includes(f));return u.length&&(n=je("NON_CONFORMING_NAMESPACES",`${r} namespaces keys don't satisfy requiredNamespaces. 2071 Required: ${u.toString()} 2072 Received: ${Object.keys(e).toString()}`)),Jd(o,a)||(n=je("NON_CONFORMING_NAMESPACES",`${r} namespaces chains don't satisfy required namespaces. 2073 Required: ${o.toString()} 2074 Approved: ${a.toString()}`)),Object.keys(e).forEach(f=>{if(!f.includes(":")||n)return;const d=Hg(e[f].accounts);d.includes(f)||(n=je("NON_CONFORMING_NAMESPACES",`${r} namespaces accounts don't satisfy namespace accounts for ${f} 2075 Required: ${f} 2076 Approved: ${d.toString()}`))}),o.forEach(f=>{n||(Jd(i[f].methods,s[f].methods)?Jd(i[f].events,s[f].events)||(n=je("NON_CONFORMING_NAMESPACES",`${r} namespaces events don't satisfy namespace events for ${f}`)):n=je("NON_CONFORMING_NAMESPACES",`${r} namespaces methods don't satisfy namespace methods for ${f}`))}),n}function yEe(t){const e={};return Object.keys(t).forEach(r=>{var n;r.includes(":")?e[r]=t[r]:(n=t[r].chains)==null||n.forEach(i=>{e[i]={methods:t[r].methods,events:t[r].events}})}),e}function jR(t){return[...new Set(t.map(e=>e.includes(":")?e.split(":")[0]:e))]}function bEe(t){const e={};return Object.keys(t).forEach(r=>{if(r.includes(":"))e[r]=t[r];else{const n=Hg(t[r].accounts);n==null||n.forEach(i=>{e[i]={accounts:t[r].accounts.filter(s=>s.includes(`${i}:`)),methods:t[r].methods,events:t[r].events}})}}),e}function wEe(t,e){return YS(t,!1)&&t<=e.max&&t>=e.min}function zR(){const t=ub();return new Promise(e=>{switch(t){case Wo.browser:e(vEe());break;case Wo.reactNative:e(xEe());break;case Wo.node:e(EEe());break;default:e(!0)}})}function vEe(){return jg()&&(navigator==null?void 0:navigator.onLine)}async function xEe(){if(wd()&&typeof global<"u"&&global!=null&&global.NetInfo){const t=await(global==null?void 0:global.NetInfo.fetch());return t==null?void 0:t.isConnected}return!0}function EEe(){return!0}function CEe(t){switch(ub()){case Wo.browser:_Ee(t);break;case Wo.reactNative:AEe(t);break}}function _Ee(t){!wd()&&jg()&&(window.addEventListener("online",()=>t(!0)),window.addEventListener("offline",()=>t(!1)))}function AEe(t){wd()&&typeof global<"u"&&global!=null&&global.NetInfo&&(global==null||global.NetInfo.addEventListener(e=>t(e==null?void 0:e.isConnected)))}function SEe(){var t;return jg()&&Dh()?((t=Dh())==null?void 0:t.visibilityState)==="visible":!0}const QE={};class C1{static get(e){return QE[e]}static set(e,r){QE[e]=r}static delete(e){delete QE[e]}}function NEe(t){const e=Fg.decode(t);if(e.length<33)throw new Error("Too short to contain a public key");return e.slice(1,33)}function IEe({publicKey:t,signature:e,payload:r}){var n;const i=__(r.method),s=128|parseInt(((n=r.version)==null?void 0:n.toString())||"4"),o=PEe(r.address),a=r.era==="00"?new Uint8Array([0]):__(r.era);if(a.length!==1&&a.length!==2)throw new Error("Invalid era length");const c=parseInt(r.nonce,16),l=new Uint8Array([c&255,c>>8&255]),u=BigInt(`0x${kEe(r.tip)}`),f=OEe(u),d=new Uint8Array([0,...t,o,...e,...a,...l,...f,...i]),p=REe(d.length+1);return new Uint8Array([...p,s,...d])}function TEe(t){const e=__(t),r=w3e.blake2b(e,void 0,32);return"0x"+Buffer.from(r).toString("hex")}function __(t){return new Uint8Array(t.replace(/^0x/,"").match(/.{1,2}/g).map(e=>parseInt(e,16)))}function kEe(t){return t.startsWith("0x")?t.slice(2):t}function PEe(t){const e=Fg.decode(t)[0];return e===42?0:e===60?2:1}function REe(t){if(t<64)return new Uint8Array([t<<2]);if(t<16384){const e=t<<2|1;return new Uint8Array([e&255,e>>
vendor: 19,958 bytes, line 2076
20768&255])}else if(t<1<<30){const e=t<<2|2;return new Uint8Array([e&255,e>>8&255,e>>16&255,e>>24&255])}else throw new Error("Compact encoding > 2^30 not supported")}function OEe(t){if(t<BigInt(1)<<BigInt(6))return new Uint8Array([Number(t<<BigInt(2))]);if(t<BigInt(1)<<BigInt(14)){const e=t<<BigInt(2)|BigInt(1);return new Uint8Array([Number(e&BigInt(255)),Number(e>>BigInt(8)&BigInt(255))])}else if(t<BigInt(1)<<BigInt(30)){const e=t<<BigInt(2)|BigInt(2);return new Uint8Array([Number(e&BigInt(255)),Number(e>>BigInt(8)&BigInt(255)),Number(e>>BigInt(16)&BigInt(255)),Number(e>>BigInt(24)&BigInt(255))])}else throw new Error("BigInt compact encoding not supported > 2^30")}function DEe(t){const e=Uint8Array.from(Buffer.from(t.signature,"hex")),r=NEe(t.transaction.address),n=IEe({publicKey:r,signature:e,payload:t.transaction}),i=Buffer.from(n).toString("hex");return TEe(i)}const LEe="PARSE_ERROR",MEe="INVALID_REQUEST",$Ee="METHOD_NOT_FOUND",UEe="INVALID_PARAMS",NH="INTERNAL_ERROR",ZS="SERVER_ERROR",BEe=[-32700,-32600,-32601,-32602,-32603],Lm={[LEe]:{code:-32700,message:"Parse error"},[MEe]:{code:-32600,message:"Invalid Request"},[$Ee]:{code:-32601,message:"Method not found"},[UEe]:{code:-32602,message:"Invalid params"},[NH]:{code:-32603,message:"Internal error"},[ZS]:{code:-32e3,message:"Server error"}},IH=ZS;function FEe(t){return BEe.includes(t)}function WR(t){return Object.keys(Lm).includes(t)?Lm[t]:Lm[IH]}function jEe(t){const e=Object.values(Lm).find(r=>r.code===t);return e||Lm[IH]}function TH(t,e,r){return t.message.includes("getaddrinfo ENOTFOUND")||t.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${r} RPC url at ${e}`):t}var kH={},Ul={},HR;function zEe(){if(HR)return Ul;HR=1,Object.defineProperty(Ul,"__esModule",{value:!0}),Ul.isBrowserCryptoAvailable=Ul.getSubtleCrypto=Ul.getBrowerCrypto=void 0;function t(){return(li==null?void 0:li.crypto)||(li==null?void 0:li.msCrypto)||{}}Ul.getBrowerCrypto=t;function e(){const n=t();return n.subtle||n.webkitSubtle}Ul.getSubtleCrypto=e;function r(){return!!t()&&!!e()}return Ul.isBrowserCryptoAvailable=r,Ul}var Bl={},qR;function WEe(){if(qR)return Bl;qR=1,Object.defineProperty(Bl,"__esModule",{value:!0}),Bl.isBrowser=Bl.isNode=Bl.isReactNative=void 0;function t(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}Bl.isReactNative=t;function e(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}Bl.isNode=e;function r(){return!t()&&!e()}return Bl.isBrowser=r,Bl}(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=ib;e.__exportStar(zEe(),t),e.__exportStar(WEe(),t)})(kH);function $c(t=3){const e=Date.now()*Math.pow(10,t),r=Math.floor(Math.random()*Math.pow(10,t));return e+r}function th(t=6){return BigInt($c(t))}function If(t,e,r){return{id:r||$c(),jsonrpc:"2.0",method:t,params:e}}function Ox(t,e){return{id:t,jsonrpc:"2.0",result:e}}function Dx(t,e,r){return{id:t,jsonrpc:"2.0",error:HEe(e)}}function HEe(t,e){return typeof t>"u"?WR(NH):(typeof t=="string"&&(t=Object.assign(Object.assign({},WR(ZS)),{message:t})),FEe(t.code)&&(t=jEe(t.code)),t)}let qEe=class{},VEe=class extends qEe{constructor(){super()}},KEe=class extends VEe{constructor(e){super()}};const GEe="^https?:",YEe="^wss?:";function ZEe(t){const e=t.match(new RegExp(/^\w+:/,"gi"));if(!(!e||!e.length))return e[0]}function PH(t,e){const r=ZEe(t);return typeof r>"u"?!1:new RegExp(e).test(r)}function VR(t){return PH(t,GEe)}function KR(t){return PH(t,YEe)}function JEe(t){return new RegExp("wss?://localhost(:d{2,5})?").test(t)}function RH(t){return typeof t=="object"&&"id"in t&&"jsonrpc"in t&&t.jsonrpc==="2.0"}function JS(t){return RH(t)&&"method"in t}function Lx(t){return RH(t)&&(Uc(t)||da(t))}function Uc(t){return"result"in t}function da(t){return"error"in t}let Pa=class extends KEe{constructor(e){super(e),this.events=new ka.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.close()}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}async request(e,r){return this.requestStrict(If(e.method,e.params||[],e.id||th().toString()),r)}async requestStrict(e,r){return new Promise(async(n,i)=>{if(!this.connection.connected)try{await this.open()}catch(s){i(s)}this.events.on(`${e.id}`,s=>{da(s)?i(s.error):n(s.result)});try{await this.connection.send(e,r)}catch(s){i(s)}})}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),Lx(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&e.code===3e3&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}async open(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),typeof e=="string"&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",e=>this.onPayload(e)),this.connection.on("close",e=>this.onClose(e)),this.connection.on("error",e=>this.events.emit("error",e)),this.connection.on("register_error",e=>this.onClose()),this.hasRegisteredEventListeners=!0)}};const QEe=()=>typeof WebSocket<"u"?WebSocket:typeof global<"u"&&typeof global.WebSocket<"u"?global.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:typeof self<"u"&&typeof self.WebSocket<"u"?self.WebSocket:require("ws"),XEe=()=>typeof WebSocket<"u"||typeof global<"u"&&typeof global.WebSocket<"u"||typeof window<"u"&&typeof window.WebSocket<"u"||typeof self<"u"&&typeof self.WebSocket<"u",GR=t=>t.split("?")[0],YR=10,e6e=QEe();let t6e=class{constructor(e){if(this.url=e,this.events=new ka.EventEmitter,this.registering=!1,!KR(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}async open(e=this.url){await this.register(e)}async close(){return new Promise((e,r)=>{if(typeof this.socket>"u"){r(new Error("Connection already closed"));return}this.socket.onclose=n=>{this.onClose(n),e()},this.socket.close()})}async send(e){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send(wu(e))}catch(r){this.onError(e.id,r)}}register(e=this.url){if(!KR(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){const r=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=r||this.events.listenerCount("open")>=r)&&this.events.setMaxListeners(r+1),new Promise((n,i)=>{this.events.once("register_error",s=>{this.resetMaxListeners(),i(s)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return i(new Error("WebSocket connection is missing or invalid"));n(this.socket)})})}return this.url=e,this.registering=!0,new Promise((r,n)=>{const i=kH.isReactNative()?void 0:{rejectUnauthorized:!JEe(e)},s=new e6e(e,[],i);XEe()?s.onerror=o=>{const a=o;n(this.emitError(a.error))}:s.on("error",o=>{n(this.emitError(o))}),s.onopen=()=>{this.onOpen(s),r(s)}})}onOpen(e){e.onmessage=r=>this.onPayload(r),e.onclose=r=>this.onClose(r),this.socket=e,this.registering=!1,this.events.emit("open")}onClose(e){this.socket=void 0,this.registering=!1,this.events.emit("close",e)}onPayload(e){if(typeof e.data>"u")return;const r=typeof e.data=="string"?Oh(e.data):e.data;this.events.emit("payload",r)}onError(e,r){const n=this.parseError(r),i=n.message||n.toString(),s=Dx(e,i);this.events.emit("payload",s)}parseError(e,r=this.url){return TH(e,GR(r),"WS")}resetMaxListeners(){this.events.getMaxListeners()>YR&&this.events.setMaxListeners(YR)}emitError(e){const r=this.parseError(new Error((e==null?void 0:e.message)||`WebSocket connection failed for host: ${GR(this.url)}`));return this.events.emit("register_error",r),r}};var r6e={};const OH="wc",DH=2,A_="core",pl=`${OH}@2:${A_}:`,n6e={logger:"error"},i6e={database:":memory:"},s6e="crypto",ZR="client_ed25519_seed",o6e=Ue.ONE_DAY,a6e="keychain",c6e="0.3",l6e="messages",u6e="0.3",JR=Ue.SIX_HOURS,f6e="publisher",LH="irn",d6e="error",MH="wss://relay.walletconnect.org",h6e="relayer",Mi={message:"relayer_message",message_ack:"relayer_message_ack",connect:"relayer_connect",disconnect:"relayer_disconnect",error:"relayer_error",connection_stalled:"relayer_connection_stalled",transport_closed:"relayer_transport_closed",publish:"relayer_publish"},p6e="_subscription",sa={payload:"payload",connect:"connect",disconnect:"disconnect",error:"error"},g6e=.1,S_="2.21.3",Nn={link_mode:"link_mode",relay:"relay"},Ev={inbound:"inbound",outbound:"outbound"},m6e="0.3",y6e="WALLETCONNECT_CLIENT_ID",QR="WALLETCONNECT_LINK_MODE_APPS",Lo={created:"subscription_created",deleted:"subscription_deleted",expired:"subscription_expired",disabled:"subscription_disabled",sync:"subscription_sync",resubscribed:"subscription_resubscribed"},b6e="subscription",w6e="0.3",v6e="pairing",x6e="0.3",_1={wc_pairingDelete:{req:{ttl:Ue.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:Ue.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:Ue.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:Ue.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:Ue.ONE_DAY,prompt:!1,tag:0},res:{ttl:Ue.ONE_DAY,prompt:!1,tag:0}}},Ud={create:"pairing_create",expire:"pairing_expire",delete:"pairing_delete",ping:"pairing_ping"},Ua={created:"history_created",updated:"history_updated",deleted:"history_deleted",sync:"history_sync"},E6e="history",C6e="0.3",_6e="expirer",ua={created:"expirer_created",deleted:"expirer_deleted",expired:"expirer_expired",sync:"expirer_sync"},A6e="0.3",S6e="verify-api",N6e="https://verify.walletconnect.com",$H="https://verify.walletconnect.org",Mm=$H,I6e=`${Mm}/v3`,T6e=[N6e,$H],k6e="echo",P6e="https://echo.walletconnect.com",Dc={pairing_started:"pairing_started",pairing_uri_validation_success:"pairing_uri_validation_success",pairing_uri_not_expired:"pairing_uri_not_expired",store_new_pairing:"store_new_pairing",subscribing_pairing_topic:"subscribing_pairing_topic",subscribe_pairing_topic_success:"subscribe_pairing_topic_success",existing_pairing:"existing_pairing",pairing_not_expired:"pairing_not_expired",emit_inactive_pairing:"emit_inactive_pairing",emit_session_proposal:"emit_session_proposal",subscribing_to_pairing_topic:"subscribing_to_pairing_topic"},zl={no_wss_connection:"no_wss_connection",no_internet_connection:"no_internet_connection",malformed_pairing_uri:"malformed_pairing_uri",active_pairing_already_exists:"active_pairing_already_exists",subscribe_pairing_topic_failure:"subscribe_pairing_topic_failure",pairing_expired:"pairing_expired",proposal_expired:"proposal_expired",proposal_listener_not_found:"proposal_listener_not_found"},Ba={session_approve_started:"session_approve_started",proposal_not_expired:"proposal_not_expired",session_namespaces_validation_success:"session_namespaces_validation_success",create_session_topic:"create_session_topic",subscribing_session_topic:"subscribing_session_topic",subscribe_session_topic_success:"subscribe_session_topic_success",publishing_session_approve:"publishing_session_approve",session_approve_publish_success:"session_approve_publish_success",store_session:"store_session",publishing_session_settle:"publishing_session_settle",session_settle_publish_success:"session_settle_publish_success"},Nd={no_internet_connection:"no_internet_connection",no_wss_connection:"no_wss_connection",proposal_expired:"proposal_expired",subscribe_session_topic_failure:"subscribe_session_topic_failure",session_approve_publish_failure:"session_approve_publish_failure",session_settle_publish_failure:"session_settle_publish_failure",session_approve_namespace_validation_failure:"session_approve_namespace_validation_failure",proposal_not_found:"proposal_not_found"},Id={authenticated_session_approve_started:"authenticated_session_approve_started",create_authenticated_session_topic:"create_authenticated_session_topic",cacaos_verified:"cacaos_verified",store_authenticated_session:"store_authenticated_session",subscribing_authenticated_session_topic:"subscribing_authenticated_session_topic",subscribe_authenticated_session_topic_success:"subscribe_authenticated_session_topic_success",publishing_authenticated_session_approve:"publishing_authenticated_session_approve"},A1={no_internet_connection:"no_internet_connection",invalid_cacao:"invalid_cacao",subscribe_authenticated_session_topic_failure:"subscribe_authenticated_session_topic_failure",authenticated_session_approve_publish_failure:"authenticated_session_approve_publish_failure",authenticated_session_pending_request_not_found:"authenticated_session_pending_request_not_found"},R6e=.1,O6e="event-client",D6e=86400,L6e="https://pulse.walletconnect.org/batch";function M6e(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<t.length;i++){var s=t.charAt(i),o=s.charCodeAt(0);if(r[o]!==255)throw new TypeError(s+" is ambiguous");r[o]=i}var a=t.length,c=t.charAt(0),l=Math.log(a)/Math.log(256),u=Math.log(256)/Math.log(a);function f(h){if(h instanceof Uint8Array||(ArrayBuffer.isView(h)?h=new Uint8Array(h.buffer,h.byteOffset,h.byteLength):Array.isArray(h)&&(h=Uint8Array.from(h))),!(h instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(h.length===0)return"";for(var g=0,y=0,x=0,C=h.length;x!==C&&h[x]===0;)x++,g++;for(var _=(C-x)*u+1>>>0,L=new Uint8Array(_);x!==C;){for(var P=h[x],z=0,W=_-1;(P!==0||z<y)&&W!==-1;W--,z++)P+=256*L[W]>>>0,L[W]=P%a>>>0,P=P/a>>>0;if(P!==0)throw new Error("Non-zero carry");y=z,x++}for(var B=_-y;B!==_&&L[B]===0;)B++;for(var I=c.repeat(g);B<_;++B)I+=t.charAt(L[B]);return I}function d(h){if(typeof h!="string")throw new TypeError("Expected String");if(h.length===0)return new Uint8Array;var g=0;if(h[g]!==" "){for(var y=0,x=0;h[g]===c;)y++,g++;for(var C=(h.length-g)*l+1>>>0,_=new Uint8Array(C);h[g];){var L=r[h.charCodeAt(g)];if(L===255)return;for(var P=0,z=C-1;(L!==0||P<x)&&z!==-1;z--,P++)L+=a*_[z]>>>0,_[z]=L%256>>>0,L=L/256>>>0;if(L!==0)throw new Error("Non-zero carry");x=P,g++}if(h[g]!==" "){for(var W=C-x;W!==C&&_[W]===0;)W++;for(var B=new Uint8Array(y+(C-W)),I=y;W!==C;)B[I++]=_[W++];return B}}}function p(h){var g=d(h);if(g)return g;throw new Error(`Non-${e} character`)}return{encode:f,decodeUnsafe:d,decode:p}}var $6e=M6e,U6e=$6e;const UH=t=>{if(t instanceof Uint8Array&&t.constructor.name==="Uint8Array")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")},B6e=t=>new TextEncoder().encode(t),F6e=t=>new TextDecoder().decode(t);class j6e{constructor(e,r,n){this.name=e,this.prefix=r,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class z6e{constructor(e,r,n){if(this.name=e,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return BH(this,e)}}class W6e{constructor(e){this.decoders=e}or(e){return BH(this,e)}decode(e){const r=e[0],n=this.decoders[r];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const BH=(t,e)=>new W6e({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class H6e{constructor(e,r,n,i){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new j6e(e,r,n),this.decoder=new z6e(e,r,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const Mx=({name:t,prefix:e,encode:r,decode:n})=>new H6e(t,e,r,n),pb=({prefix:t,name:e,alphabet:r})=>{const{encode:n,decode:i}=U6e(r,e);return Mx({prefix:t,name:e,encode:n,decode:s=>UH(i(s))})},q6e=(t,e,r,n)=>{const i={};for(let u=0;u<e.length;++u)i[e[u]]=u;let s=t.length;for(;t[s-1]==="=";)--s;const o=new Uint8Array(s*r/8|0);let a=0,c=0,l=0;for(let u=0;u<s;++u){const f=i[t[u]];if(f===void 0)throw new SyntaxError(`Non-${n} character`);c=c<<r|f,a+=r,a>=8&&(a-=8,o[l++]=255&c>>a)}if(a>=r||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return o},V6e=(t,e,r)=>{const n=e[e.length-1]==="=",i=(1<<r)-1;let s="",o=0,a=0;for(let c=0;c<t.length;++c)for(a=a<<8|t[c],o+=8;o>r;)o-=r,s+=e[i&a>>o];if(o&&(s+=e[i&a<<r-o]),n)for(;s.length*r&7;)s+="=";return s},as=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>Mx({prefix:e,name:t,encode(i){return V6e(i,n,r)},decode(i){return q6e(i,n,r,t)}}),K6e=Mx({prefix:"\0",name:"identity",encode:t=>F6e(t),decode:t=>B6e(t)});var G6e=Object.freeze({__proto__:null,identity:K6e});const Y6e=as({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var Z6e=Object.freeze({__proto__:null,base2:Y6e});const J6e=as({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var Q6e=Object.freeze({__proto__:null,base8:J6e});const X6e=pb({prefix:"9",name:"base10",alphabet:"0123456789"});var e8e=Object.freeze({__proto__:null,base10:X6e});const t8e=as({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),r8e=as({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var n8e=Object.freeze({__proto__:null,base16:t8e,base16upper:r8e});const i8e=as({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),s8e=as({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),o8e=as({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),a8e=as({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),c8e=as({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),l8e=as({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),u8e=as({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),f8e=as({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),d8e=as({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var h8e=Object.freeze({__proto__:null,base32:i8e,base32upper:s8e,base32pad:o8e,base32padupper:a8e,base32hex:c8e,base32hexupper:l8e,base32hexpad:u8e,base32hexpadupper:f8e,base32z:d8e});const p8e=pb({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),g8e=pb({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var m8e=Object.freeze({__proto__:null,base36:p8e,base36upper:g8e});const y8e=pb({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),b8e=pb({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var w8e=Object.freeze({__proto__:null,base58btc:y8e,base58flickr:b8e});const v8e=as({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
2076+/",bitsPerChar:6}),x8e=as({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),E8e=as({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),C8e=as({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var _8e=Object.freeze({__proto__:null,base64:v8e,base64pad:x8e,base64url:E8e,base64urlpad:C8e});const FH=Array.from("ððªâð°ðððððððððððððâð»ð¥ð¾ð¿ðâ¤ðð¤£ððððððð
ððð¥ð¥°ðððð¢ð¤ðððªðâºðð¤ððððð¹ð¤¦ððââ¨ð¤·ð±ðð¸ððððððððð¤©ððð¤ðð¯ððð¶ðð¤â£ððððªðð¥ððð©ð¡ð¤ªðð¥³ð¥ð¤¤ððð³âððð´ðð¬ððð·ð»ðââ
ð¥ºððð¤ð¦âð£ððâ¹ððð âððºðð»ððððð¹ð£ð«ðððµð¤ðð´ð¤ð¼ð«â½ð¤âðð¤«ðð®ðð»ðð¶ðð²ð¿ð§¡ðâ¡ððââðð°ð¤¨ð¶ð¤ð¶ð°ðð¢ð¤ðð¨ð¨ð¤¬âððºð¤ððð±ðð¶ð¥´â¶â¡âðð¸â¬ð¨ðð¦ð·ðºâ ð
ððµðð¤²ð¤ ð¤§ððµð
ð§ð¾ððð¤ðð¤¯ð·âð§ð¯ððð¤ððâð´ð£ð¸ððð¥ð¤¢ð
ð¡ð©ðð¸ð»ð¤ð¤®ð¼ð¥µð©ððð¼ðð£ð¥"),A8e=FH.reduce((t,e,r)=>(t[r]=e,t),[]),S8e=FH.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);function N8e(t){return t.reduce((e,r)=>(e+=A8e[r],e),"")}function I8e(t){const e=[];for(const r of t){const n=S8e[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}const T8e=Mx({prefix:"ð",name:"base256emoji",encode:N8e,decode:I8e});var k8e=Object.freeze({__proto__:null,base256emoji:T8e}),P8e=jH,XR=128,R8e=-128,O8e=Math.pow(2,31);function jH(t,e,r){e=e||[],r=r||0;for(var n=r;t>=O8e;)e[r++]=t&255|XR,t/=128;for(;t&R8e;)e[r++]=t&255|XR,t>>>=7;return e[r]=t|0,jH.bytes=r-n+1,e}var D8e=N_,L8e=128,eO=127;function N_(t,n){var r=0,n=n||0,i=0,s=n,o,a=t.length;do{if(s>=a)throw N_.bytes=0,new RangeError("Could not decode varint");o=t[s++],r+=i<28?(o&eO)<<i:(o&eO)*Math.pow(2,i),i+=7}while(o>=L8e);return N_.bytes=s-n,r}var M8e=Math.pow(2,7),$8e=Math.pow(2,14),U8e=Math.pow(2,21),B8e=Math.pow(2,28),F8e=Math.pow(2,35),j8e=Math.pow(2,42),z8e=Math.pow(2,49),W8e=Math.pow(2,56),H8e=Math.pow(2,63),q8e=function(t){return t<M8e?1:t<$8e?2:t<U8e?3:t<B8e?4:t<F8e?5:t<j8e?6:t<z8e?7:t<W8e?8:t<H8e?9:10},V8e={encode:P8e,decode:D8e,encodingLength:q8e},zH=V8e;const tO=(t,e,r=0)=>(zH.encode(t,e,r),e),rO=t=>zH.encodingLength(t),I_=(t,e)=>{const r=e.byteLength,n=rO(t),i=n+rO(r),s=new Uint8Array(i+r);return tO(t,s,0),tO(r,s,n),s.set(e,i),new K8e(t,r,e,s)};let K8e=class{constructor(e,r,n,i){this.code=e,this.size=r,this.digest=n,this.bytes=i}};const WH=({name:t,code:e,encode:r})=>new G8e(t,e,r);class G8e{constructor(e,r,n){this.name=e,this.code=r,this.encode=n}digest(e){if(e instanceof Uint8Array){const r=this.encode(e);return r instanceof Uint8Array?I_(this.code,r):r.then(n=>I_(this.code,n))}else throw Error("Unknown type, must be binary type")}}const HH=t=>async e=>new Uint8Array(await crypto.subtle.digest(t,e)),Y8e=WH({name:"sha2-256",code:18,encode:HH("SHA-256")}),Z8e=WH({name:"sha2-512",code:19,encode:HH("SHA-512")});var J8e=Object.freeze({__proto__:null,sha256:Y8e,sha512:Z8e});const qH=0,Q8e="identity",VH=UH,X8e=t=>I_(qH,VH(t)),eCe={code:qH,name:Q8e,encode:VH,digest:X8e};var tCe=Object.freeze({__proto__:null,identity:eCe});new TextEncoder,new TextDecoder;const nO={...G6e,...Z6e,...Q6e,...e8e,...n8e,...h8e,...m8e,...w8e,..._8e,...k8e};({...J8e,...tCe});function KH(t){return globalThis.Buffer!=null?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function rCe(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?KH(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}function GH(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const iO=GH("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),XE=GH("ascii","a",t=>{let e="a";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},t=>{t=t.substring(1);const e=rCe(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}),nCe={utf8:iO,"utf-8":iO,hex:nO.base16,latin1:XE,ascii:XE,binary:XE,...nO};function iCe(t,e="utf8"){const r=nCe[e];
vendor: 5,280 bytes, line 2076
2076if(!r)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?KH(globalThis.Buffer.from(t,"utf-8")):r.decoder.decode(`${r.prefix}${t}`)}var sCe=Object.defineProperty,oCe=(t,e,r)=>e in t?sCe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,kc=(t,e,r)=>oCe(t,typeof e!="symbol"?e+"":e,r);let aCe=class{constructor(e,r){this.core=e,this.logger=r,kc(this,"keychain",new Map),kc(this,"name",a6e),kc(this,"version",c6e),kc(this,"initialized",!1),kc(this,"storagePrefix",pl),kc(this,"init",async()=>{if(!this.initialized){const n=await this.getKeyChain();typeof n<"u"&&(this.keychain=n),this.initialized=!0}}),kc(this,"has",n=>(this.isInitialized(),this.keychain.has(n))),kc(this,"set",async(n,i)=>{this.isInitialized(),this.keychain.set(n,i),await this.persist()}),kc(this,"get",n=>{this.isInitialized();const i=this.keychain.get(n);if(typeof i>"u"){const{message:s}=je("NO_MATCHING_KEY",`${this.name}: ${n}`);throw new Error(s)}return i}),kc(this,"del",async n=>{this.isInitialized(),this.keychain.delete(n),await this.persist()}),this.core=e,this.logger=Ls(r,this.name)}get context(){return Po(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,d_(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?h_(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:e}=je("NOT_INITIALIZED",this.name);throw new Error(e)}}};var cCe=Object.defineProperty,lCe=(t,e,r)=>e in t?cCe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ki=(t,e,r)=>lCe(t,typeof e!="symbol"?e+"":e,r);let uCe=class{constructor(e,r,n){this.core=e,this.logger=r,Ki(this,"name",s6e),Ki(this,"keychain"),Ki(this,"randomSessionIdentifier",C_()),Ki(this,"initialized",!1),Ki(this,"init",async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)}),Ki(this,"hasKeys",i=>(this.isInitialized(),this.keychain.has(i))),Ki(this,"getClientId",async()=>{this.isInitialized();const i=await this.getClientSeed(),s=RP(i);return Fz(s.publicKey)}),Ki(this,"generateKeyPair",()=>{this.isInitialized();const i=C5e();return this.setPrivateKey(i.publicKey,i.privateKey)}),Ki(this,"signJWT",async i=>{this.isInitialized();const s=await this.getClientSeed(),o=RP(s),a=this.randomSessionIdentifier;return await ibe(a,i,o6e,o)}),Ki(this,"generateSharedKey",(i,s,o)=>{this.isInitialized();const a=this.getPrivateKey(i),c=_5e(a,s);return this.setSymKey(c,o)}),Ki(this,"setSymKey",async(i,s)=>{this.isInitialized();const o=s||xv(i);return await this.keychain.set(o,i),o}),Ki(this,"deleteKeyPair",async i=>{this.isInitialized(),await this.keychain.del(i)}),Ki(this,"deleteSymKey",async i=>{this.isInitialized(),await this.keychain.del(i)}),Ki(this,"encode",async(i,s,o)=>{this.isInitialized();const a=CH(o),c=wu(s);if(PR(a))return N5e(c,o==null?void 0:o.encoding);if(kR(a)){const d=a.senderPublicKey,p=a.receiverPublicKey;i=await this.generateSharedKey(d,p)}const l=this.getSymKey(i),{type:u,senderPublicKey:f}=a;return A5e({type:u,symKey:l,message:c,senderPublicKey:f,encoding:o==null?void 0:o.encoding})}),Ki(this,"decode",async(i,s,o)=>{this.isInitialized();const a=T5e(s,o);if(PR(a)){const c=I5e(s,o==null?void 0:o.encoding);return Oh(c)}if(kR(a)){const c=a.receiverPublicKey,l=a.senderPublicKey;i=await this.generateSharedKey(c,l)}try{const c=this.getSymKey(i),l=S5e({symKey:c,encoded:s,encoding:o==null?void 0:o.encoding});return Oh(l)}catch(c){this.logger.error(`Failed to decode message from topic: '${i}', clientId: '${await this.getClientId()}'`),this.logger.error(c)}}),Ki(this,"getPayloadType",(i,s=rc)=>{const o=iy({encoded:i,encoding:s});return $h(o.type)}),Ki(this,"getPayloadSenderPublicKey",(i,s=rc)=>{const o=iy({encoded:i,encoding:s});return o.senderPublicKey?No(o.senderPublicKey,Hs):void 0}),this.core=e,this.logger=Ls(r,this.name),this.keychain=n||new aCe(this.core,this.logger)}get context(){return Po(this.logger)}async setPrivateKey(e,r){return await this.keychain.set(e,r),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e="";try{e=this.keychain.get(ZR)}catch{e=C_(),await this.keychain.set(ZR,e)}return iCe(e,"base16")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=je("NOT_INITIALIZED",this.name);throw new Error(e)}}};var fCe=Object.defineProperty,dCe=Object.defineProperties,hCe=Object.getOwnPropertyDescriptors,sO=Object.getOwnPropertySymbols,pCe=Object.prototype.hasOwnProperty,gCe=Object.prototype.propertyIsEnumerable,T_=(t,e,r)=>e in t?fCe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,mCe=(t,e)=>{for(var r in e||(e={}))pCe.call(e,r)&&T_(t,r,e[r]);if(sO)for(var r of sO(e))gCe.call(e,r)&&T_(t,r,e[r]);return t},yCe=(t,e)=>dCe(t,hCe(e)),Do=(t,e,r)=>T_(t,typeof e!="symbol"?e+"":e,r);let bCe=class extends rme{constructor(e,r){super(e,r),this.logger=e,this.core=r,Do(this,"messages",new Map),Do(this,"messagesWithoutClientAck",new Map),Do(this,"name",l6e),Do(this,"version",u6e),Do(this,"initialized",!1),Do(this,"storagePrefix",pl),Do(this,"init",async()=>
2076{if(!this.initialized){this.logger.trace("Initialized");try{const n=await this.getRelayerMessages();typeof n<"u"&&(this.messages=n);const i=await this.getRelayerMessagesWithoutClientAck();typeof i<"u"&&(this.messagesWithoutClientAck=i),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(n){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(n)}finally{this.initialized=!0}}}),Do(this,"set",async(n,i,s)=>{this.isInitialized();const o=zc(i);let a=this.messages.get(n);if(typeof a>"u"&&(a={}),typeof a[o]<"u")return o;if(a[o]=i,this.messages.set(n,a),s===Ev.inbound){const c=this.messagesWithoutClientAck.get(n)||{};this.messagesWithoutClientAck.set(n,yCe(mCe({},c),{[o]:i}))}return await this.persist(),o}),Do(this,"get",n=>{this.isInitialized();let i=this.messages.get(n);return typeof i>"u"&&(i={}),i}),Do(this,"getWithoutAck",n=>{this.isInitialized();const i={};for(const s of n){const o=this.messagesWithoutClientAck.get(s)||{};i[s]=Object.values(o)}return i}),Do(this,"has",(n,i)=>{this.isInitialized();const s=this.get(n),o=zc(i);return typeof s[o]<"u"}),Do(this,"ack",async(n,i)=>{this.isInitialized();const s=this.messagesWithoutClientAck.get(n);if(typeof s>"u")return;const o=zc(i);delete s[o],Object.keys(s).length===0?this.messagesWithoutClientAck.delete(n):this.messagesWithoutClientAck.set(n,s),await this.persist()}),Do(this,"del",async n=>{this.isInitialized(),this.messages.delete(n),this.messagesWithoutClientAck.delete(n),await this.persist()}),this.logger=Ls(e,this.name),this.core=r}get context(){return Po(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get storageKeyWithoutClientAck(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name+"_withoutClientAck"}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,d_(e))}async setRelayerMessagesWithoutClientAck(e){await this.core.storage.setItem(this.storageKeyWithoutClientAck,d_(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?h_(e):void 0}async getRelayerMessagesWithoutClientAck(){const e=await this.core.storage.getItem(this.storageKeyWithoutClientAck);return typeof e<"u"?h_(e):void 0}async persist(){await this.setRelayerMessages(this.messages),await this.setRelayerMessagesWithoutClientAck(this.messagesWithoutClientAck)}isInitialized(){if(!this.initialized){const{message:e}=je("NOT_INITIALIZED",this.name);throw new Error(e)}}};var wCe=Object.defineProperty,vCe=Object.defineProperties,xCe=Object.getOwnPropertyDescriptors,oO=Object.getOwnPropertySymbols,ECe=Object.prototype.hasOwnProperty,CCe=Object.prototype.propertyIsEnumerable,k_=(t,e,r)=>e in t?wCe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Aw=(t,e)=>{for(var r in e||(e={}))ECe.call(e,r)&&k_(t,r,e[r]);if(oO)for(var r of oO(e))CCe.call(e,r)&&k_(t,r,e[r]);return t},e6=(t,e)=>vCe(t,xCe(e)),Fa=(t,e,r)=>k_(t,typeof e!="symbol"?e+"":e,r);class _Ce extends nme{constructor(e,r){super(e,r),this.relayer=e,this.logger=r,Fa(this,"events",new ka.EventEmitter),Fa(this,"name",f6e),Fa(this,"queue",new Map),Fa(this,"publishTimeout",Ue.toMiliseconds(Ue.ONE_MINUTE)),Fa(this,"initialPublishTimeout",Ue.toMiliseconds(Ue.ONE_SECOND*15)),Fa(this,"needsTransportRestart",!1),Fa(this,"publish",async(n,i,s)=>{var o;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:i,opts:s}});const a=(s==null?void 0:s.ttl)||JR,c=J3(s),l=(s==null?void 0:s.prompt)||!1,u=(s==null?void 0:s.tag)||0,f=(s==null?void 0:s.id)||th().toString(),d={topic:n,message:i,opts:{ttl:a,relay:c,prompt:l,tag:u,id:f,attestation:s==null?void 0:s.attestation,tvf:s==null?void 0:s.tvf}},p=`Failed to publish payload, please try again. id:${f} tag:${u}`;try{const h=new Promise(async g=>{const y=({id:C})=>{d.opts.id===C&&(this.removeRequestFromQueue(C),this.relayer.events.removeListener(Mi.publish,y),g(d))};this.relayer.events.on(Mi.publish,y);const x=Nf(new Promise((C,_)=>{this.rpcPublish({topic:n,message:i,ttl:a,prompt:l,tag:u,id:f,attestation:s==null?void 0:s.attestation,tvf:s==null?void 0:s.tvf}).then(C).catch(L=>{this.logger.warn(L,L==null?void 0:L.message),_(L)})}),this.initialPublishTimeout,`Failed initial publish, retrying.... id:${f} tag:${u}`);try{await x,this.events.removeListener(Mi.publish,y)}catch(C){this.queue.set(f,e6(Aw({},d),{attempt:1})),this.logger.warn(C,C==null?void 0:C.message)}});this.logger.trace({type:"method",method:"publish",params:{id:f,topic:n,message:i,opts:s}}),await Nf(h,this.publishTimeout,p)}catch(h){if(this.logger.debug("Failed to Publish Payload"),this.logger.error(h),(o=s==null?void 0:s.internal)!=null&&o.throwOnFailedPublish)throw h}finally{this.queue.delete(f)}}),Fa(this,"on",(n,i)=>{this.events.on(n,i)}),Fa(this,"once",(n,i)=>{this.events.once(n,i)}),Fa(this,"off",(n,i)=>{this.events.off(n,i)}),Fa(this,"removeListener",(n,i)=>{this.events.removeListener(n,i)}),this.relayer=e,this.logger=Ls(r,this.name),this.registerEventListeners()}get context(){return Po(this.logger)}async rpcPublish(e){var r,n,i,s;const{topic:o,message:a,ttl:c=JR,prompt:l,tag:u,id:f,attestation:d,tvf:p}=e,h={method:X1(J3().protocol).publish,params:Aw({topic:o,message:a,ttl:c,prompt:l,tag:u,attestation:d},p),id:f};es((r=h.params)==null?void 0:r.prompt)&&((n=h.params)==null||delete n.prompt),es((i=h.params)==null?void 0:i.tag)&&((s=h.params)==null||delete s.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:h});const g=await this.relayer.request(h);return this.relayer.events.emit(Mi.publish,e),this.logger.debug("Successfully Published Payload"),g}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach(async(e,r)=>{const n=e.attempt+1;this.queue.set(r,e6(Aw({},e),{attempt:n}));const{topic:i,message:s,opts:o,attestation:a}=e;this.logger.warn({},`Publisher: queue->publishing: ${e.opts.id}, tag: ${e.opts.tag}, attempt: ${n}
2076`),await this.rpcPublish(e6(Aw({},e),{topic:i,message:s,ttl:o.ttl,prompt:o.prompt,tag:o.tag,id:o.id,attestation:a,tvf:o.tvf})),this.logger.warn({},`Publisher: queue->published: ${e.opts.id}`)})}registerEventListeners(){this.relayer.core.heartbeat.on(n0.pulse,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(Mi.connection_stalled);return}this.checkQueue()}),this.relayer.on(Mi.message_ack,e=>{this.removeRequestFromQueue(e.id.toString())})}}var ACe=Object.defineProperty,SCe=(t,e,r)=>e in t?ACe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,C0=(t,e,r)=>SCe(t,typeof e!="symbol"?e+"":e,r);class NCe{constructor(){C0(this,"map",new Map),C0(this,"set",(e,r)=>{const n=this.get(e);this.exists(e,r)||this.map.set(e,[...n,r])}),C0(this,"get",e=>this.map.get(e)||[]),C0(this,"exists",(e,r)=>this.get(e).includes(r)),C0(this,"delete",(e,r)=>{if(typeof r>"u"){this.map.delete(e);return}if(!this.map.has(e))return;const n=this.get(e);if(!this.exists(e,r))return;const i=n.filter(s=>s!==r);if(!i.length){this.map.delete(e);return}this.map.set(e,i)}),C0(this,"clear",()=>{this.map.clear()})}get topics(){return Array.from(this.map.keys())}}var ICe=Object.defineProperty,TCe=Object.defineProperties,kCe=Object.getOwnPropertyDescriptors,aO=Object.getOwnPropertySymbols,PCe=Object.prototype.hasOwnProperty,RCe=Object.prototype.propertyIsEnumerable,P_=(t,e,r)=>e in t?ICe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,S1=(t,e)=>{for(var r in e||(e={}))PCe.call(e,r)&&P_(t,r,e[r]);if(aO)for(var r of aO(e))RCe.call(e,r)&&P_(t,r,e[r]);return t},t6=(t,e)=>TCe(t,kCe(e)),mn=(t,e,r)=>P_(t,typeof e!="symbol"?e+"":e,r);let OCe=class extends ome{constructor(e,r){super(e,r),this.relayer=e,this.logger=r,mn(this,"subscriptions",new Map),mn(this,"topicMap",new NCe),mn(this,"events",new ka.EventEmitter),mn(this,"name",b6e),mn(this,"version",w6e),mn(this,"pending",new Map),mn(this,"cached",[]),mn(this,"initialized",!1),mn(this,"storagePrefix",pl),mn(this,"subscribeTimeout",Ue.toMiliseconds(Ue.ONE_MINUTE)),mn(this,"initialSubscribeTimeout",Ue.toMiliseconds(Ue.ONE_SECOND*15)),mn(this,"clientId"),mn(this,"batchSubscribeTopicsLimit",500),mn(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),this.registerEventListeners(),await this.restore()),this.initialized=!0}),mn(this,"subscribe",async(n,i)=>{this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:i}});try{const s=J3(i),o={topic:n,relay:s,transportType:i==null?void 0:i.transportType};this.pending.set(n,o);const a=await this.rpcSubscribe(n,s,i);return typeof a=="string"&&(this.onSubscribe(a,o),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:i}})),a}catch(s){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(s),s}}),mn(this,"unsubscribe",async(n,i)=>{this.isInitialized(),typeof(i==null?void 0:i.id)<"u"?await this.unsubscribeById(n,i.id,i):await this.unsubscribeByTopic(n,i)}),mn(this,"isSubscribed",n=>new Promise(i=>{i(this.topicMap.topics.includes(n))})),mn(this,"isKnownTopic",n=>new Promise(i=>{i(this.topicMap.topics.includes(n)||this.pending.has(n)||this.cached.some(s=>s.topic===n))})),mn(this,"on",(n,i)=>{this.events.on(n,i)}),mn(this,"once",(n,i)=>{this.events.once(n,i)}),mn(this,"off",(n,i)=>{this.events.off(n,i)}),mn(this,"removeListener",(n,i)=>{this.events.removeListener(n,i)}),mn(this,"start",async()=>{await this.onConnect()}),mn(this,"stop",async()=>{await this.onDisconnect()}),mn(this,"restart",async()=>{await this.restore(),await this.onRestart()}),mn(this,"checkPending",async()=>{if(this.pending.size===0&&(!this.initialized||!this.relayer.connected))return;const n=[];this.pending.forEach(i=>{n.push(i)}),await this.batchSubscribe(n)}),mn(this,"registerEventListeners",()=>{this.relayer.core.heartbeat.on(n0.pulse,async()=>{await this.checkPending()}),this.events.on(Lo.created,async n=>{const i=Lo.created;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:n}),await this.persist()}),this.events.on(Lo.deleted,async n=>{const i=Lo.deleted;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:n}),await this.persist()})}),this.relayer=e,this.logger=Ls(r,this.name),this.clientId=""}get context(){return Po(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}get hasAnyTopics(){return this.topicMap.topics.length>0||this.pending.size>0||this.cached.length>0||this.subscriptions.size>0}hasSubscription(e,r){let n=!1;try{n=this.getSubscription(e).topic===r}catch{}return n}reset(){this.cached=[],this.initialized=!0}onDisable(){this.values.length>0&&(this.cached=this.values),this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,r){const n=this.topicMap.get(e);await Promise.all(n.map(async i=>await this.unsubscribeById(e,i,r)))}async unsubscribeById(e,r,n){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:r,opts:n}});try{const i=J3(n);await this.restartToComplete({topic:e,id:r,relay:i}),await this.rpcUnsubscribe(e,r,i);const s=Xn("USER_DISCONNECTED",`${this.name}, ${e}`);await this.onUnsubscribe(e,r,s),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:r,opts:n}})}catch(i){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(i),i}}async rpcSubscribe(e,r,n){var i;(!n||(n==null?void 0:n.transportType)===Nn.relay)&&await this.restartToComplete({topic:e,id:e,relay:r});const s={method:X1(r.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:s});const o=(i=n==null?void 0:n.internal)==null?void 0:i.throwOnFailedPublish;
vendor: 4,609 bytes, line 2076
2076try{const a=await this.getSubscriptionId(e);if((n==null?void 0:n.transportType)===Nn.link_mode)return setTimeout(()=>{(this.relayer.connected||this.relayer.connecting)&&this.relayer.request(s).catch(u=>this.logger.warn(u))},Ue.toMiliseconds(Ue.ONE_SECOND)),a;const c=new Promise(async u=>{const f=d=>{d.topic===e&&(this.events.removeListener(Lo.created,f),u(d.id))};this.events.on(Lo.created,f);try{const d=await Nf(new Promise((p,h)=>{this.relayer.request(s).catch(g=>{this.logger.warn(g,g==null?void 0:g.message),h(g)}).then(p)}),this.initialSubscribeTimeout,`Subscribing to ${e} failed, please try again`);this.events.removeListener(Lo.created,f),u(d)}catch{}}),l=await Nf(c,this.subscribeTimeout,`Subscribing to ${e} failed, please try again`);if(!l&&o)throw new Error(`Subscribing to ${e} failed, please try again`);return l?a:null}catch(a){if(this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(Mi.connection_stalled),o)throw a}return null}async rpcBatchSubscribe(e){if(!e.length)return;const r=e[0].relay,n={method:X1(r.protocol).batchSubscribe,params:{topics:e.map(i=>i.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{await await Nf(new Promise(i=>{this.relayer.request(n).catch(s=>this.logger.warn(s)).then(i)}),this.subscribeTimeout,"rpcBatchSubscribe failed, please try again")}catch{this.relayer.events.emit(Mi.connection_stalled)}}async rpcBatchFetchMessages(e){if(!e.length)return;const r=e[0].relay,n={method:X1(r.protocol).batchFetchMessages,params:{topics:e.map(s=>s.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});let i;try{i=await await Nf(new Promise((s,o)=>{this.relayer.request(n).catch(a=>{this.logger.warn(a),o(a)}).then(s)}),this.subscribeTimeout,"rpcBatchFetchMessages failed, please try again")}catch{this.relayer.events.emit(Mi.connection_stalled)}return i}rpcUnsubscribe(e,r,n){const i={method:X1(n.protocol).unsubscribe,params:{topic:e,id:r}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:i}),this.relayer.request(i)}onSubscribe(e,r){this.setSubscription(e,t6(S1({},r),{id:e})),this.pending.delete(r.topic)}onBatchSubscribe(e){e.length&&e.forEach(r=>{this.setSubscription(r.id,S1({},r)),this.pending.delete(r.topic)})}async onUnsubscribe(e,r,n){this.events.removeAllListeners(r),this.hasSubscription(r,e)&&this.deleteSubscription(r,n),await this.relayer.messages.del(e)}async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(e,r){this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:r}),this.addSubscription(e,r)}addSubscription(e,r){this.subscriptions.set(e,S1({},r)),this.topicMap.set(r.topic,e),this.events.emit(Lo.created,r)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});const r=this.subscriptions.get(e);if(!r){const{message:n}=je("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(n)}return r}deleteSubscription(e,r){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:r});const n=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(n.topic,e),this.events.emit(Lo.deleted,t6(S1({},n),{reason:r}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(Lo.sync)}async onRestart(){if(this.cached.length){const e=[...this.cached],r=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let n=0;n<r;n++){const i=e.splice(0,this.batchSubscribeTopicsLimit);await this.batchSubscribe(i)}}this.events.emit(Lo.resubscribed)}async restore(){try{const e=await this.getRelayerSubscriptions();if(typeof e>"u"||!e.length)return;if(this.subscriptions.size){const{message:r}=je("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(e){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(e)}}async batchSubscribe(e){e.length&&(await this.rpcBatchSubscribe(e),this.onBatchSubscribe(await Promise.all(e.map(async r=>t6(S1({}
2076,r),{id:await this.getSubscriptionId(r.topic)})))))}async batchFetchMessages(e){if(!e.length)return;this.logger.trace(`Fetching batch messages for ${e.length} subscriptions`);const r=await this.rpcBatchFetchMessages(e);r&&r.messages&&(await V3e(Ue.toMiliseconds(Ue.ONE_SECOND)),await this.relayer.handleBatchMessageEvents(r.messages))}async onConnect(){await this.restart(),this.reset()}onDisconnect(){this.onDisable()}isInitialized(){if(!this.initialized){const{message:e}=je("NOT_INITIALIZED",this.name);throw new Error(e)}}async restartToComplete(e){!this.relayer.connected&&!this.relayer.connecting&&(this.cached.push(e),await this.relayer.transportOpen())}async getClientId(){return this.clientId||(this.clientId=await this.relayer.core.crypto.getClientId()),this.clientId}async getSubscriptionId(e){return zc(e+await this.getClientId())}};var DCe=Object.defineProperty,cO=Object.getOwnPropertySymbols,LCe=Object.prototype.hasOwnProperty,MCe=Object.prototype.propertyIsEnumerable,R_=(t,e,r)=>e in t?DCe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,lO=(t,e)=>{for(var r in e||(e={}))LCe.call(e,r)&&R_(t,r,e[r]);if(cO)for(var r of cO(e))MCe.call(e,r)&&R_(t,r,e[r]);return t},Ur=(t,e,r)=>R_(t,typeof e!="symbol"?e+"":e,r);let $Ce=class extends ime{constructor(e){super(e),Ur(this,"protocol","wc"),Ur(this,"version",2),Ur(this,"core"),Ur(this,"logger"),Ur(this,"events",new ka.EventEmitter),Ur(this,"provider"),Ur(this,"messages"),Ur(this,"subscriber"),Ur(this,"publisher"),Ur(this,"name",h6e),Ur(this,"transportExplicitlyClosed",!1),Ur(this,"initialized",!1),Ur(this,"connectionAttemptInProgress",!1),Ur(this,"relayUrl"),Ur(this,"projectId"),Ur(this,"packageName"),Ur(this,"bundleId"),Ur(this,"hasExperiencedNetworkDisruption",!1),Ur(this,"pingTimeout"),Ur(this,"heartBeatTimeout",Ue.toMiliseconds(Ue.THIRTY_SECONDS+Ue.FIVE_SECONDS)),Ur(this,"reconnectTimeout"),Ur(this,"connectPromise"),Ur(this,"reconnectInProgress",!1),Ur(this,"requestsInFlight",[]),Ur(this,"connectTimeout",Ue.toMiliseconds(Ue.ONE_SECOND*15)),Ur(this,"request",async r=>{var n,i;this.logger.debug("Publishing Request Payload");const s=r.id||th().toString();await this.toEstablishConnection();try{this.logger.trace({id:s,method:r.method,topic:(n=r.params)==null?void 0:n.topic},"relayer.request - publishing...");const o=`${s}:${((i=r.params)==null?void 0:i.tag)||""}`;this.requestsInFlight.push(o);const a=await this.provider.request(r);return this.requestsInFlight=this.requestsInFlight.filter(c=>c!==o),a}catch(o){throw this.logger.debug(`Failed to Publish Request: ${s}`),o}}),Ur(this,"resetPingTimeout",()=>{K3()&&(clearTimeout(this.pingTimeout),this.pingTimeout=setTimeout(()=>{var r,n,i,s;try{this.logger.debug({},"pingTimeout: Connection stalled, terminating..."),(s=(i=(n=(r=this.provider)==null?void 0:r.connection)==null?void 0:n.socket)==null?void 0:i.terminate)==null||s.call(i)}catch(o){this.logger.warn(o,o==null?void 0:o.message)}},this.heartBeatTimeout))}),Ur(this,"onPayloadHandler",r=>{this.onProviderPayload(r),this.resetPingTimeout()}),Ur(this,"onConnectHandler",()=>{this.logger.warn({},"Relayer connected ð"),this.startPingTimeout(),this.events.emit(Mi.connect)}),Ur(this,"onDisconnectHandler",()=>{this.logger.warn({},"Relayer disconnected ð"),this.requestsInFlight=[],this.onProviderDisconnect()}),Ur(this,"onProviderErrorHandler",r=>{this.logger.fatal(`Fatal socket error: ${r.message}`),this.events.emit(Mi.error,r),this.logger.fatal("Fatal socket error received, closing transport"),this.transportClose()}),Ur(this,"registerProviderListeners",()=>{this.provider.on(sa.payload,this.onPayloadHandler),this.provider.on(sa.connect,this.onConnectHandler),this.provider.on(sa.disconnect,this.onDisconnectHandler),this.provider.on(sa.error,this.onProviderErrorHandler)}),this.core=e.core,this.logger=typeof e.logger<"u"&&typeof e.logger!="string"?Ls(e.logger,this.name):ob(Lg({level:e.logger||d6e})),this.messages=new bCe(this.logger,e.core),this.subscriber=new OCe(this,this.logger),this.publisher=new _Ce(this,this.logger),this.relayUrl=(e==null?void 0:e.relayUrl)||MH,this.projectId=e.projectId,k3e()?this.packageName=QP():P3e()&&(this.bundleId=QP()),this.provider={}}
2076async init(){this.logger.trace("Initialized"),this.registerEventListeners(),await Promise.all([this.messages.init(),this.subscriber.init()]),this.initialized=!0,this.transportOpen().catch(e=>this.logger.warn(e,e==null?void 0:e.message))}get context(){return Po(this.logger)}get connected(){var e,r,n;return((n=(r=(e=this.provider)==null?void 0:e.connection)==null?void 0:r.socket)==null?void 0:n.readyState)===1||!1}get connecting(){var e,r,n;return((n=(r=(e=this.provider)==null?void 0:e.connection)==null?void 0:r.socket)==null?void 0:n.readyState)===0||this.connectPromise!==void 0||!1}async publish(e,r,n){this.isInitialized(),await this.publisher.publish(e,r,n),await this.recordMessageEvent({topic:e,message:r,publishedAt:Date.now(),transportType:Nn.relay},Ev.outbound)}async subscribe(e,r){var n,i,s;this.isInitialized(),(!(r!=null&&r.transportType)||(r==null?void 0:r.transportType)==="relay")&&await this.toEstablishConnection();const o=typeof((n=r==null?void 0:r.internal)==null?void 0:n.throwOnFailedPublish)>"u"?!0:(i=r==null?void 0:r.internal)==null?void 0:i.throwOnFailedPublish;let a=((s=this.subscriber.topicMap.get(e))==null?void 0:s[0])||"",c;const l=u=>{u.topic===e&&(this.subscriber.off(Lo.created,l),c())};return await Promise.all([new Promise(u=>{c=u,this.subscriber.on(Lo.created,l)}),new Promise(async(u,f)=>{a=await this.subscriber.subscribe(e,lO({internal:{throwOnFailedPublish:o}},r)).catch(d=>{o&&f(d)})||a,u()})]),a}async unsubscribe(e,r){this.isInitialized(),await this.subscriber.unsubscribe(e,r)}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}async transportDisconnect(){this.provider.disconnect&&(this.hasExperiencedNetworkDisruption||this.connected)?await Nf(this.provider.disconnect(),2e3,"provider.disconnect()").catch(()=>this.onProviderDisconnect()):this.onProviderDisconnect()}async transportClose(){this.transportExplicitlyClosed=!0,await this.transportDisconnect()}async transportOpen(e){if(!this.subscriber.hasAnyTopics){this.logger.warn("Starting WS connection skipped because the client has no topics to work with.");return}if(this.connectPromise?(this.logger.debug({},"Waiting for existing connection attempt to resolve..."),await this.connectPromise,this.logger.debug({},"Existing connection attempt resolved")):(this.connectPromise=new Promise(async(r,n)=>{await this.connect(e).then(r).catch(n).finally(()=>{this.connectPromise=void 0})}),await this.connectPromise),!this.connected)throw new Error(`Couldn't establish socket connection to the relay server: ${this.relayUrl}`)}async restartTransport(e){this.logger.debug({},"Restarting transport..."),!this.connectionAttemptInProgress&&(this.relayUrl=e||this.relayUrl,await this.confirmOnlineStateOrThrow(),await this.transportClose(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await zR())throw new Error("No internet connection detected. Please restart your network and try again.")}async handleBatchMessageEvents(e){if((e==null?void 0:e.length)===0){this.logger.trace("Batch message events is empty. Ignoring...");return}const r=e.sort((n,i)=>n.publishedAt-i.publishedAt);this.logger.debug(`Batch of ${r.length} message events sorted`);for(const n of r)try{await this.onMessageEvent(n)}catch(i){this.logger.warn(i,"Error while processing batch message event: "+(i==null?void 0:i.message))}this.logger.trace(`Batch of ${r.length} message events processed`)}async onLinkMessageEvent(e,r){const{topic:n}=e;if(!r.sessionExists){const i=_i(Ue.FIVE_MINUTES),s={topic:n,expiry:i,relay:{protocol:"irn"},active:!1};await this.core.pairing.pairings.set(n,s)}this.events.emit(Mi.message,e),await this.recordMessageEvent(e,Ev.inbound)}async connect(e){await this.confirmOnlineStateOrThrow(),e&&e!==this.relayUrl&&(this.relayUrl=e,await this.transportDisconnect()),this.connectionAttemptInProgress=!0,this.transportExplicitlyClosed=!1;let r=1;for(;r<6;){try{if(this.transportExplicitlyClosed)break;this.logger.debug({},`Connecting to ${this.relayUrl}, attempt: ${r}...`),await this.createProvider(),await new Promise(async(n,i)=>{const s=()=>
vendor: 8,334 bytes, line 2076
2076{i(new Error("Connection interrupted while trying to connect"))};this.provider.once(sa.disconnect,s),await Nf(new Promise((o,a)=>{this.provider.connect().then(o).catch(a)}),this.connectTimeout,`Socket stalled when trying to connect to ${this.relayUrl}`).catch(o=>{i(o)}).finally(()=>{this.provider.off(sa.disconnect,s),clearTimeout(this.reconnectTimeout)}),await new Promise(async(o,a)=>{const c=()=>{i(new Error("Connection interrupted while trying to subscribe"))};this.provider.once(sa.disconnect,c),await this.subscriber.start().then(o).catch(a).finally(()=>{this.provider.off(sa.disconnect,c)})}),this.hasExperiencedNetworkDisruption=!1,n()})}catch(n){await this.subscriber.stop();const i=n;this.logger.warn({},i.message),this.hasExperiencedNetworkDisruption=!0}finally{this.connectionAttemptInProgress=!1}if(this.connected){this.logger.debug({},`Connected to ${this.relayUrl} successfully on attempt: ${r}`);break}await new Promise(n=>setTimeout(n,Ue.toMiliseconds(r*1))),r++}}startPingTimeout(){var e,r,n,i,s;if(K3())try{(r=(e=this.provider)==null?void 0:e.connection)!=null&&r.socket&&((s=(i=(n=this.provider)==null?void 0:n.connection)==null?void 0:i.socket)==null||s.on("ping",()=>{this.resetPingTimeout()})),this.resetPingTimeout()}catch(o){this.logger.warn(o,o==null?void 0:o.message)}}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();const e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new Pa(new t6e(M3e({sdkVersion:S_,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0,bundleId:this.bundleId,packageName:this.packageName}))),this.registerProviderListeners()}async recordMessageEvent(e,r){const{topic:n,message:i}=e;await this.messages.set(n,i,r)}async shouldIgnoreMessageEvent(e){const{topic:r,message:n}=e;if(!n||n.length===0)return this.logger.warn(`Ignoring invalid/empty message: ${n}`),!0;if(!await this.subscriber.isKnownTopic(r))return this.logger.warn(`Ignoring message for unknown topic ${r}`),!0;const i=this.messages.has(r,n);return i&&this.logger.warn(`Ignoring duplicate message: ${n}`),i}async onProviderPayload(e){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:e}),JS(e)){if(!e.method.endsWith(p6e))return;const r=e.params,{topic:n,message:i,publishedAt:s,attestation:o}=r.data,a={topic:n,message:i,publishedAt:s,transportType:Nn.relay,attestation:o};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(lO({type:"event",event:r.id},a)),this.events.emit(r.id,a),await this.acknowledgePayload(e),await this.onMessageEvent(a)}else Lx(e)&&this.events.emit(Mi.message_ack,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(await this.recordMessageEvent(e,Ev.inbound),this.events.emit(Mi.message,e))}async acknowledgePayload(e){const r=Ox(e.id,!0);await this.provider.connection.send(r)}unregisterProviderListeners(){this.provider.off(sa.payload,this.onPayloadHandler),this.provider.off(sa.connect,this.onConnectHandler),this.provider.off(sa.disconnect,this.onDisconnectHandler),this.provider.off(sa.error,this.onProviderErrorHandler),clearTimeout(this.pingTimeout)}async registerEventListeners(){let e=await zR();CEe(async r=>{e!==r&&(e=r,r?await this.transportOpen().catch(n=>this.logger.error(n,n==null?void 0:n.message)):(this.hasExperiencedNetworkDisruption=!0,await this.transportDisconnect(),this.transportExplicitlyClosed=!1))}),this.core.heartbeat.on(n0.pulse,async()=>{if(!this.transportExplicitlyClosed&&!this.connected&&SEe())try{await this.confirmOnlineStateOrThrow(),await this.transportOpen()}catch(r){this.logger.warn(r,r==null?void 0:r.message)}})}async onProviderDisconnect(){clearTimeout(this.pingTimeout),this.events.emit(Mi.disconnect),this.connectionAttemptInProgress=!1,!this.reconnectInProgress&&(this.reconnectInProgress=!0,await this.subscriber.stop(),this.subscriber.hasAnyTopics&&(this.transportExplicitlyClosed||(this.reconnectTimeout=setTimeout(async()=>{await this.transportOpen().catch(e=>this.logger.error(e,e==null?void 0:e.message)),this.reconnectTimeout=void 0,this.reconnectInProgress=!1},Ue.toMiliseconds(g6e)))))}isInitialized(){if(!this.initialized){const{message:e}=je("NOT_INITIALIZED",this.name);throw new Error(e)}}async toEstablishConnection(){if(await this.confirmOnlineStateOrThrow(),!this.connected){if(this.connectPromise){await this.connectPromise;return}await this.connect()}}};function UCe(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}function uO(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}function fO(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const BCe="[object RegExp]",FCe="[object String]",jCe="[object Number]",zCe="[object Boolean]",dO="[object Arguments]",WCe="[object Symbol]",HCe="[object Date]",qCe="[object Map]",VCe="[object Set]",KCe="[object Array]",GCe="[object Function]",YCe="[object ArrayBuffer]",r6="[object Object]",ZCe="[object Error]",JCe="[object DataView]",QCe="[object Uint8Array]",XCe="[object Uint8ClampedArray]",e_e="[object Uint16Array]",t_e="[object Uint32Array]",r_e="[object BigUint64Array]",n_e="[object Int8Array]",i_e="[object Int16Array]",s_e="[object Int32Array]",o_e="[object BigInt64Array]",a_e="[object Float32Array]",c_e="[object Float64Array]";function l_e(){}function hO(t){if(!t||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e===null||e===Object.prototype||Object.getPrototypeOf(e)===null?Object.prototype.toString.call(t)==="[object Object]":!1}function u_e(t,e,r){return em(t,e,void 0,void 0,void 0,void 0,r)}function em(t,e,r,n,i,s,o){const a=o(t,e,r,n,i,s);if(a!==void 0)return a;if(typeof t==typeof e)switch(typeof t){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return t===e;case"number":return t===e||Object.is(t,e);case"function":return t===e;case"object":return $m(t,e,s,o)}return $m(t,e,s,o)}function $m(t,e,r,n){if(Object.is(t,e))return!0;let i=fO(t),s=fO(e);if(i===dO&&(i=r6),s===dO&&(s=r6),i!==s)return!1;switch(i){case FCe:return t.toString()===e.toString();case jCe:{const c=t.valueOf(),l=e.valueOf();return UCe(c,l)}case zCe:case HCe:case WCe:return Object.is(t.valueOf(),e.valueOf());case BCe:return t.source===e.source&&t.flags===e.flags;case GCe:return t===e}r=r??new Map;const o=r.get(t),a=r.get(e);if(o!=null&&a!=null)return o===e;r.set(t,e),r.set(e,t);try{switch(i){case qCe:{if(t.size!==e.size)return!1;for(const[c,l]of t.entries())if(!e.has(c)||!em(l,e.get(c),c,t,e,r,n))return!1;return!0}case VCe:{if(t.size!==e.size)return!1;const c=Array.from(t.values()),l=Array.from(e.values());for(let u=0;u<c.length;u++){const f=c[u],d=l.findIndex(p=>em(f,p,void 0,t,e,r,n));if(d===-1)return!1;l.splice(d,1)}return!0}case KCe:case QCe:case XCe:case e_e:case t_e:case r_e:case n_e:case i_e:case s_e:case o_e:case a_e:case c_e:{if(typeof Buffer<"u"&&Buffer.isBuffer(t)!==Buffer.isBuffer(e)||t.length!==e.length)return!1;for(let c=0;c<t.length;c++)if(!em(t[c],e[c],c,t,e,r,n))return!1;return!0}case YCe:return t.byteLength!==e.byteLength?!1:$m(new Uint8Array(t),new Uint8Array(e),r,n);case JCe:return t.byteLength!==e.byteLength||t.byteOffset!==e.byteOffset?!1:$m(new Uint8Array(t),new Uint8Array(e),r,n);case ZCe:return t.name===e.name&&t.message===e.message;case r6:{if(!($m(t.constructor,e.constructor,r,n)||hO(t)&&hO(e)))return!1;const c=[...Object.keys(t),...uO(t)],l=[...Object.keys(e),...uO(e)];if(c.length!==l.length)return!1;for(let u=0;u<c.length;u++){const f=c[u],d=t[f];if(!Object.hasOwn(e,f))return!1;const p=e[f];if(!em(d,p,f,t,e,r,n))return!1}return!0}default:return!1}}finally{r.delete(t),r.delete(e)}}function f_e(t,e){return u_e(t,e,l_e)}var d_e=Object.defineProperty,pO=Object.getOwnPropertySymbols,h_e=Object.prototype.hasOwnProperty,p_e=Object.prototype.propertyIsEnumerable,O_=(t,e,r)=>e in t?d_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,gO=(t,e)=>{for(var r in e||(e={}))h_e.call(e,r)&&O_(t,r,e[r]);if(pO)for(var r of pO(e))p_e.call(e,r)&&O_(t,r,e[r]);return t},ro=(t,e,r)=>O_(t,typeof e!="symbol"?e+"":e,r);let o0=class extends sme{constructor(e,r,n,i=pl,s=void 0){super(e,r,n,i),this.core=e,this.logger=r,this.name=n,ro(this,"map",new Map),ro(this,"version",m6e),ro(this,"cac
2076hed",[]),ro(this,"initialized",!1),ro(this,"getKey"),ro(this,"storagePrefix",pl),ro(this,"recentlyDeleted",[]),ro(this,"recentlyDeletedLimit",200),ro(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(o=>{this.getKey&&o!==null&&!es(o)?this.map.set(this.getKey(o),o):eEe(o)?this.map.set(o.id,o):tEe(o)&&this.map.set(o.topic,o)}),this.cached=[],this.initialized=!0)}),ro(this,"set",async(o,a)=>{this.isInitialized(),this.map.has(o)?await this.update(o,a):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:o,value:a}),this.map.set(o,a),await this.persist())}),ro(this,"get",o=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:o}),this.getData(o))),ro(this,"getAll",o=>(this.isInitialized(),o?this.values.filter(a=>Object.keys(o).every(c=>f_e(a[c],o[c]))):this.values)),ro(this,"update",async(o,a)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:o,update:a});const c=gO(gO({},this.getData(o)),a);this.map.set(o,c),await this.persist()}),ro(this,"delete",async(o,a)=>{this.isInitialized(),this.map.has(o)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:o,reason:a}),this.map.delete(o),this.addToRecentlyDeleted(o),await this.persist())}),this.logger=Ls(r,this.name),this.storagePrefix=i,this.getKey=s}get context(){return Po(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}addToRecentlyDeleted(e){this.recentlyDeleted.push(e),this.recentlyDeleted.length>=this.recentlyDeletedLimit&&this.recentlyDeleted.splice(0,this.recentlyDeletedLimit/2)}async setDataStore(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){const r=this.map.get(e);if(!r){if(this.recentlyDeleted.includes(e)){const{message:i}=je("MISSING_OR_INVALID",`Record was recently deleted - ${this.name}: ${e}`);throw this.logger.error(i),new Error(i)}const{message:n}=je("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(n),new Error(n)}return r}async persist(){await this.setDataStore(this.values)}async restore(){try{const e=await this.getDataStore();if(typeof e>"u"||!e.length)return;if(this.map.size){const{message:r}=je("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(e){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(e)}}isInitialized(){if(!this.initialized){const{message:e}=je("NOT_INITIALIZED",this.name);throw new Error(e)}}};var g_e=Object.defineProperty,m_e=(t,e,r)=>e in t?g_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,xr=(t,e,r)=>m_e(t,typeof e!="symbol"?e+"":e,r);class y_e{constructor(e,r){this.core=e,this.logger=r,xr(this,"name",v6e),xr(this,"version",x6e),xr(this,"events",new bS),xr(this,"pairings"),xr(this,"initialized",!1),xr(this,"storagePrefix",pl),xr(this,"ignoredPayloadTypes",[au]),xr(this,"registeredMethods",[]),xr(this,"init",async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))}),xr(this,"register",({methods:n})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...n])]}),xr(this,"create",async n=>{this.isInitialized();const i=C_(),s=await this.core.crypto.setSymKey(i),o=_i(Ue.FIVE_MINUTES),a={protocol:LH},c={topic:s,expiry:o,relay:a,active:!1,methods:n==null?void 0:n.methods},l=OR({protocol:this.core.protocol,version:this.core.version,topic:s,symKey:i,relay:a,expiryTimestamp:o,methods:n==null?void 0:n.methods});return this.events.emit(Ud.create,c),this.core.expirer.set(s,o),await this.pairings.set(s,c),await this.core.relayer.subscribe(s,{transportType:n==null?void 0:n.transportType}),{topic:s,uri:l}}),xr(this,"pair",async n=>{this.isInitialized();const i=this.core.eventClient.createEvent({properties:{topic:n==null?void 0:n.uri,trace:[Dc.pairing_started]}});this.isValidPair(n,i);const{topic:s,symKey:o,relay:a,expiryTimestamp:c,methods:l}=RR(n.uri);i.props.properties.topic=s,i.addTrace(Dc.pairing_uri_validation_success),i.addTrace(Dc.pairing_uri_not_expired);let u;if(this.pairings.keys.includes(s)){if(u=this.pairings.get(s),i.addTrace(Dc.existing_pairing),u.active)throw i.setError(zl.active_pairing_already_exists),new Error(`Pairing already exists: ${s}. Please try again with a new connection URI.`);
vendor: 7,745 bytes, line 2076
2076i.addTrace(Dc.pairing_not_expired)}const f=c||_i(Ue.FIVE_MINUTES),d={topic:s,relay:a,expiry:f,active:!1,methods:l};this.core.expirer.set(s,f),await this.pairings.set(s,d),i.addTrace(Dc.store_new_pairing),n.activatePairing&&await this.activate({topic:s}),this.events.emit(Ud.create,d),i.addTrace(Dc.emit_inactive_pairing),this.core.crypto.keychain.has(s)||await this.core.crypto.setSymKey(o,s),i.addTrace(Dc.subscribing_pairing_topic);try{await this.core.relayer.confirmOnlineStateOrThrow()}catch{i.setError(zl.no_internet_connection)}try{await this.core.relayer.subscribe(s,{relay:a})}catch(p){throw i.setError(zl.subscribe_pairing_topic_failure),p}return i.addTrace(Dc.subscribe_pairing_topic_success),d}),xr(this,"activate",async({topic:n})=>{this.isInitialized();const i=_i(Ue.FIVE_MINUTES);this.core.expirer.set(n,i),await this.pairings.update(n,{active:!0,expiry:i})}),xr(this,"ping",async n=>{this.isInitialized(),await this.isValidPing(n),this.logger.warn("ping() is deprecated and will be removed in the next major release.");const{topic:i}=n;if(this.pairings.keys.includes(i)){const s=await this.sendRequest(i,"wc_pairingPing",{}),{done:o,resolve:a,reject:c}=Ld();this.events.once(Qr("pairing_ping",s),({error:l})=>{l?c(l):a()}),await o()}}),xr(this,"updateExpiry",async({topic:n,expiry:i})=>{this.isInitialized(),await this.pairings.update(n,{expiry:i})}),xr(this,"updateMetadata",async({topic:n,metadata:i})=>{this.isInitialized(),await this.pairings.update(n,{peerMetadata:i})}),xr(this,"getPairings",()=>(this.isInitialized(),this.pairings.values)),xr(this,"disconnect",async n=>{this.isInitialized(),await this.isValidDisconnect(n);const{topic:i}=n;this.pairings.keys.includes(i)&&(await this.sendRequest(i,"wc_pairingDelete",Xn("USER_DISCONNECTED")),await this.deletePairing(i))}),xr(this,"formatUriFromPairing",n=>{this.isInitialized();const{topic:i,relay:s,expiry:o,methods:a}=n,c=this.core.crypto.keychain.get(i);return OR({protocol:this.core.protocol,version:this.core.version,topic:i,symKey:c,relay:s,expiryTimestamp:o,methods:a})}),xr(this,"sendRequest",async(n,i,s)=>{const o=If(i,s),a=await this.core.crypto.encode(n,o),c=_1[i].req;return this.core.history.set(n,o),this.core.relayer.publish(n,a,c),o.id}),xr(this,"sendResult",async(n,i,s)=>{const o=Ox(n,s),a=await this.core.crypto.encode(i,o),c=(await this.core.history.get(i,n)).request.method,l=_1[c].res;await this.core.relayer.publish(i,a,l),await this.core.history.resolve(o)}),xr(this,"sendError",async(n,i,s)=>{const o=Dx(n,s),a=await this.core.crypto.encode(i,o),c=(await this.core.history.get(i,n)).request.method,l=_1[c]?_1[c].res:_1.unregistered_method.res;await this.core.relayer.publish(i,a,l),await this.core.history.resolve(o)}),xr(this,"deletePairing",async(n,i)=>{await this.core.relayer.unsubscribe(n),await Promise.all([this.pairings.delete(n,Xn("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(n),i?Promise.resolve():this.core.expirer.del(n)])}),xr(this,"cleanup",async()=>{const n=this.pairings.getAll().filter(i=>cf(i.expiry));await Promise.all(n.map(i=>this.deletePairing(i.topic)))}),xr(this,"onRelayEventRequest",async n=>{const{topic:i,payload:s}=n;switch(s.method){case"wc_pairingPing":return await this.onPairingPingRequest(i,s);case"wc_pairingDelete":return await this.onPairingDeleteRequest(i,s);default:return await this.onUnknownRpcMethodRequest(i,s)}}),xr(this,"onRelayEventResponse",async n=>{const{topic:i,payload:s}=n,o=(await this.core.history.get(i,s.id)).request.method;switch(o){case"wc_pairingPing":return this.onPairingPingResponse(i,s);default:return this.onUnknownRpcMethodResponse(o)}}),xr(this,"onPairingPingRequest",async(n,i)=>{const{id:s}=i;try{this.isValidPing({topic:n}),await this.sendResult(s,n,!0),this.events.emit(Ud.ping,{id:s,topic:n})}catch(o){await this.sendError(s,n,o),this.logger.error(o)}}),xr(this,"onPairingPingResponse",(n,i)=>{const{id:s}=i;setTimeout(()=>{Uc(i)?this.events.emit(Qr("pairing_ping",s),{}):da(i)&&this.events.emit(Qr("pairing_ping",s),{error:i.error})},500)}),xr(this,"onPairingDeleteRequest",async(n,i)=>{const{id:s}=i;try{this.isValidDisconnect({topic:n}),await this.deletePairing(n),this.events.emit(Ud.delete,{id:s,topic:n})}catch(o){await this.sendError(s,n,o),this.logger.error(o)}}),xr(this,"onUnknownRpcMethodRequest",async(n,i)=>{const{id:s,method:o}=i;try{if(this.registeredMethods.includes(o))return;const a=Xn("WC_METHOD_UNSUPPORTED",o);await this.sendError(s,n,a),this.logger.error(a)}catch(a){await this.sendError(s,n,a),this.logger.error(a)}}),xr(this,"onUnknownRpcMethodResponse",n=>{this.registeredMethods.includes(n)||this.logger.error(Xn("WC_METHOD_UNSUPPORTED",n))}),xr(this,"isValidPair",(n,i)=>{var s;if(!ao(n)){const{message:a}=je("MISSING_OR_INVALID",`pair() params: ${n}`);throw i.setError(zl.malformed_pairing_uri),new Error(a)}if(!X5e(n.uri)){const{message:a}=je("MISSING_OR_INVALID",`pair() uri: ${n.uri}`);throw i.setError(zl.malformed_pairing_uri),new Error(a)}const o=RR(n==null?void 0:n.uri);if(!((s=o==null?void 0:o.relay)!=null&&s.protocol)){const{message:a}=je("MISSING_OR_INVALID","pair() uri#relay-protocol");throw i.setError(zl.malformed_pairing_uri),new Error(a)}if(!(o!=null&&o.symKey)){const{message:a}=je("MISSING_OR_INVALID","pair() uri#symKey");throw i.setError(zl.malformed_pairing_uri),new Error(a)}if(o!=null&&o.expiryTimestamp&&Ue.toMiliseconds(o==null?void 0:o.expiryTimestamp)<Date.now()){i.setError(zl.pairing_expired);const{message:a}=je("EXPIRED","pair() URI has expired. Please try again with a new connection URI.");throw new Error(a)}}),xr(this,"isValidPing",async n=>{if(!ao(n)){const{message:s}=je("MISSING_OR_INVALID",`ping() params: ${n}`);throw new Error(s)}const{topic:i}=n;await this.isValidPairingTopic(i)}),xr(this,"isValidDisconnect",async n=>{if(!ao(n)){const{message:s}=je("MISSING_OR_INVALID",`disconnect() params: ${n}`);throw new Error(s)}const{topic:i}=n;await this.isValidPairingTopic(i)}),xr(this,"isValidPairingTopic",async n=>{if(!mi(n,!1)){const{message:i}=je("MISSING_OR_INVALID",`pairing topic should be a string: ${n}`);throw new Error(i)}if(!this.pairings.keys.includes(n)){const{message:i}=je("NO_MATCHING_KEY",`pairing topic doesn't exist: ${n}`);throw new Error(i)}if(cf(this.pairings.get(n).expiry)){await this.deletePairing(n);const{message:i}=je("EXPIRED",`pairing topic: ${n}`);throw new Error(i)}}),this.core=e,this.logger=Ls(r,this.name),this.pairings=new o0(this.core,this.logger,this.name,this.storagePrefix)}get context(){return Po(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=je("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(Mi.message,async e=>{const{topic:r,message:n,transportType:i}=e;if(this.pairings.keys.includes(r)&&i!==Nn.link_mode&&!this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(n)))try{const s=await this.core.crypto.decode(r,n);JS(s)?(this.core.history.set(r,s),await this.onRelayEventRequest({topic:r,payload:s})):Lx(s)&&(await this.core.history.resolve(s),await this.onRelayEventResponse({topic:r,payload:s}),this.core.history.delete(r,s.id)),await this.core.relayer.messages.ack(r,n)}catch(s){this.logger.error(s)}})}registerExpirerEvents(){this.core.expirer.on(ua.expired,async e=>{const{topic:r}=OW(e.target);r&&this.pairings.keys.includes(r)&&(await this.deletePairing(r,!0),this.events.emit(Ud.expire,{topic:r}))})}}var b_e=Object.defineProperty,w_e=(t,e,r)=>e in t?b_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Gi=(t,e,r)=>w_e(t,typeof e!="symbol"?e+"":e,r);let v_e=class extends tme{constructor(e,r){super(e,r),this.core=e,this.logger=r,Gi(this,"records",new Map),Gi(this,"events",new ka.EventEmitter),Gi(this,"name",E6e),Gi(this,"version",C6e),Gi(this,"cac
2076hed",[]),Gi(this,"initialized",!1),Gi(this,"storagePrefix",pl),Gi(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.records.set(n.id,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)}),Gi(this,"set",(n,i,s)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:n,request:i,chainId:s}),this.records.has(i.id))return;const o={id:i.id,topic:n,request:{method:i.method,params:i.params||null},chainId:s,expiry:_i(Ue.THIRTY_DAYS)};this.records.set(o.id,o),this.persist(),this.events.emit(Ua.created,o)}),Gi(this,"resolve",async n=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:n}),!this.records.has(n.id))return;const i=await this.getRecord(n.id);typeof i.response>"u"&&(i.response=da(n)?{error:n.error}:{result:n.result},this.records.set(i.id,i),this.persist(),this.events.emit(Ua.updated,i))}),Gi(this,"get",async(n,i)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:n,id:i}),await this.getRecord(i))),Gi(this,"delete",(n,i)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:i}),this.values.forEach(s=>{if(s.topic===n){if(typeof i<"u"&&s.id!==i)return;this.records.delete(s.id),this.events.emit(Ua.deleted,s)}}),this.persist()}),Gi(this,"exists",async(n,i)=>(this.isInitialized(),this.records.has(i)?(await this.getRecord(i)).topic===n:!1)),Gi(this,"on",(n,i)=>{this.events.on(n,i)}),Gi(this,"once",(n,i)=>{this.events.once(n,i)}),Gi(this,"off",(n,i)=>{this.events.off(n,i)}),Gi(this,"removeListener",(n,i)=>{this.events.removeListener(n,i)}),this.logger=Ls(r,this.name)}get context(){return Po(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const e=[];return this.values.forEach(r=>{if(typeof r.response<"u")return;const n={topic:r.topic,request:If(r.request.method,r.request.params,r.id),chainId:r.chainId};return e.push(n)}),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();const r=this.records.get(e);if(!r){const{message:n}=je("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(n)}return r}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(Ua.sync)}async restore(){try{const e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){const{message:r}=je("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}}registerEventListeners(){this.events.on(Ua.created,e=>{const r=Ua.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:e})}),this.events.on(Ua.updated,e=>{const r=Ua.updated;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:e})}),this.events.on(Ua.deleted,e=>{const r=Ua.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:e})}),this.core.heartbeat.on(n0.pulse,()=>{this.cleanup()})}cleanup(){try{this.isInitialized();let e=!1;this.records.forEach(r=>{Ue.toMiliseconds(r.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${r.id}`),this.records.delete(r.id),this.events.emit(Ua.deleted,r,!1),e=!0)}),e&&this.persist()}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){const{message:e}=je("NOT_INITIALIZED",this.name);throw new Error(e)}}};var x_e=Object.defineProperty,E_e=(t,e,r)=>e in t?x_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,vs=(t,e,r)=>E_e(t,typeof e!="symbol"?e+"":e,r);let C_e=class extends ame{constructor(e,r){super(e,r),this.core=e,this.logger=r,vs(this,"expirations",new Map),vs(this,"events",new ka.EventEmitter),vs(this,"name",_6e),vs(this,"version",A6e),vs(this,"cac
2076hed",[]),vs(this,"initialized",!1),vs(this,"storagePrefix",pl),vs(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.expirations.set(n.target,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)}),vs(this,"has",n=>{try{const i=this.formatTarget(n);return typeof this.getExpiration(i)<"u"}catch{return!1}}),vs(this,"set",(n,i)=>{this.isInitialized();const s=this.formatTarget(n),o={target:s,expiry:i};this.expirations.set(s,o),this.checkExpiry(s,o),this.events.emit(ua.created,{target:s,expiration:o})}),vs(this,"get",n=>{this.isInitialized();const i=this.formatTarget(n);return this.getExpiration(i)}),vs(this,"del",n=>{if(this.isInitialized(),this.has(n)){const i=this.formatTarget(n),s=this.getExpiration(i);this.expirations.delete(i),this.events.emit(ua.deleted,{target:i,expiration:s})}}),vs(this,"on",(n,i)=>{this.events.on(n,i)}),vs(this,"once",(n,i)=>{this.events.once(n,i)}),vs(this,"off",(n,i)=>{this.events.off(n,i)}),vs(this,"removeListener",(n,i)=>{this.events.removeListener(n,i)}),this.logger=Ls(r,this.name)}get context(){return Po(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if(typeof e=="string")return $3e(e);if(typeof e=="number")return U3e(e);const{message:r}=je("UNKNOWN_TYPE",`Target type: ${typeof e}`);throw new Error(r)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(ua.sync)}async restore(){try{const e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){const{message:r}=je("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){const r=this.expirations.get(e);if(!r){const{message:n}=je("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.warn(n),new Error(n)}return r}checkExpiry(e,r){const{expiry:n}=r;Ue.toMiliseconds(n)-Date.now()<=0&&this.expire(e,r)}expire(e,r){this.expirations.delete(e),this.events.emit(ua.expired,{target:e,expiration:r})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,r)=>this.checkExpiry(r,e))}registerEventListeners(){this.core.heartbeat.on(n0.pulse,()=>this.checkExpirations()),this.events.on(ua.created,e=>{const r=ua.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),this.persist()}),this.events.on(ua.expired,e=>{const r=ua.expired;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),this.persist()}),this.events.on(ua.deleted,e=>{const r=ua.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=je("NOT_INITIALIZED",this.name);throw new Error(e)}}};var __e=Object.defineProperty,A_e=(t,e,r)=>e in t?__e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,pi=(t,e,r)=>A_e(t,typeof e!="symbol"?e+"":e,r);let S_e=class extends cme{constructor(e,r,n){super(e,r,n),this.core=e,this.logger=r,this.store=n,pi(this,"name",S6e),pi(this,"abortController"),pi(this,"isDevEnv"),pi(this,"verifyUrlV3",I6e),pi(this,"storagePrefix",pl),pi(this,"version",DH),pi(this,"publicKey"),pi(this,"fetchPromise"),pi(this,"init",async()=>{var i;this.isDevEnv||(this.publicKey=await this.store.getItem(this.storeKey),this.publicKey&&Ue.toMiliseconds((i=this.publicKey)==null?void 0:i.expiresAt)<Date.now()&&(this.logger.debug("verify v2 public key expired"),await this.removePublicKey()))}),pi(this,"register",async i=>{if(!jg()||this.isDevEnv)return;const s=window.location.origin,{id:o,decryptedId:a}=i,c=`${this.verifyUrlV3}/attestation?projectId=${this.core.projectId}&origin=${s}&id=${o}&decryptedId=${a}`;try{const l=Dh(),u=this.startAbortTimer(Ue.ONE_SECOND*5),f=await new Promise((d,p)=>{const h=()=>{window.removeEventListener("message",y),l.body.removeChild(g),p("attestation aborted")};this.abortController.signal.addEventListener("abort",h);const g=l.createElement("iframe");g.src=c,g.style.display="none",g.addEventListener("error",h,{signal:this.abortController.signal});const y=x=>
vendor: 19,875 bytes, line 2076
2076{if(x.data&&typeof x.data=="string")try{const C=JSON.parse(x.data);if(C.type==="verify_attestation"){if(s_(C.attestation).payload.id!==o)return;clearInterval(u),l.body.removeChild(g),this.abortController.signal.removeEventListener("abort",h),window.removeEventListener("message",y),d(C.attestation===null?"":C.attestation)}}catch(C){this.logger.warn(C)}};l.body.appendChild(g),window.addEventListener("message",y,{signal:this.abortController.signal})});return this.logger.debug("jwt attestation",f),f}catch(l){this.logger.warn(l)}return""}),pi(this,"resolve",async i=>{if(this.isDevEnv)return"";const{attestationId:s,hash:o,encryptedId:a}=i;if(s===""){this.logger.debug("resolve: attestationId is empty, skipping");return}if(s){if(s_(s).payload.id!==a)return;const l=await this.isValidJwtAttestation(s);if(l){if(!l.isVerified){this.logger.warn("resolve: jwt attestation: origin url not verified");return}return l}}if(!o)return;const c=this.getVerifyUrl(i==null?void 0:i.verifyUrl);return this.fetchAttestation(o,c)}),pi(this,"fetchAttestation",async(i,s)=>{this.logger.debug(`resolving attestation: ${i} from url: ${s}`);const o=this.startAbortTimer(Ue.ONE_SECOND*5),a=await fetch(`${s}/attestation/${i}?v2Supported=true`,{signal:this.abortController.signal});return clearTimeout(o),a.status===200?await a.json():void 0}),pi(this,"getVerifyUrl",i=>{let s=i||Mm;return T6e.includes(s)||(this.logger.info(`verify url: ${s}, not included in trusted list, assigning default: ${Mm}`),s=Mm),s}),pi(this,"fetchPublicKey",async()=>{try{this.logger.debug(`fetching public key from: ${this.verifyUrlV3}`);const i=this.startAbortTimer(Ue.FIVE_SECONDS),s=await fetch(`${this.verifyUrlV3}/public-key`,{signal:this.abortController.signal});return clearTimeout(i),await s.json()}catch(i){this.logger.warn(i)}}),pi(this,"persistPublicKey",async i=>{this.logger.debug("persisting public key to local storage",i),await this.store.setItem(this.storeKey,i),this.publicKey=i}),pi(this,"removePublicKey",async()=>{this.logger.debug("removing verify v2 public key from storage"),await this.store.removeItem(this.storeKey),this.publicKey=void 0}),pi(this,"isValidJwtAttestation",async i=>{const s=await this.getPublicKey();try{if(s)return this.validateAttestation(i,s)}catch(a){this.logger.error(a),this.logger.warn("error validating attestation")}const o=await this.fetchAndPersistPublicKey();try{if(o)return this.validateAttestation(i,o)}catch(a){this.logger.error(a),this.logger.warn("error validating attestation")}}),pi(this,"getPublicKey",async()=>this.publicKey?this.publicKey:await this.fetchAndPersistPublicKey()),pi(this,"fetchAndPersistPublicKey",async()=>{if(this.fetchPromise)return await this.fetchPromise,this.publicKey;this.fetchPromise=new Promise(async s=>{const o=await this.fetchPublicKey();o&&(await this.persistPublicKey(o),s(o))});const i=await this.fetchPromise;return this.fetchPromise=void 0,i}),pi(this,"validateAttestation",(i,s)=>{const o=P5e(i,s.publicKey),a={hasExpired:Ue.toMiliseconds(o.exp)<Date.now(),payload:o};if(a.hasExpired)throw this.logger.warn("resolve: jwt attestation expired"),new Error("JWT attestation expired");return{origin:a.payload.origin,isScam:a.payload.isScam,isVerified:a.payload.isVerified}}),this.logger=Ls(r,this.name),this.abortController=new AbortController,this.isDevEnv=MS(),this.init()}get storeKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//verify:public:key"}get context(){return Po(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),Ue.toMiliseconds(e))}};var N_e=Object.defineProperty,I_e=(t,e,r)=>e in t?N_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,mO=(t,e,r)=>I_e(t,typeof e!="symbol"?e+"":e,r);let T_e=class extends lme{constructor(e,r){super(e,r),this.projectId=e,this.logger=r,mO(this,"context",k6e),mO(this,"registerDeviceToken",async n=>{const{clientId:i,token:s,notificationType:o,enableEncrypted:a=!1}=n,c=`${P6e}/${this.projectId}/clients`;await fetch(c,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:i,type:o,token:s,always_raw:a})})}),this.logger=Ls(r,this.context)}};var k_e=Object.defineProperty,yO=Object.getOwnPropertySymbols,P_e=Object.prototype.hasOwnProperty,R_e=Object.prototype.propertyIsEnumerable,D_=(t,e,r)=>e in t?k_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,N1=(t,e)=>{for(var r in e||(e={}))P_e.call(e,r)&&D_(t,r,e[r]);if(yO)for(var r of yO(e))R_e.call(e,r)&&D_(t,r,e[r]);return t},Ri=(t,e,r)=>D_(t,typeof e!="symbol"?e+"":e,r);let O_e=class extends ume{constructor(e,r,n=!0){super(e,r,n),this.core=e,this.logger=r,Ri(this,"context",O6e),Ri(this,"storagePrefix",pl),Ri(this,"storageVersion",R6e),Ri(this,"events",new Map),Ri(this,"shouldPersist",!1),Ri(this,"init",async()=>{if(!MS())try{const i={eventId:eR(),timestamp:Date.now(),domain:this.getAppDomain(),props:{event:"INIT",type:"",properties:{client_id:await this.core.crypto.getClientId(),user_agent:PW(this.core.relayer.protocol,this.core.relayer.version,S_)}}};await this.sendEvent([i])}catch(i){this.logger.warn(i)}}),Ri(this,"createEvent",i=>{const{event:s="ERROR",type:o="",properties:{topic:a,trace:c}}=i,l=eR(),u=this.core.projectId||"",f=Date.now(),d=N1({eventId:l,timestamp:f,props:{event:s,type:o,properties:{topic:a,trace:c}},bundleId:u,domain:this.getAppDomain()},this.setMethods(l));return this.telemetryEnabled&&(this.events.set(l,d),this.shouldPersist=!0),d}),Ri(this,"getEvent",i=>{const{eventId:s,topic:o}=i;if(s)return this.events.get(s);const a=Array.from(this.events.values()).find(c=>c.props.properties.topic===o);if(a)return N1(N1({},a),this.setMethods(a.eventId))}),Ri(this,"deleteEvent",i=>{const{eventId:s}=i;this.events.delete(s),this.shouldPersist=!0}),Ri(this,"setEventListeners",()=>{this.core.heartbeat.on(n0.pulse,async()=>{this.shouldPersist&&await this.persist(),this.events.forEach(i=>{Ue.fromMiliseconds(Date.now())-Ue.fromMiliseconds(i.timestamp)>D6e&&(this.events.delete(i.eventId),this.shouldPersist=!0)})})}),Ri(this,"setMethods",i=>({addTrace:s=>this.addTrace(i,s),setError:s=>this.setError(i,s)})),Ri(this,"addTrace",(i,s)=>{const o=this.events.get(i);o&&(o.props.properties.trace.push(s),this.events.set(i,o),this.shouldPersist=!0)}),Ri(this,"setError",(i,s)=>{const o=this.events.get(i);o&&(o.props.type=s,o.timestamp=Date.now(),this.events.set(i,o),this.shouldPersist=!0)}),Ri(this,"persist",async()=>{await this.core.storage.setItem(this.storageKey,Array.from(this.events.values())),this.shouldPersist=!1}),Ri(this,"restore",async()=>{try{const i=await this.core.storage.getItem(this.storageKey)||[];if(!i.length)return;i.forEach(s=>{this.events.set(s.eventId,N1(N1({},s),this.setMethods(s.eventId)))})}catch(i){this.logger.warn(i)}}),Ri(this,"submit",async()=>{if(!this.telemetryEnabled||this.events.size===0)return;const i=[];for(const[s,o]of this.events)o.props.type&&i.push(o);if(i.length!==0)try{if((await this.sendEvent(i)).ok)for(const s of i)this.events.delete(s.eventId),this.shouldPersist=!0}catch(s){this.logger.warn(s)}}),Ri(this,"sendEvent",async i=>{const s=this.getAppDomain()?"":"&sp=desktop";return await fetch(`${L6e}?projectId=${this.core.projectId}&st=events_sdk&sv=js-${S_}${s}`,{method:"POST",body:JSON.stringify(i)})}),Ri(this,"getAppDomain",()=>kW().url),this.logger=Ls(r,this.context),this.telemetryEnabled=n,n?this.restore().then(async()=>{await this.submit(),this.setEventListeners()}):this.persist()}get storageKey(){return this.storagePrefix+this.storageVersion+this.core.customStoragePrefix+"//"+this.context}};var D_e=Object.defineProperty,bO=Object.getOwnPropertySymbols,L_e=Object.prototype.hasOwnProperty,M_e=Object.prototype.propertyIsEnumerable,L_=(t,e,r)=>e in t?D_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,wO=(t,e)=>{for(var r in e||(e={}))L_e.call(e,r)&&L_(t,r,e[r]);if(bO)for(var r of bO(e))M_e.call(e,r)&&L_(t,r,e[r]);return t},vn=(t,e,r)=>L_(t,typeof e!="symbol"?e+"":e,r);let $_e=class YH extends J1e{constructor(e){var r;super(e),vn(this,"protocol",OH),vn(this,"version",DH),vn(this,"name",A_),vn(this,"relayUrl"),vn(this,"projectId"),vn(this,"customStoragePrefix"),vn(this,"events",new ka.EventEmitter),vn(this,"logger"),vn(this,"heartbeat"),vn(this,"relayer"),vn(this,"crypto"),vn(this,"storage"),vn(this,"history"),vn(this,"expirer"),vn(this,"pairing"),vn(this,"verify"),vn(this,"echoClient"),vn(this,"linkModeSupportedApps"),vn(this,"eventClient"),vn(this,"initialized",!1),vn(this,"logChunkController"),vn(this,"on",(a,c)=>this.events.on(a,c)),vn(this,"once",(a,c)=>this.events.once(a,c)),vn(this,"off",(a,c)=>this.events.off(a,c)),vn(this,"removeListener",(a,c)=>this.events.removeListener(a,c)),vn(this,"dispatchEnvelope",({topic:a,message:c,sessionExists:l})=>{if(!a||!c)return;const u={topic:a,message:c,publishedAt:Date.now(),transportType:Nn.link_mode};this.relayer.onLinkMessageEvent(u,{sessionExists:l})});const n=this.getGlobalCore(e==null?void 0:e.customStoragePrefix);if(n)try{return this.customStoragePrefix=n.customStoragePrefix,this.logger=n.logger,this.heartbeat=n.heartbeat,this.crypto=n.crypto,this.history=n.history,this.expirer=n.expirer,this.storage=n.storage,this.relayer=n.relayer,this.pairing=n.pairing,this.verify=n.verify,this.echoClient=n.echoClient,this.linkModeSupportedApps=n.linkModeSupportedApps,this.eventClient=n.eventClient,this.initialized=n.initialized,this.logChunkController=n.logChunkController,n}catch(a){console.warn("Failed to copy global core",a)}this.projectId=e==null?void 0:e.projectId,this.relayUrl=(e==null?void 0:e.relayUrl)||MH,this.customStoragePrefix=e!=null&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";const i=Lg({level:typeof(e==null?void 0:e.logger)=="string"&&e.logger?e.logger:n6e.logger,name:A_}),{logger:s,chunkLoggerController:o}=vS({opts:i,maxSizeInBytes:e==null?void 0:e.maxLogBlobSizeInBytes,loggerOverride:e==null?void 0:e.logger});this.logChunkController=o,(r=this.logChunkController)!=null&&r.downloadLogsBlobInBrowser&&(window.downloadLogsBlobInBrowser=async()=>{var a,c;(a=this.logChunkController)!=null&&a.downloadLogsBlobInBrowser&&((c=this.logChunkController)==null||c.downloadLogsBlobInBrowser({clientId:await this.crypto.getClientId()}))}),this.logger=Ls(s,this.name),this.heartbeat=new Bge,this.crypto=new uCe(this,this.logger,e==null?void 0:e.keychain),this.history=new v_e(this,this.logger),this.expirer=new C_e(this,this.logger),this.storage=e!=null&&e.storage?e.storage:new x1e(wO(wO({},i6e),e==null?void 0:e.storageOptions)),this.relayer=new $Ce({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new y_e(this,this.logger),this.verify=new S_e(this,this.logger,this.storage),this.echoClient=new T_e(this.projectId||"",this.logger),this.linkModeSupportedApps=[],this.eventClient=new O_e(this,this.logger,e==null?void 0:e.telemetryEnabled),this.setGlobalCore(this)}static async init(e){const r=new YH(e);await r.initialize();const n=await r.crypto.getClientId();return await r.storage.setItem(y6e,n),r}get context(){return Po(this.logger)}async start(){this.initialized||await this.initialize()}async getLogsBlob(){var e;return(e=this.logChunkController)==null?void 0:e.logsToBlob({clientId:await this.crypto.getClientId()})}async addLinkModeSupportedApp(e){this.linkModeSupportedApps.includes(e)||(this.linkModeSupportedApps.push(e),await this.storage.setItem(QR,this.linkModeSupportedApps))}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.linkModeSupportedApps=await this.storage.getItem(QR)||[],this.initialized=!0,this.logger.info("Core Initialization Success")}catch(e){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,e),this.logger.error(e.message),e}}getGlobalCore(e=""){try{if(this.isGlobalCoreDisabled())return;const r=`_walletConnectCore_${e}`,n=`${r}_count`;return globalThis[n]=(globalThis[n]||0)+1,globalThis[n]>1&&console.warn(`WalletConnect Core is already initialized. This is probably a mistake and can lead to unexpected behavior. Init() was called ${globalThis[n]} times.`),globalThis[r]}catch(r){console.warn("Failed to get global WalletConnect core",r);return}}setGlobalCore(e){var r;try{if(this.isGlobalCoreDisabled())return;const n=`_walletConnectCore_${((r=e.opts)==null?void 0:r.customStoragePrefix)||""}`;globalThis[n]=e}catch(n){console.warn("Failed to set global WalletConnect core",n)}}isGlobalCoreDisabled(){try{return typeof process<"u"&&r6e.DISABLE_GLOBAL_CORE==="true"}catch{return!0}}};const U_e=$_e,ZH="wc",JH=2,QH="client",QS=`${ZH}@${JH}:${QH}:`,n6={name:QH,logger:"error"},vO="WALLETCONNECT_DEEPLINK_CHOICE",B_e="proposal",xO="Proposal expired",F_e="session",_0=Ue.SEVEN_DAYS,j_e="engine",Oi={wc_sessionPropose:{req:{ttl:Ue.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:Ue.FIVE_MINUTES,prompt:!1,tag:1101},reject:{ttl:Ue.FIVE_MINUTES,prompt:!1,tag:1120},autoReject:{ttl:Ue.FIVE_MINUTES,prompt:!1,tag:1121}},wc_sessionSettle:{req:{ttl:Ue.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:Ue.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:Ue.ONE_DAY,prompt:!1,tag:1104},res:{ttl:Ue.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:Ue.ONE_DAY,prompt:!1,tag:1106},res:{ttl:Ue.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:Ue.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:Ue.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:Ue.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:Ue.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:Ue.ONE_DAY,prompt:!1,tag:1112},res:{ttl:Ue.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:Ue.ONE_DAY,prompt:!1,tag:1114},res:{ttl:Ue.ONE_DAY,prompt:!1,tag:1115}},wc_sessionAuthenticate:{req:{ttl:Ue.ONE_HOUR,prompt:!0,tag:1116},res:{ttl:Ue.ONE_HOUR,prompt:!1,tag:1117},reject:{ttl:Ue.FIVE_MINUTES,prompt:!1,tag:1118},autoReject:{ttl:Ue.FIVE_MINUTES,prompt:!1,tag:1119}}},i6={min:Ue.FIVE_MINUTES,max:Ue.SEVEN_DAYS},Pc={idle:"IDLE",active:"ACTIVE"},z_e={eth_sendTransaction:{key:""},eth_sendRawTransaction:{key:""},wallet_sendCalls:{key:""},solana_signTransaction:{key:"signature"},solana_signAllTransactions:{key:"transactions"},solana_signAndSendTransaction:{key:"signature"},sui_signAndExecuteTransaction:{key:"digest"},sui_signTransaction:{key:""},hedera_signAndExecuteTransaction:{key:"transactionId"},hedera_executeTransaction:{key:"transactionId"},near_signTransaction:{key:""},near_signTransactions:{key:""},tron_signTransaction:{key:"txID"},xrpl_signTransaction:{key:""},xrpl_signTransactionFor:{key:""},algo_signTxn:{key:""},sendTransfer:{key:"txid"},stacks_stxTransfer:{key:"txId"},polkadot_signTransaction:{key:""},cosmos_signDirect:{key:""}},W_e="request",H_e=["wc_sessionPropose","wc_sessionRequest","wc_authRequest","wc_sessionAuthenticate"],q_e="wc",V_e="auth",K_e="authKeys",G_e="pairingTopics",Y_e="requests",$x=`${q_e}@${1.5}:${V_e}:`,Cv=`${$x}:PUB_KEY`;var Z_e=Object.defineProperty,J_e=Object.defineProperties,Q_e=Object.getOwnPropertyDescriptors,EO=Object.getOwnPropertySymbols,X_e=Object.prototype.hasOwnProperty,eAe=Object.prototype.propertyIsEnumerable,M_=(t,e,r)=>e in t?Z_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,An=(t,e)=>{for(var r in e||(e={}))X_e.call(e,r)&&M_(t,r,e[r]);if(EO)for(var r of EO(e))eAe.call(e,r)&&M_(t,r,e[r]);return t},no=(t,e)=>J_e(t,Q_e(e)),Ae=(t,e,r)=>M_(t,typeof e!="symbol"?e+"":e,r);class tAe extends pme{constructor(e){super(e),Ae(this,"name",j_e),Ae(this,"events",new bS),Ae(this,"initialized",!1),Ae(this,"requestQueue",{state:Pc.idle,queue:[]}),Ae(this,"sessionRequestQueue",{state:Pc.idle,queue:[]}),Ae(this,"requestQueueDelay",Ue.ONE_SECOND),Ae(this,"expectedPairingMethodMap",new Map),Ae(this,"recentlyDeletedMap",new Map),Ae(this,"recentlyDeletedLimit",200),Ae(this,"relayMessageCache",[]),Ae(this,"pendingSessions",new Map),Ae(this,"init",async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),await this.registerLinkModeListeners(),this.client.core.pairing.register({methods:Object.keys(Oi)}),this.initialized=!0,setTimeout(async()=>{await this.processPendingMessageEvents(),this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()},Ue.toMiliseconds(this.requestQueueDelay)))}),Ae(this,"connect",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();const n=no(An({},r),{requiredNamespaces:r.requiredNamespaces||{},optionalNamespaces:r.optionalNamespaces||{}});await this.isValidConnect(n),n.optionalNamespaces=G5e(n.requiredNamespaces,n.optionalNamespaces),n.requiredNamespaces={};const{pairingTopic:i,requiredNamespaces:s,optionalNamespaces:o,sessionProperties:a,scopedProperties:c,relays:l}=n;let u=i,f,d=!1;try{if(u){const z=this.client.core.pairing.pairings.get(u);this.client.logger.warn("connect() with existing pairing topic is deprecated and will be removed in the next major release."),d=z.active}}catch(z){throw this.client.logger.error(`connect() -> pairing.get(${u}) failed`),z}if(!u||!d){const{topic:z,uri:W}=await this.client.core.pairing.create();u=z,f=W}if(!u){const{message:z}=je("NO_MATCHING_KEY",`connect() pairing topic: ${u}`);throw new Error(z)}const p=await this.client.core.crypto.generateKeyPair(),h=Oi.wc_sessionPropose.req.ttl||Ue.FIVE_MINUTES,g=_i(h),y=no(An(An({requiredNamespaces:s,optionalNamespaces:o,relays:l??[{protocol:LH}],proposer:{publicKey:p,metadata:this.client.metadata},expiryTimestamp:g,pairingTopic:u},a&&{sessionProperties:a}),c&&{scopedProperties:c}),{id:$c()}),x=Qr("session_connect",y.id),{reject:C,resolve:_,done:L}=Ld(h,xO),P=({id:z})=>{z===y.id&&(this.client.events.off("proposal_expire",P),this.pendingSessions.delete(y.id),this.events.emit(x,{error:{message:xO,code:0}}))};return this.client.events.on("proposal_expire",P),this.events.once(x,({error:z,session:W})=>{this.client.events.off("proposal_expire",P),z?C(z):W&&_(W)}),await this.sendRequest({topic:u,method:"wc_sessionPropose",params:y,throwOnFailedPublish:!0,clientRpcId:y.id}),await this.setProposal(y.id,y),{uri:f,approval:L}}),Ae(this,"pair",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{return await this.client.core.pairing.pair(r)}catch(n){throw this.client.logger.error("pair() failed"),n}}),Ae(this,"approve",async r=>{var n,i,s;const o=this.client.core.eventClient.createEvent({properties:{topic:(n=r==null?void 0:r.id)==null?void 0:n.toString(),trace:[Ba.session_approve_started]}});try{this.isInitialized(),await this.confirmOnlineStateOrThrow()}catch(I){throw o.setError(Nd.no_internet_connection),I}try{await this.isValidProposalId(r==null?void 0:r.id)}catch(I){throw this.client.logger.error(`approve() -> proposal.get(${r==null?void 0:r.id}) failed`),o.setError(Nd.proposal_not_found),I}try{await this.isValidApprove(r)}catch(I){throw this.client.logger.error("approve() -> isValidApprove() failed"),o.setError(Nd.session_approve_namespace_validation_failure),I}const{id:a,relayProtocol:c,namespaces:l,sessionProperties:u,scopedProperties:f,sessionConfig:d}=r,p=this.client.proposal.get(a);this.client.core.eventClient.deleteEvent({eventId:o.eventId});const{pairingTopic:h,proposer:g,requiredNamespaces:y,optionalNamespaces:x}=p;let C=(i=this.client.core.eventClient)==null?void 0:i.getEvent({topic:h});C||(C=(s=this.client.core.eventClient)==null?void 0:s.createEvent({type:Ba.session_approve_started,properties:{topic:h,trace:[Ba.session_approve_started,Ba.session_namespaces_validation_success]}}));const _=await this.client.core.crypto.generateKeyPair(),L=g.publicKey,P=await this.client.core.crypto.generateSharedKey(_,L),z=An(An(An({relay:{protocol:c??"irn"},namespaces:l,controller:{publicKey:_,metadata:this.client.metadata}
2076,expiry:_i(_0)},u&&{sessionProperties:u}),f&&{scopedProperties:f}),d&&{sessionConfig:d}),W=Nn.relay;C.addTrace(Ba.subscribing_session_topic);try{await this.client.core.relayer.subscribe(P,{transportType:W})}catch(I){throw C.setError(Nd.subscribe_session_topic_failure),I}C.addTrace(Ba.subscribe_session_topic_success);const B=no(An({},z),{topic:P,requiredNamespaces:y,optionalNamespaces:x,pairingTopic:h,acknowledged:!1,self:z.controller,peer:{publicKey:g.publicKey,metadata:g.metadata},controller:_,transportType:Nn.relay});await this.client.session.set(P,B),C.addTrace(Ba.store_session);try{C.addTrace(Ba.publishing_session_settle),await this.sendRequest({topic:P,method:"wc_sessionSettle",params:z,throwOnFailedPublish:!0}).catch(I=>{throw C==null||C.setError(Nd.session_settle_publish_failure),I}),C.addTrace(Ba.session_settle_publish_success),C.addTrace(Ba.publishing_session_approve),await this.sendResult({id:a,topic:h,result:{relay:{protocol:c??"irn"},responderPublicKey:_},throwOnFailedPublish:!0}).catch(I=>{throw C==null||C.setError(Nd.session_approve_publish_failure),I}),C.addTrace(Ba.session_approve_publish_success)}catch(I){throw this.client.logger.error(I),this.client.session.delete(P,Xn("USER_DISCONNECTED")),await this.client.core.relayer.unsubscribe(P),I}return this.client.core.eventClient.deleteEvent({eventId:C.eventId}),await this.client.core.pairing.updateMetadata({topic:h,metadata:g.metadata}),await this.deleteProposal(a),await this.client.core.pairing.activate({topic:h}),await this.setExpiry(P,_i(_0)),{topic:P,acknowledged:()=>Promise.resolve(this.client.session.get(P))}}),Ae(this,"reject",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidReject(r)}catch(o){throw this.client.logger.error("reject() -> isValidReject() failed"),o}const{id:n,reason:i}=r;let s;try{s=this.client.proposal.get(n).pairingTopic}catch(o){throw this.client.logger.error(`reject() -> proposal.get(${n}) failed`),o}s&&await this.sendError({id:n,topic:s,error:i,rpcOpts:Oi.wc_sessionPropose.reject}),await this.deleteProposal(n)}),Ae(this,"update",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidUpdate(r)}catch(f){throw this.client.logger.error("update() -> isValidUpdate() failed"),f}const{topic:n,namespaces:i}=r,{done:s,resolve:o,reject:a}=Ld(),c=$c(),l=th().toString(),u=this.client.session.get(n).namespaces;return this.events.once(Qr("session_update",c),({error:f})=>{f?a(f):o()}),await this.client.session.update(n,{namespaces:i}),await this.sendRequest({topic:n,method:"wc_sessionUpdate",params:{namespaces:i},throwOnFailedPublish:!0,clientRpcId:c,relayRpcId:l}).catch(f=>{this.client.logger.error(f),this.client.session.update(n,{namespaces:u}),a(f)}),{acknowledged:s}}),Ae(this,"extend",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidExtend(r)}catch(c){throw this.client.logger.error("extend() -> isValidExtend() failed"),c}const{topic:n}=r,i=$c(),{done:s,resolve:o,reject:a}=Ld();return this.events.once(Qr("session_extend",i),({error:c})=>{c?a(c):o()}),await this.setExpiry(n,_i(_0)),this.sendRequest({topic:n,method:"wc_sessionExtend",params:{},clientRpcId:i,throwOnFailedPublish:!0}).catch(c=>{a(c)}),{acknowledged:s}}),Ae(this,"request",async r=>{this.isInitialized();try{await this.isValidRequest(r)}catch(y){throw this.client.logger.error("request() -> isValidRequest() failed"),y}const{chainId:n,request:i,topic:s,expiry:o=Oi.wc_sessionRequest.req.ttl}=r,a=this.client.session.get(s);(a==null?void 0:a.transportType)===Nn.relay&&await this.confirmOnlineStateOrThrow();const c=$c(),l=th().toString(),{done:u,resolve:f,reject:d}=Ld(o,"Request expired. Please try again.");this.events.once(Qr("session_request",c),({error:y,result:x})=>{y?d(y):f(x)});const p="wc_sessionRequest",h=this.getAppLinkIfEnabled(a.peer.metadata,a.transportType);if(h)return await this.sendRequest({clientRpcId:c,relayRpcId:l,topic:s,method:p,params:{request:no(An({},i),{expiryTimestamp:_i(o)}),chainId:n},expiry:o,throwOnFailedPublish:!0,appLink:h}).catch(y=>d(y)),this.client.events.emit("session_request_sent",{topic:s,request:i,
vendor: 11,868 bytes, line 2076
2076chainId:n,id:c}),await u();const g={request:no(An({},i),{expiryTimestamp:_i(o)}),chainId:n};return await Promise.all([new Promise(async y=>{await this.sendRequest({clientRpcId:c,relayRpcId:l,topic:s,method:p,params:g,expiry:o,throwOnFailedPublish:!0,tvf:this.getTVFParams(c,g)}).catch(x=>d(x)),this.client.events.emit("session_request_sent",{topic:s,request:i,chainId:n,id:c}),y()}),new Promise(async y=>{var x;if(!((x=a.sessionConfig)!=null&&x.disableDeepLink)){const C=await z3e(this.client.core.storage,vO);await B3e({id:c,topic:s,wcDeepLink:C})}y()}),u()]).then(y=>y[2])}),Ae(this,"respond",async r=>{this.isInitialized(),await this.isValidRespond(r);const{topic:n,response:i}=r,{id:s}=i,o=this.client.session.get(n);o.transportType===Nn.relay&&await this.confirmOnlineStateOrThrow();const a=this.getAppLinkIfEnabled(o.peer.metadata,o.transportType);Uc(i)?await this.sendResult({id:s,topic:n,result:i.result,throwOnFailedPublish:!0,appLink:a}):da(i)&&await this.sendError({id:s,topic:n,error:i.error,appLink:a}),this.cleanupAfterResponse(r)}),Ae(this,"ping",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidPing(r)}catch(i){throw this.client.logger.error("ping() -> isValidPing() failed"),i}const{topic:n}=r;if(this.client.session.keys.includes(n)){const i=$c(),s=th().toString(),{done:o,resolve:a,reject:c}=Ld();this.events.once(Qr("session_ping",i),({error:l})=>{l?c(l):a()}),await Promise.all([this.sendRequest({topic:n,method:"wc_sessionPing",params:{},throwOnFailedPublish:!0,clientRpcId:i,relayRpcId:s}),o()])}else this.client.core.pairing.pairings.keys.includes(n)&&(this.client.logger.warn("ping() on pairing topic is deprecated and will be removed in the next major release."),await this.client.core.pairing.ping({topic:n}))}),Ae(this,"emit",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow(),await this.isValidEmit(r);const{topic:n,event:i,chainId:s}=r,o=th().toString(),a=$c();await this.sendRequest({topic:n,method:"wc_sessionEvent",params:{event:i,chainId:s},throwOnFailedPublish:!0,relayRpcId:o,clientRpcId:a})}),Ae(this,"disconnect",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow(),await this.isValidDisconnect(r);const{topic:n}=r;if(this.client.session.keys.includes(n))await this.sendRequest({topic:n,method:"wc_sessionDelete",params:Xn("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession({topic:n,emitEvent:!1});else if(this.client.core.pairing.pairings.keys.includes(n))await this.client.core.pairing.disconnect({topic:n});else{const{message:i}=je("MISMATCHED_TOPIC",`Session or pairing topic not found: ${n}`);throw new Error(i)}}),Ae(this,"find",r=>(this.isInitialized(),this.client.session.getAll().filter(n=>J5e(n,r)))),Ae(this,"getPendingSessionRequests",()=>this.client.pendingRequest.getAll()),Ae(this,"authenticate",async(r,n)=>{var i;this.isInitialized(),this.isValidAuthenticate(r);const s=n&&this.client.core.linkModeSupportedApps.includes(n)&&((i=this.client.metadata.redirect)==null?void 0:i.linkMode),o=s?Nn.link_mode:Nn.relay;o===Nn.relay&&await this.confirmOnlineStateOrThrow();const{chains:a,statement:c="",uri:l,domain:u,nonce:f,type:d,exp:p,nbf:h,methods:g=[],expiry:y}=r,x=[...r.resources||[]],{topic:C,uri:_}=await this.client.core.pairing.create({methods:["wc_sessionAuthenticate"],transportType:o});this.client.logger.info({message:"Generated new pairing",pairing:{topic:C,uri:_}});const L=await this.client.core.crypto.generateKeyPair(),P=xv(L);if(await Promise.all([this.client.auth.authKeys.set(Cv,{responseTopic:P,publicKey:L}),this.client.auth.pairingTopics.set(P,{topic:P,pairingTopic:C})]),await this.client.core.relayer.subscribe(P,{transportType:o}),this.client.logger.info(`sending request to new pairing topic: ${C}`),g.length>0){const{namespace:M}=wv(a[0]);let H=nxe(M,"request",g);vv(x)&&(H=sxe(H,x.pop())),x.push(H)}const z=y&&y>Oi.wc_sessionAuthenticate.req.ttl?y:Oi.wc_sessionAuthenticate.req.ttl,W={authPayload:{type:d??"caip122",chains:a,statement:c,aud:l,domain:u,version:"1",nonce:f,iat:new Date().toISOString(),exp:p,nbf:h,resources:x},requester:{publicKey:L,metadata:this.client.metadata},expiryTimestamp:_i(z)},B={eip155:{chains:a,methods:[...new Set(["personal_sign",...g])],events:["chainChanged","accountsChanged"]}},I={requiredNamespaces:{},optionalNamespaces:B,relays:[{protocol:"irn"}],pairingTopic:C,proposer:{publicKey:L,metadata:this.client.metadata},expiryTimestamp:_i(Oi.wc_sessionPropose.req.ttl),id:$c()},{done:j,resolve:D,reject:O}=Ld(z,"Request expired"),T=$c(),m=Qr("session_connect",I.id),b=Qr("session_request",T),E=async({error:M,session:H})=>{this.events.off(b,k),M?O(M):H&&D({session:H})},k=async M=>{var H,N,v;if(await this.deletePendingAuthRequest(T,{message:"fulfilled",code:0}),M.error){const Q=Xn("WC_METHOD_UNSUPPORTED","wc_sessionAuthenticate");return M.error.code===Q.code?void 0:(this.events.off(m,E),O(M.error.message))}await this.deleteProposal(I.id),this.events.off(m,E);const{cacaos:U,responder:G}=M.result,S=[],J=[];for(const Q of U){await fR({cacao:Q,projectId:this.client.core.projectId})||(this.client.logger.error(Q,"Signature verification failed"),O(Xn("SESSION_SETTLEMENT_FAILED","Signature verification failed")));const{p:ee}=Q,re=vv(ee.resources),ie=[p_(ee.iss)],me=G3(ee.iss);if(re){const le=dR(re),ye=hR(re);S.push(...le),ie.push(...ye)}for(const le of ie)J.push(`${le}:${me}`)}const ne=await this.client.core.crypto.generateSharedKey(L,G.publicKey);let Z;S.length>0&&(Z={topic:ne,acknowledged:!0,self:{publicKey:L,metadata:this.client.metadata},peer:G,controller:G.publicKey,expiry:_i(_0),requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:C,namespaces:$R([...new Set(S)],[...new Set(J)]),transportType:o},await this.client.core.relayer.subscribe(ne,{transportType:o}),await this.client.session.set(ne,Z),C&&await this.client.core.pairing.updateMetadata({topic:C,metadata:G.metadata}),Z=this.client.session.get(ne)),(H=this.client.metadata.redirect)!=null&&H.linkMode&&(N=G.metadata.redirect)!=null&&N.linkMode&&(v=G.metadata.redirect)!=null&&v.universal&&n&&(this.client.core.addLinkModeSupportedApp(G.metadata.redirect.universal),this.client.session.update(ne,{transportType:Nn.link_mode})),D({auths:U,session:Z})};this.events.once(m,E),this.events.once(b,k);let R;try{if(s){const M=If("wc_sessionAuthenticate",W,T);this.client.core.history.set(C,M);const H=await this.client.core.crypto.encode("",M,{type:hb,encoding:wf});R=_w(n,C,H)}else await Promise.all([this.sendRequest({topic:C,method:"wc_sessionAuthenticate",params:W,expiry:r.expiry,throwOnFailedPublish:!0,clientRpcId:T}),this.sendRequest({topic:C,method:"wc_sessionPropose",params:I,expiry:Oi.wc_sessionPropose.req.ttl,throwOnFailedPublish:!0,clientRpcId:I.id})])}catch(M){throw this.events.off(m,E),this.events.off(b,k),M}return await this.setProposal(I.id,I),await this.setAuthRequest(T,{request:no(An({},W),{verifyContext:{}}),pairingTopic:C,transportType:o}),{uri:R??_,response:j}}),Ae(this,"approveSessionAuthenticate",async r=>{const{id:n,auths:i}=r,s=this.client.core.eventClient.createEvent({properties:{topic:n.toString(),trace:[Id.authenticated_session_approve_started]}});try{this.isInitialized()}catch(y){throw s.setError(A1.no_internet_connection),y}const o=this.getPendingAuthRequest(n);if(!o)throw s.setError(A1.authenticated_session_pending_request_not_found),new Error(`Could not find pending auth request with id ${n}`);const a=o.transportType||Nn.relay;a===Nn.relay&&await this.confirmOnlineStateOrThrow();const c=o.requester.publicKey,l=await this.client.core.crypto.generateKeyPair(),u=xv(c),f={type:au,receiverPublicKey:c,senderPublicKey:l},d=[],p=[];for(const y of i){if(!await fR({cacao:y,projectId:this.client.core.projectId})){s.setError(A1.invalid_cacao);const P=Xn("SESSION_SETTLEMENT_FAILED","Signature verification failed");throw await this.sendError({id:n,topic:u,error:P,encodeOpts:f}),new Error(P.message)}s.addTrace(Id.cacaos_verified);const{p:x}=y,C=vv(x.resources),_=[p_(x.iss)],L=G3(x.iss);if(C){const P=dR(C),z=hR(C);d.push(...P),_.push(...z)}for(const P of _)p.push(`${P}:${L}`)}const h=await this.client.core.crypto.generateSharedKey(l,c);s.addTrace(Id.create_authenticated_session_topic);let g;if((d==null?void 0:d.length)>0){g={topic:h,acknowledged:!0,self:{publicKey:l,metadata:this.client.metadata},peer:{publicKey:c,metadata:o.requester.metadata},controller:c,expiry:_i(_0),authentication:i,requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:o.pairingTopic,namespaces:$R([...new Set(d)],[...new Set(p)]),transportType:a},s.addTrace(Id.subscribing_authenticated_session_topic);try{await this.client.core.relayer.subscribe(h,{transportType:a})}catch(y){throw s.setError(A1.subscribe_authenticated_session_topic_failure),y}s.addTrace(Id.subscribe_authenticated_session_topic_success),await this.client.session.set(h,g),s.addTrace(Id.store_authenticated_session),await this.client.core.pairing.updateMetadata({topic:o.pairingTopic,metadata:o.requester.metadata})}s.addTrace(Id.publishing_authenticated_session_approve);try{await this.sendResult({topic:u,id:n,result:{cacaos:i,responder:{publicKey:l,metadata:this.client.metadata}},encodeOpts:f,throwOnFailedPublish:!0,appLink:this.getAppLinkIfEnabled(o.requester.metadata,a)})}catch(y){throw s.setError(A1.authenticated_session_approve_publish_failure),y}return await this.client.auth.requests.delete(n,{message:"fulfilled",code:0}),await this.client.core.pairing.activate({topic:o.pairingTopic}),this.client.core.eventClient.deleteEvent({eventId:s.eventId}),{session:g}}),Ae(this,"rejectSessionAuthenticate",async r=>{this.isInitialized();const{id:n,reason:i}=r,s=this.getPendingAuthRequest(n);if(!s)throw new Error(`Could not find pending auth request with id ${n}`);s.transportType===Nn.relay&&await this.confirmOnlineStateOrThrow();const o=s.requester.publicKey,a=await this.client.core.crypto.generateKeyPair(),c=xv(o),l={type:au,receiverPublicKey:o,senderPublicKey:a};await this.sendError({id:n,topic:c,error:i,encodeOpts:l,rpcOpts:Oi.wc_sessionAuthenticate.reject,appLink:this.getAppLinkIfEnabled(s.requester.metadata,s.transportType)}),await this.client.auth.requests.delete(n,{message:"rejected",code:0}),await this.deleteProposal(n)}),Ae(this,"formatAuthMessage",r=>{this.isInitialized();const{request:n,iss:i}=r;return GW(n,i)}),Ae(this,"processRelayMessageCache",()=>{setTimeout(async()=>{if(this.relayMessageCache.length!==0)for(;this.relayMessageCache.length>0;)try{const r=this.relayMessageCache.shift();r&&await this.onRelayMessage(r)}catch(r){this.client.logger.error(r)}},50)}),Ae(this,"cleanupDuplicatePairings",async r=>{if(r.pairingTopic)try{const n=this.client.core.pairing.pairings.get(r.pairingTopic),i=this.client.core.pairing.pairings.getAll().filter(s=>{var o,a;return((o=s.peerMetadata)==null?void 0:o.url)&&((a=s.peerMetadata)==null?void 0:a.url)===r.peer.metadata.url&&s.topic&&s.topic!==n.topic});if(i.length===0)return;this.client.logger.info(`Cleaning up ${i.length} duplicate pairing(s)`),await Promise.all(i.map(s=>this.client.core.pairing.disconnect({topic:s.topic}))),this.client.logger.info("Duplicate pairings clean up finished")}catch(n){this.client.logger.error(n)}}),Ae(this,"deleteSession",async r=>{var n;const{topic:i,expirerHasDeleted:s=!1,emitEvent:o=!0,id:a=0}=r,{self:c}=this.client.session.get(i);await this.client.core.relayer.unsubscribe(i),await this.client.session.delete(i,Xn("USER_DISCONNECTED")),this.addToRecentlyDeleted(i,"session"),this.client.core.crypto.keychain.has(c.publicKey)&&await this.client.core.crypto.deleteKeyPair(c.publicKey),this.client.core.crypto.keychain.has(i)&&await this.client.core.crypto.deleteSymKey(i),s||this.client.core.expirer.del(i),this.client.core.storage.removeItem(vO).catch(l=>this.client.logger.warn(l)),this.getPendingSessionRequests().forEac
2076h(l=>{l.topic===i&&this.deletePendingSessionRequest(l.id,Xn("USER_DISCONNECTED"))}),i===((n=this.sessionRequestQueue.queue[0])==null?void 0:n.topic)&&(this.sessionRequestQueue.state=Pc.idle),o&&this.client.events.emit("session_delete",{id:a,topic:i})}),Ae(this,"deleteProposal",async(r,n)=>{if(n)try{const i=this.client.proposal.get(r),s=this.client.core.eventClient.getEvent({topic:i.pairingTopic});s==null||s.setError(Nd.proposal_expired)}catch{}await Promise.all([this.client.proposal.delete(r,Xn("USER_DISCONNECTED")),n?Promise.resolve():this.client.core.expirer.del(r)]),this.addToRecentlyDeleted(r,"proposal")}),Ae(this,"deletePendingSessionRequest",async(r,n,i=!1)=>{await Promise.all([this.client.pendingRequest.delete(r,n),i?Promise.resolve():this.client.core.expirer.del(r)]),this.addToRecentlyDeleted(r,"request"),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter(s=>s.id!==r),i&&(this.sessionRequestQueue.state=Pc.idle,this.client.events.emit("session_request_expire",{id:r}))}),Ae(this,"deletePendingAuthRequest",async(r,n,i=!1)=>{await Promise.all([this.client.auth.requests.delete(r,n),i?Promise.resolve():this.client.core.expirer.del(r)])}),Ae(this,"setExpiry",async(r,n)=>{this.client.session.keys.includes(r)&&(this.client.core.expirer.set(r,n),await this.client.session.update(r,{expiry:n}))}),Ae(this,"setProposal",async(r,n)=>{this.client.core.expirer.set(r,_i(Oi.wc_sessionPropose.req.ttl)),await this.client.proposal.set(r,n)}),Ae(this,"setAuthRequest",async(r,n)=>{const{request:i,pairingTopic:s,transportType:o=Nn.relay}=n;this.client.core.expirer.set(r,i.expiryTimestamp),await this.client.auth.requests.set(r,{authPayload:i.authPayload,requester:i.requester,expiryTimestamp:i.expiryTimestamp,id:r,pairingTopic:s,verifyContext:i.verifyContext,transportType:o})}),Ae(this,"setPendingSessionRequest",async r=>{const{id:n,topic:i,params:s,verifyContext:o}=r,a=s.request.expiryTimestamp||_i(Oi.wc_sessionRequest.req.ttl);this.client.core.expirer.set(n,a),await this.client.pendingRequest.set(n,{id:n,topic:i,params:s,verifyContext:o})}),Ae(this,"sendRequest",async r=>{const{topic:n,method:i,params:s,expiry:o,relayRpcId:a,clientRpcId:c,throwOnFailedPublish:l,appLink:u,tvf:f}=r,d=If(i,s,c);let p;const h=!!u;try{const x=h?wf:rc;p=await this.client.core.crypto.encode(n,d,{encoding:x})}catch(x){throw await this.cleanup(),this.client.logger.error(`sendRequest() -> core.crypto.encode() for topic ${n} failed`),x}let g;if(H_e.includes(i)){const x=zc(JSON.stringify(d)),C=zc(p);g=await this.client.core.verify.register({id:C,decryptedId:x})}const y=Oi[i].req;if(y.attestation=g,o&&(y.ttl=o),a&&(y.id=a),this.client.core.history.set(n,d),h){const x=_w(u,n,p);await global.Linking.openURL(x,this.client.name)}else{const x=Oi[i].req;o&&(x.ttl=o),a&&(x.id=a),x.tvf=no(An({},f),{correlationId:d.id}),l?(x.internal=no(An({},x.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(n,p,x)):this.client.core.relayer.publish(n,p,x).catch(C=>this.client.logger.error(C))}return d.id}),Ae(this,"sendResult",async r=>{const{id:n,topic:i,result:s,throwOnFailedPublish:o,encodeOpts:a,appLink:c}=r,l=Ox(n,s);let u;const f=c&&typeof(global==null?void 0:global.Linking)<"u";try{const h=f?wf:rc;u=await this.client.core.crypto.encode(i,l,no(An({},a||{}),{encoding:h}))}catch(h){throw await this.cleanup(),this.client.logger.error(`sendResult() -> core.crypto.encode() for topic ${i} failed`),h}let d,p;try{d=await this.client.core.history.get(i,n);const h=d.request;try{p=this.getTVFParams(n,h.params,s)}catch(g){this.client.logger.warn(`sendResult() -> getTVFParams() failed: ${g==null?void 0:g.message}`)}}catch(h){throw this.client.logger.error(`sendResult() -> history.get(${i}, ${n}) failed`),h}if(f){const h=_w(c,i,u);await global.Linking.openURL(h,this.client.name)}else{const h=d.request.method,g=Oi[h].res;g.tvf=no(An({},p),{correlationId:n}),o?(g.internal=no(An({},g.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(i,u,g)):this.client.core.relayer.publish(i,u,g).catch(y=>this.client.logger.error(y))}await this.client.core.history.resolve(l)}),Ae(this,"sendError",async r=>{const{id:n,topic:i,error:s,encodeOpts:o,rpcOpts:a,appLink:c}=r,l=Dx(n,s);let u;const f=c&&typeof(global==null?void 0:global.Linking)<"u";try{const p=f?wf:rc;u=await this.client.core.crypto.encode(i,l,no(An({},o||{}),{encoding:p}))}catch(p){throw await this.cleanup(),this.client.logger.error(`sendError() -> core.crypto.encode() for topic ${i} failed`),p}let d;try{d=await this.client.core.history.get(i,n)}catch(p){throw this.client.logger.error(`sendError() -> history.get(${i}, ${n}) failed`),p}if(f){const p=_w(c,i,u);await global.Linking.openURL(p,this.client.name)}else{const p=d.request.method,h=a||Oi[p].res;this.client.core.relayer.publish(i,u,h)}await this.client.core.history.resolve(l)}),Ae(this,"cleanup",async()=>{const r=[],n=[];
vendor: 13,992 bytes, line 2076
2076this.client.session.getAll().forEach(i=>{let s=!1;cf(i.expiry)&&(s=!0),this.client.core.crypto.keychain.has(i.topic)||(s=!0),s&&r.push(i.topic)}),this.client.proposal.getAll().forEach(i=>{cf(i.expiryTimestamp)&&n.push(i.id)}),await Promise.all([...r.map(i=>this.deleteSession({topic:i})),...n.map(i=>this.deleteProposal(i))])}),Ae(this,"onProviderMessageEvent",async r=>{!this.initialized||this.relayMessageCache.length>0?this.relayMessageCache.push(r):await this.onRelayMessage(r)}),Ae(this,"onRelayEventRequest",async r=>{this.requestQueue.queue.push(r),await this.processRequestsQueue()}),Ae(this,"processRequestsQueue",async()=>{if(this.requestQueue.state===Pc.active){this.client.logger.info("Request queue already active, skipping...");return}for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=Pc.active;const r=this.requestQueue.queue.shift();if(r)try{await this.processRequest(r)}catch(n){this.client.logger.warn(n)}}this.requestQueue.state=Pc.idle}),Ae(this,"processRequest",async r=>{const{topic:n,payload:i,attestation:s,transportType:o,encryptedId:a}=r,c=i.method;if(!this.shouldIgnorePairingRequest({topic:n,requestMethod:c}))switch(c){case"wc_sessionPropose":return await this.onSessionProposeRequest({topic:n,payload:i,attestation:s,encryptedId:a});case"wc_sessionSettle":return await this.onSessionSettleRequest(n,i);case"wc_sessionUpdate":return await this.onSessionUpdateRequest(n,i);case"wc_sessionExtend":return await this.onSessionExtendRequest(n,i);case"wc_sessionPing":return await this.onSessionPingRequest(n,i);case"wc_sessionDelete":return await this.onSessionDeleteRequest(n,i);case"wc_sessionRequest":return await this.onSessionRequest({topic:n,payload:i,attestation:s,encryptedId:a,transportType:o});case"wc_sessionEvent":return await this.onSessionEventRequest(n,i);case"wc_sessionAuthenticate":return await this.onSessionAuthenticateRequest({topic:n,payload:i,attestation:s,encryptedId:a,transportType:o});default:return this.client.logger.info(`Unsupported request method ${c}`)}}),Ae(this,"onRelayEventResponse",async r=>{const{topic:n,payload:i,transportType:s}=r,o=(await this.client.core.history.get(n,i.id)).request.method;switch(o){case"wc_sessionPropose":return this.onSessionProposeResponse(n,i,s);case"wc_sessionSettle":return this.onSessionSettleResponse(n,i);case"wc_sessionUpdate":return this.onSessionUpdateResponse(n,i);case"wc_sessionExtend":return this.onSessionExtendResponse(n,i);case"wc_sessionPing":return this.onSessionPingResponse(n,i);case"wc_sessionRequest":return this.onSessionRequestResponse(n,i);case"wc_sessionAuthenticate":return this.onSessionAuthenticateResponse(n,i);default:return this.client.logger.info(`Unsupported response method ${o}`)}}),Ae(this,"onRelayEventUnknownPayload",r=>{const{topic:n}=r,{message:i}=je("MISSING_OR_INVALID",`Decoded payload on topic ${n} is not identifiable as a JSON-RPC request or a response.`);throw new Error(i)}),Ae(this,"shouldIgnorePairingRequest",r=>{const{topic:n,requestMethod:i}=r,s=this.expectedPairingMethodMap.get(n);return!s||s.includes(i)?!1:!!(s.includes("wc_sessionAuthenticate")&&this.client.events.listenerCount("session_authenticate")>0)}),Ae(this,"onSessionProposeRequest",async r=>{const{topic:n,payload:i,attestation:s,encryptedId:o}=r,{params:a,id:c}=i;try{const l=this.client.core.eventClient.getEvent({topic:n});this.client.events.listenerCount("session_proposal")===0&&(console.warn("No listener for session_proposal event"),l==null||l.setError(zl.proposal_listener_not_found)),this.isValidConnect(An({},i.params));const u=a.expiryTimestamp||_i(Oi.wc_sessionPropose.req.ttl),f=An({id:c,pairingTopic:n,expiryTimestamp:u,attestation:s,encryptedId:o},a);await this.setProposal(c,f);const d=await this.getVerifyContext({attestationId:s,hash:zc(JSON.stringify(i)),encryptedId:o,metadata:f.proposer.metadata});l==null||l.addTrace(Dc.emit_session_proposal),this.client.events.emit("session_proposal",{id:c,params:f,verifyContext:d})}catch(l){await this.sendError({id:c,topic:n,error:l,rpcOpts:Oi.wc_sessionPropose.autoReject}),this.client.logger.error(l)}}),Ae(this,"onSessionProposeResponse",async(r,n,i)=>{const{id:s}=n;if(Uc(n)){const{result:o}=n;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:o});const a=this.client.proposal.get(s);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:a});const c=a.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:c});const l=o.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:l});const u=await this.client.core.crypto.generateSharedKey(c,l);this.pendingSessions.set(s,{sessionTopic:u,pairingTopic:r,proposalId:s,publicKey:c});const f=await this.client.core.relayer.subscribe(u,{transportType:i});this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:f}),await this.client.core.pairing.activate({topic:r})}else if(da(n)){await this.deleteProposal(s);const o=Qr("session_connect",s);if(this.events.listenerCount(o)===0)throw new Error(`emitting ${o} without any listeners, 954`);this.events.emit(o,{error:n.error})}}),Ae(this,"onSessionSettleRequest",async(r,n)=>{const{id:i,params:s}=n;try{this.isValidSessionSettleRequest(s);const{relay:o,controller:a,expiry:c,namespaces:l,sessionProperties:u,scopedProperties:f,sessionConfig:d}=n.params,p=[...this.pendingSessions.values()].find(y=>y.sessionTopic===r);if(!p)return this.client.logger.error(`Pending session not found for topic ${r}`);const h=this.client.proposal.get(p.proposalId),g=no(An(An(An({topic:r,relay:o,expiry:c,namespaces:l,acknowledged:!0,pairingTopic:p.pairingTopic,requiredNamespaces:h.requiredNamespaces,optionalNamespaces:h.optionalNamespaces,controller:a.publicKey,self:{publicKey:p.publicKey,metadata:this.client.metadata},peer:{publicKey:a.publicKey,metadata:a.metadata}},u&&{sessionProperties:u}),f&&{scopedProperties:f}),d&&{sessionConfig:d}),{transportType:Nn.relay});await this.client.session.set(g.topic,g),await this.setExpiry(g.topic,g.expiry),await this.client.core.pairing.updateMetadata({topic:p.pairingTopic,metadata:g.peer.metadata}),this.client.events.emit("session_connect",{session:g}),this.events.emit(Qr("session_connect",p.proposalId),{session:g}),this.pendingSessions.delete(p.proposalId),this.deleteProposal(p.proposalId,!1),this.cleanupDuplicatePairings(g),await this.sendResult({id:n.id,topic:r,result:!0})}catch(o){await this.sendError({id:i,topic:r,error:o}),this.client.logger.error(o)}}),Ae(this,"onSessionSettleResponse",async(r,n)=>{const{id:i}=n;Uc(n)?(await this.client.session.update(r,{acknowledged:!0}),this.events.emit(Qr("session_approve",i),{})):da(n)&&(await this.client.session.delete(r,Xn("USER_DISCONNECTED")),this.events.emit(Qr("session_approve",i),{error:n.error}))}),Ae(this,"onSessionUpdateRequest",async(r,n)=>{const{params:i,id:s}=n;try{const o=`${r}_session_update`,a=C1.get(o);if(a&&this.isRequestOutOfSync(a,s)){this.client.logger.warn(`Discarding out of sync request - ${s}`),this.sendError({id:s,topic:r,error:Xn("INVALID_UPDATE_REQUEST")});return}this.isValidUpdate(An({topic:r},i));try{C1.set(o,s),await this.client.session.update(r,{namespaces:i.namespaces}),await this.sendResult({id:s,topic:r,result:!0})}catch(c){throw C1.delete(o),c}this.client.events.emit("session_update",{id:s,topic:r,params:i})}catch(o){await this.sendError({id:s,topic:r,error:o}),this.client.logger.error(o)}}),Ae(this,"isRequestOutOfSync",(r,n)=>n.toString().slice(0,-3)<r.toString().slice(0,-3)),Ae(this,"onSessionUpdateResponse",(r,n)=>{const{id:i}=n,s=Qr("session_update",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);Uc(n)?this.events.emit(Qr("session_update",i),{}):da(n)&&this.events.emit(Qr("session_update",i),{error:n.error})}),Ae(this,"onSessionExtendRequest",async(r,n)=>{const{id:i}=n;try{this.isValidExtend({topic:r}),await this.setExpiry(r,_i(_0)),await this.sendResult({id:i,topic:r,result:!0}),this.client.events.emit("session_extend",{id:i,topic:r})}catch(s){await this.sendError({id:i,topic:r,error:s}),this.client.logger.error(s)}}),Ae(this,"onSessionExtendResponse",(r,n)=>{const{id:i}=n,s=Qr("session_extend",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);Uc(n)?this.events.emit(Qr("session_extend",i),{}):da(n)&&this.events.emit(Qr("session_extend",i),{error:n.error})}),Ae(this,"onSessionPingRequest",async(r,n)=>{const{id:i}=n;try{this.isValidPing({topic:r}),await this.sendResult({id:i,topic:r,result:!0,throwOnFailedPublish:!0}),this.client.events.emit("session_ping",{id:i,topic:r})}catch(s){await this.sendError({id:i,topic:r,error:s}),this.client.logger.error(s)}}),Ae(this,"onSessionPingResponse",(r,n)=>{const{id:i}=n,s=Qr("session_ping",i);setTimeout(()=>{if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners 2176`);Uc(n)?this.events.emit(Qr("session_ping",i),{}):da(n)&&this.events.emit(Qr("session_ping",i),{error:n.error})},500)}),Ae(this,"onSessionDeleteRequest",async(r,n)=>{const{id:i}=n;try{this.isValidDisconnect({topic:r,reason:n.params}),Promise.all([new Promise(s=>{this.client.core.relayer.once(Mi.publish,async()=>{s(await this.deleteSession({topic:r,id:i}))})}),this.sendResult({id:i,topic:r,result:!0}),this.cleanupPendingSentRequestsForTopic({topic:r,error:Xn("USER_DISCONNECTED")})]).catch(s=>this.client.logger.error(s))}catch(s){this.client.logger.error(s)}}),Ae(this,"onSessionRequest",async r=>{var n,i,s;const{topic:o,payload:a,attestation:c,encryptedId:l,transportType:u}=r,{id:f,params:d}=a;try{await this.isValidRequest(An({topic:o},d));const p=this.client.session.get(o),h=await this.getVerifyContext({attestationId:c,hash:zc(JSON.stringify(If("wc_sessionRequest",d,f))),encryptedId:l,metadata:p.peer.metadata,transportType:u}),g={id:f,topic:o,params:d,verifyContext:h};await this.setPendingSessionRequest(g),u===Nn.link_mode&&(n=p.peer.metadata.redirect)!=null&&n.universal&&this.client.core.addLinkModeSupportedApp((i=p.peer.metadata.redirect)==null?void 0:i.universal),(s=this.client.signConfig)!=null&&s.disableRequestQueue?this.emitSessionRequest(g):(this.addSessionRequestToSessionRequestQueue(g),this.processSessionRequestQueue())}catch(p){await this.sendError({id:f,topic:o,error:p}),this.client.logger.error(p)}}),Ae(this,"onSessionRequestResponse",(r,n)=>{const{id:i}=n,s=Qr("session_request",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);Uc(n)?this.events.emit(Qr("session_request",i),{result:n.result}):da(n)&&this.events.emit(Qr("session_request",i),{error:n.error})}),Ae(this,"onSessionEventRequest",async(r,n)=>{const{id:i,params:s}=n;try{const o=`${r}_session_event_${s.event.name}`,a=C1.get(o);if(a&&this.isRequestOutOfSync(a,i)){this.client.logger.info(`Discarding out of sync request - ${i}`);return}this.isValidEmit(An({topic:r},s)),this.client.events.emit("session_event",{id:i,topic:r,params:s}),C1.set(o,i)}catch(o){await this.sendError({id:i,topic:r,error:o}),this.client.logger.error(o)}}),Ae(this,"onSessionAuthenticateResponse",(r,n)=>{const{id:i}=n;this.client.logger.trace({type:"method",method:"onSessionAuthenticateResponse",topic:r,payload:n}),Uc(n)?this.events.emit(Qr("session_request",i),{result:n.result}):da(n)&&this.events.emit(Qr("session_request",i),{error:n.error})}),Ae(this,"onSessionAuthenticateRequest",async r=>{var n;const{topic:i,payload:s,attestation:o,encryptedId:a,transportType:c}=r;try{const{requester:l,authPayload:u,expiryTimestamp:f}=s.params,d=await this.getVerifyContext({attestationId:o,hash:zc(JSON.stringify(s)),encryptedId:a,metadata:l.metadata,transportType:c}),p={requester:l,pairingTopic:i,id:s.id,authPayload:u,verifyContext:d,expiryTimestamp:f};await this.setAuthRequest(s.id,{request:p,pairingTopic:i,transportType:c}),c===Nn.link_mode&&(n=l.metadata.redirect)!=null&&n.universal&&this.client.core.addLinkModeSupportedApp(l.metadata.redirect.universal),this.client.events.emit("session_authenticate",{topic:i,params:s.params,id:s.id,verifyContext:d})}catch(l){this.client.logger.error(l);const u=s.params.requester.publicKey,f=await this.client.core.crypto.generateKeyPair(),d=this.getAppLinkIfEnabled(s.params.requester.metadata,c),p={type:au,receiverPublicKey:u,senderPublicKey:f};await this.sendError({id:s.id,topic:i,error:l,encodeOpts:p,rpcOpts:Oi.wc_sessionAuthenticate.autoReject,appLink:d})}}),Ae(this,"addSessionRequestToSessionRequestQueue",r=>{this.sessionRequestQueue.queue.push(r)}),Ae(this,"cleanupAfterResponse",r=>{this.deletePendingSessionRequest(r.response.id,{message:"fulfilled",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=Pc.idle,this.processSessionRequestQueue()},Ue.toMiliseconds(this.requestQueueDelay))}),Ae(this,"cleanupPendingSentRequestsForTopic",({topic:r,error:n})=>{const i=this.client.core.history.pending;i.length>0&&i.filter(s=>s.topic===r&&s.request.method==="wc_sessionRequest").forEach(s=>{const o=s.request.id,a=Qr("session_request",o);if(this.events.listenerCount(a)===0)throw new Error(`emitting ${a} without any listeners`);this.events.emit(Qr("session_request",s.request.id),{error:n})})}),Ae(this,"processSessionRequestQueue",()=>{if(this.sessionRequestQueue.state===Pc.active){this.client.logger.info("session request queue is already active.");return}const r=this.sessionRequestQueue.queue[0];if(!r){this.client.logger.info("session request queue is empty.");return}try{this.sessionRequestQueue.state=Pc.active,this.emitSessionRequest(r)}catch(n){this.client.logger.error(n)}}),Ae(this,"emitSessionRequest",r=>{this.client.events.emit("session_request",r)}),Ae(this,"onPairingCreated",r=>{if(r.methods&&this.expectedPairingMethodMap.set(r.topic,r.methods),r.active)return;const n=this.client.proposal.getAll().find(i=>i.pairingTopic===r.topic);
2076n&&this.onSessionProposeRequest({topic:r.topic,payload:If("wc_sessionPropose",no(An({},n),{requiredNamespaces:n.requiredNamespaces,optionalNamespaces:n.optionalNamespaces,relays:n.relays,proposer:n.proposer,sessionProperties:n.sessionProperties,scopedProperties:n.scopedProperties}),n.id),attestation:n.attestation,encryptedId:n.encryptedId})}),Ae(this,"isValidConnect",async r=>{if(!ao(r)){const{message:l}=je("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(r)}`);throw new Error(l)}const{pairingTopic:n,requiredNamespaces:i,optionalNamespaces:s,sessionProperties:o,scopedProperties:a,relays:c}=r;if(es(n)||await this.isValidPairingTopic(n),!lEe(c)){const{message:l}=je("MISSING_OR_INVALID",`connect() relays: ${c}`);throw new Error(l)}if(!es(i)&&sy(i)!==0){const l="requiredNamespaces are deprecated and are automatically assigned to optionalNamespaces";["fatal","error","silent"].includes(this.client.logger.level)?console.warn(l):this.client.logger.warn(l),this.validateNamespaces(i,"requiredNamespaces")}if(!es(s)&&sy(s)!==0&&this.validateNamespaces(s,"optionalNamespaces"),es(o)||this.validateSessionProps(o,"sessionProperties"),!es(a)){this.validateSessionProps(a,"scopedProperties");const l=Object.keys(i||{}).concat(Object.keys(s||{}));if(!Object.keys(a).every(u=>l.includes(u)))throw new Error(`Scoped properties must be a subset of required/optional namespaces, received: ${JSON.stringify(a)}, required/optional namespaces: ${JSON.stringify(l)}`)}}),Ae(this,"validateNamespaces",(r,n)=>{const i=cEe(r,"connect()",n);if(i)throw new Error(i.message)}),Ae(this,"isValidApprove",async r=>{if(!ao(r))throw new Error(je("MISSING_OR_INVALID",`approve() params: ${r}`).message);const{id:n,namespaces:i,relayProtocol:s,sessionProperties:o,scopedProperties:a}=r;this.checkRecentlyDeleted(n),await this.isValidProposalId(n);const c=this.client.proposal.get(n),l=JE(i,"approve()");if(l)throw new Error(l.message);const u=FR(c.requiredNamespaces,i,"approve()");if(u)throw new Error(u.message);if(!mi(s,!0)){const{message:f}=je("MISSING_OR_INVALID",`approve() relayProtocol: ${s}`);throw new Error(f)}if(es(o)||this.validateSessionProps(o,"sessionProperties"),!es(a)){this.validateSessionProps(a,"scopedProperties");const f=new Set(Object.keys(i));if(!Object.keys(a).every(d=>f.has(d)))throw new Error(`Scoped properties must be a subset of approved namespaces, received: ${JSON.stringify(a)}, approved namespaces: ${Array.from(f).join(", ")}`)}}),Ae(this,"isValidReject",async r=>{if(!ao(r)){const{message:s}=je("MISSING_OR_INVALID",`reject() params: ${r}`);throw new Error(s)}const{id:n,reason:i}=r;if(this.checkRecentlyDeleted(n),await this.isValidProposalId(n),!fEe(i)){const{message:s}=je("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(i)}`);throw new Error(s)}}),Ae(this,"isValidSessionSettleRequest",r=>{if(!ao(r)){const{message:l}=je("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${r}`);throw new Error(l)}const{relay:n,controller:i,namespaces:s,expiry:o}=r;if(!SH(n)){const{message:l}=je("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(l)}const a=rEe(i,"onSessionSettleRequest()");if(a)throw new Error(a.message);const c=JE(s,"onSessionSettleRequest()");if(c)throw new Error(c.message);if(cf(o)){const{message:l}=je("EXPIRED","onSessionSettleRequest()");throw new Error(l)}}),Ae(this,"isValidUpdate",async r=>{if(!ao(r)){const{message:c}=je("MISSING_OR_INVALID",`update() params: ${r}`);throw new Error(c)}const{topic:n,namespaces:i}=r;this.checkRecentlyDeleted(n),await this.isValidSessionTopic(n);const s=this.client.session.get(n),o=JE(i,"update()");if(o)throw new Error(o.message);const a=FR(s.requiredNamespaces,i,"update()");if(a)throw new Error(a.message)}),Ae(this,"isValidExtend",async r=>{if(!ao(r)){const{message:i}=je("MISSING_OR_INVALID",`extend() params: ${r}`);throw new Error(i)}const{topic:n}=r;this.checkRecentlyDeleted(n),await this.isValidSessionTopic(n)}),Ae(this,"isValidRequest",async r=>{if(!ao(r)){const{message:c}=je("MISSING_OR_INVALID",`request() params: ${r}`);throw new Error(c)}
vendor: 12,402 bytes, line 2076
2076const{topic:n,request:i,chainId:s,expiry:o}=r;this.checkRecentlyDeleted(n),await this.isValidSessionTopic(n);const{namespaces:a}=this.client.session.get(n);if(!BR(a,s)){const{message:c}=je("MISSING_OR_INVALID",`request() chainId: ${s}`);throw new Error(c)}if(!dEe(i)){const{message:c}=je("MISSING_OR_INVALID",`request() ${JSON.stringify(i)}`);throw new Error(c)}if(!gEe(a,s,i.method)){const{message:c}=je("MISSING_OR_INVALID",`request() method: ${i.method}`);throw new Error(c)}if(o&&!wEe(o,i6)){const{message:c}=je("MISSING_OR_INVALID",`request() expiry: ${o}. Expiry must be a number (in seconds) between ${i6.min} and ${i6.max}`);throw new Error(c)}}),Ae(this,"isValidRespond",async r=>{var n;if(!ao(r)){const{message:o}=je("MISSING_OR_INVALID",`respond() params: ${r}`);throw new Error(o)}const{topic:i,response:s}=r;try{await this.isValidSessionTopic(i)}catch(o){throw(n=r==null?void 0:r.response)!=null&&n.id&&this.cleanupAfterResponse(r),o}if(!hEe(s)){const{message:o}=je("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(s)}`);throw new Error(o)}}),Ae(this,"isValidPing",async r=>{if(!ao(r)){const{message:i}=je("MISSING_OR_INVALID",`ping() params: ${r}`);throw new Error(i)}const{topic:n}=r;await this.isValidSessionOrPairingTopic(n)}),Ae(this,"isValidEmit",async r=>{if(!ao(r)){const{message:a}=je("MISSING_OR_INVALID",`emit() params: ${r}`);throw new Error(a)}const{topic:n,event:i,chainId:s}=r;await this.isValidSessionTopic(n);const{namespaces:o}=this.client.session.get(n);if(!BR(o,s)){const{message:a}=je("MISSING_OR_INVALID",`emit() chainId: ${s}`);throw new Error(a)}if(!pEe(i)){const{message:a}=je("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(a)}if(!mEe(o,s,i.name)){const{message:a}=je("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(a)}}),Ae(this,"isValidDisconnect",async r=>{if(!ao(r)){const{message:i}=je("MISSING_OR_INVALID",`disconnect() params: ${r}`);throw new Error(i)}const{topic:n}=r;await this.isValidSessionOrPairingTopic(n)}),Ae(this,"isValidAuthenticate",r=>{const{chains:n,uri:i,domain:s,nonce:o}=r;if(!Array.isArray(n)||n.length===0)throw new Error("chains is required and must be a non-empty array");if(!mi(i,!1))throw new Error("uri is required parameter");if(!mi(s,!1))throw new Error("domain is required parameter");if(!mi(o,!1))throw new Error("nonce is required parameter");if([...new Set(n.map(c=>wv(c).namespace))].length>1)throw new Error("Multi-namespace requests are not supported. Please request single namespace only.");const{namespace:a}=wv(n[0]);if(a!=="eip155")throw new Error("Only eip155 namespace is supported for authenticated sessions. Please use .connect() for non-eip155 chains.")}),Ae(this,"getVerifyContext",async r=>{const{attestationId:n,hash:i,encryptedId:s,metadata:o,transportType:a}=r,c={verified:{verifyUrl:o.verifyUrl||Mm,validation:"UNKNOWN",origin:o.url||""}};try{if(a===Nn.link_mode){const u=this.getAppLinkIfEnabled(o,a);return c.verified.validation=u&&new URL(u).origin===new URL(o.url).origin?"VALID":"INVALID",c}const l=await this.client.core.verify.resolve({attestationId:n,hash:i,encryptedId:s,verifyUrl:o.verifyUrl});l&&(c.verified.origin=l.origin,c.verified.isScam=l.isScam,c.verified.validation=l.origin===new URL(o.url).origin?"VALID":"INVALID")}catch(l){this.client.logger.warn(l)}return this.client.logger.debug(`Verify context: ${JSON.stringify(c)}`),c}),Ae(this,"validateSessionProps",(r,n)=>{Object.values(r).forEach((i,s)=>{if(i==null){const{message:o}=je("MISSING_OR_INVALID",`${n} must contain an existing value for each key. Received: ${i} for key ${Object.keys(r)[s]}`);throw new Error(o)}})}),Ae(this,"getPendingAuthRequest",r=>{const n=this.client.auth.requests.get(r);return typeof n=="object"?n:void 0}),Ae(this,"addToRecentlyDeleted",(r,n)=>{if(this.recentlyDeletedMap.set(r,n),this.recentlyDeletedMap.size>=this.recentlyDeletedLimit){let i=0;const s=this.recentlyDeletedLimit/2;for(const o of this.recentlyDeletedMap.keys()){if(i++>=s)break;this.recentlyDeletedMap.delete(o)}}}),Ae(this,"checkRecentlyDeleted",r=>{const n=this.recentlyDeletedMap.get(r);if(n){const{message:i}=je("MISSING_OR_INVALID",`Record was recently deleted - ${n}: ${r}`);throw new Error(i)}}),Ae(this,"isLinkModeEnabled",(r,n)=>{var i,s,o,a,c,l,u,f,d;return!r||n!==Nn.link_mode?!1:((s=(i=this.client.metadata)==null?void 0:i.redirect)==null?void 0:s.linkMode)===!0&&((a=(o=this.client.metadata)==null?void 0:o.redirect)==null?void 0:a.universal)!==void 0&&((l=(c=this.client.metadata)==null?void 0:c.redirect)==null?void 0:l.universal)!==""&&((u=r==null?void 0:r.redirect)==null?void 0:u.universal)!==void 0&&((f=r==null?void 0:r.redirect)==null?void 0:f.universal)!==""&&((d=r==null?void 0:r.redirect)==null?void 0:d.linkMode)===!0&&this.client.core.linkModeSupportedApps.includes(r.redirect.universal)&&typeof(global==null?void 0:global.Linking)<"u"}),Ae(this,"getAppLinkIfEnabled",(r,n)=>{var i;return this.isLinkModeEnabled(r,n)?(i=r==null?void 0:r.redirect)==null?void 0:i.universal:void 0}),Ae(this,"handleLinkModeMessage",({url:r})=>{if(!r||!r.includes("wc_ev")||!r.includes("topic"))return;const n=XP(r,"topic")||"",i=decodeURIComponent(XP(r,"wc_ev")||""),s=this.client.session.keys.includes(n);s&&this.client.session.update(n,{transportType:Nn.link_mode}),this.client.core.dispatchEnvelope({topic:n,message:i,sessionExists:s})}),Ae(this,"registerLinkModeListeners",async()=>{var r;if(MS()||wd()&&(r=this.client.metadata.redirect)!=null&&r.linkMode){const n=global==null?void 0:global.Linking;if(typeof n<"u"){n.addEventListener("url",this.handleLinkModeMessage,this.client.name);const i=await n.getInitialURL();i&&setTimeout(()=>{this.handleLinkModeMessage({url:i})},50)}}}),Ae(this,"getTVFParams",(r,n,i)=>{var s,o,a;if(!((s=n.request)!=null&&s.method))return{};const c={correlationId:r,rpcMethods:[n.request.method],chainId:n.chainId};try{const l=this.extractTxHashesFromResult(n.request,i);c.txHashes=l,c.contractAddresses=this.isValidContractData(n.request.params)?[(a=(o=n.request.params)==null?void 0:o[0])==null?void 0:a.to]:[]}catch(l){this.client.logger.warn("Error getting TVF params",l)}return c}),Ae(this,"isValidContractData",r=>{var n;if(!r)return!1;try{const i=(r==null?void 0:r.data)||((n=r==null?void 0:r[0])==null?void 0:n.data);if(!i.startsWith("0x"))return!1;const s=i.slice(2);return/^[0-9a-fA-F]*$/.test(s)?s.length%2===0:!1}catch{}return!1}),Ae(this,"extractTxHashesFromResult",(r,n)=>{var i;try{if(!n)return[];const s=r.method,o=z_e[s];if(s==="sui_signTransaction")return[j4e(n.transactionBytes)];if(s==="near_signTransaction")return[aR(n)];if(s==="near_signTransactions")return n.map(c=>aR(c));if(s==="xrpl_signTransactionFor"||s==="xrpl_signTransaction")return[(i=n.tx_json)==null?void 0:i.hash];if(s==="polkadot_signTransaction")return[DEe({transaction:r.params.transactionPayload,signature:n.signature})];if(s==="algo_signTxn")return ug(n)?n.map(c=>cR(c)):[cR(n)];if(s==="cosmos_signDirect")return[W4e(n)];if(typeof n=="string")return[n];const a=n[o.key];if(ug(a))return s==="solana_signAllTransactions"?a.map(c=>F4e(c)):a;if(typeof a=="string")return[a]}catch(s){this.client.logger.warn("Error extracting tx hashes from result",s)}return[]})}async processPendingMessageEvents(){try{const e=this.client.session.keys,r=this.client.core.relayer.messages.getWithoutAck(e);for(const[n,i]of Object.entries(r))for(const s of i)try{await this.onProviderMessageEvent({topic:n,message:s,publishedAt:Date.now()})}catch{this.client.logger.warn(`Error processing pending message event for topic: ${n}, message: ${s}`)}}catch(e){this.client.logger.warn("processPendingMessageEvents failed",e)}}isInitialized(){if(!this.initialized){const{message:e}=je("NOT_INITIALIZED",this.name);throw new Error(e)}}async confirmOnlineStateOrThrow(){await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(Mi.message,e=>{this.onProviderMessageEvent(e)})}async onRelayMessage(e){const{topic:r,message:n,attestation:i,transportType:s}=e,{publicKey:o}=this.client.auth.authKeys.keys.includes(Cv)?this.client.auth.authKeys.get(Cv):{publicKey:void 0};try{const a=await this.client.core.crypto.decode(r,n,{receiverPublicKey:o,encoding:s===Nn.link_mode?wf:rc});JS(a)?(this.client.core.history.set(r,a),await this.onRelayEventRequest({topic:r,payload:a,attestation:i,transportType:s,encryptedId:zc(n)})):Lx(a)?(await this.client.core.history.resolve(a),await this.onRelayEventResponse({topic:r,payload:a,transportType:s}),this.client.core.history.delete(r,a.id)):await this.onRelayEventUnknownPayload({topic:r,payload:a,transportType:s}),await this.client.core.relayer.messages.ack(r,n)}catch(a){this.client.logger.error(a)}}registerExpirerEvents(){this.client.core.expirer.on(ua.expired,async e=>{const{topic:r,id:n}=OW(e.target);if(n&&this.client.pendingRequest.keys.includes(n))return await this.deletePendingSessionRequest(n,je("EXPIRED"),!0);if(n&&this.client.auth.requests.keys.includes(n))return await this.deletePendingAuthRequest(n,je("EXPIRED"),!0);r?this.client.session.keys.includes(r)&&(await this.deleteSession({topic:r,expirerHasDeleted:!0}),this.client.events.emit("session_expire",{topic:r})):n&&(await this.deleteProposal(n,!0),this.client.events.emit("proposal_expire",{id:n}))})}registerPairingEvents(){this.client.core.pairing.events.on(Ud.create,e=>this.onPairingCreated(e)),this.client.core.pairing.events.on(Ud.delete,e=>{this.addToRecentlyDeleted(e.topic,"pairing")})}isValidPairingTopic(e){if(!mi(e,!1)){const{message:r}=je("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(r)}if(!this.client.core.pairing.pairings.keys.includes(e)){const{message:r}=je("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(r)}if(cf(this.client.core.pairing.pairings.get(e).expiry)){const{message:r}=je("EXPIRED",`pairing topic: ${e}`);throw new Error(r)}}async isValidSessionTopic(e){if(!mi(e,!1)){const{message:r}=je("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(r)}if(this.checkRecentlyDeleted(e),!this.client.session.keys.includes(e)){const{message:r}=je("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(r)}if(cf(this.client.session.get(e).expiry)){await this.deleteSession({topic:e});const{message:r}=je("EXPIRED",`session topic: ${e}`);throw new Error(r)}if(!this.client.core.crypto.keychain.has(e)){const{message:r}=je("MISSING_OR_INVALID",`session topic does not exist in keychain: ${e}`);throw await this.deleteSession({topic:e}),new Error(r)}}async isValidSessionOrPairingTopic(e){if(this.checkRecentlyDeleted(e),this.client.session.keys.includes(e))await this.isValidSessionTopic(e);else if(this.client.core.pairing.pairings.keys.includes(e))this.isValidPairingTopic(e);else if(mi(e,!1)){const{message:r}=je("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(r)}else{const{message:r}=je("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(r)}}async isValidProposalId(e){if(!uEe(e)){const{message:r}=je("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(r)}if(!this.client.proposal.keys.includes(e)){const{message:r}=je("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(r)}if(cf(this.client.proposal.get(e).expiryTimestamp)){await this.deleteProposal(e);const{message:r}=je("EXPIRED",`proposal id: ${e}`);throw new Error(r)}}}class rAe extends o0{constructor(e,r){super(e,r,B_e,QS),this.core=e,this.logger=r}}let nAe=class extends o0{constructor(e,r){super(e,r,F_e,QS),this.core=e,this.logger=r}};class iAe extends o0{constructor(e,r){super(e,r,W_e,QS,n=>n.id),this.core=e,this.logger=r}}class sAe extends o0{constructor(e,r){super(e,r,K_e,$x,()=>Cv),this.core=e,this.logger=r}}class oAe extends o0{constructor(e,r){super(e,r,G_e,$x),this.core=e,this.logger=r}}class aAe extends o0{constructor(e,r){super(e,r,Y_e,$x,n=>n.id),this.core=e,this.logger=r}}var cAe=Object.defineProperty,lAe=(t,e,r)=>e in t?cAe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,s6=(t,e,r)=>lAe(t,typeof e!="symbol"?e+"":e,r);class uAe{constructor(e,r){this.core=e,this.logger=r,s6(this,"authKeys"),s6(this,"pairingTopics"),s6(this,"requests"),this.authKeys=new sAe(this.core,this.logger),this.pairingTopics=new oAe(this.core,this.logger),this.requests=new aAe(this.core,this.logger)}
2076async init(){await this.authKeys.init(),await this.pairingTopics.init(),await this.requests.init()}}var fAe=Object.defineProperty,dAe=(t,e,r)=>e in t?fAe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Er=(t,e,r)=>dAe(t,typeof e!="symbol"?e+"":e,r);let hAe=class XH extends hme{constructor(e){super(e),Er(this,"protocol",ZH),Er(this,"version",JH),Er(this,"name",n6.name),Er(this,"metadata"),Er(this,"core"),Er(this,"logger"),Er(this,"events",new ka.EventEmitter),Er(this,"engine"),Er(this,"session"),Er(this,"proposal"),Er(this,"pendingRequest"),Er(this,"auth"),Er(this,"signConfig"),Er(this,"on",(n,i)=>this.events.on(n,i)),Er(this,"once",(n,i)=>this.events.once(n,i)),Er(this,"off",(n,i)=>this.events.off(n,i)),Er(this,"removeListener",(n,i)=>this.events.removeListener(n,i)),Er(this,"removeAllListeners",n=>this.events.removeAllListeners(n)),Er(this,"connect",async n=>{try{return await this.engine.connect(n)}catch(i){throw this.logger.error(i.message),i}}),Er(this,"pair",async n=>{try{return await this.engine.pair(n)}catch(i){throw this.logger.error(i.message),i}}),Er(this,"approve",async n=>{try{return await this.engine.approve(n)}catch(i){throw this.logger.error(i.message),i}}),Er(this,"reject",async n=>{try{return await this.engine.reject(n)}catch(i){throw this.logger.error(i.message),i}}),Er(this,"update",async n=>{try{return await this.engine.update(n)}catch(i){throw this.logger.error(i.message),i}}),Er(this,"extend",async n=>{try{return await this.engine.extend(n)}catch(i){throw this.logger.error(i.message),i}}),Er(this,"request",async n=>{try{return await this.engine.request(n)}catch(i){throw this.logger.error(i.message),i}}),Er(this,"respond",async n=>{try{return await this.engine.respond(n)}catch(i){throw this.logger.error(i.message),i}}),Er(this,"ping",async n=>{try{return await this.engine.ping(n)}catch(i){throw this.logger.error(i.message),i}}),Er(this,"emit",async n=>{try{return await this.engine.emit(n)}catch(i){throw this.logger.error(i.message),i}}),Er(this,"disconnect",async n=>{try{return await this.engine.disconnect(n)}catch(i){throw this.logger.error(i.message),i}}),Er(this,"find",n=>{try{return this.engine.find(n)}catch(i){throw this.logger.error(i.message),i}}),Er(this,"getPendingSessionRequests",()=>{try{return this.engine.getPendingSessionRequests()}catch(n){throw this.logger.error(n.message),n}}),Er(this,"authenticate",async(n,i)=>{try{return await this.engine.authenticate(n,i)}catch(s){throw this.logger.error(s.message),s}}),Er(this,"formatAuthMessage",n=>{try{return this.engine.formatAuthMessage(n)}catch(i){throw this.logger.error(i.message),i}}),Er(this,"approveSessionAuthenticate",async n=>{try{return await this.engine.approveSessionAuthenticate(n)}catch(i){throw this.logger.error(i.message),i}}),Er(this,"rejectSessionAuthenticate",async n=>{try{return await this.engine.rejectSessionAuthenticate(n)}catch(i){throw this.logger.error(i.message),i}}),this.name=(e==null?void 0:e.name)||n6.name,this.metadata=O3e(e==null?void 0:e.metadata),this.signConfig=e==null?void 0:e.signConfig;const r=typeof(e==null?void 0:e.logger)<"u"&&typeof(e==null?void 0:e.logger)!="string"?e.logger:ob(Lg({level:(e==null?void 0:e.logger)||n6.logger}));this.core=(e==null?void 0:e.core)||new U_e(e),this.logger=Ls(r,this.name),this.session=new nAe(this.core,this.logger),this.proposal=new rAe(this.core,this.logger),this.pendingRequest=new iAe(this.core,this.logger),this.engine=new tAe(this),this.auth=new uAe(this.core,this.logger)}static async init(e){const r=new XH(e);return await r.initialize(),r}get context(){return Po(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.auth.init(),await this.engine.init(),this.logger.info("SignClient Initialization Success"),setTimeout(()=>{this.engine.processRelayMessageCache()},Ue.toMiliseconds(Ue.ONE_SECOND))}catch(e){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(e.message),e}}};const pAe=":";function eq(t){const[e,r]=t.split(pAe);return{namespace:e,reference:r}}function o6(t=[],e=[]){return[...new Set([...t,...e])]}const Sw=BigInt(2**32-1),CO=BigInt(32);function tq(t,e=!1){return e?{h:Number(t&Sw),l:Number(t>>CO&Sw)}:{h:Number(t>>CO&Sw)|0,l:Number(t&Sw)|0}}function rq(t,e=!1){const r=t.length;let n=new Uint32Array(r),i=new Uint32Array(r);for(let s=0;s<r;s++){const{h:o,l:a}=tq(t[s],e);[n[s],i[s]]=[o,a]}return[n,i]}const _O=(t,e,r)=>t>>>r,AO=(t,e,r)=>t<<32-r|e>>
vendor: 11,612 bytes, line 2076
2076>r,df=(t,e,r)=>t>>>r|e<<32-r,hf=(t,e,r)=>t<<32-r|e>>>r,tm=(t,e,r)=>t<<64-r|e>>>r-32,rm=(t,e,r)=>t>>>r-32|e<<64-r,gAe=(t,e)=>e,mAe=(t,e)=>t,yAe=(t,e,r)=>t<<r|e>>>32-r,bAe=(t,e,r)=>e<<r|t>>>32-r,wAe=(t,e,r)=>e<<r-32|t>>>64-r,vAe=(t,e,r)=>t<<r-32|e>>>64-r;function Ka(t,e,r,n){const i=(e>>>0)+(n>>>0);return{h:t+r+(i/2**32|0)|0,l:i|0}}const XS=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),e7=(t,e,r,n)=>e+r+n+(t/2**32|0)|0,xAe=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),EAe=(t,e,r,n,i)=>e+r+n+i+(t/2**32|0)|0,CAe=(t,e,r,n,i)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(i>>>0),_Ae=(t,e,r,n,i,s)=>e+r+n+i+s+(t/2**32|0)|0,A0=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;function t7(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function od(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function Ia(t,...e){if(!t7(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function AAe(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");od(t.outputLen),od(t.blockLen)}function ad(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function r7(t,e){Ia(t);const r=e.outputLen;if(t.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}function oy(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function mc(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function a6(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function Rc(t,e){return t<<32-e|t>>>e}const nq=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function iq(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}const Wl=nq?t=>t:t=>iq(t);function SAe(t){for(let e=0;e<t.length;e++)t[e]=iq(t[e]);return t}const pf=nq?t=>t:SAe,sq=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",NAe=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function ay(t){if(Ia(t),sq)return t.toHex();let e="";for(let r=0;r<t.length;r++)e+=NAe[t[r]];return e}const Fl={_0:48,_9:57,A:65,F:70,a:97,f:102};function SO(t){if(t>=Fl._0&&t<=Fl._9)return t-Fl._0;if(t>=Fl.A&&t<=Fl.F)return t-(Fl.A-10);if(t>=Fl.a&&t<=Fl.f)return t-(Fl.a-10)}function n7(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);if(sq)return Uint8Array.fromHex(t);const e=t.length,r=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);const n=new Uint8Array(r);for(let i=0,s=0;i<r;i++,s+=2){const o=SO(t.charCodeAt(s)),a=SO(t.charCodeAt(s+1));if(o===void 0||a===void 0){const c=t[s]+t[s+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+s)}n[i]=o*16+a}return n}function IAe(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}function cu(t){return typeof t=="string"&&(t=IAe(t)),Ia(t),t}function rh(...t){let e=0;for(let n=0;n<t.length;n++){const i=t[n];Ia(i),e+=i.length}const r=new Uint8Array(e);for(let n=0,i=0;n<t.length;n++){const s=t[n];r.set(s,i),i+=s.length}return r}let Ux=class{};function gb(t){const e=n=>t().update(cu(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function TAe(t){const e=(n,i)=>t(i).update(cu(n)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=n=>t(n),e}function oq(t=32){if(A0&&typeof A0.getRandomValues=="function")return A0.getRandomValues(new Uint8Array(t));if(A0&&typeof A0.randomBytes=="function")return Uint8Array.from(A0.randomBytes(t));throw new Error("crypto.getRandomValues must be defined")}const kAe=BigInt(0),I1=BigInt(1),PAe=BigInt(2),RAe=BigInt(7),OAe=BigInt(256),DAe=BigInt(113),aq=[],cq=[],lq=[];for(let t=0,e=I1,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],aq.push(2*(5*n+r)),cq.push((t+1)*(t+2)/2%64);let i=kAe;for(let s=0;s<7;s++)e=(e<<I1^(e>>RAe)*DAe)%OAe,e&PAe&&(i^=I1<<(I1<<BigInt(s))-I1);lq.push(i)}const uq=rq(lq,!0),LAe=uq[0],MAe=uq[1],NO=(t,e,r)=>r>32?wAe(t,e,r):yAe(t,e,r),IO=(t,e,r)=>r>32?vAe(t,e,r):bAe(t,e,r);function $Ae(t,e=24){const r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let o=0;o<10;o++)r[o]=t[o]^t[o+10]^t[o+20]^t[o+30]^t[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,c=(o+2)%10,l=r[c],u=r[c+1],f=NO(l,u,1)^r[a],d=IO(l,u,1)^r[a+1];for(let p=0;p<50;p+=10)t[o+p]^=f,t[o+p+1]^=d}let i=t[2],s=t[3];for(let o=0;o<24;o++){const a=cq[o],c=NO(i,s,a),l=IO(i,s,a),u=aq[o];i=t[u],s=t[u+1],t[u]=c,t[u+1]=l}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)r[a]=t[o+a];for(let a=0;a<10;a++)t[o+a]^=~r[(a+2)%10]&r[(a+4)%10]}t[0]^=LAe[n],t[1]^=MAe[n]}mc(r)}class i7 extends Ux{constructor(e,r,n,i=!1,s=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=i,this.rounds=s,od(n),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=oy(this.state)}clone(){return this._cloneInto()}keccak(){pf(this.state32),$Ae(this.state32,this.rounds),pf(this.state32),this.posOut=0,this.pos=0}update(e){ad(this),e=cu(e),Ia(e);const{blockLen:r,state:n}=this,i=e.length;for(let s=0;s<i;){const o=Math.min(r-this.pos,i-s);for(let a=0;a<o;a++)n[this.pos++]^=e[s++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:r,pos:n,blockLen:i}=this;e[n]^=r,r&128&&n===i-1&&this.keccak(),e[i-1]^=128,this.keccak()}writeInto(e){ad(this,!1),Ia(e),this.finish();const r=this.state,{blockLen:n}=this;for(let i=0,s=e.length;i<s;){this.posOut>=n&&this.keccak();const o=Math.min(n-this.posOut,s-i);e.set(r.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return od(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(r7(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,mc(this.state)}_cloneInto(e){const{blockLen:r,suffix:n,outputLen:i,rounds:s,enableXOF:o}=this;return e||(e=new i7(r,n,i,o,s)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=s,e.suffix=n,e.outputLen=i,e.enableXOF=o,e.destroyed=this.destroyed,e}}const UAe=(t,e,r)=>gb(()=>new i7(e,t,r));UAe(1,136,256/8);function BAe(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);const i=BigInt(32),s=BigInt(4294967295),o=Number(r>>i&s),a=Number(r&s),c=n?4:0,l=n?0:4;t.setUint32(e+c,o,n),t.setUint32(e+l,a,n)}function FAe(t,e,r){return t&e^~t&r}function jAe(t,e,r){return t&e^t&r^e&r}class fq extends Ux{constructor(e,r,n,i){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=i,this.buffer=new Uint8Array(e),this.view=a6(this.buffer)}update(e){ad(this),e=cu(e),Ia(e);const{view:r,buffer:n,blockLen:i}=this,s=e.length;for(let o=0;o<s;){const a=Math.min(i-this.pos,s-o);if(a===i){const c=a6(e);for(;i<=s-o;o+=i)this.process(c,o);continue}n.set(e.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===i&&(this.process(r,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){ad(this),r7(e,this),this.finished=!0;const{buffer:r,view:n,blockLen:i,isLE:s}=this;let{pos:o}=this;r[o++]=128,mc(this.buffer.subarray(o)),this.padOffset>i-o&&(this.process(n,0),o=0);for(let f=o;f<i;f++)r[f]=0;BAe(n,i-8,BigInt(this.length*8),s),this.process(n,0);const a=a6(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,u=this.get();if(l>u.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;f<l;f++)a.setUint32(4*f,u[f],s)}digest(){const{buffer:e,outputLen:r}=this;this.digestInto(e);const n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:r,buffer:n,length:i,finished:s,destroyed:o,pos:a}=this;return e.destroyed=o,e.finished=s,e.length=i,e.pos=a,i%r&&e.buffer.set(n),e}clone(){return this._cloneInto()}}const Zu=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),xs=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),Es=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),zAe=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Ju=new Uint32Array(64);class WAe extends fq{constructor(e=32){super(64,e,8,!1),this.A=Zu[0]|0,this.B=Zu[1]|0,this.C=Zu[2]|0,this.D=Zu[3]|0,this.E=Zu[4]|0,this.F=Zu[5]|0,this.G=Zu[6]|0,this.H=Zu[7]|0}get(){const{A:e,B:r,C:n,D:i,E:s,F:o,G:a,H:c}=this;return[e,r,n,i,s,o,a,c]}set(e,r,n,i,s,o,a,c){this.A=e|0,this.B=r|0,this.C=n|0,this.D=i|0,this.E=s|0,this.F=o|0,this.G=a|0,this.H=c|0}process(e,r){for(let f=0;f<16;f++,r+=4)Ju[f]=e.getUint32(r,!1);for(let f=16;f<64;f++){const d=Ju[f-15],p=Ju[f-2],h=Rc(d,7)^Rc(d,18)^d>>>3,g=Rc(p,17)^Rc(p,19)^p>>>10;Ju[f]=g+Ju[f-7]+h+Ju[f-16]|0}let{A:n,B:i,C:s,D:o,E:a,F:c,G:l,H:u}=this;for(let f=0;f<64;f++){const d=Rc(a,6)^Rc(a,11)^Rc(a,25),p=u+d+FAe(a,c,l)+zAe[f]+Ju[f]|0,h=(Rc(n,2)^Rc(n,13)^Rc(n,22))+jAe(n,i,s)|0;u=l,l=c,c=a,a=o+p|0,o=s,s=i,i=n,n=p+h|0}n=n+this.A|0,i=i+this.B|0,s=s+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(n,i,s,o,a,c,l,u)}roundClean(){mc(Ju)}destroy(){this.set(0,0,0,0,0,0,0,0),mc(this.buffer)}}const dq=rq(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e3585
20765771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))),HAe=dq[0],qAe=dq[1],Qu=new Uint32Array(80),Xu=new Uint32Array(80);class s7 extends fq{constructor(e=64){super(128,e,16,!1),this.Ah=Es[0]|0,this.Al=Es[1]|0,this.Bh=Es[2]|0,this.Bl=Es[3]|0,this.Ch=Es[4]|0,this.Cl=Es[5]|0,this.Dh=Es[6]|0,this.Dl=Es[7]|0,this.Eh=Es[8]|0,this.El=Es[9]|0,this.Fh=Es[10]|0,this.Fl=Es[11]|0,this.Gh=Es[12]|0,this.Gl=Es[13]|0,this.Hh=Es[14]|0,this.Hl=Es[15]|0}get(){const{Ah:e,Al:r,Bh:n,Bl:i,Ch:s,Cl:o,Dh:a,Dl:c,Eh:l,El:u,Fh:f,Fl:d,Gh:p,Gl:h,Hh:g,Hl:y}=this;return[e,r,n,i,s,o,a,c,l,u,f,d,p,h,g,y]}set(e,r,n,i,s,o,a,c,l,u,f,d,p,h,g,y){this.Ah=e|0,this.Al=r|0,this.Bh=n|0,this.Bl=i|0,this.Ch=s|0,this.Cl=o|0,this.Dh=a|0,this.Dl=c|0,this.Eh=l|0,this.El=u|0,this.Fh=f|0,this.Fl=d|0,this.Gh=p|0,this.Gl=h|0,this.Hh=g|0,this.Hl=y|0}process(e,r){for(let _=0;_<16;_++,r+=4)Qu[_]=e.getUint32(r),Xu[_]=e.getUint32(r+=4);for(let _=16;_<80;_++){const L=Qu[_-15]|0,P=Xu[_-15]|0,z=df(L,P,1)^df(L,P,8)^_O(L,P,7),W=hf(L,P,1)^hf(L,P,8)^AO(L,P,7),B=Qu[_-2]|0,I=Xu[_-2]|0,j=df(B,I,19)^tm(B,I,61)^_O(B,I,6),D=hf(B,I,19)^rm(B,I,61)^AO(B,I,6),O=xAe(W,D,Xu[_-7],Xu[_-16]),T=EAe(O,z,j,Qu[_-7],Qu[_-16]);Qu[_]=T|0,Xu[_]=O|0}let{Ah:n,Al:i,Bh:s,Bl:o,Ch:a,Cl:c,Dh:l,Dl:u,Eh:f,El:d,Fh:p,Fl:h,Gh:g,Gl:y,Hh:x,Hl:C}=this;for(let _=0;_<80;_++){const L=df(f,d,14)^df(f,d,18)^tm(f,d,41),P=hf(f,d,14)^hf(f,d,18)^rm(f,d,41),z=f&p^~f&g,W=d&h^~d&y,B=CAe(C,P,W,qAe[_],Xu[_]),I=_Ae(B,x,L,z,HAe[_],Qu[_]),j=B|0,D=df(n,i,28)^tm(n,i,34)^tm(n,i,39),O=hf(n,i,28)^rm(n,i,34)^rm(n,i,39),T=n&s^n&a^s&a,m=i&o^i&c^o&c;x=g|0,C=y|0,g=p|0,y=h|0,p=f|0,h=d|0,{h:f,l:d}=Ka(l|0,u|0,I|0,j|0),l=a|0,u=c|0,a=s|0,c=o|0,s=n|0,o=i|0;const b=XS(j,O,m);n=e7(b,I,D,T),i=b|0}({h:n,l:i}=Ka(this.Ah|0,this.Al|0,n|0,i|0)),{h:s,l:o}=Ka(this.Bh|0,this.Bl|0,s|0,o|0),{h:a,l:c}=Ka(this.Ch|0,this.Cl|0,a|0,c|0),{h:l,l:u}=Ka(this.Dh|0,this.Dl|0,l|0,u|0),{h:f,l:d}=Ka(this.Eh|0,this.El|0,f|0,d|0),{h:p,l:h}=Ka(this.Fh|0,this.Fl|0,p|0,h|0),{h:g,l:y}=Ka(this.Gh|0,this.Gl|0,g|0,y|0),{h:x,l:C}=Ka(this.Hh|0,this.Hl|0,x|0,C|0),this.set(n,i,s,o,a,c,l,u,f,d,p,h,g,y,x,C)}roundClean(){mc(Qu,Xu)}destroy(){mc(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class VAe extends s7{constructor(){super(48),this.Ah=xs[0]|0,this.Al=xs[1]|0,this.Bh=xs[2]|0,this.Bl=xs[3]|0,this.Ch=xs[4]|0,this.Cl=xs[5]|0,this.Dh=xs[6]|0,this.Dl=xs[7]|0,this.Eh=xs[8]|0,this.El=xs[9]|0,this.Fh=xs[10]|0,this.Fl=xs[11]|0,this.Gh=xs[12]|0,this.Gl=xs[13]|0,this.Hh=xs[14]|0,this.Hl=xs[15]|0}}const Cs=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class KAe extends s7{constructor(){super(32),this.Ah=Cs[0]|0,this.Al=Cs[1]|0,this.Bh=Cs[2]|0,this.Bl=Cs[3]|0,this.Ch=Cs[4]|0,this.Cl=Cs[5]|0,this.Dh=Cs[6]|0,this.Dl=Cs[7]|0,this.Eh=Cs[8]|0,this.El=Cs[9]|0,this.Fh=Cs[10]|0,this.Fl=Cs[11]|0,this.Gh=Cs[12]|0,this.Gl=Cs[13]|0,this.Hh=Cs[14]|0,this.Hl=Cs[15]|0}}const GAe=gb(()=>new WAe),YAe=gb(()=>new s7),ZAe=gb(()=>new VAe);gb(()=>new KAe);const JAe=Uint8Array.from([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9]),Ei=Uint32Array.from([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),Ze=new
vendor: 18,617 bytes, line 2076
2076Uint32Array(32);function ef(t,e,r,n,i,s){const o=i[s],a=i[s+1];let c=Ze[2*t],l=Ze[2*t+1],u=Ze[2*e],f=Ze[2*e+1],d=Ze[2*r],p=Ze[2*r+1],h=Ze[2*n],g=Ze[2*n+1],y=XS(c,u,o);l=e7(y,l,f,a),c=y|0,{Dh:g,Dl:h}={Dh:g^l,Dl:h^c},{Dh:g,Dl:h}={Dh:gAe(g,h),Dl:mAe(g)},{h:p,l:d}=Ka(p,d,g,h),{Bh:f,Bl:u}={Bh:f^p,Bl:u^d},{Bh:f,Bl:u}={Bh:df(f,u,24),Bl:hf(f,u,24)},Ze[2*t]=c,Ze[2*t+1]=l,Ze[2*e]=u,Ze[2*e+1]=f,Ze[2*r]=d,Ze[2*r+1]=p,Ze[2*n]=h,Ze[2*n+1]=g}function tf(t,e,r,n,i,s){const o=i[s],a=i[s+1];let c=Ze[2*t],l=Ze[2*t+1],u=Ze[2*e],f=Ze[2*e+1],d=Ze[2*r],p=Ze[2*r+1],h=Ze[2*n],g=Ze[2*n+1],y=XS(c,u,o);l=e7(y,l,f,a),c=y|0,{Dh:g,Dl:h}={Dh:g^l,Dl:h^c},{Dh:g,Dl:h}={Dh:df(g,h,16),Dl:hf(g,h,16)},{h:p,l:d}=Ka(p,d,g,h),{Bh:f,Bl:u}={Bh:f^p,Bl:u^d},{Bh:f,Bl:u}={Bh:tm(f,u,63),Bl:rm(f,u,63)},Ze[2*t]=c,Ze[2*t+1]=l,Ze[2*e]=u,Ze[2*e+1]=f,Ze[2*r]=d,Ze[2*r+1]=p,Ze[2*n]=h,Ze[2*n+1]=g}function QAe(t,e={},r,n,i){if(od(r),t<0||t>r)throw new Error("outputLen bigger than keyLen");const{key:s,salt:o,personalization:a}=e;if(s!==void 0&&(s.length<1||s.length>r))throw new Error("key length must be undefined or 1.."+r);if(o!==void 0&&o.length!==n)throw new Error("salt must be undefined or "+n);if(a!==void 0&&a.length!==i)throw new Error("personalization must be undefined or "+i)}class XAe extends Ux{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,this.length=0,this.pos=0,od(e),od(r),this.blockLen=e,this.outputLen=r,this.buffer=new Uint8Array(e),this.buffer32=oy(this.buffer)}update(e){ad(this),e=cu(e),Ia(e);const{blockLen:r,buffer:n,buffer32:i}=this,s=e.length,o=e.byteOffset,a=e.buffer;for(let c=0;c<s;){this.pos===r&&(pf(i),this.compress(i,0,!1),pf(i),this.pos=0);const l=Math.min(r-this.pos,s-c),u=o+c;if(l===r&&!(u%4)&&c+l<s){const f=new Uint32Array(a,u,Math.floor((s-c)/4));pf(f);for(let d=0;c+r<s;d+=i.length,c+=r)this.length+=r,this.compress(f,d,!1);pf(f);continue}n.set(e.subarray(c,c+l),this.pos),this.pos+=l,this.length+=l,c+=l}return this}digestInto(e){ad(this),r7(e,this);const{pos:r,buffer32:n}=this;this.finished=!0,mc(this.buffer.subarray(r)),pf(n),this.compress(n,0,!0),pf(n);const i=oy(e);this.get().forEach((s,o)=>i[o]=Wl(s))}digest(){const{buffer:e,outputLen:r}=this;this.digestInto(e);const n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){const{buffer:r,length:n,finished:i,destroyed:s,outputLen:o,pos:a}=this;return e||(e=new this.constructor({dkLen:o})),e.set(...this.get()),e.buffer.set(r),e.destroyed=s,e.finished=i,e.length=n,e.pos=a,e.outputLen=o,e}clone(){return this._cloneInto()}}class e9e extends XAe{constructor(e={}){const r=e.dkLen===void 0?64:e.dkLen;super(128,r),this.v0l=Ei[0]|0,this.v0h=Ei[1]|0,this.v1l=Ei[2]|0,this.v1h=Ei[3]|0,this.v2l=Ei[4]|0,this.v2h=Ei[5]|0,this.v3l=Ei[6]|0,this.v3h=Ei[7]|0,this.v4l=Ei[8]|0,this.v4h=Ei[9]|0,this.v5l=Ei[10]|0,this.v5h=Ei[11]|0,this.v6l=Ei[12]|0,this.v6h=Ei[13]|0,this.v7l=Ei[14]|0,this.v7h=Ei[15]|0,QAe(r,e,64,16,16);let{key:n,personalization:i,salt:s}=e,o=0;if(n!==void 0&&(n=cu(n),o=n.length),this.v0l^=this.outputLen|o<<8|65536|1<<24,s!==void 0){s=cu(s);const a=oy(s);this.v4l^=Wl(a[0]),this.v4h^=Wl(a[1]),this.v5l^=Wl(a[2]),this.v5h^=Wl(a[3])}if(i!==void 0){i=cu(i);const a=oy(i);this.v6l^=Wl(a[0]),this.v6h^=Wl(a[1]),this.v7l^=Wl(a[2]),this.v7h^=Wl(a[3])}if(n!==void 0){const a=new Uint8Array(this.blockLen);a.set(n),this.update(a)}}get(){let{v0l:e,v0h:r,v1l:n,v1h:i,v2l:s,v2h:o,v3l:a,v3h:c,v4l:l,v4h:u,v5l:f,v5h:d,v6l:p,v6h:h,v7l:g,v7h:y}=this;return[e,r,n,i,s,o,a,c,l,u,f,d,p,h,g,y]}set(e,r,n,i,s,o,a,c,l,u,f,d,p,h,g,y){this.v0l=e|0,this.v0h=r|0,this.v1l=n|0,this.v1h=i|0,this.v2l=s|0,this.v2h=o|0,this.v3l=a|0,this.v3h=c|0,this.v4l=l|0,this.v4h=u|0,this.v5l=f|0,this.v5h=d|0,this.v6l=p|0,this.v6h=h|0,this.v7l=g|0,this.v7h=y|0}compress(e,r,n){this.get().forEach((c,l)=>Ze[l]=c),Ze.set(Ei,16);let{h:i,l:s}=tq(BigInt(this.length));Ze[24]=Ei[8]^s,Ze[25]=Ei[9]^i,n&&(Ze[28]=~Ze[28],Ze[29]=~Ze[29]);let o=0;const a=JAe;for(let c=0;c<12;c++)ef(0,4,8,12,e,r+2*a[o++]),tf(0,4,8,12,e,r+2*a[o++]),ef(1,5,9,13,e,r+2*a[o++]),tf(1,5,9,13,e,r+2*a[o++]),ef(2,6,10,14,e,r+2*a[o++]),tf(2,6,10,14,e,r+2*a[o++]),ef(3,7,11,15,e,r+2*a[o++]),tf(3,7,11,15,e,r+2*a[o++]),ef(0,5,10,15,e,r+2*a[o++]),tf(0,5,10,15,e,r+2*a[o++]),ef(1,6,11,12,e,r+2*a[o++]),tf(1,6,11,12,e,r+2*a[o++]),ef(2,7,8,13,e,r+2*a[o++]),tf(2,7,8,13,e,r+2*a[o++]),ef(3,4,9,14,e,r+2*a[o++]),tf(3,4,9,14,e,r+2*a[o++]);this.v0l^=Ze[0]^Ze[16],this.v0h^=Ze[1]^Ze[17],this.v1l^=Ze[2]^Ze[18],this.v1h^=Ze[3]^Ze[19],this.v2l^=Ze[4]^Ze[20],this.v2h^=Ze[5]^Ze[21],this.v3l^=Ze[6]^Ze[22],this.v3h^=Ze[7]^Ze[23],this.v4l^=Ze[8]^Ze[24],this.v4h^=Ze[9]^Ze[25],this.v5l^=Ze[10]^Ze[26],this.v5h^=Ze[11]^Ze[27],this.v6l^=Ze[12]^Ze[28],this.v6h^=Ze[13]^Ze[29],this.v7l^=Ze[14]^Ze[30],this.v7h^=Ze[15]^Ze[31],mc(Ze)}destroy(){this.destroyed=!0,mc(this.buffer32),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}TAe(t=>new e9e(t));/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */function hq(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function $_(t){if(typeof t!="boolean")throw new Error(`boolean expected, not ${t}`)}function c6(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function po(t,...e){if(!hq(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function TO(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function t9e(t,e){po(t);const r=e.outputLen;if(t.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}function Hf(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function fg(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function r9e(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}const n9e=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function i9e(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}function U_(t){if(typeof t=="string")t=i9e(t);else if(hq(t))t=B_(t);else throw new Error("Uint8Array expected, got "+typeof t);return t}function s9e(t,e){if(e==null||typeof e!="object")throw new Error("options must be defined");return Object.assign(t,e)}function o9e(t,e){if(t.length!==e.length)return!1;let r=0;for(let n=0;n<t.length;n++)r|=t[n]^e[n];return r===0}const a9e=(t,e)=>{function r(n,...i){if(po(n),!n9e)throw new Error("Non little-endian hardware is not yet supported");if(t.nonceLength!==void 0){const l=i[0];if(!l)throw new Error("nonce / iv required");t.varSizeNonce?po(l):po(l,t.nonceLength)}const s=t.tagLength;s&&i[1]!==void 0&&po(i[1]);const o=e(n,...i),a=(l,u)=>{if(u!==void 0){if(l!==2)throw new Error("cipher output not supported");po(u)}};let c=!1;return{encrypt(l,u){if(c)throw new Error("cannot encrypt() twice with same key + nonce");return c=!0,po(l),a(o.encrypt.length,u),o.encrypt(l,u)},decrypt(l,u){if(po(l),s&&l.length<s)throw new Error("invalid ciphertext length: smaller than tagLength="+s);return a(o.decrypt.length,u),o.decrypt(l,u)}}}return Object.assign(r,t),r};function kO(t,e,r=!0){if(e===void 0)return new Uint8Array(t);if(e.length!==t)throw new Error("invalid output length, expected "+t+", got: "+e.length);if(r&&!l9e(e))throw new Error("invalid output, must be aligned");return e}function PO(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);const i=BigInt(32),s=BigInt(4294967295),o=Number(r>>i&s),a=Number(r&s);t.setUint32(e+4,o,n),t.setUint32(e+0,a,n)}function c9e(t,e,r){$_(r);const n=new Uint8Array(16),i=r9e(n);return PO(i,0,BigInt(e),r),PO(i,8,BigInt(t),r),n}function l9e(t){return t.byteOffset%4===0}function B_(t){return Uint8Array.from(t)}const pq=t=>Uint8Array.from(t.split("").map(e=>e.charCodeAt(0))),u9e=pq("expand 16-byte k"),f9e=pq("expand 32-byte k"),d9e=Hf(u9e),h9e=Hf(f9e);function Br(t,e){return t<<e|t>>>32-e}function F_(t){return t.byteOffset%4===0}const Nw=64,p9e=16,gq=2**32-1,RO=new Uint32Array;function g9e(t,e,r,n,i,s,o,a){const c=i.length,l=new Uint8Array(Nw),u=Hf(l),f=F_(i)&&F_(s),d=f?Hf(i):RO,p=f?Hf(s):RO;for(let h=0;h<c;o++){if(t(e,r,n,u,o,a),o>=gq)throw new Error("arx: counter overflow");const g=Math.min(Nw,c-h);if(f&&g===Nw){const y=h/4;if(h%4!==0)throw new Error("arx: invalid block position");for(let x=0,C;x<p9e;x++)C=y+x,p[C]=d[C]^u[x];h+=Nw;continue}for(let y=0,x;y<g;y++)x=h+y,s[x]=i[x]^l[y];h+=g}}function m9e(t,e){const{allowShortKeys:r,extendNonceFn:n,counterLength:i,counterRight:s,rounds:o}=s9e({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},e);if(typeof t!="function")throw new Error("core must be a function");return c6(i),c6(o),$_(s),$_(r),(a,c,l,u,f=0)=>{po(a),po(c),po(l);const d=l.length;if(u===void 0&&(u=new Uint8Array(d)),po(u),c6(f),f<0||f>=gq)throw new Error("arx: counter overflow");if(u.length<d)throw new Error(`arx: output (${u.length}) is shorter than data (${d})`);const p=[];let h=a.length,g,y;if(h===32)p.push(g=B_(a)),y=h9e;else if(h===16&&r)g=new Uint8Array(32),g.set(a),g.set(a,16),y=d9e,p.push(g);else throw new Error(`arx: invalid 32-byte key, got length=${h}`);F_(c)||p.push(c=B_(c));const x=Hf(g);if(n){if(c.length!==24)throw new Error("arx: extended nonce must be 24 bytes");n(y,x,Hf(c.subarray(0,16)),x),c=c.subarray(16)}const C=16-i;if(C!==c.length)throw new Error(`arx: nonce must be ${C} or 16 bytes`);if(C!==12){const L=new Uint8Array(12);L.set(c,s?0:12-c.length),c=L,p.push(c)}const _=Hf(c);return g9e(t,y,x,_,l,u,f,o),fg(...p),u}}const Yi=(t,e)=>t[e++]&255|(t[e++]&255)<<8;class y9e{constructor(e){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,e=U_(e),po(e,32);const r=Yi(e,0),n=Yi(e,2),i=Yi(e,4),s=Yi(e,6),o=Yi(e,8),a=Yi(e,10),c=Yi(e,12),l=Yi(e,14);this.r[0]=r&8191,this.r[1]=(r>>>13|n<<3)&8191,this.r[2]=(n>>>10|i<<6)&7939,this.r[3]=(i>>>7|s<<9)&8191,this.r[4]=(s>>>4|o<<12)&255,this.r[5]=o>>>1&8190,this.r[6]=(o>>>14|a<<2)&8191,this.r[7]=(a>>>11|c<<5)&8065,this.r[8]=(c>>>8|l<<8)&8191,this.r[9]=l>>>5&127;for(let u=0;u<8;u++)this.pad[u]=Yi(e,16+2*u)}process(e,r,n=!1){const i=n?0:2048,{h:s,r:o}=this,a=o[0],c=o[1],l=o[2],u=o[3],f=o[4],d=o[5],p=o[6],h=o[7],g=o[8],y=o[9],x=Yi(e,r+0),C=Yi(e,r+2),_=Yi(e,r+4),L=Yi(e,r+6),P=Yi(e,r+8),z=Yi(e,r+10),W=Yi(e,r+12),B=Yi(e,r+14);let I=s[0]+(x&8191),j=s[1]+((x>>>13|C<<3)&8191),D=s[2]+((C>>>10|_<<6)&8191),O=s[3]+((_>>>7|L<<9)&8191),T=s[4]+((L>>>4|P<<12)&8191),m=s[5]+(P>>>1&8191),b=s[6]+((P>>>14|z<<2)&8191),E=s[7]+((z>>>11|W<<5)&8191),k=s[8]+((W>>>8|B<<8)&8191),R=s[9]+(B>>>5|i),M=0,H=M+I*a+j*(5*y)+D*(5*g)+O*(5*h)+T*(5*p);M=H>>>13,H&=8191,H+=m*(5*d)+b*(5*f)+E*(5*u)+k*(5*l)+R*(5*c),M+=H>>>13,H&=8191;let N=M+I*c+j*a+D*(5*y)+O*(5*g)+T*(5*h);M=N>>>13,N&=8191,N+=m*(5*p)+b*(5*d)+E*(5*f)+k*(5*u)+R*(5*l),M+=N>>>13,N&=8191;let v=M+I*l+j*c+D*a+O*(5*y)+T*(5*g);M=v>>>13,v&=8191,v+=m*(5*h)+b*(5*p)+E*(5*d)+k*(5*f)+R*(5*u),M+=v>>>13,v&=8191;let U=M+I*u+j*l+D*c+O*a+T*(5*y);M=U>>>13,U&=8191,U+=m*(5*g)+b*(5*h)+E*(5*p)+k*(5*d)+R*(5*f),M+=U>>>13,U&=8191;let G=M+I*f+j*u+D*l+O*c+T*a;M=G>>>13,G&=8191,G+=m*(5*y)+b*(5*g)+E*(5*h)+k*(5*p)+R*(5*d),M+=G>>>13,G&=8191;let S=M+I*d+j*f+D*u+O*l+T*c;M=S>>>13,S&=8191,S+=m*a+b*(5*y)+E*(5*g)+k*(5*h)+R*(5*p),M+=S>>>13,S&=8191;let J=M+I*p+j*d+D*f+O*u+T*l;M=J>>>13,J&=8191,J+=m*c+b*a+E*(5*y)+k*(5*g)+R*(5*h),M+=J>>>13,J&=8191;let ne=M+I*h+j*p+D*d+O*f+T*u;M=ne>>>13,ne&=8191,ne+=m*l+b*c+E*a+k*(5*y)+R*(5*g),M+=ne>>>13,ne&=8191;let Z=M+I*g+j*h+D*p+O*d+T*f;M=Z>>>13,Z&=8191,Z+=m*u+b*l+E*c+k*a+R*(5*y),M+=Z>>>13,Z&=8191;let Q=M+I*y+j*g+D*h+O*p+T*d;M=Q>>>13,Q&=8191,Q+=m*f+b*u+E*l+k*c+R*a,M+=Q>>>13,Q&=8191,M=(M<<2)+M|0,M=M+H|0,H=M&8191,M=M>>>13,N+=M,s[0]=H,s[1]=N,s[2]=v,s[3]=U,s[4]=G,s[5]=S,s[6]=J,s[7]=ne,s[8]=Z,s[9]=Q}finalize(){const{h:e,pad:r}=this,n=new Uint16Array(10);let i=e[1]>>>13;e[1]&=8191;for(let a=2;a<10;a++)e[a]+=i,i=e[a]>>>13,e[a]&=8191;e[0]+=i*5,i=e[0]>>>13,e[0]&=8191,e[1]+=i,i=e[1]>>>13,e[1]&=8191,e[2]+=i,n[0]=e[0]+5,i=n[0]>>>13,n[0]&=8191;for(let a=1;a<10;a++)n[a]=e[a]+i,i=n[a]>>>13,n[a]&=8191;n[9]-=8192;let s=(i^1)-1;for(let a=0;a<10;a++)n[a]&=s;s=~s;for(let a=0;a<10;a++)e[a]=e[a]&s|n[a];e[0]=(e[0]|e[1]<<13)&65535,e[1]=(e[1]>>>3|e[2]<<10)&65535,e[2]=(e[2]>>>6|e[3]<<7)&65535,e[3]=(e[3]>>>9|e[4]<<4)&65535,e[4]=(e[4]>>>12|e[5]<<1|e[6]<<14)&65535,e[5]=(e[6]>>>2|e[7]<<11)&65535,e[6]=(e[7]>>>5|e[8]<<8)&65535,e[7]=(e[8]>>>8|e[9]<<5)&65535;let o=e[0]+r[0];e[0]=o&65535;for(let a=1;a<8;a++)o=(e[a]+r[a]|0)+(o>>>16)|0,e[a]=o&65535;fg(n)}update(e){TO(this),e=U_(e),po(e);const{buffer:r,blockLen:n}=this,i=e.length;for(let s=0;s<i;){const o=Math.min(n-this.pos,i-s);if(o===n){for(;n<=i-s;s+=n)this.process(e,s);continue}r.set(e.subarray(s,s+o),this.pos),this.pos+=o,s+=o,this.pos===n&&(this.process(r,0,!1),this.pos=0)}return this}destroy(){fg(this.h,this.r,this.buffer,this.pad)}digestInto(e){TO(this),t9e(e,this),this.finished=!0;const{buffer:r,h:n}=this;let{pos:i}=this;if(i){for(r[i++]=1;i<16;i++)r[i]=0;this.process(r,0,!0)}this.finalize();let s=0;for(let o=0;o<8;o++)e[s++]=n[o]>>>0,e[s++]=n[o]>>>8;return e}digest(){const{buffer:e,outputLen:r}=this;this.digestInto(e);const n=e.slice(0,r);return this.destroy(),n}}function b9e(t){const e=(n,i)=>t(i).update(U_(n)).digest(),r=t(new Uint8Array(32));return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=n=>t(n),e}const w9e=b9e(t=>new y9e(t));function v9e(t,e,r,n,i,s=20){let o=t[0],a=t[1],c=t[2],l=t[3],u=e[0],f=e[1],d=e[2],p=e[3],h=e[4],g=e[5],y=e[6],x=e[7],C=i,_=r[0],L=r[1],P=r[2],z=o,W=a,B=c,I=l,j=u,D=f,O=d,T=p,m=h,b=g,E=y,k=x,R=C,M=_,H=L,N=P;for(let U=0;U<s;U+=2)z=z+j|0,R=Br(R^z,16),m=m+R|0,j=Br(j^m,12),z=z+j|0,R=Br(R^z,8),m=m+R|0,j=Br(j^m,7),W=W+D|0,M=Br(M^W,16),b=b+M|0,D=Br(D^b,12),W=W+D|0,M=Br(M^W,8),b=b+M|0,D=Br(D^b,7),B=B+O|0,H=Br(H^B,16),E=E+H|0,O=Br(O^E,12),B=B+O|0,H=Br(H^B,8),E=E+H|0,O=Br(O^E,7),I=I+T|0,N=Br(N^I,16),k=k+N|0,T=Br(T^k,12),I=I+T|0,N=Br(N^I,8),k=k+N|0,T=Br(T^k,7),z=z+D|0,N=Br(N^z,16),E=E+N|0,D=Br(D^E,12),z=z+D|0,N=Br(N^z,8),E=E+N|0,D=Br(D^E,7),W=W+O|0,R=Br(R^W,16),k=k+R|0,O=Br(O^k,12),W=W+O|0,R=Br(R^W,8),k=k+R|0,O=Br(O^k,7),B=B+T|0,M=Br(M^B,16),m=m+M|0,T=Br(T^m,12),B=B+T|0,M=Br(M^B,8),m=m+M|0,T=Br(T^m,7),I=I+j|0,H=Br(H^I,16),b=b+H|0,j=Br(j^b,12),I=I+j|0,H=Br(H^I,8),b=b+H|0,j=Br(j^b,7);let v=0;n[v++]=o+z|0,n[v++]=a+W|0,n[v++]=c+B|0,n[v++]=l+I|0,n[v++]=u+j|0,n[v++]=f+D|0,n[v++]=d+O|0,n[v++]=p+T|0,n[v++]=h+m|0,n[v++]=g+b|0,n[v++]=y+E|0,n[v++]=x+k|0,n[v++]=C+R|0,n[v++]=_+M|0,n[v++]=L+H|0,n[v++]=P+N|0}const x9e=m9e(v9e,{counterRight:!1,counterLength:4,allowShortKeys:!1}),E9e=new Uint8Array(16),OO=(t,e)=>{t.update(e);const r=e.length%16;r&&t.update(E9e.subarray(r))},C9e=new Uint8Array(32);function DO(t,e,r,n,i){const s=t(e,r,C9e),o=w9e.create(s);i&&OO(o,i),OO(o,n);const a=c9e(n.length,i?i.length:0,!0);o.update(a);const c=o.digest();return fg(s,a),c}const _9e=t=>(e,r,n)=>({encrypt(i,s){const o=i.length;s=kO(o+16,s,!1),s.set(i);const a=s.subarray(0,-16);t(e,r,a,a,1);const c=DO(t,e,r,a,n);return s.set(c,o),fg(c),s},decrypt(i,s){s=kO(i.length-16,s,!1);const o=i.subarray(0,-16),a=i.subarray(-16),c=DO(t,e,r,o,n);if(!o9e(a,c))throw new Error("invalid tag");return s.set(i.subarray(0,-16)),t(e,r,s,s,1),fg(c),s}});a9e({blockSize:64,nonceLength:12,tagLength:16},_9e(x9e));class mq extends Ux{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,AAe(e);const n=cu(r);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,s=new Uint8Array(i);s.set(n.length>i?e.create().update(n).digest():n);for(let o=0;o<s.length;o++)s[o]^=54;this.iHash.update(s),this.oHash=e.create();for(let o=0;o<s.length;o++)s[o]^=106;this.oHash.update(s),mc(s)}update(e){return ad(this),this.iHash.update(e),this}digestInto(e){ad(this),Ia(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:r,iHash:n,finished:i,destroyed:s,blockLen:o,outputLen:a}=this;return e=e,e.finished=i,e.destroyed=s,e.blockLen=o,e.outputLen=a,e.oHash=r._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const yq=(t,e,r)=>new mq(t,e).update(r).digest();yq.create=(t,e)=>new mq(t,e);Uint8Array.from([0]);const o7=BigInt(0),j_=BigInt(1);function X3(t,e){if(typeof e!="boolean")throw new Error(t+" boolean expected, got "+e)}function Iw(t){const e=t.toString(16);return e.length&1?"0"+e:e}function bq(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return t===""?o7:BigInt("0x"+t)}function Bx(t){return bq(ay(t))}function e4(t){return Ia(t),bq(ay(Uint8Array.from(t).reverse()))}function a7(t,e){return n7(t.toString(16).padStart(e*2,"0"))}function c7(t,e){return a7(t,e).reverse()}function uo(t,e,r){let n;if(typeof e=="string")try{n=n7(e)}catch(s){throw new Error(t+" must be hex string or Uint8Array, cause: "+s)}else if(t7(e))n=Uint8Array.from(e);else throw new Error(t+" must be hex string or Uint8Array");const i=n.length;if(typeof r=="number"&&i!==r)throw new Error(t+" of length "+r+" expected, got "+i);return n}const l6=t=>typeof t=="bigint"&&o7<=t;function A9e(t,e,r){return l6(t)&&l6(e)&&l6(r)&&e<=t&&t<r}function z_(t,e,r,n){if(!A9e(e,r,n))throw new Error("expected valid "+t+": "+r+" <= n < "+n+", got "+e)}function S9e(t){let e;for(e=0;t>o7;t>>=j_,e+=1);return e}const Fx=t=>(j_<<BigInt(t))-j_;function N9e(t,e,r){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");const n=d=>new Uint8Array(d),i=d=>Uint8Array.of(d);let s=n(t),o=n(t),a=0;const c=()=>{s.fill(1),o.fill(0),a=0},l=(...d)=>r(o,s,...d),u=(d=n(0))=>{o=l(i(0),d),s=l(),d.length!==0&&(o=l(i(1),d),s=l())},f=()=>{if(a++>=1e3)throw new Error("drbg: tried 1000 values");let d=0;const p=[];for(;d<e;){s=l();const h=s.slice();p.push(h),d+=s.length}return rh(...p)};return(d,p)=>{c(),u(d);let h;for(;!(h=p(f()));)u();return c(),h}}function jx(t,e,r={}){if(!t||typeof t!="object")throw new Error("expected valid options object");function n(i,s,o){const a=t[i];if(o&&a===void 0)return;const c=typeof a;if(c!==s||a===null)throw new Error(`param "${i}
2076" is invalid: expected ${s}, got ${c}`)}Object.entries(e).forEach(([i,s])=>n(i,s,!1)),Object.entries(r).forEach(([i,s])=>n(i,s,!0))}function LO(t){const e=new WeakMap;return(r,...n)=>{const i=e.get(r);if(i!==void 0)return i;const s=t(r,...n);return e.set(r,s),s}}const xo=BigInt(0),qs=BigInt(1),nh=BigInt(2),I9e=BigInt(3),wq=BigInt(4),vq=BigInt(5),xq=BigInt(8);function ga(t,e){const r=t%e;return r>=xo?r:e+r}function Ha(t,e,r){let n=t;for(;e-- >xo;)n*=n,n%=r;return n}function MO(t,e){if(t===xo)throw new Error("invert: expected non-zero number");if(e<=xo)throw new Error("invert: expected positive modulus, got "+e);let r=ga(t,e),n=e,i=xo,s=qs;for(;r!==xo;){const o=n/r,a=n%r,c=i-s*o;n=r,r=a,i=s,s=c}if(n!==qs)throw new Error("invert: does not exist");return ga(i,e)}function Eq(t,e){const r=(t.ORDER+qs)/wq,n=t.pow(e,r);if(!t.eql(t.sqr(n),e))throw new Error("Cannot find square root");return n}function T9e(t,e){const r=(t.ORDER-vq)/xq,n=t.mul(e,nh),i=t.pow(n,r),s=t.mul(e,i),o=t.mul(t.mul(s,nh),i),a=t.mul(s,t.sub(o,t.ONE));if(!t.eql(t.sqr(a),e))throw new Error("Cannot find square root");return a}function k9e(t){if(t<BigInt(3))throw new Error("sqrt is not defined for small field");let e=t-qs,r=0;for(;e%nh===xo;)e/=nh,r++;let n=nh;const i=qg(t);for(;$O(i,n)===1;)if(n++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(r===1)return Eq;let s=i.pow(n,e);const o=(e+qs)/nh;return function(a,c){if(a.is0(c))return c;if($O(a,c)!==1)throw new Error("Cannot find square root");let l=r,u=a.mul(a.ONE,s),f=a.pow(c,e),d=a.pow(c,o);for(;!a.eql(f,a.ONE);){if(a.is0(f))return a.ZERO;let p=1,h=a.sqr(f);for(;!a.eql(h,a.ONE);)if(p++,h=a.sqr(h),p===l)throw new Error("Cannot find square root");const g=qs<<BigInt(l-p-1),y=a.pow(u,g);l=p,u=a.sqr(y),f=a.mul(f,u),d=a.mul(d,y)}return d}}function P9e(t){return t%wq===I9e?Eq:t%xq===vq?T9e:k9e(t)}const R9e=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function O9e(t){const e={ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"},r=R9e.reduce((n,i)=>(n[i]="function",n),e);return jx(t,r),t}function D9e(t,e,r){if(r<xo)throw new Error("invalid exponent, negatives unsupported");if(r===xo)return t.ONE;if(r===qs)return e;let n=t.ONE,i=e;for(;r>xo;)r&qs&&(n=t.mul(n,i)),i=t.sqr(i),r>>=qs;return n}function Cq(t,e,r=!1){const n=new Array(e.length).fill(r?t.ZERO:void 0),i=e.reduce((o,a,c)=>t.is0(a)?o:(n[c]=o,t.mul(o,a)),t.ONE),s=t.inv(i);return e.reduceRight((o,a,c)=>t.is0(a)?o:(n[c]=t.mul(o,n[c]),t.mul(o,a)),s),n}function $O(t,e){const r=(t.ORDER-qs)/nh,n=t.pow(e,r),i=t.eql(n,t.ONE),s=t.eql(n,t.ZERO),o=t.eql(n,t.neg(t.ONE));if(!i&&!s&&!o)throw new Error("invalid Legendre symbol result");return i?1:s?0:-1}function L9e(t,e){e!==void 0&&od(e);const r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function qg(t,e,r=!1,n={}){if(t<=xo)throw new Error("invalid field: expected ORDER > 0, got "+t);let i,s;if(typeof e=="object"&&e!=null){if(n.sqrt||r)throw new Error("cannot specify opts in two arguments");const u=e;u.BITS&&(i=u.BITS),u.sqrt&&(s=u.sqrt),typeof u.isLE=="boolean"&&(r=u.isLE)}else typeof e=="number"&&(i=e),n.sqrt&&(s=n.sqrt);const{nBitLength:o,nByteLength:a}=L9e(t,i);if(a>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let c;const l=Object.freeze({ORDER:t,isLE:r,BITS:o,BYTES:a,MASK:Fx(o),ZERO:xo,ONE:qs,create:u=>ga(u,t),isValid:u=>{if(typeof u!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof u);return xo<=u&&u<t},is0:u=>u===xo,isValidNot0:u=>!l.is0(u)&&l.isValid(u),isOdd:u=>(u&qs)===qs,neg:u=>ga(-u,t),eql:(u,f)=>u===f,sqr:u=>ga(u*u,t),add:(u,f)=>ga(u+f,t),sub:(u,f)=>ga(u-f,t),mul:(u,f)=>ga(u*f,t),pow:(u,f)=>D9e(l,u,f),div:(u,f)=>ga(u*MO(f,t),t),sqrN:u=>u*u,addN:(u,f)=>u+f,subN:(u,f)=>u-f,mulN:(u,f)=>u*f,inv:u=>MO(u,t),sqrt:s||(u=>(c||(c=P9e(t)),c(l,u))),toBytes:u=>r?c7(u,a):a7(u,a),fromBytes:u=>{if(u.length!==a)throw new Error("Field.fromBytes: expected "+a+" bytes, got "+u.length);return r?e4(u):Bx(u)},invertBatch:u=>Cq(l,u),cmov:(u,f,d)=>d?f:u});return Object.freeze(l)}function _q(t){if(typeof t!="bigint")throw new Error("field order must be bigint");const e=t.toString(2).length;return Math.ceil(e/8)}function Aq(t){const e=_q(t);return e+Math.ceil(e/2)}function M9e(t,e,r=!1){const n=t.length,i=_q(e),s=Aq(e);if(n<16||n<s||n>1024)throw new Error("expected "+s+"-1024 bytes of input, got "+n);const o=r?e4(t):Bx(t),a=ga(o,e-qs)+qs;return r?c7(a,i):a7(a,i)}const dg=BigInt(0),ih=BigInt(1);function Um(t,e){const r=e.negate();return t?r:e}function $9e(t,e,r){const n=s=>s.pz,i=Cq(t.Fp,r.map(n));return r.map((s,o)=>
vendor: 4,324 bytes, line 2076
2076s.toAffine(i[o])).map(t.fromAffine)}function Sq(t,e){if(!Number.isSafeInteger(t)||t<=0||t>e)throw new Error("invalid window size, expected [1.."+e+"], got W="+t)}function u6(t,e){Sq(t,e);const r=Math.ceil(e/t)+1,n=2**(t-1),i=2**t,s=Fx(t),o=BigInt(t);return{windows:r,windowSize:n,mask:s,maxNumber:i,shiftBy:o}}function UO(t,e,r){const{windowSize:n,mask:i,maxNumber:s,shiftBy:o}=r;let a=Number(t&i),c=t>>o;a>n&&(a-=s,c+=ih);const l=e*n,u=l+Math.abs(a)-1,f=a===0,d=a<0,p=e%2!==0;return{nextN:c,offset:u,isZero:f,isNeg:d,isNegF:p,offsetF:l}}function U9e(t,e){if(!Array.isArray(t))throw new Error("array expected");t.forEach((r,n)=>{if(!(r instanceof e))throw new Error("invalid point at index "+n)})}function B9e(t,e){if(!Array.isArray(t))throw new Error("array of scalars expected");t.forEach((r,n)=>{if(!e.isValid(r))throw new Error("invalid scalar at index "+n)})}const f6=new WeakMap,Nq=new WeakMap;function d6(t){return Nq.get(t)||1}function BO(t){if(t!==dg)throw new Error("invalid wNAF")}function F9e(t,e){return{constTimeNegate:Um,hasPrecomputes(r){return d6(r)!==1},unsafeLadder(r,n,i=t.ZERO){let s=r;for(;n>dg;)n&ih&&(i=i.add(s)),s=s.double(),n>>=ih;return i},precomputeWindow(r,n){const{windows:i,windowSize:s}=u6(n,e),o=[];let a=r,c=a;for(let l=0;l<i;l++){c=a,o.push(c);for(let u=1;u<s;u++)c=c.add(a),o.push(c);a=c.double()}return o},wNAF(r,n,i){let s=t.ZERO,o=t.BASE;const a=u6(r,e);for(let c=0;c<a.windows;c++){const{nextN:l,offset:u,isZero:f,isNeg:d,isNegF:p,offsetF:h}=UO(i,c,a);i=l,f?o=o.add(Um(p,n[h])):s=s.add(Um(d,n[u]))}return BO(i),{p:s,f:o}},wNAFUnsafe(r,n,i,s=t.ZERO){const o=u6(r,e);for(let a=0;a<o.windows&&i!==dg;a++){const{nextN:c,offset:l,isZero:u,isNeg:f}=UO(i,a,o);if(i=c,!u){const d=n[l];s=s.add(f?d.negate():d)}}return BO(i),s},getPrecomputes(r,n,i){let s=f6.get(n);return s||(s=this.precomputeWindow(n,r),r!==1&&(typeof i=="function"&&(s=i(s)),f6.set(n,s))),s},wNAFCached(r,n,i){const s=d6(r);return this.wNAF(s,this.getPrecomputes(s,r,i),n)},wNAFCachedUnsafe(r,n,i,s){const o=d6(r);return o===1?this.unsafeLadder(r,n,s):this.wNAFUnsafe(o,this.getPrecomputes(o,r,i),n,s)},setWindowSize(r,n){Sq(n,e),Nq.set(r,n),f6.delete(r)}}}function j9e(t,e,r,n){let i=e,s=t.ZERO,o=t.ZERO;for(;r>dg||n>dg;)r&ih&&(s=s.add(i)),n&ih&&(o=o.add(i)),i=i.double(),r>>=ih,n>>=ih;return{p1:s,p2:o}}function z9e(t,e,r,n){U9e(r,t),B9e(n,e);const i=r.length,s=n.length;if(i!==s)throw new Error("arrays of points and scalars must have equal length");const o=t.ZERO,a=S9e(BigInt(i));let c=1;a>12?c=a-3:a>4?c=a-2:a>0&&(c=2);const l=Fx(c),u=new Array(Number(l)+1).fill(o),f=Math.floor((e.BITS-1)/c)*c;let d=o;for(let p=f;p>=0;p-=c){u.fill(o);for(let g=0;g<s;g++){const y=n[g],x=Number(y>>BigInt(p)&l);u[x]=u[x].add(r[g])}let h=o;for(let g=u.length-1,y=o;g>0;g--)y=y.add(u[g]),h=h.add(y);if(d=d.add(h),p!==0)for(let g=0;g<c;g++)d=d.double()}return d}function FO(t,e){if(e){if(e.ORDER!==t)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return O9e(e),e}else return qg(t)}function W9e(t,e,r={}){if(!e||typeof e!="object")throw new Error(`expected valid ${t} CURVE object`);for(const o of["p","n","h"]){const a=e[o];if(!(typeof a=="bigint"&&a>dg))throw new Error(`CURVE.${o} must be positive bigint`)}const n=FO(e.p,r.Fp),i=FO(e.n,r.Fn),s=["Gx","Gy","a","b"];for(const o of s)if(!n.isValid(e[o]))throw new Error(`CURVE.${o} must be valid field element of CURVE.Fp`);return{Fp:n,Fn:i}}BigInt(0),BigInt(1),BigInt(2),BigInt(8);const T1=BigInt(0),S0=BigInt(1),Tw=BigInt(2);function H9e(t){return jx(t,{adjustScalarBytes:"function",powPminus2:"function"}),Object.freeze({...t})}function q9e(t){const e=H9e(t),{P:r,type:n,adjustScalarBytes:i,powPminus2:s,randomBytes:o}=e,a=n==="x25519";if(!a&&n!=="x448")throw new Error("invalid type");const c=o||oq,l=a?255:448,u=a?32:56,f=BigInt(a?9:5),d=BigInt(a?121665:39081),p=a?Tw**BigInt(254):Tw**BigInt(447),h=a?BigInt(8)*Tw**BigInt(251)-S0:BigInt(4)*Tw**BigInt(445)-S0,g=p+h+S0,y=I=>ga(I,r),x=C(f);function C(I){return c7(y(I),u)}function _(I){const j=uo("u coordinate",I,u);return a&&(j[31]&=127),y(e4(j))}function L(I){return e4(i(uo("scalar",I,u)))}function P(I,j){const D=B(_(j),L(I));if(D===T1)throw new Error("invalid private or public key received");return C(D)}function z(I){return P(I,x)}function W(I,j,D){const O=y(I*(j-D));return j=y(j-O),D=y(D+O),{x_2:j,x_3:D}}
2076function B(I,j){z_("u",I,T1,r),z_("scalar",j,p,g);const D=j,O=I;let T=S0,m=T1,b=I,E=S0,k=T1;for(let M=BigInt(l-1);M>=T1;M--){const H=D>>M&S0;k^=H,{x_2:T,x_3:b}=W(k,T,b),{x_2:m,x_3:E}=W(k,m,E),k=H;const N=T+m,v=y(N*N),U=T-m,G=y(U*U),S=v-G,J=b+E,ne=b-E,Z=y(ne*N),Q=y(J*U),ee=Z+Q,re=Z-Q;b=y(ee*ee),E=y(O*y(re*re)),T=y(v*G),m=y(S*(v+y(d*S)))}({x_2:T,x_3:b}=W(k,T,b)),{x_2:m,x_3:E}=W(k,m,E);const R=s(m);return y(T*R)}return{scalarMult:P,scalarMultBase:z,getSharedSecret:(I,j)=>P(I,j),getPublicKey:I=>z(I),utils:{randomPrivateKey:()=>c(u)},GuBytes:x.slice()}}BigInt(0);const V9e=BigInt(1),jO=BigInt(2),K9e=BigInt(3),G9e=BigInt(5);BigInt(8);const Iq={p:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function Y9e(t){const e=BigInt(10),r=BigInt(20),n=BigInt(40),i=BigInt(80),s=Iq.p,o=t*t%s*t%s,a=Ha(o,jO,s)*o%s,c=Ha(a,V9e,s)*t%s,l=Ha(c,G9e,s)*c%s,u=Ha(l,e,s)*l%s,f=Ha(u,r,s)*u%s,d=Ha(f,n,s)*f%s,p=Ha(d,i,s)*d%s,h=Ha(p,i,s)*d%s,g=Ha(h,e,s)*l%s;return{pow_p_5_8:Ha(g,jO,s)*t%s,b2:o}}function Z9e(t){return t[0]&=248,t[31]&=127,t[31]|=64,t}(()=>{const t=Iq.p;return q9e({P:t,type:"x25519",powPminus2:e=>{const{pow_p_5_8:r,b2:n}=Y9e(e);return ga(Ha(r,K9e,t)*n,t)},adjustScalarBytes:Z9e})})();function zO(t){t.lowS!==void 0&&X3("lowS",t.lowS),t.prehash!==void 0&&X3("prehash",t.prehash)}class J9e extends Error{constructor(e=""){super(e)}}const Jl={Err:J9e,_tlv:{encode:(t,e)=>{const{Err:r}=Jl;if(t<0||t>256)throw new r("tlv.encode: wrong tag");if(e.length&1)throw new r("tlv.encode: unpadded data");const n=e.length/2,i=Iw(n);if(i.length/2&128)throw new r("tlv.encode: long form length too big");const s=n>127?Iw(i.length/2|128):"";return Iw(t)+s+i+e},decode(t,e){const{Err:r}=Jl;let n=0;if(t<0||t>256)throw new r("tlv.encode: wrong tag");if(e.length<2||e[n++]!==t)throw new r("tlv.decode: wrong tlv");const i=e[n++],s=!!(i&128);let o=0;if(!s)o=i;else{const c=i&127;if(!c)throw new r("tlv.decode(long): indefinite length not supported");if(c>4)throw new r("tlv.decode(long): byte length is too big");const l=e.subarray(n,n+c);if(l.length!==c)throw new r("tlv.decode: length bytes not complete");if(l[0]===0)throw new r("tlv.decode(long): zero leftmost byte");for(const u of l)o=o<<8|u;if(n+=c,o<128)throw new r("tlv.decode(long): not minimal encoding")}const a=e.subarray(n,n+o);if(a.length!==o)throw new r("tlv.decode: wrong value length");return{v:a,l:e.subarray(n+o)}}},_int:{encode(t){const{Err:e}=Jl;if(t<Bm)throw new e("integer: negative integers are not allowed");let r=Iw(t);if(Number.parseInt(r[0],16)&8&&(r="00"+r),r.length&1)throw new e("unexpected DER parsing assertion: unpadded hex");return r},decode(t){const{Err:e}=Jl;if(t[0]&128)throw new e("invalid signature integer: negative");if(t[0]===0&&!(t[1]&128))throw new e("invalid signature integer: unnecessary leading zero");return Bx(t)}},toSig(t){const{Err:e,_int:r,_tlv:n}=Jl,i=uo("signature",t),{v:s,l:o}=n.decode(48,i);if(o.length)throw new e("invalid signature: left bytes after parsing");const{v:a,l:c}=n.decode(2,s),{v:l,l:u}=n.decode(2,c);if(u.length)throw new e("invalid signature: left bytes after parsing");return{r:r.decode(a),s:r.decode(l)}},hexFromSig(t){const{_tlv:e,_int:r}=Jl,n=e.encode(2,r.encode(t.r)),i=e.encode(2,r.encode(t.s)),s=n+i;return e.encode(48,s)}},Bm=BigInt(0),Fm=BigInt(1),Q9e=BigInt(2),kw=BigInt(3),X9e=BigInt(4);function eSe(t,e,r){function n(i){const s=t.sqr(i),o=t.mul(s,i);return t.add(t.add(o,t.mul(i,e)),r)}return n}function Tq(t,e,r){const{BYTES:n}=t;function i(s){let o;if(typeof s=="bigint")o=s;else{let a=uo("private key",s);if(e){if(!e.includes(a.length*2))throw new Error("invalid private key");const c=new Uint8Array(n);c.set(a,c.length-a.length),a=c}try{o=t.fromBytes(a)}catch{throw new Error(`invalid private key: expected ui8a of size ${n}, got ${typeof s}`)}}if(r&&(o=t.create(o)),!t.isValidNot0(o))throw new Error("invalid private key: out of range [1..N-1]");return o}return i}function tSe(t,e={}){const{Fp:r,Fn:n}=W9e("weierstrass",t,e),{h:i,n:s}=t;jx(e,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});
2076const{endo:o}=e;if(o&&(!r.is0(t.a)||typeof o.beta!="bigint"||typeof o.splitScalar!="function"))throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function');function a(){if(!r.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}function c(B,I,j){const{x:D,y:O}=I.toAffine(),T=r.toBytes(D);if(X3("isCompressed",j),j){a();const m=!r.isOdd(O);return rh(kq(m),T)}else return rh(Uint8Array.of(4),T,r.toBytes(O))}function l(B){Ia(B);const I=r.BYTES,j=I+1,D=2*I+1,O=B.length,T=B[0],m=B.subarray(1);if(O===j&&(T===2||T===3)){const b=r.fromBytes(m);if(!r.isValid(b))throw new Error("bad point: is not on curve, wrong x");const E=d(b);let k;try{k=r.sqrt(E)}catch(M){const H=M instanceof Error?": "+M.message:"";throw new Error("bad point: is not on curve, sqrt error"+H)}a();const R=r.isOdd(k);return(T&1)===1!==R&&(k=r.neg(k)),{x:b,y:k}}else if(O===D&&T===4){const b=r.fromBytes(m.subarray(I*0,I*1)),E=r.fromBytes(m.subarray(I*1,I*2));if(!p(b,E))throw new Error("bad point: is not on curve");return{x:b,y:E}}else throw new Error(`bad point: got length ${O}, expected compressed=${j} or uncompressed=${D}`)}const u=e.toBytes||c,f=e.fromBytes||l,d=eSe(r,t.a,t.b);function p(B,I){const j=r.sqr(I),D=d(B);return r.eql(j,D)}if(!p(t.Gx,t.Gy))throw new Error("bad curve params: generator point");const h=r.mul(r.pow(t.a,kw),X9e),g=r.mul(r.sqr(t.b),BigInt(27));if(r.is0(r.add(h,g)))throw new Error("bad curve params: a or b");function y(B,I,j=!1){if(!r.isValid(I)||j&&r.is0(I))throw new Error(`bad point coordinate ${B}`);return I}function x(B){if(!(B instanceof P))throw new Error("ProjectivePoint expected")}const C=LO((B,I)=>{const{px:j,py:D,pz:O}=B;if(r.eql(O,r.ONE))return{x:j,y:D};const T=B.is0();I==null&&(I=T?r.ONE:r.inv(O));const m=r.mul(j,I),b=r.mul(D,I),E=r.mul(O,I);if(T)return{x:r.ZERO,y:r.ZERO};if(!r.eql(E,r.ONE))throw new Error("invZ was invalid");return{x:m,y:b}}),_=LO(B=>{if(B.is0()){if(e.allowInfinityPoint&&!r.is0(B.py))return;throw new Error("bad point: ZERO")}const{x:I,y:j}=B.toAffine();if(!r.isValid(I)||!r.isValid(j))throw new Error("bad point: x or y not field elements");if(!p(I,j))throw new Error("bad point: equation left != right");if(!B.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});function L(B,I,j,D,O){return j=new P(r.mul(j.px,B),j.py,j.pz),I=Um(D,I),j=Um(O,j),I.add(j)}class P{constructor(I,j,D){this.px=y("x",I),this.py=y("y",j,!0),this.pz=y("z",D),Object.freeze(this)}static fromAffine(I){const{x:j,y:D}=I||{};if(!I||!r.isValid(j)||!r.isValid(D))throw new Error("invalid affine point");if(I instanceof P)throw new Error("projective point not allowed");return r.is0(j)&&r.is0(D)?P.ZERO:new P(j,D,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(I){return $9e(P,"pz",I)}static fromBytes(I){return Ia(I),P.fromHex(I)}static fromHex(I){const j=P.fromAffine(f(uo("pointHex",I)));return j.assertValidity(),j}static fromPrivateKey(I){const j=Tq(n,e.allowedPrivateKeyLengths,e.wrapPrivateKey);return P.BASE.multiply(j(I))}static msm(I,j){return z9e(P,n,I,j)}precompute(I=8,j=!0){return W.setWindowSize(this,I),j||this.multiply(kw),this}_setWindowSize(I){this.precompute(I)}assertValidity(){_(this)}hasEvenY(){const{y:I}=this.toAffine();if(!r.isOdd)throw new Error("Field doesn't support isOdd");return!r.isOdd(I)}equals(I){x(I);const{px:j,py:D,pz:O}=this,{px:T,py:m,pz:b}=I,E=r.eql(r.mul(j,b),r.mul(T,O)),k=r.eql(r.mul(D,b),r.mul(m,O));return E&&k}negate(){return new P(this.px,r.neg(this.py),this.pz)}double(){const{a:I,b:j}=t,D=r.mul(j,kw),{px:O,py:T,pz:m}=this;let b=r.ZERO,E=r.ZERO,k=r.ZERO,R=r.mul(O,O),M=r.mul(T,T),H=r.mul(m,m),N=r.mul(O,T);return N=r.add(N,N),k=r.mul(O,m),k=r.add(k,k),b=r.mul(I,k),E=r.mul(D,H),E=r.add(b,E),b=r.sub(M,E),E=r.add(M,E),E=r.mul(b,E),b=r.mul(N,b),k=r.mul(D,k),H=r.mul(I,H),N=r.sub(R,H),N=r.mul(I,N),N=r.add(N,k),k=r.add(R,R),R=r.add(k,R),R=r.add(R,H),R=r.mul(R,N),E=r.add(E,R),H=r.mul(T,m),H=r.add(H,H),R=r.mul(H,N),b=r.sub(b,R),k=r.mul(H,M),k=r.add(k,k),k=r.add(k,k),new P(b,E,k)}add(I){x(I);const{px:j,py:D,pz:O}=this,{px:T,py:m,pz:b}=I;let E=r.ZERO,k=r.ZERO,R=r.ZERO;const M=t.a,H=r.mul(t.b,kw);let N=r.mul(j,T),v=r.mul(D,m),U=r.mul(O,b),G=r.add(j,D),S=r.add(T,m);G=r.mul(G,S),S=r.add(N,v),G=r.sub(G,S),S=r.add(j,O);let J=r.add(T,b);return S=r.mul(S,J),J=r.add(N,U),S=r.sub(S,J),J=r.add(D,O),E=r.add(m,b),J=r.mul(J,E),E=r.add(v,U),J=r.sub(J,E),R=r.mul(M,S),E=r.mul(H,U),R=r.add(E,R),E=r.sub(v,R),R=r.add(v,R),k=r.mul(E,R),v=r.add(N,N),v=r.add(v,N),U=r.mul(M,U),S=r.mul(H,S),v=r.add(v,U),U=r.sub(N,U),U=r.mul(M,U),S=r.add(S,U),N=r.mul(v,S),k=r.add(k,N),N=r.mul(J,S),E=r.mul(G,E),E=r.sub(E,N),N=r.mul(G,v),R=r.mul(J,R),R=r.add(R,N),new P(E,k,R)}subtract(I){return this.add(I.negate())}is0(){return this.equals(P.ZERO)}
2076multiply(I){const{endo:j}=e;if(!n.isValidNot0(I))throw new Error("invalid scalar: out of range");let D,O;const T=m=>W.wNAFCached(this,m,P.normalizeZ);if(j){const{k1neg:m,k1:b,k2neg:E,k2:k}=j.splitScalar(I),{p:R,f:M}=T(b),{p:H,f:N}=T(k);O=M.add(N),D=L(j.beta,R,H,m,E)}else{const{p:m,f:b}=T(I);D=m,O=b}return P.normalizeZ([D,O])[0]}multiplyUnsafe(I){const{endo:j}=e,D=this;if(!n.isValid(I))throw new Error("invalid scalar: out of range");if(I===Bm||D.is0())return P.ZERO;if(I===Fm)return D;if(W.hasPrecomputes(this))return this.multiply(I);if(j){const{k1neg:O,k1:T,k2neg:m,k2:b}=j.splitScalar(I),{p1:E,p2:k}=j9e(P,D,T,b);return L(j.beta,E,k,O,m)}else return W.wNAFCachedUnsafe(D,I)}multiplyAndAddUnsafe(I,j,D){const O=this.multiplyUnsafe(j).add(I.multiplyUnsafe(D));return O.is0()?void 0:O}toAffine(I){return C(this,I)}isTorsionFree(){const{isTorsionFree:I}=e;return i===Fm?!0:I?I(P,this):W.wNAFCachedUnsafe(this,s).is0()}clearCofactor(){const{clearCofactor:I}=e;return i===Fm?this:I?I(P,this):this.multiplyUnsafe(i)}toBytes(I=!0){return X3("isCompressed",I),this.assertValidity(),u(P,this,I)}toRawBytes(I=!0){return this.toBytes(I)}toHex(I=!0){return ay(this.toBytes(I))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}P.BASE=new P(t.Gx,t.Gy,r.ONE),P.ZERO=new P(r.ZERO,r.ONE,r.ZERO),P.Fp=r,P.Fn=n;const z=n.BITS,W=F9e(P,e.endo?Math.ceil(z/2):z);return P}function kq(t){return Uint8Array.of(t?2:3)}function rSe(t,e,r={}){jx(e,{hash:"function"},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});const n=e.randomBytes||oq,i=e.hmac||((D,...O)=>yq(e.hash,D,rh(...O))),{Fp:s,Fn:o}=t,{ORDER:a,BITS:c}=o;function l(D){const O=a>>Fm;return D>O}function u(D){return l(D)?o.neg(D):D}function f(D,O){if(!o.isValidNot0(O))throw new Error(`invalid signature ${D}: out of range 1..CURVE.n`)}class d{constructor(O,T,m){f("r",O),f("s",T),this.r=O,this.s=T,m!=null&&(this.recovery=m),Object.freeze(this)}static fromCompact(O){const T=o.BYTES,m=uo("compactSignature",O,T*2);return new d(o.fromBytes(m.subarray(0,T)),o.fromBytes(m.subarray(T,T*2)))}static fromDER(O){const{r:T,s:m}=Jl.toSig(uo("DER",O));return new d(T,m)}assertValidity(){}addRecoveryBit(O){return new d(this.r,this.s,O)}recoverPublicKey(O){const T=s.ORDER,{r:m,s:b,recovery:E}=this;if(E==null||![0,1,2,3].includes(E))throw new Error("recovery id invalid");if(a*Q9e<T&&E>1)throw new Error("recovery id is ambiguous for h>1 curve");const k=E===2||E===3?m+a:m;if(!s.isValid(k))throw new Error("recovery id 2 or 3 invalid");const R=s.toBytes(k),M=t.fromHex(rh(kq((E&1)===0),R)),H=o.inv(k),N=_(uo("msgHash",O)),v=o.create(-N*H),U=o.create(b*H),G=t.BASE.multiplyUnsafe(v).add(M.multiplyUnsafe(U));if(G.is0())throw new Error("point at infinify");return G.assertValidity(),G}hasHighS(){return l(this.s)}normalizeS(){return this.hasHighS()?new d(this.r,o.neg(this.s),this.recovery):this}toBytes(O){if(O==="compact")return rh(o.toBytes(this.r),o.toBytes(this.s));if(O==="der")return n7(Jl.hexFromSig(this));throw new Error("invalid format")}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return ay(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return ay(this.toBytes("compact"))}}const p=Tq(o,r.allowedPrivateKeyLengths,r.wrapPrivateKey),h={isValidPrivateKey(D){try{return p(D),!0}catch{return!1}},normPrivateKeyToScalar:p,randomPrivateKey:()=>{const D=a;return M9e(n(Aq(D)),D)},precompute(D=8,O=t.BASE){return O.precompute(D,!1)}};function g(D,O=!0){return t.fromPrivateKey(D).toBytes(O)}function y(D){if(typeof D=="bigint")return!1;if(D instanceof t)return!0;const O=uo("key",D).length,T=s.BYTES,m=T+1,b=2*T+1;if(!(r.allowedPrivateKeyLengths||o.BYTES===m))return O===m||O===b}function x(D,O,T=!0){if(y(D)===!0)throw new Error("first arg must be private key");if(y(O)===!1)throw new Error("second arg must be public key");return t.fromHex(O).multiply(p(D)).toBytes(T)}const C=e.bits2int||function(D){if(D.length>8192)throw new Error("input is too large");const O=Bx(D),T=D.length*8-c;return T>0?O>>BigInt(T):O},_=e.bits2int_modN||function(D){return o.create(C(D))},L=Fx(c);function P(D){return z_("num < 2^"+c,D,Bm,L),o.toBytes(D)}function z(D,O,T=W){if(["recovered","canonical"].some(G=>G in T))throw new Error("sign() legacy options not supported");const{hash:m}=e;let{lowS:b,prehash:E,extraEntropy:k}=T;b==null&&(b=!0),D=uo("msgHash",D),zO(T),E&&(D=uo("prehashed msgHash",m(D)));
2076const R=_(D),M=p(O),H=[P(M),P(R)];if(k!=null&&k!==!1){const G=k===!0?n(s.BYTES):k;H.push(uo("extraEntropy",G))}const N=rh(...H),v=R;function U(G){const S=C(G);if(!o.isValidNot0(S))return;const J=o.inv(S),ne=t.BASE.multiply(S).toAffine(),Z=o.create(ne.x);if(Z===Bm)return;const Q=o.create(J*o.create(v+Z*M));if(Q===Bm)return;let ee=(ne.x===Z?0:2)|Number(ne.y&Fm),re=Q;return b&&l(Q)&&(re=u(Q),ee^=1),new d(Z,re,ee)}return{seed:N,k2sig:U}}const W={lowS:e.lowS,prehash:!1},B={lowS:e.lowS,prehash:!1};function I(D,O,T=W){const{seed:m,k2sig:b}=z(D,O,T);return N9e(e.hash.outputLen,o.BYTES,i)(m,b)}t.BASE.precompute(8);function j(D,O,T,m=B){const b=D;O=uo("msgHash",O),T=uo("publicKey",T),zO(m);const{lowS:E,prehash:k,format:R}=m;if("strict"in m)throw new Error("options.strict was renamed to lowS");if(R!==void 0&&!["compact","der","js"].includes(R))throw new Error('format must be "compact", "der" or "js"');const M=typeof b=="string"||t7(b),H=!M&&!R&&typeof b=="object"&&b!==null&&typeof b.r=="bigint"&&typeof b.s=="bigint";if(!M&&!H)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let N,v;try{if(H)if(R===void 0||R==="js")N=new d(b.r,b.s);else throw new Error("invalid format");if(M){try{R!=="compact"&&(N=d.fromDER(b))}catch(ee){if(!(ee instanceof Jl.Err))throw ee}!N&&R!=="der"&&(N=d.fromCompact(b))}v=t.fromHex(T)}catch{return!1}if(!N||E&&N.hasHighS())return!1;k&&(O=e.hash(O));const{r:U,s:G}=N,S=_(O),J=o.inv(G),ne=o.create(S*J),Z=o.create(U*J),Q=t.BASE.multiplyUnsafe(ne).add(v.multiplyUnsafe(Z));return Q.is0()?!1:o.create(Q.x)===U}return Object.freeze({getPublicKey:g,getSharedSecret:x,sign:I,verify:j,utils:h,Point:t,Signature:d})}function nSe(t){const e={a:t.a,b:t.b,p:t.Fp.ORDER,n:t.n,h:t.h,Gx:t.Gx,Gy:t.Gy},r=t.Fp,n=qg(e.n,t.nBitLength),i={Fp:r,Fn:n,allowedPrivateKeyLengths:t.allowedPrivateKeyLengths,allowInfinityPoint:t.allowInfinityPoint,endo:t.endo,wrapPrivateKey:t.wrapPrivateKey,isTorsionFree:t.isTorsionFree,clearCofactor:t.clearCofactor,fromBytes:t.fromBytes,toBytes:t.toBytes};return{CURVE:e,curveOpts:i}}function iSe(t){const{CURVE:e,curveOpts:r}=nSe(t),n={hash:t.hash,hmac:t.hmac,randomBytes:t.randomBytes,lowS:t.lowS,bits2int:t.bits2int,bits2int_modN:t.bits2int_modN};return{CURVE:e,curveOpts:r,ecdsaOpts:n}}function sSe(t,e){return Object.assign({},e,{ProjectivePoint:e.Point,CURVE:t})}function oSe(t){const{CURVE:e,curveOpts:r,ecdsaOpts:n}=iSe(t),i=tSe(e,r),s=rSe(i,n,r);return sSe(t,s)}function W_(t,e){const r=n=>oSe({...t,hash:n});return{...r(e),create:r}}const Pq={p:BigInt("0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff"),n:BigInt("0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551"),h:BigInt(1),a:BigInt("0xffffffff00000001000000000000000000000000fffffffffffffffffffffffc"),b:BigInt("0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b"),Gx:BigInt("0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296"),Gy:BigInt("0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5")},Rq={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff"),n:BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973"),h:BigInt(1),a:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000fffffffc"),b:BigInt("0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef"),Gx:BigInt("0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7"),Gy:BigInt("0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f")},Oq={p:BigInt("0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),n:BigInt("0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386409"),h:BigInt(1),a:BigInt("0x1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc"),b:BigInt("0x0051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00"),Gx:BigInt("0x00c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66"),Gy:BigInt("0x011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650")},aSe=qg(Pq.p),cSe=qg(Rq.p),lSe=qg(Oq.p);W_({...Pq,Fp:aSe,lowS:!1},GAe);W_({...Rq,Fp:cSe,lowS:!1},ZAe),W_({...Oq,Fp:lSe,lowS:!1,allowedPrivateKeyLengths:[130,131,132]},YAe);function l7(t){return t.includes(":")}function nm(t){return l7(t)?t.split(":")[0]:t}const uSe={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}};function WO(t,e){const{message:r,code:n}=uSe[t];return{message:e?`${r} ${e}`:r,code:n}}function h6(t,e){return!!Array.isArray(t)}function p6(t){return Object.getPrototypeOf(t)===Object.prototype&&Object.keys(t).length}var H_={exports:{}};(function(t,e){var r=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof li<"u"&&li,n=function(){function s(){this.fetch=!1,this.DOMException=r.DOMException}return s.prototype=r,new s}();(function(s){(function(o){var a=typeof s<"u"&&s||typeof self<"u"&&self||typeof li<"u"&&li||{},c={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function l(b){return b&&DataView.prototype.isPrototypeOf(b)}if(c.arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array
2076]"],f=ArrayBuffer.isView||function(b){return b&&u.indexOf(Object.prototype.toString.call(b))>-1};function d(b){if(typeof b!="string"&&(b=String(b)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(b)||b==="")throw new TypeError('Invalid character in header field name: "'+b+'"');return b.toLowerCase()}function p(b){return typeof b!="string"&&(b=String(b)),b}function h(b){var E={next:function(){var k=b.shift();return{done:k===void 0,value:k}}};return c.iterable&&(E[Symbol.iterator]=function(){return E}),E}function g(b){this.map={},b instanceof g?b.forEach(function(E,k){this.append(k,E)},this):Array.isArray(b)?b.forEach(function(E){if(E.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+E.length);this.append(E[0],E[1])},this):b&&Object.getOwnPropertyNames(b).forEach(function(E){this.append(E,b[E])},this)}g.prototype.append=function(b,E){b=d(b),E=p(E);var k=this.map[b];this.map[b]=k?k+", "+E:E},g.prototype.delete=function(b){delete this.map[d(b)]},g.prototype.get=function(b){return b=d(b),this.has(b)?this.map[b]:null},g.prototype.has=function(b){return this.map.hasOwnProperty(d(b))},g.prototype.set=function(b,E){this.map[d(b)]=p(E)},g.prototype.forEach=function(b,E){for(var k in this.map)this.map.hasOwnProperty(k)&&b.call(E,this.map[k],k,this)},g.prototype.keys=function(){var b=[];return this.forEach(function(E,k){b.push(k)}),h(b)},g.prototype.values=function(){var b=[];return this.forEach(function(E){b.push(E)}),h(b)},g.prototype.entries=function(){var b=[];return this.forEach(function(E,k){b.push([k,E])}),h(b)},c.iterable&&(g.prototype[Symbol.iterator]=g.prototype.entries);function y(b){if(!b._noBody){if(b.bodyUsed)return Promise.reject(new TypeError("Already read"));b.bodyUsed=!0}}function x(b){return new Promise(function(E,k){b.onload=function(){E(b.result)},b.onerror=function(){k(b.error)}})}function C(b){var E=new FileReader,k=x(E);return E.readAsArrayBuffer(b),k}function _(b){var E=new FileReader,k=x(E),R=/charset=([A-Za-z0-9_-]+)/.exec(b.type),M=R?R[1]:"utf-8";return E.readAsText(b,M),k}function L(b){for(var E=new Uint8Array(b),k=new Array(E.length),R=0;R<E.length;R++)k[R]=String.fromCharCode(E[R]);return k.join("")}function P(b){if(b.slice)return b.slice(0);var E=new Uint8Array(b.byteLength);return E.set(new Uint8Array(b)),E.buffer}function z(){return this.bodyUsed=!1,this._initBody=function(b){this.bodyUsed=this.bodyUsed,this._bodyInit=b,b?typeof b=="string"?this._bodyText=b:c.blob&&Blob.prototype.isPrototypeOf(b)?this._bodyBlob=b:c.formData&&FormData.prototype.isPrototypeOf(b)?this._bodyFormData=b:c.searchParams&&URLSearchParams.prototype.isPrototypeOf(b)?this._bodyText=b.toString():c.arrayBuffer&&c.blob&&l(b)?(this._bodyArrayBuffer=P(b.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):c.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(b)||f(b))?this._bodyArrayBuffer=P(b):this._bodyText=b=Object.prototype.toString.call(b):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof b=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):c.searchParams&&URLSearchParams.prototype.isPrototypeOf(b)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},c.blob&&(this.blob=function(){var b=y(this);if(b)return b;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var b=y(this);return b||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(c.blob)return this.blob().then(C);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var b=y(this);if(b)return b;if(this._bodyBlob)return _(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(L(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},c.formData&&(this.formData=function(){return this.text().then(j)}),this.json=function(){return this.text().then(JSON.parse)},this}var W=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function B(b){var E=b.toUpperCase();return W.indexOf(E)>-1?E:b}function I(b,E){if(!(this instanceof I))throw new TypeError('Please use the "new" operator, this DOM object c
2076onstructor cannot be called as a function.');E=E||{};var k=E.body;if(b instanceof I){if(b.bodyUsed)throw new TypeError("Already read");this.url=b.url,this.credentials=b.credentials,E.headers||(this.headers=new g(b.headers)),this.method=b.method,this.mode=b.mode,this.signal=b.signal,!k&&b._bodyInit!=null&&(k=b._bodyInit,b.bodyUsed=!0)}else this.url=String(b);if(this.credentials=E.credentials||this.credentials||"same-origin",(E.headers||!this.headers)&&(this.headers=new g(E.headers)),this.method=B(E.method||this.method||"GET"),this.mode=E.mode||this.mode||null,this.signal=E.signal||this.signal||function(){if("AbortController"in a){var H=new AbortController;return H.signal}}(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&k)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(k),(this.method==="GET"||this.method==="HEAD")&&(E.cache==="no-store"||E.cache==="no-cache")){var R=/([?&])_=[^&]*/;if(R.test(this.url))this.url=this.url.replace(R,"$1_="+new Date().getTime());else{var M=/\?/;this.url+=(M.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}I.prototype.clone=function(){return new I(this,{body:this._bodyInit})};function j(b){var E=new FormData;return b.trim().split("&").forEach(function(k){if(k){var R=k.split("="),M=R.shift().replace(/\+/g," "),H=R.join("=").replace(/\+/g," ");E.append(decodeURIComponent(M),decodeURIComponent(H))}}),E}function D(b){var E=new g,k=b.replace(/\r?\n[\t ]+/g," ");return k.split("\r").map(function(R){return R.indexOf(` 2077`)===0?R.substr(1,R.length):R}).forEach(function(R){var M=R.split(":"),H=M.shift().trim();if(H){var N=M.join(":").trim();try{E.append(H,N)}catch(v){console.warn("Response "+v.message)}}}),E}z.call(I.prototype);function O(b,E){if(!(this instanceof O))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(E||(E={}),this.type="default",this.status=E.status===void 0?200:E.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=E.statusText===void 0?"":""+E.statusText,this.headers=new g(E.headers),this.url=E.url||"",this._initBody(b)}z.call(O.prototype),O.prototype.clone=function(){return new O(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new g(this.headers),url:this.url})},O.error=function(){var b=new O(null,{status:200,statusText:""});return b.ok=!1,b.status=0,b.type="error",b};var T=[301,302,303,307,308];O.redirect=function(b,E){if(T.indexOf(E)===-1)throw new RangeError("Invalid status code");return new O(null,{status:E,headers:{location:b}})},o.DOMException=a.DOMException;try{new o.DOMException}catch{o.DOMException=function(E,k){this.message=E,this.name=k;var R=Error(E);this.stack=R.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function m(b,E){return new Promise(function(k,R){var M=new I(b,E);if(M.signal&&M.signal.aborted)return R(new o.DOMException("Aborted","AbortError"));var H=new XMLHttpRequest;function N(){H.abort()}H.onload=function(){var G={statusText:H.statusText,headers:D(H.getAllResponseHeaders()||"")};M.url.indexOf("file://")===0&&(H.status<200||H.status>599)?G.status=200:G.status=H.status,G.url="responseURL"in H?H.responseURL:G.headers.get("X-Request-URL");var S="response"in H?H.response:H.responseText;setTimeout(function(){k(new O(S,G))},0)},H.onerror=function(){setTimeout(function(){R(new TypeError("Network request failed"))},0)},H.ontimeout=function(){setTimeout(function(){R(new TypeError("Network request timed out"))},0)},H.onabort=function(){setTimeout(function(){R(new o.DOMException("Aborted","AbortError"))},0)};function v(G){try{return G===""&&a.location.href?a.location.href:G}catch{return G}}if(H.open(M.method,v(M.url),!0),M.credentials==="include"?H.withCredentials=!0:M.credentials==="omit"&&(H.withCredentials=!1),"responseType"in H&&(c.blob?H.responseType="blob":c.arrayBuffer&&(H.responseType="arraybuffer")),E&&typeof E.headers=="object"&&!(E.headers instanceof g||a.Headers&&E.headers instanceof a.Headers)){var U=[];
vendor: 4,623 bytes, line 2077
2077Object.getOwnPropertyNames(E.headers).forEach(function(G){U.push(d(G)),H.setRequestHeader(G,p(E.headers[G]))}),M.headers.forEach(function(G,S){U.indexOf(S)===-1&&H.setRequestHeader(S,G)})}else M.headers.forEach(function(G,S){H.setRequestHeader(S,G)});M.signal&&(M.signal.addEventListener("abort",N),H.onreadystatechange=function(){H.readyState===4&&M.signal.removeEventListener("abort",N)}),H.send(typeof M._bodyInit>"u"?null:M._bodyInit)})}return m.polyfill=!0,a.fetch||(a.fetch=m,a.Headers=g,a.Request=I,a.Response=O),o.Headers=g,o.Request=I,o.Response=O,o.fetch=m,Object.defineProperty(o,"__esModule",{value:!0}),o})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=r.fetch?r:n;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e})(H_,H_.exports);var fSe=H_.exports;const HO=is(fSe);var dSe=Object.defineProperty,hSe=Object.defineProperties,pSe=Object.getOwnPropertyDescriptors,qO=Object.getOwnPropertySymbols,gSe=Object.prototype.hasOwnProperty,mSe=Object.prototype.propertyIsEnumerable,VO=(t,e,r)=>e in t?dSe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,KO=(t,e)=>{for(var r in e||(e={}))gSe.call(e,r)&&VO(t,r,e[r]);if(qO)for(var r of qO(e))mSe.call(e,r)&&VO(t,r,e[r]);return t},GO=(t,e)=>hSe(t,pSe(e));const ySe={Accept:"application/json","Content-Type":"application/json"},bSe="POST",YO={headers:ySe,method:bSe},ZO=10;let Ec=class{constructor(e,r=!1){if(this.url=e,this.disableProviderPing=r,this.events=new ka.EventEmitter,this.isAvailable=!1,this.registering=!1,!VR(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=r}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e){this.isAvailable||await this.register();try{const r=wu(e),n=await(await HO(this.url,GO(KO({},YO),{body:r}))).json();this.onPayload({data:n})}catch(r){this.onError(e.id,r)}}async register(e=this.url){if(!VR(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){const r=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=r||this.events.listenerCount("open")>=r)&&this.events.setMaxListeners(r+1),new Promise((n,i)=>{this.events.once("register_error",s=>{this.resetMaxListeners(),i(s)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return i(new Error("HTTP connection is missing or invalid"));n()})})}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){const r=wu({id:1,jsonrpc:"2.0",method:"test",params:[]});await HO(e,GO(KO({},YO),{body:r}))}this.onOpen()}catch(r){const n=this.parseError(r);throw this.events.emit("register_error",n),this.onClose(),n}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(typeof e.data>"u")return;const r=typeof e.data=="string"?Oh(e.data):e.data;this.events.emit("payload",r)}onError(e,r){const n=this.parseError(r),i=n.message||n.toString(),s=Dx(e,i);this.events.emit("payload",s)}parseError(e,r=this.url){return TH(e,r,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>ZO&&this.events.setMaxListeners(ZO)}};const JO="error",wSe="wss://relay.walletconnect.org",vSe="wc",xSe="universal_provider",Pw=`${vSe}@2:${xSe}:`,Dq="https://rpc.walletconnect.org/v1/",q0="generic",ESe=`${Dq}bundler`,Ra={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};function u7(t){return t==null||typeof t!="object"&&typeof t!="function"}function Lq(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}function Mq(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const CSe="[object RegExp]",$q="[object String]",Uq="[object Number]",Bq="[object Boolean]",Fq="[object Arguments]",_Se="[object Symbol]",ASe="[object Date]",SSe="[object Map]",NSe="[object Set]",ISe="[object Array]",TSe="[object ArrayBuffer]",kSe="[object Object]",PSe="[object DataView]",RSe="[object Uint8Array]",OSe="[object Uint8ClampedArray]",DSe="[object Uint16Array]",LSe="[object Uint32Array]",MSe="[object Int8Array]",$Se="[object Int16Array]",USe="[object Int32Array]",BSe="[object Float32Array]",FSe="[object Float64Array
2077]";function f7(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function jSe(t,e){return yp(t,void 0,t,new Map,e)}function yp(t,e,r,n=new Map,i=void 0){const s=i==null?void 0:i(t,e,r,n);if(s!=null)return s;if(u7(t))return t;if(n.has(t))return n.get(t);if(Array.isArray(t)){const o=new Array(t.length);n.set(t,o);for(let a=0;a<t.length;a++)o[a]=yp(t[a],a,r,n,i);return Object.hasOwn(t,"index")&&(o.index=t.index),Object.hasOwn(t,"input")&&(o.input=t.input),o}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const o=new RegExp(t.source,t.flags);return o.lastIndex=t.lastIndex,o}if(t instanceof Map){const o=new Map;n.set(t,o);for(const[a,c]of t)o.set(a,yp(c,a,r,n,i));return o}if(t instanceof Set){const o=new Set;n.set(t,o);for(const a of t)o.add(yp(a,void 0,r,n,i));return o}if(typeof Buffer<"u"&&Buffer.isBuffer(t))return t.subarray();if(f7(t)){const o=new(Object.getPrototypeOf(t)).constructor(t.length);n.set(t,o);for(let a=0;a<t.length;a++)o[a]=yp(t[a],a,r,n,i);return o}if(t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer)return t.slice(0);if(t instanceof DataView){const o=new DataView(t.buffer.slice(0),t.byteOffset,t.byteLength);return n.set(t,o),Bd(o,t,r,n,i),o}if(typeof File<"u"&&t instanceof File){const o=new File([t],t.name,{type:t.type});return n.set(t,o),Bd(o,t,r,n,i),o}if(t instanceof Blob){const o=new Blob([t],{type:t.type});return n.set(t,o),Bd(o,t,r,n,i),o}if(t instanceof Error){const o=new t.constructor;return n.set(t,o),o.message=t.message,o.name=t.name,o.stack=t.stack,o.cause=t.cause,Bd(o,t,r,n,i),o}if(typeof t=="object"&&zSe(t)){const o=Object.create(Object.getPrototypeOf(t));return n.set(t,o),Bd(o,t,r,n,i),o}return t}function Bd(t,e,r=t,n,i){const s=[...Object.keys(e),...Lq(e)];for(let o=0;o<s.length;o++){const a=s[o],c=Object.getOwnPropertyDescriptor(t,a);(c==null||c.writable)&&(t[a]=yp(e[a],a,r,n,i))}}function zSe(t){switch(Mq(t)){case Fq:case ISe:case TSe:case PSe:case Bq:case ASe:case BSe:case FSe:case MSe:case $Se:case USe:case SSe:case Uq:case kSe:case CSe:case NSe:case $q:case _Se:case RSe:case OSe:case DSe:case LSe:return!0;default:return!1}}function WSe(t,e){return jSe(t,(r,n,i,s)=>{if(typeof t=="object")switch(Object.prototype.toString.call(t)){case Uq:case $q:case Bq:{const o=new t.constructor(t==null?void 0:t.valueOf());return Bd(o,t),o}case Fq:{const o={};return Bd(o,t),o.length=t.length,o[Symbol.iterator]=t[Symbol.iterator],o}default:return}})}function QO(t){return WSe(t)}function XO(t){return t!==null&&typeof t=="object"&&Mq(t)==="[object Arguments]"}function eD(t){return typeof t=="object"&&t!==null}function HSe(){}function qSe(t){return f7(t)}function VSe(t){var r;if(typeof t!="object"||t==null)return!1;if(Object.getPrototypeOf(t)===null)return!0;if(Object.prototype.toString.call(t)!=="[object Object]"){const n=t[Symbol.toStringTag];return n==null||!((r=Object.getOwnPropertyDescriptor(t,Symbol.toStringTag))!=null&&r.writable)?!1:t.toString()===`[object ${n}]`}let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function KSe(t){if(u7(t))return t;if(Array.isArray(t)||f7(t)||t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer)return t.slice(0);const e=Object.getPrototypeOf(t),r=e.constructor;if(t instanceof Date||t instanceof Map||t instanceof Set)return new r(t);if(t instanceof RegExp){const n=new r(t);return n.lastIndex=t.lastIndex,n}if(t instanceof DataView)return new r(t.buffer.slice(0));if(t instanceof Error){const n=new r(t.message);
vendor: 9,895 bytes, line 2077
2077return n.stack=t.stack,n.name=t.name,n.cause=t.cause,n}if(typeof File<"u"&&t instanceof File)return new r([t],t.name,{type:t.type,lastModified:t.lastModified});if(typeof t=="object"){const n=Object.create(e);return Object.assign(n,t)}return t}function GSe(t,...e){const r=e.slice(0,-1),n=e[e.length-1];let i=t;for(let s=0;s<r.length;s++){const o=r[s];i=q_(i,o,n,new Map)}return i}function q_(t,e,r,n){if(u7(t)&&(t=Object(t)),e==null||typeof e!="object")return t;if(n.has(e))return KSe(n.get(e));if(n.set(e,t),Array.isArray(e)){e=e.slice();for(let s=0;s<e.length;s++)e[s]=e[s]??void 0}const i=[...Object.keys(e),...Lq(e)];for(let s=0;s<i.length;s++){const o=i[s];let a=e[o],c=t[o];if(XO(a)&&(a={...a}),XO(c)&&(c={...c}),typeof Buffer<"u"&&Buffer.isBuffer(a)&&(a=QO(a)),Array.isArray(a))if(typeof c=="object"&&c!=null){const u=[],f=Reflect.ownKeys(c);for(let d=0;d<f.length;d++){const p=f[d];u[p]=c[p]}c=u}else c=[];const l=r(c,a,o,t,e,n);l!=null?t[o]=l:Array.isArray(a)||eD(c)&&eD(a)?t[o]=q_(c,a,r,n):c==null&&VSe(a)?t[o]=q_({},a,r,n):c==null&&qSe(a)?t[o]=QO(a):(c===void 0||a!==void 0)&&(t[o]=a)}return t}function YSe(t,...e){return GSe(t,...e,HSe)}var ZSe=Object.defineProperty,JSe=Object.defineProperties,QSe=Object.getOwnPropertyDescriptors,tD=Object.getOwnPropertySymbols,XSe=Object.prototype.hasOwnProperty,e7e=Object.prototype.propertyIsEnumerable,rD=(t,e,r)=>e in t?ZSe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Rw=(t,e)=>{for(var r in e||(e={}))XSe.call(e,r)&&rD(t,r,e[r]);if(tD)for(var r of tD(e))e7e.call(e,r)&&rD(t,r,e[r]);return t},t7e=(t,e)=>JSe(t,QSe(e));function Ko(t,e,r){var n;const i=eq(t);return((n=e.rpcMap)==null?void 0:n[i.reference])||`${Dq}?chainId=${i.namespace}:${i.reference}&projectId=${r}`}function a0(t){return t.includes(":")?t.split(":")[1]:t}function jq(t){return t.map(e=>`${e.split(":")[0]}:${e.split(":")[1]}`)}function r7e(t,e){const r=Object.keys(e.namespaces).filter(i=>i.includes(t));if(!r.length)return[];const n=[];return r.forEach(i=>{const s=e.namespaces[i].accounts;n.push(...s)}),n}function Ow(t={},e={}){const r=nD(t),n=nD(e);return YSe(r,n)}function nD(t){var e,r,n,i,s;const o={};if(!p6(t))return o;for(const[a,c]of Object.entries(t)){const l=l7(a)?[a]:c.chains,u=c.methods||[],f=c.events||[],d=c.rpcMap||{},p=nm(a);o[p]=t7e(Rw(Rw({},o[p]),c),{chains:o6(l,(e=o[p])==null?void 0:e.chains),methods:o6(u,(r=o[p])==null?void 0:r.methods),events:o6(f,(n=o[p])==null?void 0:n.events)}),(p6(d)||p6(((i=o[p])==null?void 0:i.rpcMap)||{}))&&(o[p].rpcMap=Rw(Rw({},d),(s=o[p])==null?void 0:s.rpcMap))}return o}function iD(t){return t.includes(":")?t.split(":")[2]:t}function sD(t){const e={};for(const[r,n]of Object.entries(t)){const i=n.methods||[],s=n.events||[],o=n.accounts||[],a=l7(r)?[r]:n.chains?n.chains:jq(n.accounts);e[r]={chains:a,methods:i,events:s,accounts:o}}return e}function g6(t){return typeof t=="number"?t:t.includes("0x")?parseInt(t,16):(t=t.includes(":")?t.split(":")[1]:t,isNaN(Number(t))?t:Number(t))}const zq={},qr=t=>zq[t],m6=(t,e)=>{zq[t]=e};var n7e=Object.defineProperty,i7e=(t,e,r)=>e in t?n7e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,N0=(t,e,r)=>i7e(t,typeof e!="symbol"?e+"":e,r);class s7e{constructor(e){N0(this,"name","polkadot"),N0(this,"client"),N0(this,"httpProviders"),N0(this,"events"),N0(this,"namespace"),N0(this,"chainId"),this.namespace=e.namespace,this.events=qr("events"),this.client=qr("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(Ra.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;const i=a0(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||Ko(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Pa(new Ec(n,qr("disableProviderPing")))}}var o7e=Object.defineProperty,a7e=Object.defineProperties,c7e=Object.getOwnPropertyDescriptors,oD=Object.getOwnPropertySymbols,l7e=Object.prototype.hasOwnProperty,u7e=Object.prototype.propertyIsEnumerable,V_=(t,e,r)=>e in t?o7e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,aD=(t,e)=>{for(var r in e||(e={}))l7e.call(e,r)&&V_(t,r,e[r]);if(oD)for(var r of oD(e))u7e.call(e,r)&&V_(t,r,e[r]);return t},cD=(t,e)=>a7e(t,c7e(e)),I0=(t,e,r)=>V_(t,typeof e!="symbol"?e+"":e,r);class f7e{constructor(e){I0(this,"name","eip155"),I0(this,"client"),I0(this,"chainId"),I0(this,"namespace"),I0(this,"httpProviders"),I0(this,"events"),this.namespace=e.namespace,this.events=qr("events"),this.client=qr("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(e){switch(e.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(e);case"eth_chainId":return parseInt(this.getDefaultChain());case"wallet_getCapabilities":return await this.getCapabilities(e);case"wallet_getCallsStatus":return await this.getCallStatus(e)}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(parseInt(e),r),this.chainId=parseInt(e),this.events.emit(Ra.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,r){const n=r||Ko(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Pa(new Ec(n,qr("disableProviderPing")))}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;const i=parseInt(a0(r));e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}getHttpProvider(){const e=this.chainId,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}async handleSwitchChain(e){var r,n;let i=e.request.params?(r=e.request.params[0])==null?void 0:r.chainId:"0x0";i=i.startsWith("0x")?i:`0x${i}`;const s=parseInt(i,16);if(this.isChainApproved(s))this.setDefaultChain(`${s}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:i}]},chainId:(n=this.namespace.chains)==null?void 0:n[0]}),this.setDefaultChain(`${s}`);else throw new Error(`Failed to switch to chain 'eip155:${s}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(e){return this.namespace.chains.includes(`${this.name}:${e}`)}async getCapabilities(e){var r,n,i,s,o;const a=(n=(r=e.request)==null?void 0:r.params)==null?void 0:n[0],c=((s=(i=e.request)==null?void 0:i.params)==null?void 0:s[1])||[],l=`${a}${c.join(",")}`;if(!a)throw new Error("Missing address parameter in `wallet_getCapabilities` request");const u=this.client.session.get(e.topic),f=((o=u==null?void 0:u.sessionProperties)==null?void 0:o.capabilities)||{};if(f!=null&&f[l])return f==null?void 0:f[l];const d=await this.client.request(e);try{await this.client.session.update(e.topic,{sessionProperties:cD(aD({},u.sessionProperties||{}),{capabilities:cD(aD({},f||{}),{[l]:d})})})}catch(p){console.warn("Failed to update session with capabilities",p)}return d}async getCallStatus(e){var r,n;const i=this.client.session.get(e.topic),s=(r=i.sessionProperties)==null?void 0:r.bundler_name;if(s){const a=this.getBundlerUrl(e.chainId,s);try{return await this.getUserOperationReceipt(a,e)}catch(c){console.warn("Failed to fetch call status from bundler",c,a)}}const o=(n=i.sessionProperties)==null?void 0:n.bundler_url;if(o)try{return await this.getUserOperationReceipt(o,e)}catch(a){console.warn("Failed to fetch call status from custom bundler",a,o)}if(this.namespace.methods.includes(e.request.method))return await this.client.request(e);throw new Error("Fetching call status not approved by the wallet.")}async getUserOperationReceipt(e,r){var n;const i=new URL(e),s=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(If("eth_getUserOperationReceipt",[(n=r.request.params)==null?void 0:n[0]]))});if(!s.ok)throw new Error(`Failed to fetch user operation receipt - ${s.status}`);return await s.json()}
2077getBundlerUrl(e,r){return`${ESe}?projectId=${this.client.core.projectId}&chainId=${e}&bundler=${r}`}}var d7e=Object.defineProperty,h7e=(t,e,r)=>e in t?d7e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,T0=(t,e,r)=>h7e(t,typeof e!="symbol"?e+"":e,r);class p7e{constructor(e){T0(this,"name","solana"),T0(this,"client"),T0(this,"httpProviders"),T0(this,"events"),T0(this,"namespace"),T0(this,"chainId"),this.namespace=e.namespace,this.events=qr("events"),this.client=qr("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(Ra.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;const i=a0(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||Ko(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Pa(new Ec(n,qr("disableProviderPing")))}}var g7e=Object.defineProperty,m7e=(t,e,r)=>e in t?g7e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,k0=(t,e,r)=>m7e(t,typeof e!="symbol"?e+"":e,r);class y7e{constructor(e){k0(this,"name","cosmos"),k0(this,"client"),k0(this,"httpProviders"),k0(this,"events"),k0(this,"namespace"),k0(this,"chainId"),this.namespace=e.namespace,this.events=qr("events"),this.client=qr("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(Ra.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;const i=a0(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||Ko(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Pa(new Ec(n,qr("disableProviderPing")))}}var b7e=Object.defineProperty,w7e=(t,e,r)=>e in t?b7e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,P0=(t,e,r)=>w7e(t,typeof e!="symbol"?e+"":e,r);class v7e{constructor(e){P0(this,"name","algorand"),P0(this,"client"),P0(this,"httpProviders"),P0(this,"events"),P0(this,"namespace"),P0(this,"chainId"),this.namespace=e.namespace,this.events=qr("events"),this.client=qr("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){if(!this.httpProviders[e]){const n=r||Ko(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(Ra.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;e[r]=this.createHttpProvider(r,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||Ko(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new Pa(new Ec(n,qr("disableProviderPing")))}}var x7e=Object.defineProperty,E7e=(t,e,r)=>e in t?x7e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,R0=(t,e,r)=>E7e(t,typeof e!="symbol"?e+"":e,r);class C7e{constructor(e){R0(this,"name","cip34"),R0(this,"client"),R0(this,"httpProviders"),R0(this,"events"),R0(this,"namespace"),R0(this,"chainId"),this.namespace=e.namespace,this.events=qr("events"),this.client=qr("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(Ra.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{const n=this.getCardanoRPCUrl(r),i=a0(r);e[i]=this.createHttpProvider(i,n)}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}getCardanoRPCUrl(e){const r=this.namespace.rpcMap;if(r)return r[e]}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||this.getCardanoRPCUrl(e);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Pa(new Ec(n,qr("disableProviderPing")))}}var _7e=Object.defineProperty,A7e=(t,e,r)=>e in t?_7e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,O0=(t,e,r)=>A7e(t,typeof e!="symbol"?e+"":e,r);class S7e{constructor(e){O0(this,"name","elrond"),O0(this,"client"),O0(this,"httpProviders"),O0(this,"events"),O0(this,"namespace"),O0(this,"chainId"),this.namespace=e.namespace,this.events=qr("events"),this.client=qr("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(Ra.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;const i=a0(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||Ko(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Pa(new Ec(n,qr("disableProviderPing")))}}var N7e=Object.defineProperty,I7e=(t,e,r)=>e in t?N7e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,D0=(t,e,r)=>I7e(t,typeof e!="symbol"?e+"":e,r);class T7e{constructor(e){D0(this,"name","multiversx"),D0(this,"client"),D0(this,"httpProviders"),D0(this,"events"),D0(this,"namespace"),D0(this,"chainId"),this.namespace=e.namespace,this.events=qr("events"),this.client=qr("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(Ra.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;const i=a0(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||Ko(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Pa(new Ec(n,qr("disableProviderPing")))}}var k7e=Object.defineProperty,P7e=(t,e,r)=>e in t?k7e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,L0=(t,e,r)=>P7e(t,typeof e!="symbol"?e+"":e,r);class R7e{constructor(e){L0(this,"name","near"),L0(this,"client"),L0(this,"httpProviders"),L0(this,"events"),L0(this,"namespace"),L0(this,"chainId"),this.namespace=e.namespace,this.events=qr("events"),this.client=qr("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){if(this.chainId=e,!this.httpProviders[e]){const n=r||Ko(`${this.name}:${e}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(Ra.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;e[r]=this.createHttpProvider(r,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||Ko(e,this.namespace);return typeof n>"u"?void 0:new Pa(new Ec(n,qr("disableProviderPing")))}}var O7e=Object.defineProperty,D7e=(t,e,r)=>e in t?O7e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,M0=(t,e,r)=>D7e(t,typeof e!="symbol"?e+"":e,r);class L7e{constructor(e){M0(this,"name","tezos"),M0(this,"client"),M0(this,"httpProviders"),M0(this,"events"),M0(this,"namespace"),M0(this,"chainId"),this.namespace=e.namespace,this.events=qr("events"),this.client=qr("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){if(this.chainId=e,!this.httpProviders[e]){const n=r||Ko(`${this.name}:${e}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(Ra.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{e[r]=this.createHttpProvider(r)}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||Ko(e,this.namespace);return typeof n>"u"?void 0:new Pa(new Ec(n))}}var M7e=Object.defineProperty,$7e=(t,e,r)=>e in t?M7e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,$0=(t,e,r)=>$7e(t,typeof e!="symbol"?e+"":e,r);class U7e{constructor(e){$0(this,"name",q0),$0(this,"client"),$0(this,"httpProviders"),$0(this,"events"),$0(this,"namespace"),$0(this,"chainId"),this.namespace=e.namespace,this.events=qr("events"),this.client=qr("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace.chains=[...new Set((this.namespace.chains||[]).concat(e.chains||[]))],this.namespace.accounts=[...new Set((this.namespace.accounts||[]).concat(e.accounts||[]))],this.namespace.methods=[...new Set((this.namespace.methods||[]).concat(e.methods||[]))],this.namespace.events=[...new Set((this.namespace.events||[]).concat(e.events||[]))],this.httpProviders=this.createHttpProviders()}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider(e.chainId).request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(Ra.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.d
vendor: 8,792 bytes, line 2077
2077efaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){var e,r;const n={};return(r=(e=this.namespace)==null?void 0:e.accounts)==null||r.forEach(i=>{const s=eq(i);n[`${s.namespace}:${s.reference}`]=this.createHttpProvider(i)}),n}getHttpProvider(e){const r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||Ko(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Pa(new Ec(n,qr("disableProviderPing")))}}var B7e=Object.defineProperty,F7e=Object.defineProperties,j7e=Object.getOwnPropertyDescriptors,lD=Object.getOwnPropertySymbols,z7e=Object.prototype.hasOwnProperty,W7e=Object.prototype.propertyIsEnumerable,K_=(t,e,r)=>e in t?B7e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Dw=(t,e)=>{for(var r in e||(e={}))z7e.call(e,r)&&K_(t,r,e[r]);if(lD)for(var r of lD(e))W7e.call(e,r)&&K_(t,r,e[r]);return t},y6=(t,e)=>F7e(t,j7e(e)),oa=(t,e,r)=>K_(t,typeof e!="symbol"?e+"":e,r);let H7e=class Wq{constructor(e){oa(this,"client"),oa(this,"namespaces"),oa(this,"optionalNamespaces"),oa(this,"sessionProperties"),oa(this,"scopedProperties"),oa(this,"events",new bS),oa(this,"rpcProviders",{}),oa(this,"session"),oa(this,"providerOpts"),oa(this,"logger"),oa(this,"uri"),oa(this,"disableProviderPing",!1),this.providerOpts=e,this.logger=typeof(e==null?void 0:e.logger)<"u"&&typeof(e==null?void 0:e.logger)!="string"?e.logger:ob(Lg({level:(e==null?void 0:e.logger)||JO})),this.disableProviderPing=(e==null?void 0:e.disableProviderPing)||!1}static async init(e){const r=new Wq(e);return await r.initialize(),r}async request(e,r,n){const[i,s]=this.validateChain(r);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(i).request({request:Dw({},e),chainId:`${i}:${s}`,topic:this.session.topic,expiry:n})}sendAsync(e,r,n,i){const s=new Date().getTime();this.request(e,n,i).then(o=>r(null,Ox(s,o))).catch(o=>r(o,void 0))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties,scopedProperties:this.scopedProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:(e=this.session)==null?void 0:e.topic,reason:WO("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(e),await this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}async authenticate(e,r){if(!this.client)throw new Error("Sign Client not initialized");this.setNamespaces(e),await this.cleanupPendingPairings();const{uri:n,response:i}=await this.client.authenticate(e,r);n&&(this.uri=n,this.events.emit("display_uri",n));const s=await i();if(this.session=s.session,this.session){const o=sD(this.session.namespaces);this.namespaces=Ow(this.namespaces,o),await this.persist("namespaces",this.namespaces),this.onConnect()}return s}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}removeListener(e,r){this.events.removeListener(e,r)}off(e,r){this.events.off(e,r)}get isWalletConnect(){return!0}async pair(e){const{uri:r,approval:n}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties,scopedProperties:this.scopedProperties});r&&(this.uri=r,this.events.emit("display_uri",r));const i=await n();this.session=i;const s=sD(i.namespaces);return this.namespaces=Ow(this.namespaces,s),await this.persist("namespaces",this.namespaces),await this.persist("optionalNamespaces",this.optionalNamespaces),this.onConnect(),this.session}setDefaultChain(e,r){try{if(!this.session)return;const[n,i]=this.validateChain(e),s=this.getProvider(n);s.name===q0?s.setDefaultChain(`${n}:${i}`,r):s.setDefaultChain(i,r)}catch(n){if(!/Please call connect/.test(n.message))throw n}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");const r=this.client.pairing.getAll();if(h6(r)){for(const n of r)e.deletePairings?this.client.core.expirer.set(n.topic,0):await this.client.core.relayer.subscriber.unsubscribe(n.topic);this.logger.info(`Inactive pairings cleared: ${r.length}`)}}abortPairingAttempt(){this.logger.warn("abortPairingAttempt is deprecated. This is now a no-op.")}async checkStorage(){this.namespaces=await this.getFromStore("namespaces")||{},this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.session&&this.createProviders()}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){var e,r;if(this.client=this.providerOpts.client||await hAe.init({core:this.providerOpts.core,logger:this.providerOpts.logger||JO,relayUrl:this.providerOpts.relayUrl||wSe,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name,customStoragePrefix:this.providerOpts.customStoragePrefix,telemetryEnabled:this.providerOpts.telemetryEnabled}),this.providerOpts.session)try{this.session=this.client.session.get(this.providerOpts.session.topic)}catch(n){throw this.logger.error("Failed to get session",n),new Error(`The provided session: ${(r=(e=this.providerOpts)==null?void 0:e.session)==null?void 0:r.topic} doesn't exist in the Sign client`)}else{const n=this.client.session.getAll();this.session=n[0]}this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const e=[...new Set(Object.keys(this.session.namespaces).map(r=>nm(r)))];m6("client",this.client),m6("events",this.events),m6("disableProviderPing",this.disableProviderPing),e.forEach(r=>{if(!this.session)return;const n=r7e(r,this.session),i=jq(n),s=Ow(this.namespaces,this.optionalNamespaces),o=y6(Dw({},s[r]),{accounts:n,chains:i});switch(r){case"eip155":this.rpcProviders[r]=new f7e({namespace:o});break;case"algorand":this.rpcProviders[r]=new v7e({namespace:o});break;case"solana":this.rpcProviders[r]=new p7e({namespace:o});break;case"cosmos":this.rpcProviders[r]=new y7e({namespace:o});break;case"polkadot":this.rpcProviders[r]=new s7e({namespace:o});break;case"cip34":this.rpcProviders[r]=new C7e({namespace:o});break;case"elrond":this.rpcProviders[r]=new S7e({namespace:o});break;case"multiversx":this.rpcProviders[r]=new T7e({namespace:o});break;case"near":this.rpcProviders[r]=new R7e({namespace:o});break;case"tezos":this.rpcProviders[r]=new L7e({namespace:o});break;default:this.rpcProviders[q0]?this.rpcProviders[q0].updateNamespace(o):this.rpcProviders[q0]=new U7e({namespace:o})}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",e=>{var r;const{topic:n}=e;n===((r=this.session)==null?void 0:r.topic)&&this.events.emit("session_ping",e)}),this.client.on("session_event",e=>{var r;const{params:n,topic:i}=e;if(i!==((r=this.session)==null?void 0:r.topic))return;const{event:s}=n;if(s.name==="accountsChanged"){const o=s.data;o&&h6(o)&&this.events.emit("accountsChanged",o.map(iD))}else if(s.name==="chainChanged"){const o=n.chainId,a=n.event.data,c=nm(o),l=g6(o)!==g6(a)?`${c}:${g6(a)}`:o;this.onChainChanged(l)}else this.events.emit(s.name,s.data);this.events.emit("session_event",e)}),this.client.on("session_update",({topic:e,params:r})=>{var n,i;if(e!==((n=this.session)==null?void 0:n.topic))return;const{namespaces:s}=r,o=(i=this.client)==null?void 0:i.session.get(e);this.session=y6(Dw({},o),{namespaces:s}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:r})}),this.client.on("session_delete",async e=>{var r;e.topic===((r=this.session)==null?void 0:r.topic)&&(await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",y6(Dw({},WO("USER_DISCONNECTED")),{data:e.topic})))}),this.on(Ra.DEFAULT_CHAIN_CHANGED,e=>{this.onChainChanged(e,!0)})}getProvider(e){return this.rpcProviders[e]||this.rpcProviders[q0]}
2077onSessionUpdate(){Object.keys(this.rpcProviders).forEach(e=>{var r;this.getProvider(e).updateNamespace((r=this.session)==null?void 0:r.namespaces[e])})}setNamespaces(e){const{namespaces:r={},optionalNamespaces:n={},sessionProperties:i,scopedProperties:s}=e;this.optionalNamespaces=Ow(r,n),this.sessionProperties=i,this.scopedProperties=s}validateChain(e){const[r,n]=(e==null?void 0:e.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[r,n];if(r&&!Object.keys(this.namespaces||{}).map(o=>nm(o)).includes(r))throw new Error(`Namespace '${r}' is not configured. Please call connect() first with namespace config.`);if(r&&n)return[r,n];const i=nm(Object.keys(this.namespaces)[0]),s=this.rpcProviders[i].getDefaultChain();return[i,s]}async requestAccounts(){const[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}async onChainChanged(e,r=!1){if(!this.namespaces)return;const[n,i]=this.validateChain(e);if(!i)return;this.updateNamespaceChain(n,i),this.events.emit("chainChanged",i);const s=this.getProvider(n).getDefaultChain();r||this.getProvider(n).setDefaultChain(i),this.emitAccountsChangedOnChainChange({namespace:n,previousChainId:s,newChainId:e}),await this.persist("namespaces",this.namespaces)}emitAccountsChangedOnChainChange({namespace:e,previousChainId:r,newChainId:n}){var i,s;try{if(r===n)return;const o=(s=(i=this.session)==null?void 0:i.namespaces[e])==null?void 0:s.accounts;if(!o)return;const a=o.filter(c=>c.includes(`${n}:`)).map(iD);if(!h6(a))return;this.events.emit("accountsChanged",a)}catch(o){this.logger.warn("Failed to emit accountsChanged on chain change",o)}}updateNamespaceChain(e,r){if(!this.namespaces)return;const n=this.namespaces[e]?e:`${e}:${r}`,i={chains:[],methods:[],events:[],defaultChain:r};this.namespaces[n]?this.namespaces[n]&&(this.namespaces[n].defaultChain=r):this.namespaces[n]=i}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,await this.deleteFromStore("namespaces"),await this.deleteFromStore("optionalNamespaces"),await this.deleteFromStore("sessionProperties"),this.session=void 0,await this.cleanupPendingPairings({deletePairings:!0}),await this.cleanupStorage()}async persist(e,r){var n;const i=((n=this.session)==null?void 0:n.topic)||"";await this.client.core.storage.setItem(`${Pw}/${e}${i}`,r)}async getFromStore(e){var r;const n=((r=this.session)==null?void 0:r.topic)||"";return await this.client.core.storage.getItem(`${Pw}/${e}${n}`)}async deleteFromStore(e){var r;const n=((r=this.session)==null?void 0:r.topic)||"";await this.client.core.storage.removeItem(`${Pw}/${e}${n}`)}async cleanupStorage(){var e;try{if(((e=this.client)==null?void 0:e.session.length)>0)return;const r=await this.client.core.storage.getKeys();for(const n of r)n.startsWith(Pw)&&await this.client.core.storage.removeItem(n)}catch(r){this.logger.warn("Failed to cleanup storage",r)}}},Td=null;const Fo={getSIWX(){return Ee.state.siwx},async initializeIfEnabled(){var s;const t=Ee.state.siwx,e=X.getActiveCaipAddress();if(!(t&&e))return;const[r,n,i]=e.split(":");if(X.checkIfSupportedNetwork(r))try{if(Td&&await Td,(await t.getSessions(`${r}:${n}`,i)).length)return;await Wr.open({view:"SIWXSignMessage"})}catch(o){console.error("SIWXUtil:initializeIfEnabled",o),on.sendEvent({type:"track",event:"SIWX_AUTH_ERROR",properties:this.getSIWXEventProperties()}),await((s=We._getClient())==null?void 0:s.disconnect().catch(console.error)),Lt.reset("Connect"),Jc.showError("A problem occurred while trying initialize authentication")}},async requestSignMessage(){const t=Ee.state.siwx,e=it.getPlainAddress(X.getActiveCaipAddress()),r=X.getActiveCaipNetwork(),n=We._getClient();if(!t)throw new Error("SIWX is not enabled");if(!e)throw new Error("No ActiveCaipAddress found");if(!r)throw new Error("No ActiveCaipNetwork or client found");if(!n)throw new Error("No ConnectionController client found");try{const i=await t.createMessage({chainId:r.caipNetworkId,accountAddress:e}),s=i.toString();Fe.getConnectorId(r.chainNamespace)===fe.CONNECTOR_ID.AUTH&&Lt.pushTransactionStack({});const a=await n.signMessage(s);await t.addSession({data:i,message:s,signature:a}
2077),X.setLastConnectedSIWECaipNetwork(r),Wr.close(),on.sendEvent({type:"track",event:"SIWX_AUTH_SUCCESS",properties:this.getSIWXEventProperties()})}catch(i){const s=this.getSIWXEventProperties();(!Wr.state.open||Lt.state.view==="ApproveTransaction")&&await Wr.open({view:"SIWXSignMessage"}),Jc.showError("Error signing message"),on.sendEvent({type:"track",event:"SIWX_AUTH_ERROR",properties:s}),console.error("SWIXUtil:requestSignMessage",i)}},async cancelSignMessage(){var t;try{const e=this.getSIWX();if((t=e==null?void 0:e.getRequired)==null?void 0:t.call(e)){const n=X.getLastConnectedSIWECaipNetwork();if(n){const i=await(e==null?void 0:e.getSessions(n==null?void 0:n.caipNetworkId,it.getPlainAddress(X.getActiveCaipAddress())||""));i&&i.length>0?await X.switchActiveNetwork(n):await We.disconnect()}else await We.disconnect()}else Wr.close();Wr.close(),on.sendEvent({event:"CLICK_CANCEL_SIWX",type:"track",properties:this.getSIWXEventProperties()})}catch(e){console.error("SIWXUtil:cancelSignMessage",e)}},async getAllSessions(){const t=this.getSIWX(),e=X.getAllRequestedCaipNetworks(),r=[];return await Promise.all(e.map(async n=>{const i=await(t==null?void 0:t.getSessions(n.caipNetworkId,it.getPlainAddress(X.getActiveCaipAddress())||""));i&&r.push(...i)})),r},async getSessions(t){const e=Ee.state.siwx;let r=t==null?void 0:t.address;if(!r){const i=X.getActiveCaipAddress();r=it.getPlainAddress(i)}let n=t==null?void 0:t.caipNetworkId;if(!n){const i=X.getActiveCaipNetwork();n=i==null?void 0:i.caipNetworkId}return e&&r&&n?e.getSessions(n,r):[]},async isSIWXCloseDisabled(){var e;const t=this.getSIWX();if(t){const r=Lt.state.view==="ApproveTransaction",n=Lt.state.view==="SIWXSignMessage";if(r||n)return((e=t.getRequired)==null?void 0:e.call(t))&&(await this.get
2077Sessions()).length===0}return!1},async authConnectorAuthenticate({authConnector:t,chainId:e,socialUri:r,preferredAccountType:n,chainNamespace:i}){var l;const s=Fo.getSIWX();if(!s||!i.includes(fe.CHAIN.EVM)){const u=await t.connect({chainId:e,socialUri:r,preferredAccountType:n});return{address:u.address,chainId:u.chainId,accounts:u.accounts}}const o=await s.createMessage({chainId:((l=X.getActiveCaipNetwork())==null?void 0:l.caipNetworkId)||"",accountAddress:"<<AccountAddress>>"}),a={accountAddress:o.accountAddress,chainId:o.chainId,domain:o.domain,uri:o.uri,version:o.version,nonce:o.nonce,notBefore:o.notBefore,statement:o.statement,resources:o.resources,requestId:o.requestId,issuedAt:o.issuedAt,expirationTime:o.expirationTime,serializedMessage:o.toString()},c=await t.connect({chainId:e,socialUri:r,siwxMessage:a,preferredAccountType:n});return a.accountAddress=c.address,a.serializedMessage=c.message||"",c.signature&&c.message&&await Fo.addEmbeddedWalletSession(a,c.message,c.signature),{address:c.address,chainId:c.chainId,accounts:c.accounts}},async addEmbeddedWalletSession(t,e,r){if(Td)return Td;const n=Fo.getSIWX();return n?(Td=n.addSession({data:t,message:e,signature:r}).finally(()=>{Td=null}),Td):Promise.resolve()},async universalProviderAuthenticate({universalProvider:t,chains:e,methods:r}){var a,c,l;const n=Fo.getSIWX(),i=new Set(e.map(u=>u.split(":")[0]));if(!n||i.size!==1||!i.has("eip155"))return!1;const s=await n.createMessage({chainId:((a=X.getActiveCaipNetwork())==null?void 0:a.caipNetworkId)||"",accountAddress:""}),o=await t.authenticate({nonce:s.nonce,domain:s.domain,uri:s.uri,exp:s.expirationTime,iat:s.issuedAt,nbf:s.notBefore,requestId:s.requestId,version:s.version,resources:s.resources,statement:s.statement,chainId:s.chainId,methods:r,chains:[s.chainId,...e.filter(u=>u!==s.chainId)]});if(Jc.showLoading("Authenticating...",{autoClose:!1}),ct.setConnectedWalletInfo({...o.session.peer.metadata,name:o.session.peer.metadata.name,icon:(c=o.session.peer.metadata.icons)==null?void 0:c[0],type:"WALLET_CONNECT"},Array.from(i)[0]),(l=o==null?void 0:o.auths)!=null&&l.length){const u=o.auths.map(f=>{const d=t.client.formatAuthMessage({request:f.p,iss:f.p.iss});return{data:{...f.p,accountAddress:f.p.iss.split(":").slice(-1).join(""),chainId:f.p.iss.split(":").slice(2,4).join(":"),uri:f.p.aud,version:f.p.version||s.version,expirationTime:f.p.exp,issuedAt:f.p.iat,notBefore:f.p.nbf},message:d,signature:f.s.s,cacao:f}});try{await n.setSessions(u),on.sendEvent({type:"track",event:"SIWX_AUTH_SUCCESS",properties:Fo.getSIWXEventProperties()})}catch(f){throw console.error("SIWX:universalProviderAuth - failed to set sessions",f),on.sendEvent({type:"track",event:"SIWX_AUTH_ERROR",properties:Fo.getSIWXEventProperties()}),await t.disconnect().catch(console.error),f}finally{Jc.hide()}}return!0},getSIWXEventProperties(){var e;const t=X.state.activeChain;if(!t)throw new Error("SIWXUtil:getSIWXEventProperties - namespace is required");return{network:((e=X.state.activeCaipNetwork)==null?void 0:e.caipNetworkId)||"",isSmartAccount:Vo(t)===Pi.ACCOUNT_TYPES.SMART_ACCOUNT}},async clearSessions(){const t=this.getSIWX();t&&await t.setSessions([])}},q7e={},V7e=(t,e)=>{const r=se.useRef(void 0);se.useEffect(()=>{r.current=_0e(t,e)}),se.useDebugValue(r.current)},K7e=V7e,G7e=new WeakMap;function G_(t,e){const n=se.useMemo(()=>t&&new WeakMap,[t]),i=se.useRef(void 0);let s=!0;const o=se.useSyncExternalStore(se.useCallback(c=>{const l=Wi(t,c);return c(),l},[t,void 0]),()=>{const c=kh(t);try{if(!s&&i.current&&!Rj(i.current,c,n,new WeakMap))return i.current}catch{}return c},()=>kh(t));s=!1,se.useLayoutEffect(()=>{i.current=o}),(q7e?"production":void 0)!=="production"&&K7e(o,n);const a=se.useMemo(()=>new WeakMap,[]);return Pj(o,n,a,G7e)}function Y7e(){const{activeCaipNetwork:t}=G_(X.state);return{caipNetwork:t,chainId:t==null?void 0:t.id,caipNetworkId:t==null?void 0:t.caipNetworkId}}function XUe(t){var l;const e=G_(X.state),{activeConnectorIds:r}=G_(Fe.state),n=e.activeChain;if(!n)return{allAccounts:[],address:void 0,caipAddress:void 0,status:void 0,isConnected:!1,embeddedWalletInfo:void 0};const i=(l=e.chains.get(n))==null?void 0:l.accountState,s=Fe.getAuthConnector(n),o=r[n];return{allAccounts:We.getConnections(n).flatMap(u=>u.accounts.map(({address:f})=>it.createAccount(n,f,"eoa"))),caipAddress:i==null?void 0:i.caipAddress,address:it.getPlainAddress(i==null?void 0:i.caipAddress),isConnected:!!(i!=null&&i.caipAddress),status:i==null?void 0:i.status,embeddedWalletInfo:s&&o===fe.CONNECTOR_ID.AUTH?{user:i!=null&&i.user?{...i.user,username:Oe.getConnectedSocialUsername()}:void 0,authProvider:(i==null?void 0:i.socialProvider)||"email",accountType:i==null?void 0:i.preferredAccountType,isSmartAccountDeployed:!!(i!=null&&i.smartAccountDeployed)}:void 0}}function eBe(){async function t(e){await We.disconnect(e)}return{disconnect:t}}const Yr={METMASK_CONNECTOR_NAME:"MetaMask",TRUST_CONNECTOR_NAME:"Trust Wallet",SOLFLARE_CONNECTOR_NAME:"Solflare",PHANTOM_CONNECTOR_NAME:"Phantom",COIN98_CONNECTOR_NAME:"Coin98",MAGIC_EDEN_CONNECTOR_NAME:"Magic Eden",BACKPACK_CONNECTOR_NAME:"Backpack",BITGET_CONNECTOR_NAME:"Bitget Wallet",FRONTIER_CONNECTOR_NAME:"Frontier",XVERSE_CONNECTOR_NAME:"Xverse Wallet",LEATHER_CONNECTOR_NAME:"Leather",EIP155:fe.CHAIN.EVM,ADD_CHAIN_METHOD:"wallet_addEthereumChain",EIP6963_ANNOUNCE_EVENT:"eip6963:announceProvider",EIP6963_REQUEST_EVENT:"eip6963:requestProvider",CONNECTOR_RDNS_MAP:{coinbaseWallet:"com.coinbase.wallet",coinbaseWalletSDK:"com.coinbase.wallet"},CONNECTOR_TYPE_EXTERNAL:"EXTERNAL",CONNECTOR_TYPE_WALLET_CONNECT:"WALLET_CONNECT",CONNECTOR_TYPE_INJECTED:"INJECTED",CONNECTOR_TYPE_ANNOUNCED:"ANNOUNCED",CONNECTOR_TYPE_AUTH:"AUTH",CONNECTOR_TYPE_MULTI_CHAIN:"MULTI_CHAIN",CONNECTOR_TYPE_W3M_AUTH:"ID_AUTH"},Vc={ConnectorExplorerIds:{[fe.CONNECTOR_ID.COINBASE]:"fd20dc426fb37566d803205b19bbc1d4096b248ac04548e3cfb6b3a38bd033aa",[fe.CONNECTOR_ID.COINBASE_SDK]:"fd20dc426fb37566d803205b19bbc1d4096b248ac04548e3cfb6b3a38bd033aa",[fe.CONNECTOR_ID.SAFE]:"225affb176778569276e484e1b92637ad061b01e13a048b35a9d280c3b58970f",[fe.CONNECTOR_ID.LEDGER]:"19177a98252e07ddfc9af2083ba8e07ef627cb6103467ffebb3f8f4205fd7927",[fe.CONNECTOR_ID.OKX]:"971e689d0a5be527bac79629b4ee9b925e82208e5168b733496
2077a09c0faed0709",[Yr.METMASK_CONNECTOR_NAME]:"c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96",[Yr.TRUST_CONNECTOR_NAME]:"4622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0",[Yr.SOLFLARE_CONNECTOR_NAME]:"1ca0bdd4747578705b1939af023d120677c64fe6ca76add81fda36e350605e79",[Yr.PHANTOM_CONNECTOR_NAME]:"a797aa35c0fadbfc1a53e7f675162ed5226968b44a19ee3d24385c64d1d3c393",[Yr.COIN98_CONNECTOR_NAME]:"2a3c89040ac3b723a1972a33a125b1db11e258a6975d3a61252cd64e6ea5ea01",[Yr.MAGIC_EDEN_CONNECTOR_NAME]:"8b830a2b724a9c3fbab63af6f55ed29c9dfa8a55e732dc88c80a196a2ba136c6",[Yr.BACKPACK_CONNECTOR_NAME]:"2bd8c14e035c2d48f184aaa168559e86b0e3433228d3c4075900a221785019b0",[Yr.BITGET_CONNECTOR_NAME]:"38f5d18bd8522c244bdd70cb4a68e0e718865155811c043f052fb9f1c51de662",[Yr.FRONTIER_CONNECTOR_NAME]:"85db431492aa2e8672e93f4ea7acf10c88b97b867b0d373107af63dc4880f041",[Yr.XVERSE_CONNECTOR_NAME]:"2a87d74ae02e10bdd1f51f7ce6c4e1cc53cd5f2c0b6b5ad0d7b3007d2b13de7b",[Yr.LEATHER_CONNECTOR_NAME]:"483afe1df1df63daf313109971ff3ef8356ddf1cc4e45877d205eee0b7893a13"},NetworkImageIds:{1:"ba0ba0cd-17c6-4806-ad93-f9d174f17900",42161:"3bff954d-5cb0-47a0-9a23-d20192e74600",43114:"30c46e53-e989-45fb-4549-be3bd4eb3b00",56:"93564157-2e8e-4ce7-81df-b264dbee9b00",250:"06b26297-fe0c-4733-5d6b-ffa5498aac00",10:"ab9c186a-c52f-464b-2906-ca59d760a400",137:"41d04d42-da3b-4453-8506-668cc0727900",5e3:"e86fae9b-b770-4eea-e520-150e12c81100",295:"6a97d510-cac8-4e58-c7ce-e8681b044c00",11155111:"e909ea0a-f92a-4512-c8fc-748044ea6800",84532:"a18a7ecd-e307-4360-4746-283182228e00",1301:"4eeea7ef-0014-4649-5d1d-07271a80f600",130:"2257980a-3463-48c6-cbac-a42d2a956e00",10143:"0a728e83-bacb-46db-7844-948f05434900",100:"02b53f6a-e3d4-479e-1cb4-21178987d100",9001:"f926ff41-260d-4028-635e-91913fc28e00",324:"b310f07f-4ef7-49f3-7073-2a0a39685800",314:"5a73b3dd-af74-424e-cae0-0de859ee9400",4689:"34e68754-e536-40da-c153-6ef2e7188a00",1088:"3897a66d-40b9-4833-162f-a2c90531c900",1284:"161038da-44ae-4ec7-1208-0ea569454b00",1285:"f1d73bb6-5450-4e18-38f7-fb6484264a00",7777777:"845c60df-d429-4991-e687-91ae45791600",42220:"ab781bbc-ccc6-418d-d32d-789b15da1f00",8453:"7289c336-3981-4081-c5f4-efc26ac64a00",1313161554:"3ff73439-a619-4894-9262-4470c773a100",2020:"b8101fc0-9c19-4b6f-ec65-f6dfff106e00",2021:"b8101fc0-9c19-4b6f-ec65-f6dfff106e00",80094:"e329c2c9-59b0-4a02-83e4-212ff3779900",2741:"fc2427d1-5af9-4a9c-8da5-6f94627cd900","5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp":"a1b58899-f671-4276-6a5e-56ca5bd59700","4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z":"a1b58899-f671-4276-6a5e-56ca5bd59700",EtWTRABZaYq6iMfeYKouRu166VU2xqa1:"a1b58899-f671-4276-6a5e-56ca5bd59700","000000000019d6689c085ae165831e93":"0b4838db-0161-4ffe-022d-532bf03dba00","000000000933ea01ad0ee984209779ba":"39354064-d79b-420b-065d-f980c4b78200"},ConnectorImageIds:{[fe.CONNECTOR_ID.COINBASE]:"0c2840c3-5b04-4c44-9661-fbd4b49e1800",[fe.CONNECTOR_ID.COINBASE_SDK]:"0c2840c3-5b04-4c44-9661-fbd4b49e1800",[fe.CONNECTOR_ID.SAFE]:"461db637-8616-43ce-035a-d89b8a1d5800",[fe.CONNECTOR_ID.LEDGER]:"54a1aa77-d202-4f8d-0fb2-5d2bb6db0300",[fe.CONNECTOR_ID.WALLET_CONNECT]:"ef1a1fcf-7fe8-4d69-bd6d-fda1345b4400",[fe.CONNECTOR_ID.INJECTED]:"07ba87ed-43aa-4adf-4540-9e6a2b9cae00"},ConnectorNamesMap:{[fe.CONNECTOR_ID.INJECTED]:"Browser Wallet",[fe.CONNECTOR_ID.WALLET_CONNECT]:"WalletConnect",[fe.CONNECTOR_ID.COINBASE]:"Coinbase",[fe.CONNECTOR_ID.COINBASE_SDK]:"Coinbase",[fe.CONNECTOR_ID.LEDGER]:"Ledger",[fe.CONNECTOR_ID.SAFE]:"Safe"},ConnectorTypesMap:{[fe.CONNECTOR_ID.INJECTED]:"INJECTED",[fe.CONNECTOR_ID.WALLET_CONNECT]:"WALLET_CONNECT",[fe.CONNECTOR_ID.EIP6963]:"ANNOUNCED",[fe.CONNECTOR_ID.AUTH]:"AUTH",[Yr.CONNECTOR_TYPE_AUTH]:"AUTH"}},Ui={getCaipTokens(t){if(!t)return;const e={};return Object.entries(t).forEach(([r,n])=>{e[`${Yr.EIP155}:${r}`]=n}),e},isLowerCaseMatch(t,e){return(t==null?void 0:t.toLowerCase())===(e==null?void 0:e.toLowerCase())},getActiveNamespaceConnectedToAuth(){const t=X.state.activeChain;return fe.AUTH_CONNECTOR_SUPPORTED_CHAINS.find(e=>Fe.getConnectorId(e)===fe.CONNECTOR_ID.AUTH&&e===t)},withRetry({conditionFn:t,intervalMs:e,maxRetries:r}){let n=0;return new Promise(i=>{async function s(){return n+=1,await t()?i(!0):n>=r?i(!1):(setTimeout(s,e),null)}s()})}},Z7e=new AbortController,Ms={EmbeddedWalletAbortController:Z7e,UniversalProviderErrors:{UNAUTHORIZED_DOMAIN_NOT_ALLOWED:{message:"Unauthorized: origin not allowed",alertErrorKey:"ORIGIN_NOT_ALLOWED"},JWT_VALIDATION_ERROR:{message:"JWT validation error: JWT Token is not yet valid",alertErrorKey:"JWT_TOKEN_NOT_VALID"}
2077,INVALID_KEY:{message:"Unauthorized: invalid key",alertErrorKey:"INVALID_PROJECT_ID"}},ALERT_ERRORS:{SWITCH_NETWORK_NOT_FOUND:{shortMessage:"Network Not Found",longMessage:"Network not found. Please make sure it is included in 'networks' array in createAppKit function."},ORIGIN_NOT_ALLOWED:{shortMessage:"Origin Not Allowed",longMessage:()=>`ð§ Origin ${J7e()?window.origin:"unknown"} not found on allow list. Please update your project configurations on dashboard.reown.com.`},IFRAME_LOAD_FAILED:{shortMessage:"Network Error - Could not load embedded wallet",longMessage:()=>"There was an issue loading the embedded wallet. Please try again later."},IFRAME_REQUEST_TIMEOUT:{shortMessage:"Embedded Wallet Request Timed Out",longMessage:()=>"There was an issue doing the request to the embedded wallet. Please try again later."},UNVERIFIED_DOMAIN:{shortMessage:"Unverified Domain",longMessage:()=>"There was an issue loading the embedded wallet. Please verify that your domain is allowed at dashboard.reown.com."},JWT_TOKEN_NOT_VALID:{shortMessage:"Session Expired",longMessage:"Invalid session found on UniversalProvider. Please check your time settings and connect again."},INVALID_PROJECT_ID:{shortMessage:"Invalid Project ID",longMessage:"The project ID is invali
2077d. Visit dashboard.reown.com to get a new one."},PROJECT_ID_NOT_CONFIGURED:{shortMessage:"Project ID Not Configured",longMessage:"Project ID Not Configured. Please update your project configurations on dashboard.reown.com."},SERVER_ERROR_APP_CONFIGURATION:{shortMessage:"Server Error",longMessage:t=>`Failed to get App Configuration ${t||""}`},RATE_LIMITED_APP_CONFIGURATION:{shortMessage:"Rate Limited",longMessage:"Rate limited when trying to get the App Configuration"}}};function J7e(){return typeof window<"u"}const Q7e={createLogger(t,e="error"){const r=Lg({level:e}),{logger:n}=vS({opts:r});return n.error=(...i)=>{for(const s of i)if(s instanceof Error){t(s,...i);return}t(void 0,...i)},n}},X7e="rpc.walletconnect.org";function uD(t,e){const r=new URL("https://rpc.walletconnect.org/v1/");return r.searchParams.set("chainId",t),r.searchParams.set("projectId",e),r.toString()}const b6=["near:mainnet","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","eip155:1101","eip155:56","eip155:42161","eip155:7777777","eip155:59144","eip155:324","solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1","eip155:5000","solana:4sgjmw1sunhzsxgspuhpqldx6wiyjntz","eip155:80084","eip155:5003","eip155:100","eip155:8453","eip155:42220","eip155:1313161555","eip155:17000","eip155:1","eip155:300","eip155:1313161554","eip155:1329","eip155:84532","eip155:421614","eip155:11155111","eip155:8217","eip155:43114","solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z","eip155:999999999","eip155:11155420","eip155:80002","eip155:97","eip155:43113","eip155:137","eip155:10","eip155:1301","bip122:000000000019d6689c085ae165831e93","bip122:000000000933ea01ad0ee984209779ba"],V0={extendRpcUrlWithProjectId(t,e){let r=!1;try{r=new URL(t).host===X7e}catch{r=!1}if(r){const n=new URL(t);return n.searchParams.has("projectId")||n.searchParams.set("projectId",e),n.toString()}return t},isCaipNetwork(t){return"chainNamespace"in t&&"caipNetworkId"in t},getChainNamespace(t){return this.isCaipNetwork(t)?t.chainNamespace:fe.CHAIN.EVM},getCaipNetworkId(t){return this.isCaipNetwork(t)?t.caipNetworkId:`${fe.CHAIN.EVM}:${t.id}`},getDefaultRpcUrl(t,e,r){var i,s,o;const n=(o=(s=(i=t.rpcUrls)==null?void 0:i.default)==null?void 0:s.http)==null?void 0:o[0];return b6.includes(e)?uD(e,r):n||""},extendCaipNetwork(t,{customNetworkImageUrls:e,projectId:r,customRpcUrls:n}){var d,p,h,g,y,x,C;const i=this.getChainNamespace(t),s=this.getCaipNetworkId(t),o=(h=(p=(d=t.rpcUrls)==null?void 0:d.default)==null?void 0:p.http)==null?void 0:h[0],a=this.getDefaultRpcUrl(t,s,r),c=((x=(y=(g=t==null?void 0:t.rpcUrls)==null?void 0:g.chainDefault)==null?void 0:y.http)==null?void 0:x[0])||o,l=((C=n==null?void 0:n[s])==null?void 0:C.map(_=>_.url))||[],u=[...l,...a?[a]:[]],f=[...l];return c&&!f.includes(c)&&f.push(c),{...t,chainNamespace:i,caipNetworkId:s,assets:{imageId:Vc.NetworkImageIds[t.id],imageUrl:e==null?void 0:e[t.id]},rpcUrls:{...t.rpcUrls,default:{http:u},chainDefault:{http:f}}}},extendCaipNetworks(t,{customNetworkImageUrls:e,projectId:r,customRpcUrls:n}){return t.map(i=>V0.extendCaipNetwork(i,{customNetworkImageUrls:e,customRpcUrls:n,projectId:r}))},getViemTransport(t,e,r){var i,s,o;const n=[];return r==null||r.forEach(a=>{n.push(aw(a.url,a.config))}),b6.includes(t.caipNetworkId)&&n.push(aw(uD(t.caipNetworkId,e),{fetchOptions:{headers:{"Content-Type":"text/plain"}}})),(o=(s=(i=t==null?void 0:t.rpcUrls)==null?void 0:i.default)==null?void 0:s.http)==null||o.forEach(a=>{n.push(aw(a))}),Wk(n)},extendWagmiTransports(t,e,r){if(b6.includes(t.caipNetworkId)){const n=this.getDefaultRpcUrl(t,t.caipNetworkId,e);return Wk([r,aw(n)])}return r},getUnsupportedNetwork(t){return{id:t.split(":")[1],caipNetworkId:t,name:fe.UNSUPPORTED_NETWORK_NAME,chainNamespace:t.split(":")[0],nativeCurrency:{name:"",decimals:0,symbol:""},rpcUrls:{default:{http:[]}}}},getCaipNetworkFromStorage(t){var c;const e=Oe.getActiveCaipNetworkId(),r=X.getAllRequestedCaipNetworks(),n=Array.from(((c=X.state.chains)==null?void 0:c.keys())||[]),i=e==null?void 0:e.split(":")[0],s=i?n.includes(i):!1,o=r==null?void 0:r.find(l=>l.caipNetworkId===e);return s&&!o&&e?this.getUnsupportedNetwork(e):o||t||(r==null?void 0:r[0])}},t4={eip155:void 0,solana:void 0,polkadot:void 0,bip122:void 0,cosmos:void 0},io=_n({providers:{...t4},providerIds:{...t4}}),jr={state:io,subscribeKey(t,e){return Ds(io,t,e)},subscribe(t){return Wi(io,()=>{t(io)})},subscribeProviders(t){return Wi(io.providers,()=>t(io.providers))},setProvider(t,e){t&&e&&(io.providers[t]=Ph(e))},getProvider(t){if(t)return io.providers[t]},setProviderId(t,e){e&&(io.providerIds[t]=e)},getProviderId(t){if(t)return io.providerIds[t]},reset(){io.providers={...t4},io.providerIds={...t4}},resetChain(t){io.providers[t]=void 0,io.providerIds[t]=void 0}}
2077,fD={transactionHash:/^0x(?:[A-Fa-f0-9]{64})$/u,signedMessage:/^0x(?:[a-fA-F0-9]{62,})$/u},Zi={set(t,e){jo.isClient&&localStorage.setItem(`${lt.STORAGE_KEY}${t}`,e)},get(t){return jo.isClient?localStorage.getItem(`${lt.STORAGE_KEY}${t}`):null},delete(t,e){jo.isClient&&(e?localStorage.removeItem(t):localStorage.removeItem(`${lt.STORAGE_KEY}${t}`))}},Lw=30*1e3,jo={checkIfAllowedToTriggerEmail(){const t=Zi.get(lt.LAST_EMAIL_LOGIN_TIME);if(t){const e=Date.now()-Number(t);if(e<Lw){const r=Math.ceil((Lw-e)/1e3);throw new Error(`Please try again after ${r} seconds`)}}},getTimeToNextEmailLogin(){const t=Zi.get(lt.LAST_EMAIL_LOGIN_TIME);if(t){const e=Date.now()-Number(t);if(e<Lw)return Math.ceil((Lw-e)/1e3)}return 0},checkIfRequestExists(t){return Pi.NOT_SAFE_RPC_METHODS.includes(t.method)||Pi.SAFE_RPC_METHODS.includes(t.method)},getResponseType(t){return typeof t=="string"&&((t==null?void 0:t.match(fD.transactionHash))||(t==null?void 0:t.match(fD.signedMessage)))?lt.RPC_RESPONSE_TYPE_TX:lt.RPC_RESPONSE_TYPE_OBJECT},checkIfRequestIsSafe(t){return Pi.SAFE_RPC_METHODS.includes(t.method)},isClient:typeof window<"u"};var Hr;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function r(i){throw new Error}t.assertNever=r,t.arrayToEnum=i=>{const s={};for(const o of i)s[o]=o;return s},t.getValidEnumValues=i=>{const s=t.objectKeys(i).filter(a=>typeof i[i[a]]!="number"),o={};for(const a of s)o[a]=i[a];return t.objectValues(o)},t.objectValues=i=>t.objectKeys(i).map(function(s){return i[s]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const s=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&s.push(o);return s},t.find=(i,s)=>{for(const o of i)if(s(o))return o},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,s=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(s)}t.joinValues=n,t.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(Hr||(Hr={}));var Y_;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Y_||(Y_={}));const Xe=Hr.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),vf=t=>{switch(typeof t){case"undefined":return Xe.undefined;case"string":return Xe.string;case"number":return isNaN(t)?Xe.nan:Xe.number;case"boolean":return Xe.boolean;case"function":return Xe.function;case"bigint":return Xe.bigint;case"symbol":return Xe.symbol;case"object":return Array.isArray(t)?Xe.array:t===null?Xe.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?Xe.promise:typeof Map<"u"&&t instanceof Map?Xe.map:typeof Set<"u"&&t instanceof Set?Xe.set:typeof Date<"u"&&t instanceof Date?Xe.date:Xe.object;default:return Xe.unknown}}
vendor: 42,397 bytes, line 2077
2077,Me=Hr.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),eNe=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class fc extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const r=e||function(s){return s.message},n={_errors:[]},i=s=>{for(const o of s.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let a=n,c=0;for(;c<o.path.length;){const l=o.path[c];c===o.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(r(o))):a[l]=a[l]||{_errors:[]},a=a[l],c++}}};return i(this),n}toString(){return this.message}get message(){return JSON.stringify(this.issues,Hr.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},n=[];for(const i of this.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}fc.create=t=>new fc(t);const cy=(t,e)=>{let r;switch(t.code){case Me.invalid_type:t.received===Xe.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case Me.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,Hr.jsonStringifyReplacer)}`;break;case Me.unrecognized_keys:r=`Unrecognized key(s) in object: ${Hr.joinValues(t.keys,", ")}`;break;case Me.invalid_union:r="Invalid input";break;case Me.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Hr.joinValues(t.options)}`;break;case Me.invalid_enum_value:r=`Invalid enum value. Expected ${Hr.joinValues(t.options)}, received '${t.received}'`;break;case Me.invalid_arguments:r="Invalid function arguments";break;case Me.invalid_return_type:r="Invalid function return type";break;case Me.invalid_date:r="Invalid date";break;case Me.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:Hr.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case Me.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case Me.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case Me.custom:r="Invalid input";break;case Me.invalid_intersection_types:r="Intersection results could not be merged";break;case Me.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case Me.not_finite:r="Number must be finite";break;default:r=e.defaultError,Hr.assertNever(t)}return{message:r}};let Hq=cy;function tNe(t){Hq=t}function r4(){return Hq}const n4=t=>{const{data:e,path:r,errorMaps:n,issueData:i}=t,s=[...r,...i.path||[]],o={...i,path:s};let a="";const c=n.filter(l=>!!l).slice().reverse();for(const l of c)a=l(o,{data:e,defaultError:a}).message;return{...i,path:s,message:i.message||a}},rNe=[];function st(t,e){const r=n4({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r4(),cy].filter(n=>!!n)});t.common.issues.push(r)}class Os{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){const n=[];for(const i of r){if(i.status==="aborted")return Vt;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){const n=[];for(const i of r)n.push({key:await i.key,value:await i.value});return Os.mergeObjectSync(e,n)}static mergeObjectSync(e,r){const n={};for(const i of r){const{key:s,value:o}=i;if(s.status==="aborted"||o.status==="aborted")return Vt;s.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(n[s.value]=o.value)}return{status:e.value,value:n}}}const Vt=Object.freeze({status:"aborted"}),qq=t=>({status:"dirty",value:t}),Ks=t=>({status:"valid",value:t}),Z_=t=>t.status==="aborted",J_=t=>t.status==="dirty",ly=t=>t.status==="valid",i4=t=>typeof Promise<"u"&&t instanceof Promise;var St;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(St||(St={}));class gl{constructor(e,r,n,i){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const dD=(t,e)=>{if(ly(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new fc(t.common.issues);return this._error=r,this._error}}};function Xt(t){if(!t)return{};const{errorMap:e,invalid_type_error:r,required_error:n,description:i}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(o,a)=>o.code!=="invalid_type"?{message:a.defaultError}:typeof a.data>"u"?{message:n??a.defaultError}:{message:r??a.defaultError},description:i}}class sr{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return vf(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:vf(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Os,ctx:{common:e.parent.common,data:e.data,parsedType:vf(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(i4(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var n;const i={common:{issues:[],async:(n=r==null?void 0:r.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:vf(e)},s=this._parseSync({data:e,path:i.path,parent:i});return dD(i,s)}async parseAsync(e,r){const n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:vf(e)},i=this._parse({data:e,path:n.path,parent:n}),s=await(i4(i)?i:Promise.resolve(i));return dD(n,s)}refine(e,r){const n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,s)=>{const o=e(i),a=()=>s.addIssue({code:Me.custom,...n(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(e,r){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(e){return new yc({schema:this,typeName:Mt.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return lu.create(this,this._def)}nullable(){return Fh.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return dc.create(this,this._def)}promise(){return pg.create(this,this._def)}or(e){return hy.create([this,e],this._def)}and(e){return py.create(this,e,this._def)}transform(e){return new yc({...Xt(this._def),schema:this,typeName:Mt.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new wy({...Xt(this._def),innerType:this,defaultValue:r,typeName:Mt.ZodDefault})}brand(){return new Kq({typeName:Mt.ZodBranded,type:this,...Xt(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new c4({...Xt(this._def),innerType:this,catchValue:r,typeName:Mt.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return mb.create(this,e)}readonly(){return u4.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const nNe=/^c[^\s-]{8,}$/i,iNe=/^[a-z][a-z0-9]*$/,sNe=/^[0-9A-HJKMNP-TV-Z]{26}$/,oNe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,aNe=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,cNe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let w6;const lNe=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,uNe=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,fNe=t=>t.precision?t.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}Z$`):t.precision===0?t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function dNe(t,e){return!!((e==="v4"||!e)&&lNe.test(t)||(e==="v6"||!e)&&uNe.test(t))}class nc extends sr{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Xe.string){const s=this._getOrReturnCtx(e);return st(s,{code:Me.invalid_type,expected:Xe.string,received:s.parsedType}),Vt}const n=new Os;let i;for(const s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(i=this._getOrReturnCtx(e,i),st(i,{code:Me.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")e.data.length>s.value&&(i=this._getOrReturnCtx(e,i),st(i,{code:Me.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){const o=e.data.length>s.value,a=e.data.length<s.value;(o||a)&&(i=this._getOrReturnCtx(e,i),o?st(i,{code:Me.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&st(i,{code:Me.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")aNe.test(e.data)||(i=this._getOrReturnCtx(e,i),st(i,{validation:"email",code:Me.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")w6||(w6=new RegExp(cNe,"u")),w6.test(e.data)||(i=this._getOrReturnCtx(e,i),st(i,{validation:"emoji",code:Me.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")oNe.test(e.data)||(i=this._getOrReturnCtx(e,i),st(i,{validation:"uuid",code:Me.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")nNe.test(e.data)||(i=this._getOrReturnCtx(e,i),st(i,{validation:"cuid",code:Me.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")iNe.test(e.data)||(i=this._getOrReturnCtx(e,i),st(i,{validation:"cuid2",code:Me.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")sNe.test(e.data)||(i=this._getOrReturnCtx(e,i),st(i,{validation:"ulid",code:Me.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),st(i,{validation:"url",code:Me.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),st(i,{validation:"regex",code:Me.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(e,i),st(i,{code:Me.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(i=this._getOrReturnCtx(e,i),st(i,{code:Me.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(i=this._getOrReturnCtx(e,i),st(i,{code:Me.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?fNe(s).test(e.data)||(i=this._getOrReturnCtx(e,i),st(i,{code:Me.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="ip"?dNe(e.data,s.version)||(i=this._getOrReturnCtx(e,i),st(i,{validation:"ip",code:Me.invalid_string,message:s.message}),n.dirty()):Hr.assertNever(s);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(i=>e.test(i),{validation:r,code:Me.invalid_string,...St.errToObj(n)})}_addCheck(e){return new nc({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...St.errToObj(e)})}url(e){return this._addCheck({kind:"url",...St.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...St.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...St.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...St.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...St.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...St.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...St.errToObj(e)})}datetime(e){var r;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(r=e==null?void 0:e.offset)!==null&&r!==void 0?r:!1,...St.errToObj(e==null?void 0:e.message)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...St.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...St.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...St.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...St.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...St.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...St.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...St.errToObj(r)})}nonempty(e){return this.min(1,St.errToObj(e))}trim(){return new nc({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new nc({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new nc({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get minLength(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}nc.create=t=>{var e;return new nc({checks:[],typeName:Mt.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Xt(t)})};function hNe(t,e){const r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,s=parseInt(t.toFixed(i).replace(".","")),o=parseInt(e.toFixed(i).replace(".",""));return s%o/Math.pow(10,i)}class cd extends sr{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Xe.number){const s=this._getOrReturnCtx(e);return st(s,{code:Me.invalid_type,expected:Xe.number,received:s.parsedType}),Vt}let n;const i=new Os;for(const s of this._def.checks)s.kind==="int"?Hr.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),st(n,{code:Me.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),st(n,{code:Me.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),st(n,{code:Me.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?hNe(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),st(n,{code:Me.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),st(n,{code:Me.not_finite,message:s.message}),i.dirty()):Hr.assertNever(s);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,St.toString(r))}gt(e,r){return this.setLimit("min",e,!1,St.toString(r))}lte(e,r){return this.setLimit("max",e,!0,St.toString(r))}lt(e,r){return this.setLimit("max",e,!1,St.toString(r))}setLimit(e,r,n,i){return new cd({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:St.toString(i)}]})}_addCheck(e){return new cd({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:St.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:St.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:St.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:St.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:St.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:St.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:St.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:St.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:St.toString(e)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Hr.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}}cd.create=t=>new cd({checks:[],typeName:Mt.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Xt(t)});class ld extends sr{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==Xe.bigint){const s=this._getOrReturnCtx(e);return st(s,{code:Me.invalid_type,expected:Xe.bigint,received:s.parsedType}),Vt}let n;const i=new Os;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),st(n,{code:Me.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),st(n,{code:Me.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),st(n,{code:Me.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):Hr.assertNever(s);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,St.toString(r))}gt(e,r){return this.setLimit("min",e,!1,St.toString(r))}lte(e,r){return this.setLimit("max",e,!0,St.toString(r))}lt(e,r){return this.setLimit("max",e,!1,St.toString(r))}setLimit(e,r,n,i){return new ld({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:St.toString(i)}]})}_addCheck(e){return new ld({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:St.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:St.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:St.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:St.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:St.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}ld.create=t=>{var e;return new ld({checks:[],typeName:Mt.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Xt(t)})};class uy extends sr{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Xe.boolean){const n=this._getOrReturnCtx(e);return st(n,{code:Me.invalid_type,expected:Xe.boolean,received:n.parsedType}),Vt}return Ks(e.data)}}uy.create=t=>new uy({typeName:Mt.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Xt(t)});class Uh extends sr{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Xe.date){const s=this._getOrReturnCtx(e);return st(s,{code:Me.invalid_type,expected:Xe.date,received:s.parsedType}),Vt}if(isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return st(s,{code:Me.invalid_date}),Vt}const n=new Os;let i;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(i=this._getOrReturnCtx(e,i),st(i,{code:Me.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(i=this._getOrReturnCtx(e,i),st(i,{code:Me.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):Hr.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Uh({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:St.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:St.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}Uh.create=t=>new Uh({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:Mt.ZodDate,...Xt(t)});class s4 extends sr{_parse(e){if(this._getType(e)!==Xe.symbol){const n=this._getOrReturnCtx(e);return st(n,{code:Me.invalid_type,expected:Xe.symbol,received:n.parsedType}),Vt}return Ks(e.data)}}s4.create=t=>new s4({typeName:Mt.ZodSymbol,...Xt(t)});class fy extends sr{_parse(e){if(this._getType(e)!==Xe.undefined){const n=this._getOrReturnCtx(e);return st(n,{code:Me.invalid_type,expected:Xe.undefined,received:n.parsedType}),Vt}return Ks(e.data)}}fy.create=t=>new fy({typeName:Mt.ZodUndefined,...Xt(t)});class dy extends sr{_parse(e){if(this._getType(e)!==Xe.null){const n=this._getOrReturnCtx(e);return st(n,{code:Me.invalid_type,expected:Xe.null,received:n.parsedType}),Vt}return Ks(e.data)}}dy.create=t=>new dy({typeName:Mt.ZodNull,...Xt(t)});class hg extends sr{constructor(){super(...arguments),this._any=!0}_parse(e){return Ks(e.data)}}hg.create=t=>new hg({typeName:Mt.ZodAny,...Xt(t)});class gh extends sr{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ks(e.data)}}gh.create=t=>new gh({typeName:Mt.ZodUnknown,...Xt(t)});class xu extends sr{_parse(e){const r=this._getOrReturnCtx(e);return st(r,{code:Me.invalid_type,expected:Xe.never,received:r.parsedType}),Vt}}xu.create=t=>new xu({typeName:Mt.ZodNever,...Xt(t)});class o4 extends sr{_parse(e){if(this._getType(e)!==Xe.undefined){const n=this._getOrReturnCtx(e);return st(n,{code:Me.invalid_type,expected:Xe.void,received:n.parsedType}),Vt}return Ks(e.data)}}o4.create=t=>new o4({typeName:Mt.ZodVoid,...Xt(t)});class dc extends sr{_parse(e){const{ctx:r,status:n}=this._processInputParams(e),i=this._def;if(r.parsedType!==Xe.array)return st(r,{code:Me.invalid_type,expected:Xe.array,received:r.parsedType}),Vt;if(i.exactLength!==null){const o=r.data.length>i.exactLength.value,a=r.data.length<i.exactLength.value;(o||a)&&(st(r,{code:o?Me.too_big:Me.too_small,minimum:a?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(st(r,{code:Me.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(st(r,{code:Me.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,a)=>i.type._parseAsync(new gl(r,o,r.path,a)))).then(o=>Os.mergeArray(n,o));const s=[...r.data].map((o,a)=>i.type._parseSync(new gl(r,o,r.path,a)));return Os.mergeArray(n,s)}get element(){return this._def.type}min(e,r){return new dc({...this._def,minLength:{value:e,message:St.toString(r)}})}max(e,r){return new dc({...this._def,maxLength:{value:e,message:St.toString(r)}})}length(e,r){return new dc({...this._def,exactLength:{value:e,message:St.toString(r)}})}nonempty(e){return this.min(1,e)}}dc.create=(t,e)=>new dc({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Mt.ZodArray,...Xt(e)});function K0(t){if(t instanceof Bn){const e={};for(const r in t.shape){const n=t.shape[r];e[r]=lu.create(K0(n))}return new Bn({...t._def,shape:()=>e})}else return t instanceof dc?new dc({...t._def,type:K0(t.element)}):t instanceof lu?lu.create(K0(t.unwrap())):t instanceof Fh?Fh.create(K0(t.unwrap())):t instanceof ml?ml.create(t.items.map(e=>K0(e))):t}class Bn extends sr{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),r=Hr.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==Xe.object){const l=this._getOrReturnCtx(e);return st(l,{code:Me.invalid_type,expected:Xe.object,received:l.parsedType}),Vt}const{status:n,ctx:i}=this._processInputParams(e),{shape:s,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof xu&&this._def.unknownKeys==="strip"))for(const l in i.data)o.includes(l)||a.push(l);const c=[];for(const l of o){const u=s[l],f=i.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new gl(i,f,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof xu){const l=this._def.unknownKeys;if(l==="passthrough")for(const u of a)c.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(l==="strict")a.length>0&&(st(i,{code:Me.unrecognized_keys,keys:a}),n.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const u of a){const f=i.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new gl(i,f,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const f=await u.key;l.push({key:f,value:await u.value,alwaysSet:u.alwaysSet})}return l}).then(l=>Os.mergeObjectSync(n,l)):Os.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(e){return St.errToObj,new Bn({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var i,s,o,a;const c=(o=(s=(i=this._def).errorMap)===null||s===void 0?void 0:s.call(i,r,n).message)!==null&&o!==void 0?o:n.defaultError;return r.code==="unrecognized_keys"?{message:(a=St.errToObj(e).message)!==null&&a!==void 0?a:c}:{message:c}}}:{}})}strip(){return new Bn({...this._def,unknownKeys:"strip"})}passthrough(){return new Bn({...this._def,unknownKeys:"passthrough"})}extend(e){return new Bn({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Bn({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Mt.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new Bn({...this._def,catchall:e})}pick(e){const r={};return Hr.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new Bn({...this._def,shape:()=>r})}omit(e){const r={};return Hr.objectKeys(this.shape).forEach(n=>{e[n]||(r[n]=this.shape[n])}),new Bn({...this._def,shape:()=>r})}deepPartial(){return K0(this)}partial(e){const r={};return Hr.objectKeys(this.shape).forEach(n=>{const i=this.shape[n];e&&!e[n]?r[n]=i:r[n]=i.optional()}),new Bn({...this._def,shape:()=>r})}required(e){const r={};return Hr.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof lu;)s=s._def.innerType;r[n]=s}}),new Bn({...this._def,shape:()=>r})}keyof(){return Vq(Hr.objectKeys(this.shape))}}Bn.create=(t,e)=>new Bn({shape:()=>t,unknownKeys:"strip",catchall:xu.create(),typeName:Mt.ZodObject,...Xt(e)});Bn.strictCreate=(t,e)=>new Bn({shape:()=>t,unknownKeys:"strict",catchall:xu.create(),typeName:Mt.ZodObject,...Xt(e)});Bn.lazycreate=(t,e)=>new Bn({shape:t,unknownKeys:"strip",catchall:xu.create(),typeName:Mt.ZodObject,...Xt(e)});class hy extends sr{_parse(e){const{ctx:r}=this._processInputParams(e),n=this._def.options;function i(s){for(const a of s)if(a.result.status==="valid")return a.result;for(const a of s)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;const o=s.map(a=>new fc(a.ctx.common.issues));return st(r,{code:Me.invalid_union,unionErrors:o}),Vt}if(r.common.async)return Promise.all(n.map(async s=>{const o={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(i);{let s;const o=[];for(const c of n){const l={...r,common:{...r.common,issues:[]},parent:null},u=c._parseSync({data:r.data,path:r.path,parent:l});if(u.status==="valid")return u;u.status==="dirty"&&!s&&(s={result:u,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;const a=o.map(c=>new fc(c));return st(r,{code:Me.invalid_union,unionErrors:a}),Vt}}get options(){return this._def.options}}hy.create=(t,e)=>new hy({options:t,typeName:Mt.ZodUnion,...Xt(e)});const _v=t=>t instanceof my?_v(t.schema):t instanceof yc?_v(t.innerType()):t instanceof yy?[t.value]:t instanceof ud?t.options:t instanceof by?Object.keys(t.enum):t instanceof wy?_v(t._def.innerType):t instanceof fy?[void 0]:t instanceof dy?[null]:null;class zx extends sr{_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==Xe.object)return st(r,{code:Me.invalid_type,expected:Xe.object,received:r.parsedType}),Vt;const n=this.discriminator,i=r.data[n],s=this.optionsMap.get(i);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(st(r,{code:Me.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Vt)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){const i=new Map;for(const s of r){const o=_v(s.shape[e]);if(!o)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const a of o){if(i.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);i.set(a,s)}}return new zx({typeName:Mt.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...Xt(n)})}}function Q_(t,e){const r=vf(t),n=vf(e);if(t===e)return{valid:!0,data:t};if(r===Xe.object&&n===Xe.object){const i=Hr.objectKeys(e),s=Hr.objectKeys(t).filter(a=>i.indexOf(a)!==-1),o={...t,...e};for(const a of s){const c=Q_(t[a],e[a]);if(!c.valid)return{valid:!1};o[a]=c.data}return{valid:!0,data:o}}else if(r===Xe.array&&n===Xe.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let s=0;s<t.length;s++){const o=t[s],a=e[s],c=Q_(o,a);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return r===Xe.date&&n===Xe.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class py extends sr{_parse(e){const{status:r,ctx:n}=this._processInputParams(e),i=(s,o)=>{if(Z_(s)||Z_(o))return Vt;const a=Q_(s.value,o.value);return a.valid?((J_(s)||J_(o))&&r.dirty(),{status:r.value,value:a.data}):(st(n,{code:Me.invalid_intersection_types}),Vt)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,o])=>i(s,o)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}py.create=(t,e,r)=>new py({left:t,right:e,typeName:Mt.ZodIntersection,...Xt(r)});class ml extends sr{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Xe.array)return st(n,{code:Me.invalid_type,expected:Xe.array,received:n.parsedType}),Vt;if(n.data.length<this._def.items.length)return st(n,{code:Me.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Vt;!this._def.rest&&n.data.length>this._def.items.length&&(st(n,{code:Me.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const s=[...n.data].map((o,a)=>{const c=this._def.items[a]||this._def.rest;return c?c._parse(new gl(n,o,n.path,a)):null}).filter(o=>!!o);return n.common.async?Promise.all(s).then(o=>Os.mergeArray(r,o)):Os.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new ml({...this._def,rest:e})}}ml.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ml({items:t,typeName:Mt.ZodTuple,rest:null,...Xt(e)})};class gy extends sr{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Xe.object)return st(n,{code:Me.invalid_type,expected:Xe.object,received:n.parsedType}),Vt;const i=[],s=this._def.keyType,o=this._def.valueType;for(const a in n.data)i.push({key:s._parse(new gl(n,a,n.path,a)),value:o._parse(new gl(n,n.data[a],n.path,a))});return n.common.async?Os.mergeObjectAsync(r,i):Os.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof sr?new gy({keyType:e,valueType:r,typeName:Mt.ZodRecord,...Xt(n)}):new gy({keyType:nc.create(),valueType:e,typeName:Mt.ZodRecord,...Xt(r)})}}class a4 extends sr{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Xe.map)return st(n,{code:Me.invalid_type,expected:Xe.map,received:n.parsedType}),Vt;const i=this._def.keyType,s=this._def.valueType,o=[...n.data.entries()].map(([a,c],l)=>({key:i._parse(new gl(n,a,n.path,[l,"key"])),value:s._parse(new gl(n,c,n.path,[l,"value"]))}));if(n.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const c of o){const l=await c.key,u=await c.value;if(l.status==="aborted"||u.status==="aborted")return Vt;(l.status==="dirty"||u.status==="dirty")&&r.dirty(),a.set(l.value,u.value)}return{status:r.value,value:a}})}else{const a=new Map;for(const c of o){const l=c.key,u=c.value;if(l.status==="aborted"||u.status==="aborted")return Vt;(l.status==="dirty"||u.status==="dirty")&&r.dirty(),a.set(l.value,u.value)}return{status:r.value,value:a}}}}a4.create=(t,e,r)=>new a4({valueType:e,keyType:t,typeName:Mt.ZodMap,...Xt(r)});class Bh extends sr{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Xe.set)return st(n,{code:Me.invalid_type,expected:Xe.set,received:n.parsedType}),Vt;const i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(st(n,{code:Me.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(st(n,{code:Me.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());const s=this._def.valueType;function o(c){const l=new Set;for(const u of c){if(u.status==="aborted")return Vt;u.status==="dirty"&&r.dirty(),l.add(u.value)}return{status:r.value,value:l}}const a=[...n.data.values()].map((c,l)=>s._parse(new gl(n,c,n.path,l)));return n.common.async?Promise.all(a).then(c=>o(c)):o(a)}min(e,r){return new Bh({...this._def,minSize:{value:e,message:St.toString(r)}})}max(e,r){return new Bh({...this._def,maxSize:{value:e,message:St.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}Bh.create=(t,e)=>new Bh({valueType:t,minSize:null,maxSize:null,typeName:Mt.ZodSet,...Xt(e)});class Op extends sr{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==Xe.function)return st(r,{code:Me.invalid_type,expected:Xe.function,received:r.parsedType}),Vt;function n(a,c){return n4({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,r4(),cy].filter(l=>!!l),issueData:{code:Me.invalid_arguments,argumentsError:c}})}function i(a,c){return n4({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,r4(),cy].filter(l=>!!l),issueData:{code:Me.invalid_return_type,returnTypeError:c}})}const s={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof pg){const a=this;return Ks(async function(...c){const l=new fc([]),u=await a._def.args.parseAsync(c,s).catch(p=>{throw l.addIssue(n(c,p)),l}),f=await Reflect.apply(o,this,u);return await a._def.returns._def.type.parseAsync(f,s).catch(p=>{throw l.addIssue(i(f,p)),l})})}else{const a=this;return Ks(function(...c){const l=a._def.args.safeParse(c,s);if(!l.success)throw new fc([n(c,l.error)]);const u=Reflect.apply(o,this,l.data),f=a._def.returns.safeParse(u,s);if(!f.success)throw new fc([i(u,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Op({...this._def,args:ml.create(e).rest(gh.create())})}returns(e){return new Op({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new Op({args:e||ml.create([]).rest(gh.create()),returns:r||gh.create(),typeName:Mt.ZodFunction,...Xt(n)})}}class my extends sr{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}my.create=(t,e)=>new my({getter:t,typeName:Mt.ZodLazy,...Xt(e)});class yy extends sr{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return st(r,{received:r.data,code:Me.invalid_literal,expected:this._def.value}),Vt}
vendor: 4,987 bytes, line 2077
2077return{status:"valid",value:e.data}}get value(){return this._def.value}}yy.create=(t,e)=>new yy({value:t,typeName:Mt.ZodLiteral,...Xt(e)});function Vq(t,e){return new ud({values:t,typeName:Mt.ZodEnum,...Xt(e)})}class ud extends sr{_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),n=this._def.values;return st(r,{expected:Hr.joinValues(n),received:r.parsedType,code:Me.invalid_type}),Vt}if(this._def.values.indexOf(e.data)===-1){const r=this._getOrReturnCtx(e),n=this._def.values;return st(r,{received:r.data,code:Me.invalid_enum_value,options:n}),Vt}return Ks(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e){return ud.create(e)}exclude(e){return ud.create(this.options.filter(r=>!e.includes(r)))}}ud.create=Vq;class by extends sr{_parse(e){const r=Hr.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==Xe.string&&n.parsedType!==Xe.number){const i=Hr.objectValues(r);return st(n,{expected:Hr.joinValues(i),received:n.parsedType,code:Me.invalid_type}),Vt}if(r.indexOf(e.data)===-1){const i=Hr.objectValues(r);return st(n,{received:n.data,code:Me.invalid_enum_value,options:i}),Vt}return Ks(e.data)}get enum(){return this._def.values}}by.create=(t,e)=>new by({values:t,typeName:Mt.ZodNativeEnum,...Xt(e)});class pg extends sr{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==Xe.promise&&r.common.async===!1)return st(r,{code:Me.invalid_type,expected:Xe.promise,received:r.parsedType}),Vt;const n=r.parsedType===Xe.promise?r.data:Promise.resolve(r.data);return Ks(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}}pg.create=(t,e)=>new pg({type:t,typeName:Mt.ZodPromise,...Xt(e)});class yc extends sr{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Mt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:n}=this._processInputParams(e),i=this._def.effect||null,s={addIssue:o=>{st(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){const o=i.transform(n.data,s);return n.common.issues.length?{status:"dirty",value:n.data}:n.common.async?Promise.resolve(o).then(a=>this._def.schema._parseAsync({data:a,path:n.path,parent:n})):this._def.schema._parseSync({data:o,path:n.path,parent:n})}if(i.type==="refinement"){const o=a=>{const c=i.refinement(a,s);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?Vt:(a.status==="dirty"&&r.dirty(),o(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?Vt:(a.status==="dirty"&&r.dirty(),o(a.value).then(()=>({status:r.value,value:a.value}))))}if(i.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!ly(o))return o;const a=i.transform(o.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>ly(o)?Promise.resolve(i.transform(o.value,s)).then(a=>({status:r.value,value:a})):o);Hr.assertNever(i)}}yc.create=(t,e,r)=>new yc({schema:t,typeName:Mt.ZodEffects,effect:e,...Xt(r)});yc.createWithPreprocess=(t,e,r)=>new yc({schema:e,effect:{type:"preprocess",transform:t},typeName:Mt.ZodEffects,...Xt(r)});class lu extends sr{_parse(e){return this._getType(e)===Xe.undefined?Ks(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}lu.create=(t,e)=>new lu({innerType:t,typeName:Mt.ZodOptional,...Xt(e)});class Fh extends sr{_parse(e){return this._getType(e)===Xe.null?Ks(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Fh.create=(t,e)=>new Fh({innerType:t,typeName:Mt.ZodNullable,...Xt(e)});class wy extends sr{_parse(e){const{ctx:r}=this._processInputParams(e);let n=r.data;return r.parsedType===Xe.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}wy.create=(t,e)=>new wy({innerType:t,typeName:Mt.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Xt(e)});class c4 extends sr{_parse(e){const{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return i4(i)?i.then(s=>
2077({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new fc(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new fc(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}c4.create=(t,e)=>new c4({innerType:t,typeName:Mt.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Xt(e)});class l4 extends sr{_parse(e){if(this._getType(e)!==Xe.nan){const n=this._getOrReturnCtx(e);return st(n,{code:Me.invalid_type,expected:Xe.nan,received:n.parsedType}),Vt}return{status:"valid",value:e.data}}}l4.create=t=>new l4({typeName:Mt.ZodNaN,...Xt(t)});const pNe=Symbol("zod_brand");class Kq extends sr{_parse(e){const{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class mb extends sr{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?Vt:s.status==="dirty"?(r.dirty(),qq(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{const i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?Vt:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,r){return new mb({in:e,out:r,typeName:Mt.ZodPipeline})}}class u4 extends sr{_parse(e){const r=this._def.innerType._parse(e);return ly(r)&&(r.value=Object.freeze(r.value)),r}}u4.create=(t,e)=>new u4({innerType:t,typeName:Mt.ZodReadonly,...Xt(e)});const Gq=(t,e={},r)=>t?hg.create().superRefine((n,i)=>{var s,o;if(!t(n)){const a=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,c=(o=(s=a.fatal)!==null&&s!==void 0?s:r)!==null&&o!==void 0?o:!0,l=typeof a=="string"?{message:a}:a;i.addIssue({code:"custom",...l,fatal:c})}}):hg.create(),gNe={object:Bn.lazycreate};var Mt;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Mt||(Mt={}));const mNe=(t,e={message:`Input not instance of ${t.name}`})=>Gq(r=>r instanceof t,e),Yq=nc.create,Zq=cd.create,yNe=l4.create,bNe=ld.create,Jq=uy.create,wNe=Uh.create,vNe=s4.create,xNe=fy.create,ENe=dy.create,CNe=hg.create,_Ne=gh.create,ANe=xu.create,SNe=o4.create,NNe=dc.create,INe=Bn.create,TNe=Bn.strictCreate,kNe=hy.create,PNe=zx.create,RNe=py.create,ONe=ml.create,DNe=gy.create,LNe=a4.create,MNe=Bh.create,$Ne=Op.create,UNe=my.create,BNe=yy.create,FNe=ud.create,jNe=by.create,zNe=pg.create,hD=yc.create,WNe=lu.create,HNe=Fh.create,qNe=yc.createWithPreprocess,VNe=mb.create,KNe=()=>Yq().optional(),GNe=()=>Zq().optional(),YNe=()=>Jq().optional(),ZNe={string:t=>nc.create({...t,coerce:!0}),number:t=>cd.create({...t,coerce:!0}),boolean:t=>uy.create({...t,coerce:!0}),bigint:t=>ld.create({...t,coerce:!0}),date:t=>Uh.create({...t,coerce:!0})},JNe=Vt;var V=Object.freeze({__proto__:null,defaultErrorMap:cy,setErrorMap:tNe,getErrorMap:r4,makeIssue:n4,EMPTY_PATH:rNe,addIssueToContext:st,ParseStatus:Os,INVALID:Vt,DIRTY:qq,OK:Ks,isAborted:Z_,isDirty:J_,isValid:ly,isAsync:i4,get util(){return Hr},get objectUtil(){return Y_},ZodParsedType:Xe,getParsedType:vf,ZodType:sr,ZodString:nc,ZodNumber:cd,ZodBigInt:ld,ZodBoolean:uy,ZodDate:Uh,ZodSymbol:s4,ZodUndefined:fy,ZodNull:dy,ZodAny:hg,ZodUnknown:gh,ZodNever:xu,ZodVoid:o4,ZodArray:dc,ZodObject:Bn,ZodUnion:hy,ZodDiscriminatedUnion:zx,ZodIntersection:py,ZodTuple:ml,ZodRecord:gy,ZodMap:a4,ZodSet:Bh,ZodFunction:Op,ZodLazy:my,ZodLiteral:yy,ZodEnum:ud,ZodNativeEnum:by,ZodPromise:pg,ZodEffects:yc,ZodTransformer:yc,ZodOptional:lu,ZodNullable:Fh,ZodDefault:wy,ZodCatch:c4,ZodNaN:l4,BRAND:pNe,ZodBranded:Kq,ZodPipeline:mb,ZodReadonly:u4,custom:Gq,Schema:sr,ZodSchema:sr,late:gNe,get ZodFirstPartyTypeKind(){return Mt},coerce:ZNe,any:CNe,array:NNe,bigint:bNe,boolean:Jq,date:wNe,discriminatedUnion:PNe,effect:hD,enum:FNe,function:$Ne,instanceof:mNe,intersection:RNe,lazy:UNe,literal:BNe,map:LNe,nan:yNe,nativeEnum:jNe,never:ANe,null:ENe,nullable:HNe,number:Zq,object:INe,oboolean:YNe,onumber:GNe,optional:WNe,ostring:KNe,pipeline:VNe,preprocess:qNe,promise:zNe,record:DNe,set:MNe,strictObject:TNe,string:Yq,symbol:vNe,transformer:hD,tuple:ONe,undefined:xNe,union:kNe,unknown:_Ne,void:SNe,NEVER:JNe,ZodIssueCode:Me,quotelessJson:eNe,ZodError:f
2077c});const Jn=V.object({message:V.string()});function rt(t){return V.literal(lt[t])}const Wx=V.object({serializedMessage:V.string().optional(),accountAddress:V.string(),chainId:V.string(),notBefore:V.string().optional(),domain:V.string(),uri:V.string(),version:V.string(),nonce:V.string(),statement:V.string().optional(),resources:V.array(V.string()).optional(),requestId:V.string().optional(),issuedAt:V.string().optional(),expirationTime:V.string().optional()});V.object({accessList:V.array(V.string()),blockHash:V.string().nullable(),blockNumber:V.string().nullable(),chainId:V.string().or(V.number()),from:V.string(),gas:V.string(),hash:V.string(),input:V.string().nullable(),maxFeePerGas:V.string(),maxPriorityFeePerGas:V.string(),nonce:V.string(),r:V.string(),s:V.string(),to:V.string(),transactionIndex:V.string().nullable(),type:V.string(),v:V.string(),value:V.string()});const QNe=V.object({chainId:V.string().or(V.number()),rpcUrl:V.optional(V.string())}),XNe=V.object({email:V.string().email()}),eIe=V.object({otp:V.string()}),tIe=V.object({uri:V.string(),preferredAccountType:V.optional(V.string()),chainId:V.optional(V.string().or(V.number())),siwxMessage:V.optional(Wx),rpcUrl:V.optional(V.string())}),rIe=V.object({chainId:V.optional(V.string().or(V.number())),preferredAccountType:V.optional(V.string()),socialUri:V.optional(V.string()),siwxMessage:V.optional(Wx),rpcUrl:V.optional(V.string())}),nIe=V.object({provider:V.enum(["google","github","apple","facebook","x","discord"])}),iIe=V.object({email:V.string().email()}),sIe=V.object({otp:V.string()}),oIe=V.object({otp:V.string()}),aIe=V.object({themeMode:V.optional(V.enum(["light","dark"])),themeVariables:V.optional(V.record(V.string(),V.string().or(V.number()))),w3mThemeVariables:V.optional(V.record(V.string(),V.string()))}),cIe=V.object({metadata:V.object({name:V.string(),description:V.string(),url:V.string(),icons:V.array(V.string())}).optional(),sdkVersion:V.string().optional(),sdkType:V.string().optional(),projectId:V.string()}),lIe=V.object({type:V.string()}),uIe=V.object({action:V.enum(["VERIFY_DEVICE","VERIFY_OTP","CONNECT"])}),fIe=V.object({url:V.string()}),dIe=V.object({userName:V.string()}),hIe=V.object({email:V.string().optional().nullable(),address:V.string(),chainId:V.string().or(V.number()),accounts:V.array(V.object({address:V.string(),type:V.enum([Pi.ACCOUNT_TYPES.EOA,Pi.ACCOUNT_TYPES.SMART_ACCOUNT])})).optional(),userName:V.string().optional().nullable(),preferredAccountType:V.optional(V.string()),signature:V.string().optional(),message:V.string().optional(),siwxMessage:V.optional(Wx)}),pIe=V.object({action:V.enum(["VERIFY_PRIMARY_OTP","VERIFY_SECONDARY_OTP"])}),gIe=V.object({email:V.string().email().optional().nullable(),address:V.string(),chainId:V.string().or(V.number()),smartAccountDeployed:V.optional(V.boolean()),accounts:V.array(V.object({address:V.string(),type:V.enum([Pi.ACCOUNT_TYPES.EOA,Pi.ACCOUNT_TYPES.SMART_ACCOUNT])})).optional(),preferredAccountType:V.optional(V.string()),signature:V.string().optional(),message:V.string().optional(),siwxMessage:V.optional(Wx)}),mIe=V.object({uri:V.string()}),yIe=V.object({isConnected:V.boolean()}),bIe=V.object({chainId:V.string().or(V.number())}),wIe=V.object({chainId:V.string().or(V.number())}),vIe=V.object({newEmail:V.string().email()}),xIe=V.object({smartAccountEnabledNetworks:V.array(V.number())});V.object({address:V.string(),isDeployed:V.boolean()});const EIe=V.object({version:V.string().optional()}),CIe=V.object({type:V.string(),address:V.string()}),_Ie=V.any(),AIe=V.object({method:V.literal("eth_accounts")}),SIe=V.object({method:V.literal("eth_blockNumber")}),NIe=V.object({method:V.literal("eth_call"),params:V.array(V.any())}),IIe=V.object({method:V.literal("eth_chainId")}),TIe=V.object({method:V.literal("eth_estimateGas"),params:V.array(V.any())}),kIe=V.object({method:V.literal("eth_feeHistory"),params:V.array(V.any())}),PIe=V.object({method:V.literal("eth_gasPrice")}),RIe=V.object({method:V.literal("eth_getAccount"),params:V.array(V.any())}),OIe=V.object({method:V.literal("eth_getBalance"),params:V.array(V.any())}),DIe=V.object({method:V.literal("eth_getBlockByHash"),params:V.array(V.any())}),LIe=V.object({method:V.literal("eth_getBlockByNumber"),params:V.array(V.any())}),MIe=V.object({method:V.literal("eth_getBlockReceipts"),params:V.array(V.any())}),$Ie=V.object({method:V.literal("eth_getBlockTransactionCountByHash"),params:V.array(V.any())}),UIe=V.object({method:V.literal("eth_getBlockTransactionCountByNumber"),params:V.array(V.any())}),BIe=V.object({method:V.literal("eth_getCode"),params:V.array(V.any())}),FIe=V.object({method:V.literal("eth_getFilterChanges"),params:V.array(V.any())}),jIe=V.object({method:V.literal("eth_getFilterLogs"),params:V.array(V.any())}),zIe=V.object({method:V.literal("eth_getLogs"),params:V.array(V.any())}
2077),WIe=V.object({method:V.literal("eth_getProof"),params:V.array(V.any())}),HIe=V.object({method:V.literal("eth_getStorageAt"),params:V.array(V.any())}),qIe=V.object({method:V.literal("eth_getTransactionByBlockHashAndIndex"),params:V.array(V.any())}),VIe=V.object({method:V.literal("eth_getTransactionByBlockNumberAndIndex"),params:V.array(V.any())}),KIe=V.object({method:V.literal("eth_getTransactionByHash"),params:V.array(V.any())}),GIe=V.object({method:V.literal("eth_getTransactionCount"),params:V.array(V.any())}),YIe=V.object({method:V.literal("eth_getTransactionReceipt"),params:V.array(V.any())}),ZIe=V.object({method:V.literal("eth_getUncleCountByBlockHash"),params:V.array(V.any())}),JIe=V.object({method:V.literal("eth_getUncleCountByBlockNumber"),params:V.array(V.any())}),QIe=V.object({method:V.literal("eth_maxPriorityFeePerGas")}),XIe=V.object({method:V.literal("eth_newBlockFilter")}),eTe=V.object({method:V.literal("eth_newFilter"),params:V.array(V.any())}),tTe=V.object({method:V.literal("eth_newPendingTransactionFilter")}),rTe=V.object({method:V.literal("eth_sendRawTransaction"),params:V.array(V.any())}),nTe=V.object({method:V.literal("eth_syncing"),params:V.array(V.any())}),iTe=V.object({method:V.literal("eth_uninstallFilter"),params:V.array(V.any())}),pD=V.object({method:V.literal("personal_sign"),params:V.array(V.any())}),sTe=V.object({method:V.literal("eth_signTypedData_v4"),params:V.array(V.any())}),oTe=V.object({method:V.literal("eth_sendTransaction"),params:V.array(V.any())}),aTe=V.object({method:V.literal("solana_signMessage"),params:V.object({message:V.string(),pubkey:V.string()})}),cTe=V.object({method:V.literal("solana_signTransaction"),params:V.object({transaction:V.string()})}),lTe=V.object({method:V.literal("solana_signAllTransactions"),params:V.object({transactions:V.array(V.string())})}),uTe=V.object({method:V.literal("solana_signAndSendTransaction"),params:V.object({transaction:V.string(),options:V.object({skipPreflight:V.boolean().optional(),preflightCommitment:V.enum(["processed","confirmed","finalized","recent","single","singleGossip","root","max"]).optional(),maxRetries:V.number().optional(),minContextSlot:V.number().optional()}).optional()})}),fTe=V.object({method:V.literal("wallet_sendCalls"),params:V.array(V.object({chainId:V.string().or(V.number()).optional(),from:V.string().optional(),version:V.string().optional(),capabilities:V.any().optional(),calls:V.array(V.object({to:V.string().startsWith("0x"),data:V.string().startsWith("0x").optional(),value:V.string().optional()}))}))}),dTe=V.object({method:V.literal("wallet_getCallsStatus"),params:V.array(V.string())}),hTe=V.object({method:V.literal("wallet_getCapabilities"),params:V.array(V.string().or(V.number()).optional()).optional()}),pTe=V.object({method:V.literal("wallet_grantPermissions"),params:V.array(V.any())}),gTe=V.object({method:V.literal("wallet_revokePermissions"),params:V.any()}),mTe=V.object({method:V.literal("wallet_getAssets"),params:V.any()}),gD=V.object({token:V.string()}),nt=V.object({id:V.string().optional()}),v6={appEvent:nt.extend({type:rt("APP_SWITCH_NETWORK"),payload:QNe}).or(nt.extend({type:rt("APP_CONNECT_EMAIL"),payload:XNe})).or(nt.extend({type:rt("APP_CONNECT_DEVICE")})).or(nt.extend({type:rt("APP_CONNECT_OTP"),payload:eIe})).or(nt.extend({type:rt("APP_CONNECT_SOCIAL"),payload:tIe})).or(nt.extend({type:rt("APP_GET_FARCASTER_URI")})).or(nt.extend({type:rt("APP_CONNECT_FARCASTER")})).or(nt.extend({type:rt("APP_GET_USER"),payload:V.optional(rIe)})).or(nt.extend({type:rt("APP_GET_SOCIAL_REDIRECT_URI"),payload:nIe})).or(nt.extend({type:rt("APP_SIGN_OUT")})).or(nt.extend({type:rt("APP_IS_CONNECTED"),payload:V.optional(gD)})).or(nt.extend({type:rt("APP_GET_CHAIN_ID")})).or(nt.extend({type:rt("APP_GET_SMART_ACCOUNT_ENABLED_NETWORKS")})).or(nt.extend({type:rt("APP_INIT_SMART_ACCOUNT")})).or(nt.extend({type:rt("APP_SET_PREFERRED_ACCOUNT"),payload:lIe})).or(nt.extend({type:rt("APP_RPC_REQUEST"),payload:pD.or(mTe).or(AIe).or(SIe).or(NIe).or(IIe).or(TIe).or(kIe).or(PIe).or(RIe).or(OIe).or(DIe).or(LIe).or(MIe).or($Ie).or(UIe).or(BIe).or(FIe).or(jIe).or(zIe).or(WIe).or(HIe).or(qIe).or(VIe).or(KIe).or(GIe).or(YIe).or(ZIe).or(JIe).or(QIe).or(XIe).or(eTe).or(tTe).or(rTe).or(nTe).or(iTe).or(pD).or(sTe).or(oTe).or(aTe).or(cTe).or(lTe).or(uTe).or(dTe).or(fTe).or(hTe).or(pTe).or(gTe).and(V.object({chainId:V.string().or(V.number()).optional(),chainNamespace:V.enum(["eip155","solana","polkadot","bip122","cosmos"]).optional(),rpcUrl:V.string().optional()}))})).or(nt.extend({type:rt("APP_UPDATE_EMAIL"),payload:iIe})).or(nt.extend({type:rt("APP_UPDATE_EMAIL_PRIMARY_OTP"),payload:sIe})).or(nt.extend({type:rt("APP_UPDATE_EMAIL_SECONDARY_OTP"),payload:oIe})).or(nt.extend({type:rt("APP_SYNC_THEME"),payload:aIe})).or(nt.extend({type:rt("APP_SYNC_DAPP_DATA"),payload:cIe})).or(nt.extend({type:rt("APP_RELOAD")})).or(nt.extend({type:rt("APP_RPC_ABORT")}
2077)),frameEvent:nt.extend({type:rt("FRAME_SWITCH_NETWORK_ERROR"),payload:Jn}).or(nt.extend({type:rt("FRAME_SWITCH_NETWORK_SUCCESS"),payload:wIe})).or(nt.extend({type:rt("FRAME_CONNECT_EMAIL_SUCCESS"),payload:uIe})).or(nt.extend({type:rt("FRAME_CONNECT_EMAIL_ERROR"),payload:Jn})).or(nt.extend({type:rt("FRAME_GET_FARCASTER_URI_SUCCESS"),payload:fIe})).or(nt.extend({type:rt("FRAME_GET_FARCASTER_URI_ERROR"),payload:Jn})).or(nt.extend({type:rt("FRAME_CONNECT_FARCASTER_SUCCESS"),payload:dIe})).or(nt.extend({type:rt("FRAME_CONNECT_FARCASTER_ERROR"),payload:Jn})).or(nt.extend({type:rt("FRAME_CONNECT_OTP_ERROR"),payload:Jn})).or(nt.extend({type:rt("FRAME_CONNECT_OTP_SUCCESS")})).or(nt.extend({type:rt("FRAME_CONNECT_DEVICE_ERROR"),payload:Jn})).or(nt.extend({type:rt("FRAME_CONNECT_DEVICE_SUCCESS")})).or(nt.extend({type:rt("FRAME_CONNECT_SOCIAL_SUCCESS"),payload:hIe})).or(nt.extend({type:rt("FRAME_CONNECT_SOCIAL_ERROR"),payload:Jn})).or(nt.extend({type:rt("FRAME_GET_USER_ERROR"),payload:Jn})).or(nt.extend({type:rt("FRAME_GET_USER_SUCCESS"),payload:gIe})).or(nt.extend({type:rt("FRAME_GET_SOCIAL_REDIRECT_URI_ERROR"),payload:Jn})).or(nt.extend({type:rt("FRAME_GET_SOCIAL_REDIRECT_URI_SUCCESS"),payload:mIe})).or(nt.extend({type:rt("FRAME_SIGN_OUT_ERROR"),payload:Jn})).or(nt.extend({type:rt("FRAME_SIGN_OUT_SUCCESS")})).or(nt.extend({type:rt("FRAME_IS_CONNECTED_ERROR"),payload:Jn})).or(nt.extend({type:rt("FRAME_IS_CONNECTED_SUCCESS"),payload:yIe})).or(nt.extend({type:rt("FRAME_GET_CHAIN_ID_ERROR"),payload:Jn})).or(nt.extend({type:rt("FRAME_GET_CHAIN_ID_SUCCESS"),payload:bIe})).or(nt.extend({type:rt("FRAME_RPC_REQUEST_ERROR"),payload:Jn})).or(nt.extend({type:rt("FRAME_RPC_REQUEST_SUCCESS"),payload:_Ie})).or(nt.extend({type:rt("FRAME_SESSION_UPDATE"),payload:gD})).or(nt.extend({type:rt("FRAME_UPDATE_EMAIL_ERROR"),payload:Jn})).or(nt.extend({type:rt("FRAME_UPDATE_EMAIL_SUCCESS"),payload:pIe})).or(nt.extend({type:rt("FRAME_UPDATE_EMAIL_PRIMARY_OTP_ERROR"),payload:Jn})).or(nt.extend({type:rt("FRAME_UPDATE_EMAIL_PRIMARY_OTP_SUCCESS")})).or(nt.extend({type:rt("FRAME_UPDATE_EMAIL_SECONDARY_OTP_ERROR"),payload:Jn})).or(nt.extend({type:rt("FRAME_UPDATE_EMAIL_SECONDARY_OTP_SUCCESS"),payload:vIe})).or(nt.extend({type:rt("FRAME_SYNC_THEME_ERROR"),payload:Jn})).or(nt.extend({type:rt("FRAME_SYNC_THEME_SUCCESS")})).or(nt.extend({type:rt("FRAME_SYNC_DAPP_DATA_ERROR"),payload:Jn})).or(nt.extend({type:rt("FRAME_SYNC_DAPP_DATA_SUCCESS")})).or(nt.extend({type:rt("FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS"),payload:xIe})).or(nt.extend({type:rt("FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR"),payload:Jn})).or(nt.extend({type:rt("FRAME_INIT_SMART_ACCOUNT_ERROR"),payload:Jn})).or(nt.extend({type:rt("FRAME_SET_PREFERRED_ACCOUNT_SUCCESS"),payload:CIe})).or(nt.extend({type:rt("FRAME_SET_PREFERRED_ACCOUNT_ERROR"),payload:Jn})).or(nt.extend({type:rt("FRAME_READY"),payload:EIe})).or(nt.extend({type:rt("FRAME_RELOAD_ERROR"),payload:Jn})).or(nt.extend({type:rt("FRAME_RELOAD_SUCCESS")}))};function x6(t,e={}){var r;return typeof(e==null?void 0:e.type)=="string"&&((r=e==null?void 0:e.type)==null?void 0:r.includes(t))}function yTe({projectId:t,chainId:e,version:r,enableLogger:n,rpcUrl:i=fe.BLOCKCHAIN_API_RPC_URL}){const s=new URL(rpe);return s.searchParams.set("projectId",t),s.searchParams.set("chainId",String(e)),s.searchParams.set("version",r),s.searchParams.set("enableLogger",String(n)),s.searchParams.set("rpcUrl",i),s.toString()}class bTe{constructor({projectId:e,isAppClient:r=!1,chainId:n="eip155:1",enableLogger:i=!0,rpcUrl:s=fe.BLOCKCHAIN_API_RPC_URL}){if(this.iframe=null,this.iframeIsReady=!1,this.initFrame=()=>{const o=document.getElementById("w3m-iframe");this.iframe&&!o&&document.body.appendChild(this.iframe)},this.events={registerFrameEventHandler:(o,a,c)=>{function l({data:u}){var d;if(!x6(lt.FRAME_EVENT_KEY,u))return;const f=v6.frameEvent.safeParse(u);if(!f.success){console.warn("W3mFrame: invalid frame event",f.error.message);return}((d=f.data)==null?void 0:d.id)===o&&(a(f.data),window.removeEventListener("message",l))}jo.isClient&&(window.addEventListener("message",l),c.addEventListener("abort",()=>{window.removeEventListener("message",l)}))},onFrameEvent:o=>{jo.isClient&&window.addEventListener("message",({data:a})=>{if(!x6(lt.FRAME_EVENT_KEY,a))return;const c=v6.frameEvent.safeParse(a);c.success?o(c.data):console.warn("W3mFrame: invalid frame event",c.error.message)})},onAppEvent:o=>{jo.isClient&&window.addEventListener("message",({data:a})=>{if(!x6(lt.APP_EVENT_KEY,a))return;const c=v6.appEvent.safeParse(a);c.success||console.warn("W3mFrame: invalid app event",c.error.message),o(a)})},postAppEvent:o=>{var a;if(jo.isClient){if(!((a=this.iframe)!=null&&a.contentWindow))throw new Error("W3mFrame: iframe is not set");this.iframe.contentWindow.postMessage(o,"*")}},postFrameEvent:o=>{if(jo.isClient){if(!parent)throw new Error("W3mFrame: parent is not set");parent.postMessage(o,"*")}}},this.projectId=e,this.frameLoadPromise=new Promise((o,a)=>{this.frameLoadPromiseResolver={resolve:o,reject:a}}),this.rpcUrl=s,r&&(this.frameLoadPromise=new Promise((o,a)=>{this.frameLoadPromiseResolver={resolve:o,reject:a}}),jo.isClient)){const o=document.createElement("iframe");o.id="w3m-iframe",o.src=yTe({projectId:e,chainId:n,version:ipe,enableLogger:i,rpcUrl:this.rpcUrl}),o.name="w3m-secure-iframe",o.style.position="fixed",o.style.zIndex="999999",o.style.display="none",o.style.border="none",o.style.animationDelay="0s, 50ms",o.style.borderBottomLeftRadius="clamp(0px, var(--wui-border-radius-l), 44px)",o.style.borderBottomRightRadius="clamp(0px, var(--wui-border-radius-l), 44px)",this.iframe=o,this.iframe.onerror=()=>{var a;(a=this.frameLoadPromiseResolver)==null||a.reject("Unable to load email login dependency")},this.events.onFrameEvent(a=>{var c;a.type==="@w3m-frame/READY"&&(this.iframeIsReady=!0,(c=this.frameLoadPromiseResolver)==null||c.resolve(void 0))})}}
2077get networks(){const e=["eip155:1","eip155:5","eip155:11155111","eip155:10","eip155:420","eip155:42161","eip155:421613","eip155:137","eip155:80001","eip155:42220","eip155:1313161554","eip155:1313161555","eip155:56","eip155:97","eip155:43114","eip155:43113","eip155:324","eip155:280","eip155:100","eip155:8453","eip155:84531","eip155:84532","eip155:7777777","eip155:999","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z","solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1"].map(r=>({[r]:{rpcUrl:`${this.rpcUrl}/v1/?chainId=${r}&projectId=${this.projectId}`,chainId:r}}));return Object.assign({},...e)}}class wTe{constructor(e){var s;const r=Lg({level:npe}),{logger:n,chunkLoggerController:i}=vS({opts:r});this.logger=Ls(n,this.constructor.name),this.chunkLoggerController=i,typeof window<"u"&&((s=this.chunkLoggerController)!=null&&s.downloadLogsBlobInBrowser)&&(window.downloadAppKitLogsBlob||(window.downloadAppKitLogsBlob={}),window.downloadAppKitLogsBlob.sdk=()=>{var o;(o=this.chunkLoggerController)!=null&&o.downloadLogsBlobInBrowser&&this.chunkLoggerController.downloadLogsBlobInBrowser({projectId:e})})}}class vTe{constructor({projectId:e,chainId:r,enableLogger:n=!0,onTimeout:i,abortController:s,getActiveCaipNetwork:o}){this.openRpcRequests=[],this.isInitialized=!1,n&&(this.w3mLogger=new wTe(e)),this.abortController=s,this.getActiveCaipNetwork=o;const a=this.getRpcUrl(r);this.w3mFrame=new bTe({projectId:e,isAppClient:!0,chainId:r,enableLogger:n,rpcUrl:a}),this.onTimeout=i,this.getLoginEmailUsed()&&this.createFrame()}async createFrame(){this.w3mFrame.initFrame(),this.initPromise=new Promise(e=>{this.w3mFrame.events.onFrameEvent(r=>{r.type===lt.FRAME_READY&&setTimeout(()=>{e()},500)})}),await this.initPromise,this.isInitialized=!0,this.initPromise=void 0}
2077async init(){if(!this.isInitialized){if(this.initPromise){await this.initPromise;return}await this.createFrame()}}getLoginEmailUsed(){return!!Zi.get(lt.EMAIL_LOGIN_USED_KEY)}getEmail(){return Zi.get(lt.EMAIL)}getUsername(){return Zi.get(lt.SOCIAL_USERNAME)}async reload(){var e;try{await this.appEvent({type:lt.APP_RELOAD})}catch(r){throw(e=this.w3mLogger)==null||e.logger.error({error:r},"Error reloading iframe"),r}}async connectEmail(e){var r;try{jo.checkIfAllowedToTriggerEmail(),await this.init();const n=await this.appEvent({type:lt.APP_CONNECT_EMAIL,payload:e});return this.setNewLastEmailLoginTime(),n}catch(n){throw(r=this.w3mLogger)==null||r.logger.error({error:n},"Error connecting email"),n}}async connectDevice(){var e;try{return this.appEvent({type:lt.APP_CONNECT_DEVICE})}catch(r){throw(e=this.w3mLogger)==null||e.logger.error({error:r},"Error connecting device"),r}}async connectOtp(e){var r;try{return this.appEvent({type:lt.APP_CONNECT_OTP,payload:e})}catch(n){throw(r=this.w3mLogger)==null||r.logger.error({error:n},"Error connecting otp"),n}}async isConnected(){var e;try{if(!this.getLoginEmailUsed())return{isConnected:!1};const r=await this.appEvent({type:lt.APP_IS_CONNECTED});return r!=null&&r.isConnected||this.deleteAuthLoginCache(),r}catch(r){throw this.deleteAuthLoginCache(),(e=this.w3mLogger)==null||e.logger.error({error:r},"Error checking connection"),r}}async getChainId(){var e;try{const r=await this.appEvent({type:lt.APP_GET_CHAIN_ID});return this.setLastUsedChainId(r.chainId),r}catch(r){throw(e=this.w3mLogger)==null||e.logger.error({error:r},"Error getting chain id"),r}}async getSocialRedirectUri(e){var r;try{return await this.init(),this.appEvent({type:lt.APP_GET_SOCIAL_REDIRECT_URI,payload:e})}catch(n){throw(r=this.w3mLogger)==null||r.logger.error({error:n},"Error getting social redirect uri"),n}}async updateEmail(e){var r;try{const n=await this.appEvent({type:lt.APP_UPDATE_EMAIL,payload:e});return this.setNewLastEmailLoginTime(),n}catch(n){throw(r=this.w3mLogger)==null||r.logger.error({error:n},"Error updating email"),n}}async updateEmailPrimaryOtp(e){var r;try{return this.appEvent({type:lt.APP_UPDATE_EMAIL_PRIMARY_OTP,payload:e})}catch(n){throw(r=this.w3mLogger)==null||r.logger.error({error:n},"Error updating email primary otp"),n}}async updateEmailSecondaryOtp(e){var r;try{const n=await this.appEvent({type:lt.APP_UPDATE_EMAIL_SECONDARY_OTP,payload:e});return this.setLoginSuccess(n.newEmail),n}catch(n){throw(r=this.w3mLogger)==null||r.logger.error({error:n},"Error updating email secondary otp"),n}}async syncTheme(e){var r;try{return this.appEvent({type:lt.APP_SYNC_THEME,payload:e})}catch(n){throw(r=this.w3mLogger)==null||r.logger.error({error:n},"Error syncing theme"),n}}async syncDappData(e){var r;try{return this.appEvent({type:lt.APP_SYNC_DAPP_DATA,payload:e})}catch(n){throw(r=this.w3mLogger)==null||r.logger.error({error:n},"Error syncing dapp data"),n}}async getSmartAccountEnabledNetworks(){var e;try{const r=await this.appEvent({type:lt.APP_GET_SMART_ACCOUNT_ENABLED_NETWORKS});return this.persistSmartAccountEnabledNetworks(r.smartAccountEnabledNetworks),r}catch(r){throw this.persistSmartAccountEnabledNetworks([]),(e=this.w3mLogger)==null||e.logger.error({error:r},"Error getting smart account enabled networks"),r}}async setPreferredAccount(e){var r;try{return this.appEvent({type:lt.APP_SET_PREFERRED_ACCOUNT,payload:{type:e}})}catch(n){throw(r=this.w3mLogger)==null||r.logger.error({error:n},"Error setting preferred account"),n}}async connect(e){var r,n;if(e!=null&&e.socialUri)try{await this.init();const i=this.getRpcUrl(e.chainId),s=await this.appEvent({type:lt.APP_CONNECT_SOCIAL,payload:{uri:e.socialUri,preferredAccountType:e.preferredAccountType,chainId:e.chainId,siwxMessage:e.siwxMessage,rpcUrl:i}});return s.userName&&this.setSocialLoginSuccess(s.userName),this.setLoginSuccess(s.email),this.setLastUsedChainId(s.chainId),this.user=s,s}catch(i){throw(r=this.w3mLogger)==null||r.logger.error({error:i},"Error connecting social"),i}else try{const i=(e==null?void 0:e.chainId)||this.getLastUsedChainId()||1,s=await this.getUser({chainId:i,preferredAccountType:e==null?void 0:e.preferredAccountType,siwxMessage:e==null?void 0:e.siwxMessage,rpcUrl:this.getRpcUrl(i)});
2077return this.setLoginSuccess(s.email),this.setLastUsedChainId(s.chainId),this.user=s,s}catch(i){throw(n=this.w3mLogger)==null||n.logger.error({error:i},"Error connecting"),i}}async getUser(e){var r;try{await this.init();const n=(e==null?void 0:e.chainId)||this.getLastUsedChainId()||1,i=await this.appEvent({type:lt.APP_GET_USER,payload:{...e,chainId:n}});return this.user=i,i}catch(n){throw(r=this.w3mLogger)==null||r.logger.error({error:n},"Error connecting"),n}}async connectSocial({uri:e,chainId:r,preferredAccountType:n}){var i;try{await this.init();const s=this.getRpcUrl(r),o=await this.appEvent({type:lt.APP_CONNECT_SOCIAL,payload:{uri:e,chainId:r,rpcUrl:s,preferredAccountType:n}});return o.userName&&this.setSocialLoginSuccess(o.userName),o}catch(s){throw(i=this.w3mLogger)==null||i.logger.error({error:s},"Error connecting social"),s}}async getFarcasterUri(){var e;try{return await this.init(),await this.appEvent({type:lt.APP_GET_FARCASTER_URI})}catch(r){throw(e=this.w3mLogger)==null||e.logger.error({error:r},"Error getting farcaster uri"),r}}async connectFarcaster(){var e;try{const r=await this.appEvent({type:lt.APP_CONNECT_FARCASTER});return r.userName&&this.setSocialLoginSuccess(r.userName),r}catch(r){throw(e=this.w3mLogger)==null||e.logger.error({error:r},"Error connecting farcaster"),r}}async switchNetwork({chainId:e}){var r;try{const n=this.getRpcUrl(e),i=await this.appEvent({type:lt.APP_SWITCH_NETWORK,payload:{chainId:e,rpcUrl:n}});return this.setLastUsedChainId(i.chainId),i}catch(n){throw(r=this.w3mLogger)==null||r.logger.error({error:n},"Error switching network"),n}}async disconnect(){var e;try{return this.deleteAuthLoginCache(),await new Promise(async n=>{const i=setTimeout(()=>{n()},3e3);await this.appEvent({type:lt.APP_SIGN_OUT}),clearTimeout(i),n()})}catch(r){throw(e=this.w3mLogger)==null||e.logger.error({error:r},"Error disconnecting"),r}}async request(e){var n,i,s,o,a;const r=e;try{if(Pi.GET_CHAIN_ID===e.method)return this.getLastUsedChainId();const c=e.chainNamespace||"eip155",l=(n=this.getActiveCaipNetwork(c))==null?void 0:n.id;r.chainNamespace=c,r.chainId=l,r.rpcUrl=this.getRpcUrl(l),(i=this.rpcRequestHandler)==null||i.call(this,e);const u=await this.appEvent({type:lt.APP_RPC_REQUEST,payload:r});return(s=this.rpcSuccessHandler)==null||s.call(this,u,r),u}catch(c){throw(o=this.rpcErrorHandler)==null||o.call(this,c,r),(a=this.w3mLogger)==null||a.logger.error({error:c},"Error requesting"),c}}onRpcRequest(e){this.rpcRequestHandler=e}onRpcSuccess(e){this.rpcSuccessHandler=e}onRpcError(e){this.rpcErrorHandler=e}onIsConnected(e){this.w3mFrame.events.onFrameEvent(r=>{r.type===lt.FRAME_IS_CONNECTED_SUCCESS&&r.payload.isConnected&&e()})}onNotConnected(e){this.w3mFrame.events.onFrameEvent(r=>{r.type===lt.FRAME_IS_CONNECTED_ERROR&&e(),r.type===lt.FRAME_IS_CONNECTED_SUCCESS&&!r.payload.isConnected&&e()})}onConnect(e){this.w3mFrame.events.onFrameEvent(r=>{r.type===lt.FRAME_GET_USER_SUCCESS&&e(r.payload)})}onSocialConnected(e){this.w3mFrame.events.onFrameEvent(r=>{r.type===lt.FRAME_CONNECT_SOCIAL_SUCCESS&&e(r.payload)})}async getCapabilities(){try{return await this.request({method:"wallet_getCapabilities"})||{}}catch{return{}}}onSetPreferredAccount(e){this.w3mFrame.events.onFrameEvent(r=>{r.type===lt.FRAME_SET_PREFERRED_ACCOUNT_SUCCESS?e(r.payload):r.type===lt.FRAME_SET_PREFERRED_ACCOUNT_ERROR&&e({type:Pi.ACCOUNT_TYPES.EOA})})}getAvailableChainIds(){return Object.keys(this.w3mFrame.networks)}async rejectRpcRequests(){var e;try{await Promise.all(this.openRpcRequests.map(async({abortController:r,method:n})=>{Pi.SAFE_RPC_METHODS.includes(n)||r.abort(),await this.appEvent({type:lt.APP_RPC_ABORT})})),this.openRpcRequests=[]}catch(r){(e=this.w3mLogger)==null||e.logger.error({error:r},"Error aborting RPC request")}}async appEvent(e){let r,n;function i(c){return c.replace("@w3m-app/","")}const s=[lt.APP_SYNC_DAPP_DATA,lt.APP_SYNC_THEME,lt.APP_SET_PREFERRED_ACCOUNT],o=i(e.type);return!this.w3mFrame.iframeIsReady&&!s.includes(e.type)&&(n=setTimeout(()=>{var c;(c=this.onTimeout)==null||c.call(this,"iframe_load_failed"),this.abortController.abort()},2e4)),await this.w3mFrame.frameLoadPromise,clearTimeout(n),[lt.APP_CONNECT_EMAIL,lt.APP_CONNECT_DEVICE,lt.APP_CONNECT_OTP,lt.APP_CONNECT_SOCIAL,lt.APP_GET_SOCIAL_REDIRECT_URI].map(i).includes(o)&&(r=setTimeout(()=>{var c;(c=this.onTimeout)==null||c.call(this,"iframe_request_timeout"),this.abortController.abort()},12e4)),new Promise((c,l)=>{var p,h,g;
2077const u=Math.random().toString(36).substring(7);(g=(p=this.w3mLogger)==null?void 0:(h=p.logger).info)==null||g.call(h,{event:e,id:u},"Sending app event"),this.w3mFrame.events.postAppEvent({...e,id:u});const f=new AbortController;if(o==="RPC_REQUEST"){const y=e;this.openRpcRequests=[...this.openRpcRequests,{...y.payload,abortController:f}]}f.signal.addEventListener("abort",()=>{o==="RPC_REQUEST"?l(new Error("Request was aborted")):o!=="GET_FARCASTER_URI"&&l(new Error("Something went wrong"))});function d(y,x){var C,_,L;y.id===u&&((_=x==null?void 0:(C=x.logger).info)==null||_.call(C,{framEvent:y,id:u},"Received frame response"),y.type===`@w3m-frame/${o}_SUCCESS`?(r&&clearTimeout(r),n&&clearTimeout(n),"payload"in y&&c(y.payload),c(void 0)):y.type===`@w3m-frame/${o}_ERROR`&&(r&&clearTimeout(r),n&&clearTimeout(n),"payload"in y&&l(new Error(((L=y.payload)==null?void 0:L.message)||"An error occurred")),l(new Error("An error occurred"))))}this.w3mFrame.events.registerFrameEventHandler(u,y=>d(y,this.w3mLogger),this.abortController.signal)})}setNewLastEmailLoginTime(){Zi.set(lt.LAST_EMAIL_LOGIN_TIME,Date.now().toString())}setSocialLoginSuccess(e){Zi.set(lt.SOCIAL_USERNAME,e)}setLoginSuccess(e){e&&Zi.set(lt.EMAIL,e),Zi.set(lt.EMAIL_LOGIN_USED_KEY,"true"),Zi.delete(lt.LAST_EMAIL_LOGIN_TIME)}deleteAuthLoginCache(){Zi.delete(lt.EMAIL_LOGIN_USED_KEY),Zi.delete(lt.EMAIL),Zi.delete(lt.LAST_USED_CHAIN_KEY),Zi.delete(lt.SOCIAL_USERNAME)}setLastUsedChainId(e){e&&Zi.set(lt.LAST_USED_CHAIN_KEY,String(e))}getLastUsedChainId(){const e=Zi.get(lt.LAST_USED_CHAIN_KEY)??void 0,r=Number(e);return isNaN(r)?e:r}persistSmartAccountEnabledNetworks(e){Zi.set(lt.SMART_ACCOUNT_ENABLED_NETWORKS,e.join(","))}getRpcUrl(e){var i,s;let r=e===void 0?void 0:"eip155";typeof e=="string"&&(e.includes(":")?r=(i=Bs.parseCaipNetworkId(e))==null?void 0:i.chainNamespace:Number.isInteger(Number(e))?r="eip155":r="solana");const n=this.getActiveCaipNetwork(r);return(s=n==null?void 0:n.rpcUrls.default.http)==null?void 0:s[0]}}class jm{constructor(){}static getInstance({projectId:e,chainId:r,enableLogger:n,onTimeout:i,abortController:s,getActiveCaipNetwork:o}){return jm.instance||(jm.instance=new vTe({projectId:e,chainId:r,enableLogger:n,onTimeout:i,abortController:s,getActiveCaipNetwork:o})),jm.instance}}var mD={};const xTe={ACCOUNT_TABS:[{label:"Tokens"},{label:"NFTs"},{label:"Activity"}],SECURE_SITE_ORIGIN:(typeof process<"u"&&typeof mD<"u"?mD.NEXT_PUBLIC_SECURE_SITE_ORIGIN:void 0)||"https://secure.walletconnect.org",VIEW_DIRECTION:{Next:"next",Prev:"prev"},DEFAULT_CONNECT_METHOD_ORDER:["email","social","wallet"],ANIMATION_DURATIONS:{HeaderText:120,ModalHeight:150,ViewTransition:150}},X_={filterOutDuplicatesByRDNS(t){const e=Ee.state.enableEIP6963?Fe.state.connectors:[],r=Oe.getRecentWallets(),n=e.map(a=>{var c;return(c=a.info)==null?void 0:c.rdns}).filter(Boolean),i=r.map(a=>a.rdns).filter(Boolean),s=n.concat(i);if(s.includes("io.metamask.mobile")&&it.isMobile()){const a=s.indexOf("io.metamask.mobile");s[a]="io.metamask"}return t.filter(a=>!(a!=null&&a.rdns&&s.includes(String(a.rdns))||!(a!=null&&a.rdns)&&e.some(l=>l.name===a.name)))},filterOutDuplicatesByIds(t){const e=Fe.state.connectors.filter(a=>a.type==="ANNOUNCED"||a.type==="INJECTED"),r=Oe.getRecentWallets(),n=e.map(a=>a.explorerId),i=r.map(a=>a.id),s=n.concat(i);return t.filter(a=>!s.includes(a==null?void 0:a.id))},filterOutDuplicateWallets(t){const e=this.filterOutDuplicatesByRDNS(t);return this.filterOutDuplicatesByIds(e)},markWalletsAsInstalled(t){const{connectors:e}=Fe.state,{featuredWalletIds:r}=Ee.state,n=e.filter(o=>o.type==="ANNOUNCED").reduce((o,a)=>{var c;return(c=a.info)!=null&&c.rdns&&(o[a.info.rdns]=!0),o},{});return t.map(o=>({...o,installed:!!o.rdns&&!!n[o.rdns??""]})).sort((o,a)=>{const c=Number(a.installed)-Number(o.installed);if(c!==0)return c;if(r!=null&&r.length){const l=r.indexOf(o.id),u=r.indexOf(a.id);if(l!==-1&&u!==-1)return l-u;if(l!==-1)return-1;if(u!==-1)return 1}return 0})},getConnectOrderMethod(t,e){var c;const r=(t==null?void 0:t.connectMethodsOrder)||((c=Ee.state.features)==null?void 0:c.connectMethodsOrder),n=e||Fe.state.connectors;if(r)return r;const{injected:i,announced:s}=Av.getConnectorsByType(n,At.state.recommended,At.state.featured),o=i.filter(Av.showConnector),a=s.filter(Av.showConnector);return o.length||a.length?["wallet","email","social"]:xTe.DEFAULT_CONNECT_METHOD_ORDER},isExcluded(t){const e=!!t.rdns&&At.state.excludedWallets.some(n=>n.rdns===t.rdns),r=!!t.name&&At.state.excludedWallets.some(n=>Ui.isLowerCaseMatch(n.name,t.name));return e||r}},Av={getConnectorsByType(t,e,r){const{customWallets:n}=Ee.state,i=Oe.getRecentWallets(),s=X_.filterOutDuplicateWallets(e),o=X_.filterOutDuplicateWallets(r),a=t.filter(f=>f.type==="MULTI_CHAIN"),c=t.filter(f=>f.type==="ANNOUNCED"),l=t.filter(f=>f.type==="INJECTED"),u=t.filter(f=>f.type==="EXTERNAL");return{custom:n,recent:i,external:u,multiChain:a,announced:c,injected:l,recommended:s,featured:o}},showConnector(t){var i;const e=(i=t.info)==null?void 0:i.rdns,r=!!e&&At.state.excludedWallets.some(s=>!!s.rdns&&s.rdns===e),n=!!t.name&&At.state.excludedWallets.some(s=>Ui.isLowerCaseMatch(s.name,t.name));return!(t.type==="INJECTED"&&(t.name==="Browser Wallet"&&(!it.isMobile()||it.isMobile()&&!e&&!We.checkInstalled())||r||n)||(t.type==="ANNOUNCED"||t.type==="EXTERNAL")&&(r||n))},getIsConnectedWithWC(){return Array.from(X.state.chains.values()).some(r=>Fe.getConnectorId(r.namespace)===fe.CONNECTOR_ID.WALLET_CONNECT)},getConnectorTypeOrder({recommended:t,featured:e,custom:r,recent:n,announced:i,injected:s,multiChain:o,external:a,overriddenConnectors:c=(l=>(l=Ee.state.features)==null?void 0:l.connectorTypeOrder)()??[]}){const d=[{type:"walletConnect",isEnabled:Ee.state.enableWalletConnect},{type:"recent",isEnabled:n.length>0},{type:"injected",isEnabled:[...s,...i,...o].length>0},{type:"featured",isEnabled:e.length>0},{type:"custom",isEnabled:r&&r.length>0},{type:"external",isEnabled:a.length>0},{type:"recommended",isEnabled:t.length>0}].filter(y=>y.isEnabled),p=new Set(d.map(y=>y.type)),h=c.filter(y=>p.has(y)).map(y=>({type:y,isEnabled:!0})),g=d.filter(({type:y})=>!h.some(({type:C})=>C===y));return Array.from(new Set([...h,...g].map(({type:y})=>y)))},getAuthName({email:t,socialUsername:e,socialProvider:r}){return e?r&&r==="discord"&&e.endsWith("0")?e.slice(0,-1):e:t.length>30?`${t.slice(0,-3)}...`:t}
vendor: 5,037 bytes, lines 2077-2085
2077,async fetchProviderData(t){var e,r;try{if(t.name==="Browser Wallet"&&!it.isMobile())return{accounts:[],chainId:void 0};if(t.id===fe.CONNECTOR_ID.AUTH)return{accounts:[],chainId:void 0};const[n,i]=await Promise.all([(e=t.provider)==null?void 0:e.request({method:"eth_accounts"}),(r=t.provider)==null?void 0:r.request({method:"eth_chainId"}).then(s=>Number(s))]);return{accounts:n,chainId:i}}catch(n){return console.warn(`Failed to fetch provider data for ${t.name}`,n),{accounts:[],chainId:void 0}}}};/** 2078 * @license 2079 * Copyright 2019 Google LLC 2080 * SPDX-License-Identifier: BSD-3-Clause 2081 */const Sv=globalThis,d7=Sv.ShadowRoot&&(Sv.ShadyCSS===void 0||Sv.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,h7=Symbol(),yD=new WeakMap;let Qq=class{constructor(e,r,n){if(this._$cssResult$=!0,n!==h7)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=r}get styleSheet(){let e=this.o;const r=this.t;if(d7&&e===void 0){const n=r!==void 0&&r.length===1;n&&(e=yD.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&yD.set(r,e))}return e}toString(){return this.cssText}};const ca=t=>new Qq(typeof t=="string"?t:t+"",void 0,h7),Dp=(t,...e)=>{const r=t.length===1?t[0]:e.reduce((n,i,s)=>n+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1],t[0]);return new Qq(r,t,h7)},ETe=(t,e)=>{if(d7)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(const r of e){const n=document.createElement("style"),i=Sv.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,t.appendChild(n)}},bD=d7?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(const n of e.cssRules)r+=n.cssText;return ca(r)})(t):t;/** 2082 * @license 2083 * Copyright 2017 Google LLC 2084 * SPDX-License-Identifier: BSD-3-Clause 2085 */const{is:CTe,defineProperty:_Te,getOwnPropertyDescriptor:ATe,getOwnPropertyNames:STe,getOwnPropertySymbols:NTe,getPrototypeOf:ITe}=Object,qf=globalThis,wD=qf.trustedTypes,TTe=wD?wD.emptyScript:"",E6=qf.reactiveElementPolyfillSupport,zm=(t,e)=>t,eA={toAttribute(t,e){switch(e){case Boolean:t=t?TTe:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=t!==null;break;case Number:r=t===null?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch{r=null}}return r}},Xq=(t,e)=>!CTe(t,e),vD={attribute:!0,type:String,converter:eA,reflect:!1,useDefault:!1,hasChanged:Xq};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),qf.litPropertyMetadata??(qf.litPropertyMetadata=new WeakMap);let G0=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,r=vD){if(r.state&&(r.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((r=Object.create(r)).wrapped=!0),this.elementProperties.set(e,r),!r.noAccessor){const n=Symbol(),i=this.getPropertyDescriptor(e,n,r);i!==void 0&&_Te(this.prototype,e,i)}}static getPropertyDescriptor(e,r,n){const{get:i,set:s}=ATe(this.prototype,e)??{get(){return this[r]},set(o){this[r]=o}};return{get:i,set(o){const a=i==null?void 0:i.call(this);s==null||s.call(this,o),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??vD}static _$Ei(){if(this.hasOwnProperty(zm("elementProperties")))return;const e=ITe(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(zm("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(zm("properties"))){const r=this.properties,n=[...STe(r),...NTe(r)];for(const i of n)this.createProperty(i,r[i])}const e=this[Symbol.metadata];if(e!==null){const r=litPropertyMetadata.get(e);if(r!==void 0)for(const[n,i]of r)this.elementProperties.set(n,i)}this._$Eh=new Map;for(const[r,n]of this.elementProperties){const i=this._$Eu(r,n);i!==void 0&&this._$Eh.set(i,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const r=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const i of n)r.unshift(bD(i))}else e!==void 0&&r.push(bD(e));return r}static _$Eu(e,r){const n=r.attribute;return n===!1?void 0:typeof n=="string"?n:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(r=>this.enableUpdating=r),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(r=>r(this))}addController(e){var r;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((r=e.hostConnected)==null||r.call(e))}
vendor: 4,282 bytes, lines 2085-2091
2085removeController(e){var r;(r=this._$EO)==null||r.delete(e)}_$E_(){const e=new Map,r=this.constructor.elementProperties;for(const n of r.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ETe(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(r=>{var n;return(n=r.hostConnected)==null?void 0:n.call(r)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(r=>{var n;return(n=r.hostDisconnected)==null?void 0:n.call(r)})}attributeChangedCallback(e,r,n){this._$AK(e,n)}_$ET(e,r){var s;const n=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,n);if(i!==void 0&&n.reflect===!0){const o=(((s=n.converter)==null?void 0:s.toAttribute)!==void 0?n.converter:eA).toAttribute(r,n.type);this._$Em=e,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(e,r){var s,o;const n=this.constructor,i=n._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const a=n.getPropertyOptions(i),c=typeof a.converter=="function"?{fromAttribute:a.converter}:((s=a.converter)==null?void 0:s.fromAttribute)!==void 0?a.converter:eA;this._$Em=i;const l=c.fromAttribute(r,a.type);this[i]=l??((o=this._$Ej)==null?void 0:o.get(i))??l,this._$Em=null}}requestUpdate(e,r,n){var i;if(e!==void 0){const s=this.constructor,o=this[e];if(n??(n=s.getPropertyOptions(e)),!((n.hasChanged??Xq)(o,r)||n.useDefault&&n.reflect&&o===((i=this._$Ej)==null?void 0:i.get(e))&&!this.hasAttribute(s._$Eu(e,n))))return;this.C(e,r,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,r,{useDefault:n,reflect:i,wrapped:s},o){n&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,o??r??this[e]),s!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(r=void 0),this._$AL.set(e,r)),i===!0&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(r){Promise.reject(r)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var n;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[s,o]of this._$Ep)this[s]=o;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[s,o]of i){const{wrapped:a}=o,c=this[s];a!==!0||this._$AL.has(s)||c===void 0||this.C(s,void 0,o,c)}}let e=!1;const r=this._$AL;try{e=this.shouldUpdate(r),e?(this.willUpdate(r),(n=this._$EO)==null||n.forEach(i=>{var s;return(s=i.hostUpdate)==null?void 0:s.call(i)}),this.update(r)):this._$EM()}catch(i){throw e=!1,this._$EM(),i}e&&this._$AE(r)}willUpdate(e){}_$AE(e){var r;(r=this._$EO)==null||r.forEach(n=>{var i;return(i=n.hostUpdated)==null?void 0:i.call(n)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach(r=>this._$ET(r,this[r]))),this._$EM()}updated(e){}firstUpdated(e){}};G0.elementStyles=[],G0.shadowRootOptions={mode:"open"},G0[zm("elementProperties")]=new Map,G0[zm("finalized")]=new Map,E6==null||E6({ReactiveElement:G0}),(qf.reactiveElementVersions??(qf.reactiveElementVersions=[])).push("2.1.1");/** 2086 * @license 2087 * Copyright 2017 Google LLC 2088 * SPDX-License-Identifier: BSD-3-Clause 2089 */const Wm=globalThis,f4=Wm.trustedTypes,xD=f4?f4.createPolicy("lit-html",{createHTML:t=>t}):void 0,eV="$lit$",xf=`lit$${Math.random().toFixed(9).slice(2)}$`,tV="?"+xf,kTe=`<${tV}>`,jh=document,vy=()=>jh.createComment(""),xy=t=>t===null||typeof t!="object"&&typeof t!="function",p7=Array.isArray,PTe=t=>p7(t)||typeof(t==null?void 0:t[Symbol.iterator])=="function",C6=`[ 2090\f\r]`,k1=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ED=/-->/g,CD=/>/g,kd=RegExp(`>|${C6}(?:([^\\s"'>=/]+)(${C6}*=${C6}*(?:[^ 2091\f\r"'\`<>=]|("|')|))|$)`,"g"),_D=/'/g,AD=/"/g,rV=/^(?:script|style|textarea|title)$/i,nV=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}
vendor: 4,740 bytes, line 2091
2091),nBe=nV(1),iBe=nV(2),gg=Symbol.for("lit-noChange"),$i=Symbol.for("lit-nothing"),SD=new WeakMap,sh=jh.createTreeWalker(jh,129);function iV(t,e){if(!p7(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return xD!==void 0?xD.createHTML(e):e}const RTe=(t,e)=>{const r=t.length-1,n=[];let i,s=e===2?"<svg>":e===3?"<math>":"",o=k1;for(let a=0;a<r;a++){const c=t[a];let l,u,f=-1,d=0;for(;d<c.length&&(o.lastIndex=d,u=o.exec(c),u!==null);)d=o.lastIndex,o===k1?u[1]==="!--"?o=ED:u[1]!==void 0?o=CD:u[2]!==void 0?(rV.test(u[2])&&(i=RegExp("</"+u[2],"g")),o=kd):u[3]!==void 0&&(o=kd):o===kd?u[0]===">"?(o=i??k1,f=-1):u[1]===void 0?f=-2:(f=o.lastIndex-u[2].length,l=u[1],o=u[3]===void 0?kd:u[3]==='"'?AD:_D):o===AD||o===_D?o=kd:o===ED||o===CD?o=k1:(o=kd,i=void 0);const p=o===kd&&t[a+1].startsWith("/>")?" ":"";s+=o===k1?c+kTe:f>=0?(n.push(l),c.slice(0,f)+eV+c.slice(f)+xf+p):c+xf+(f===-2?a:p)}return[iV(t,s+(t[r]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]};let tA=class sV{constructor({strings:e,_$litType$:r},n){let i;this.parts=[];let s=0,o=0;const a=e.length-1,c=this.parts,[l,u]=RTe(e,r);if(this.el=sV.createElement(l,n),sh.currentNode=this.el.content,r===2||r===3){const f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(i=sh.nextNode())!==null&&c.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(const f of i.getAttributeNames())if(f.endsWith(eV)){const d=u[o++],p=i.getAttribute(f).split(xf),h=/([.?@])?(.*)/.exec(d);c.push({type:1,index:s,name:h[2],strings:p,ctor:h[1]==="."?DTe:h[1]==="?"?LTe:h[1]==="@"?MTe:Hx}),i.removeAttribute(f)}else f.startsWith(xf)&&(c.push({type:6,index:s}),i.removeAttribute(f));if(rV.test(i.tagName)){const f=i.textContent.split(xf),d=f.length-1;if(d>0){i.textContent=f4?f4.emptyScript:"";for(let p=0;p<d;p++)i.append(f[p],vy()),sh.nextNode(),c.push({type:2,index:++s});i.append(f[d],vy())}}}else if(i.nodeType===8)if(i.data===tV)c.push({type:2,index:s});else{let f=-1;for(;(f=i.data.indexOf(xf,f+1))!==-1;)c.push({type:7,index:s}),f+=xf.length-1}s++}}static createElement(e,r){const n=jh.createElement("template");return n.innerHTML=e,n}};function mg(t,e,r=t,n){var o,a;if(e===gg)return e;let i=n!==void 0?(o=r._$Co)==null?void 0:o[n]:r._$Cl;const s=xy(e)?void 0:e._$litDirective$;return(i==null?void 0:i.constructor)!==s&&((a=i==null?void 0:i._$AO)==null||a.call(i,!1),s===void 0?i=void 0:(i=new s(t),i._$AT(t,r,n)),n!==void 0?(r._$Co??(r._$Co=[]))[n]=i:r._$Cl=i),i!==void 0&&(e=mg(t,i._$AS(t,e.values),i,n)),e}class OTe{constructor(e,r){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:r},parts:n}=this._$AD,i=((e==null?void 0:e.creationScope)??jh).importNode(r,!0);sh.currentNode=i;let s=sh.nextNode(),o=0,a=0,c=n[0];for(;c!==void 0;){if(o===c.index){let l;c.type===2?l=new yb(s,s.nextSibling,this,e):c.type===1?l=new c.ctor(s,c.name,c.strings,this,e):c.type===6&&(l=new $Te(s,this,e)),this._$AV.push(l),c=n[++a]}o!==(c==null?void 0:c.index)&&(s=sh.nextNode(),o++)}return sh.currentNode=jh,i}p(e){let r=0;for(const n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,r),r+=n.strings.length-2):n._$AI(e[r])),r++}}class yb{get _$AU(){var e;return((e=this._$AM)==null?void 0:e._$AU)??this._$Cv}constructor(e,r,n,i){this.type=2,this._$AH=$i,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=n,this.options=i,this._$Cv=(i==null?void 0:i.isConnected)??!0}get parentNode(){let e=this._$AA.parentNode;const r=this._$AM;return r!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=mg(this,e,r),xy(e)?e===$i||e==null||e===""?(this._$AH!==$i&&this._$AR(),this._$AH=$i):e!==this._$AH&&e!==gg&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):PTe(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==$i&&xy(this._$AH)?this._$AA.nextSibling.data=e:this.T(jh.createTextNode(e)),this._$AH=e}$(e){var s;const{values:r,_$litType$:n}=e,i=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=tA.createElement(iV(n.h,n.h[0]),this.options)),n);if(((s=this._$AH)==null?void 0:s._$AD)===i)this._$AH.p(r);else{const o=new OTe(i,this),a=o.u(this.options);o.p(r),this.T(a),this._$AH=o}}_$AC(e){let r=SD.get(e.strings);return r===void 0&&SD.set(e.strings,r=new tA(e)),r}k(e){p7(this._$AH)||(this._$AH=[],this._$AR());const r=this._$AH;let n,i=0;for(const s of e)i===r.length?r.push(n=new yb(this.O(vy()),this.O(vy()),this,this.options)):n=r[i],n._$AI(s),i++;i<r.length&&(this._$AR(n&&n._$AB.nextSibling,i),r.length=i)}_$AR(e=this._$AA.nextSibling,r){var n;
2091for((n=this._$AP)==null?void 0:n.call(this,!1,!0,r);e!==this._$AB;){const i=e.nextSibling;e.remove(),e=i}}setConnected(e){var r;this._$AM===void 0&&(this._$Cv=e,(r=this._$AP)==null||r.call(this,e))}}class Hx{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,r,n,i,s){this.type=1,this._$AH=$i,this._$AN=void 0,this.element=e,this.name=r,this._$AM=i,this.options=s,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=$i}_$AI(e,r=this,n,i){const s=this.strings;let o=!1;if(s===void 0)e=mg(this,e,r,0),o=!xy(e)||e!==this._$AH&&e!==gg,o&&(this._$AH=e);else{const a=e;let c,l;for(e=s[0],c=0;c<s.length-1;c++)l=mg(this,a[n+c],r,c),l===gg&&(l=this._$AH[c]),o||(o=!xy(l)||l!==this._$AH[c]),l===$i?e=$i:e!==$i&&(e+=(l??"")+s[c+1]),this._$AH[c]=l}o&&!i&&this.j(e)}j(e){e===$i?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class DTe extends Hx{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===$i?void 0:e}}class LTe extends Hx{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==$i)}}class MTe extends Hx{constructor(e,r,n,i,s){super(e,r,n,i,s),this.type=5}_$AI(e,r=this){if((e=mg(this,e,r,0)??$i)===gg)return;const n=this._$AH,i=e===$i&&n!==$i||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,s=e!==$i&&(n===$i||i);i&&this.element.removeEventListener(this.name,this,n),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var r;typeof this._$AH=="function"?this._$AH.call(((r=this.options)==null?void 0:r.host)??this.element,e):this._$AH.handleEvent(e)}}let $Te=class{constructor(e,r,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){mg(this,e)}};const _6=Wm.litHtmlPolyfillSupport;_6==null||_6(tA,yb),(Wm.litHtmlVersions??(Wm.litHtmlVersions=[])).push("3.3.1");const UTe=(t,e,r)=>{const n=(r==null?void 0:r.renderBefore)??e;let i=n._$litPart$;if(i===void 0){const s=(r==null?void 0:r.renderBefore)??null;n._$litPart$=i=new yb(e.insertBefore(vy(),s),s,void 0,r??{})}return i._$AI(t),i};/** 2092 * @license 2093 * Copyright 2017 Google LLC 2094 * SPDX-License-Identifier: BSD-3-Clause 2095 */const mh=globalThis;class Nv extends G0{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var r;const e=super.createRenderRoot();return(r=this.renderOptions).renderBefore??(r.renderBefore=e.firstChild),e}update(e){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=UTe(r,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)==null||e.setConnected(!1)}render(){return gg}}var jL;Nv._$litElement$=!0,Nv.finalized=!0,(jL=mh.litElementHydrateSupport)==null||jL.call(mh,{LitElement:Nv});const A6=mh.litElementPolyfillSupport;A6==null||A6({LitElement:Nv});(mh.litElementVersions??(mh.litElementVersions=[])).push("4.2.1");let Hm,Vf,Kf;function oBe(t,e){Hm=document.createElement("style"),Vf=document.createElement("style"),Kf=document.createElement("style"),Hm.textContent=Lp(t).core.cssText,Vf.textContent=Lp(t).dark.cssText,Kf.textContent=Lp(t).light.cssText,document.head.appendChild(Hm),document.head.appendChild(Vf),document.head.appendChild(Kf),oV(e)}function oV(t){Vf&&Kf&&(t==="light"?(Vf.removeAttribute("media"),Kf.media="enabled"):(Kf.removeAttribute("media"),Vf.media="enabled"))}function BTe(t){Hm&&Vf&&Kf&&(Hm.textContent=Lp(t).core.cssText,Vf.textContent=Lp(t).dark.cssText,Kf.textContent=Lp(t).light.cssText)}function Lp(t){return{core:Dp` 2096 @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap'); 2097 @keyframes w3m-shake { 2098 0% { 2099 transform: scale(1) rotate(0deg); 2100 } 2101 20% { 2102 transform: scale(1) rotate(-1deg); 2103 } 2104 40% { 2105 transform: scale(1) rotate(1.5deg); 2106 } 2107 60% { 2108 transform: scale(1) rotate(-1.5deg); 2109 } 2110 80% { 2111 transform: scale(1) rotate(1deg); 2112 } 2113 100% { 2114 transform: scale(1) rotate(0deg); 2115 } 2116 } 2117 @keyframes w3m-iframe-fade-out { 2118 0% { 2119 opacity: 1; 2120 } 2121 100% { 2122 opacity: 0; 2123 } 2124 } 2125 @keyframes w3m-iframe-zoom-in { 2126 0% { 2127 transform: translateY(50px); 2128 opacity: 0; 2129 } 2130 100% { 2131 transform: translateY(0px); 2132 opacity: 1; 2133 } 2134 } 2135 @keyframes w3m-iframe-zoom-in-mobile { 2136 0% { 2137 transform: scale(0.95); 2138 opacity: 0; 2139 } 2140 100% { 2141 transform: scale(1); 2142 opacity: 1; 2143 } 2144 } 2145 :root { 2146 --w3m-modal-width: 360px; 2147 --w3m-color-mix-strength: ${ca(t!=null&&t["--w3m-color-mix-strength"]?`${t["--w3m-color-mix-strength"]}%`:"0%")}; 2148 --w3m-font-family: ${ca((t==null?void 0:t["--w3m-font-family"])||"Inter, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;")}; 2149 --w3m-font-size-master: ${ca((t==null?void 0:t["--w3m-font-size-master"])||"10px")}; 2150 --w3m-border-radius-master: ${ca((t==null?void 0:t["--w3m-border-radius-master"])||"4px")}; 2151 --w3m-z-index: ${ca((t==null?void 0:t["--w3m-z-index"])||
vendor: 15,824 bytes, lines 2151-2577
2151999)}; 2152 2153 --wui-font-family: var(--w3m-font-family); 2154 2155 --wui-font-size-mini: calc(var(--w3m-font-size-master) * 0.8); 2156 --wui-font-size-micro: var(--w3m-font-size-master); 2157 --wui-font-size-tiny: calc(var(--w3m-font-size-master) * 1.2); 2158 --wui-font-size-small: calc(var(--w3m-font-size-master) * 1.4); 2159 --wui-font-size-paragraph: calc(var(--w3m-font-size-master) * 1.6); 2160 --wui-font-size-medium: calc(var(--w3m-font-size-master) * 1.8); 2161 --wui-font-size-large: calc(var(--w3m-font-size-master) * 2); 2162 --wui-font-size-title-6: calc(var(--w3m-font-size-master) * 2.2); 2163 --wui-font-size-medium-title: calc(var(--w3m-font-size-master) * 2.4); 2164 --wui-font-size-2xl: calc(var(--w3m-font-size-master) * 4); 2165 2166 --wui-border-radius-5xs: var(--w3m-border-radius-master); 2167 --wui-border-radius-4xs: calc(var(--w3m-border-radius-master) * 1.5); 2168 --wui-border-radius-3xs: calc(var(--w3m-border-radius-master) * 2); 2169 --wui-border-radius-xxs: calc(var(--w3m-border-radius-master) * 3); 2170 --wui-border-radius-xs: calc(var(--w3m-border-radius-master) * 4); 2171 --wui-border-radius-s: calc(var(--w3m-border-radius-master) * 5); 2172 --wui-border-radius-m: calc(var(--w3m-border-radius-master) * 7); 2173 --wui-border-radius-l: calc(var(--w3m-border-radius-master) * 9); 2174 --wui-border-radius-3xl: calc(var(--w3m-border-radius-master) * 20); 2175 2176 --wui-font-weight-light: 400; 2177 --wui-font-weight-regular: 500; 2178 --wui-font-weight-medium: 600; 2179 --wui-font-weight-bold: 700; 2180 2181 --wui-letter-spacing-2xl: -1.6px; 2182 --wui-letter-spacing-medium-title: -0.96px; 2183 --wui-letter-spacing-title-6: -0.88px; 2184 --wui-letter-spacing-large: -0.8px; 2185 --wui-letter-spacing-medium: -0.72px; 2186 --wui-letter-spacing-paragraph: -0.64px; 2187 --wui-letter-spacing-small: -0.56px; 2188 --wui-letter-spacing-tiny: -0.48px; 2189 --wui-letter-spacing-micro: -0.2px; 2190 --wui-letter-spacing-mini: -0.16px; 2191 2192 --wui-spacing-0: 0px; 2193 --wui-spacing-4xs: 2px; 2194 --wui-spacing-3xs: 4px; 2195 --wui-spacing-xxs: 6px; 2196 --wui-spacing-2xs: 7px; 2197 --wui-spacing-xs: 8px; 2198 --wui-spacing-1xs: 10px; 2199 --wui-spacing-s: 12px; 2200 --wui-spacing-m: 14px; 2201 --wui-spacing-l: 16px; 2202 --wui-spacing-2l: 18px; 2203 --wui-spacing-xl: 20px; 2204 --wui-spacing-xxl: 24px; 2205 --wui-spacing-2xl: 32px; 2206 --wui-spacing-3xl: 40px; 2207 --wui-spacing-4xl: 90px; 2208 --wui-spacing-5xl: 95px; 2209 2210 --wui-icon-box-size-xxs: 14px; 2211 --wui-icon-box-size-xs: 20px; 2212 --wui-icon-box-size-sm: 24px; 2213 --wui-icon-box-size-md: 32px; 2214 --wui-icon-box-size-mdl: 36px; 2215 --wui-icon-box-size-lg: 40px; 2216 --wui-icon-box-size-2lg: 48px; 2217 --wui-icon-box-size-xl: 64px; 2218 2219 --wui-icon-size-inherit: inherit; 2220 --wui-icon-size-xxs: 10px; 2221 --wui-icon-size-xs: 12px; 2222 --wui-icon-size-sm: 14px; 2223 --wui-icon-size-md: 16px; 2224 --wui-icon-size-mdl: 18px; 2225 --wui-icon-size-lg: 20px; 2226 --wui-icon-size-xl: 24px; 2227 --wui-icon-size-xxl: 28px; 2228 2229 --wui-wallet-image-size-inherit: inherit; 2230 --wui-wallet-image-size-sm: 40px; 2231 --wui-wallet-image-size-md: 56px; 2232 --wui-wallet-image-size-lg: 80px; 2233 2234 --wui-visual-size-size-inherit: inherit; 2235 --wui-visual-size-sm: 40px; 2236 --wui-visual-size-md: 55px; 2237 --wui-visual-size-lg: 80px; 2238 2239 --wui-box-size-md: 100px; 2240 --wui-box-size-lg: 120px; 2241 2242 --wui-ease-out-power-2: cubic-bezier(0, 0, 0.22, 1); 2243 --wui-ease-out-power-1: cubic-bezier(0, 0, 0.55, 1); 2244 2245 --wui-ease-in-power-3: cubic-bezier(0.66, 0, 1, 1); 2246 --wui-ease-in-power-2: cubic-bezier(0.45, 0, 1, 1); 2247 --wui-ease-in-power-1: cubic-bezier(0.3, 0, 1, 1); 2248 2249 --wui-ease-inout-power-1: cubic-bezier(0.45, 0, 0.55, 1); 2250 2251 --wui-duration-lg: 200ms; 2252 --wui-duration-md: 125ms; 2253 --wui-duration-sm: 75ms; 2254 2255 --wui-path-network-sm: path( 2256 'M15.4 2.1a5.21 5.21 0 0 1 5.2 0l11.61 6.7a5.21 5.21 0 0 1 2.61 4.52v13.4c0 1.87-1 3.59-2.6 4.52l-11.61 6.7c-1.62.93-3.6.93-5.22 0l-11.6-6.7a5.21 5.21 0 0 1-2.61-4.51v-13.4c0-1.87 1-3.6 2.6-4.52L15.4 2.1Z' 2257 ); 2258 2259 --wui-path-network-md: path( 2260 'M43.4605 10.7248L28.0485 1.61089C25.5438 0.129705 22.4562 0.129705 19.9515 1.61088L4.53951 10.7248C2.03626 12.2051 0.5 14.9365 0.5 17.886V36.1139C0.5 39.0635 2.03626 41.7949 4.53951 43.2752L19.9515 52.3891C22.4562 53.8703 25.5438 53.8703 28.0485 52.3891L43.4605 43.2752C45.9637 41.7949 47.5 39.0635 47.5 36.114V17.8861C47.5 14.9365 45.9637 12.2051 43.4605 10.7248Z' 2261 ); 2262 2263 --wui-path-network-lg: path( 2264 'M78.3244 18.926L50.1808 2.45078C45.7376 -0.150261 40.2624 -0.150262 35.8192 2.45078L7.6756 18.926C3.23322 21.5266 0.5 26.3301 0.5 31.5248V64.4752C0.5 69.6699 3.23322 74.4734 7.6756 77.074L35.8192 93.5492C40.2624 96.1503 45.7376 96.1503 50.1808 93.5492L78.3244 77.074C82.7668 74.4734 85.5 69.6699 85.5 64.4752V31.5248C85.5 26.3301 82.7668 21.5266 78.3244 18.926Z' 2265 ); 2266 2267 --wui-width-network-sm: 36px; 2268 --wui-width-network-md: 48px; 2269 --wui-width-network-lg: 86px; 2270 2271 --wui-height-network-sm: 40px; 2272 --wui-height-network-md: 54px; 2273 --wui-height-network-lg: 96px; 2274 2275 --wui-icon-size-network-xs: 12px; 2276 --wui-icon-size-network-sm: 16px; 2277 --wui-icon-size-network-md: 24px; 2278 --wui-icon-size-network-lg: 42px; 2279 2280 --wui-color-inherit: inherit; 2281 2282 --wui-color-inverse-100: #fff; 2283 --wui-color-inverse-000: #000; 2284 2285 --wui-cover: rgba(20, 20, 20, 0.8); 2286 2287 --wui-color-modal-bg: var(--wui-color-modal-bg-base); 2288 2289 --wui-color-accent-100: var(--wui-color-accent-base-100); 2290 --wui-color-accent-090: var(--wui-color-accent-base-090); 2291 --wui-color-accent-080: var(--wui-color-accent-base-080); 2292 2293 --wui-color-success-100: var(--wui-color-success-base-100); 2294 --wui-color-success-125: var(--wui-color-success-base-125); 2295 2296 --wui-color-warning-100: var(--wui-color-warning-base-100); 2297 2298 --wui-color-error-100: var(--wui-color-error-base-100); 2299 --wui-color-error-125: var(--wui-color-error-base-125); 2300 2301 --wui-color-blue-100: var(--wui-color-blue-base-100); 2302 --wui-color-blue-90: var(--wui-color-blue-base-90); 2303 2304 --wui-icon-box-bg-error-100: var(--wui-icon-box-bg-error-base-100); 2305 --wui-icon-box-bg-blue-100: var(--wui-icon-box-bg-blue-base-100); 2306 --wui-icon-box-bg-success-100: var(--wui-icon-box-bg-success-base-100); 2307 --wui-icon-box-bg-inverse-100: var(--wui-icon-box-bg-inverse-base-100); 2308 2309 --wui-all-wallets-bg-100: var(--wui-all-wallets-bg-100); 2310 2311 --wui-avatar-border: var(--wui-avatar-border-base); 2312 2313 --wui-thumbnail-border: var(--wui-thumbnail-border-base); 2314 2315 --wui-wallet-button-bg: var(--wui-wallet-button-bg-base); 2316 2317 --wui-box-shadow-blue: var(--wui-color-accent-glass-020); 2318 } 2319 2320 @supports (background: color-mix(in srgb, white 50%, black)) { 2321 :root { 2322 --wui-color-modal-bg: color-mix( 2323 in srgb, 2324 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2325 var(--wui-color-modal-bg-base) 2326 ); 2327 2328 --wui-box-shadow-blue: color-mix(in srgb, var(--wui-color-accent-100) 20%, transparent); 2329 2330 --wui-color-accent-100: color-mix( 2331 in srgb, 2332 var(--wui-color-accent-base-100) 100%, 2333 transparent 2334 ); 2335 --wui-color-accent-090: color-mix( 2336 in srgb, 2337 var(--wui-color-accent-base-100) 90%, 2338 transparent 2339 ); 2340 --wui-color-accent-080: color-mix( 2341 in srgb, 2342 var(--wui-color-accent-base-100) 80%, 2343 transparent 2344 ); 2345 --wui-color-accent-glass-090: color-mix( 2346 in srgb, 2347 var(--wui-color-accent-base-100) 90%, 2348 transparent 2349 ); 2350 --wui-color-accent-glass-080: color-mix( 2351 in srgb, 2352 var(--wui-color-accent-base-100) 80%, 2353 transparent 2354 ); 2355 --wui-color-accent-glass-020: color-mix( 2356 in srgb, 2357 var(--wui-color-accent-base-100) 20%, 2358 transparent 2359 ); 2360 --wui-color-accent-glass-015: color-mix( 2361 in srgb, 2362 var(--wui-color-accent-base-100) 15%, 2363 transparent 2364 ); 2365 --wui-color-accent-glass-010: color-mix( 2366 in srgb, 2367 var(--wui-color-accent-base-100) 10%, 2368 transparent 2369 ); 2370 --wui-color-accent-glass-005: color-mix( 2371 in srgb, 2372 var(--wui-color-accent-base-100) 5%, 2373 transparent 2374 ); 2375 --wui-color-accent-002: color-mix( 2376 in srgb, 2377 var(--wui-color-accent-base-100) 2%, 2378 transparent 2379 ); 2380 2381 --wui-color-fg-100: color-mix( 2382 in srgb, 2383 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2384 var(--wui-color-fg-100) 2385 ); 2386 --wui-color-fg-125: color-mix( 2387 in srgb, 2388 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2389 var(--wui-color-fg-125) 2390 ); 2391 --wui-color-fg-150: color-mix( 2392 in srgb, 2393 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2394 var(--wui-color-fg-150) 2395 ); 2396 --wui-color-fg-175: color-mix( 2397 in srgb, 2398 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2399 var(--wui-color-fg-175) 2400 ); 2401 --wui-color-fg-200: color-mix( 2402 in srgb, 2403 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2404 var(--wui-color-fg-200) 2405 ); 2406 --wui-color-fg-225: color-mix( 2407 in srgb, 2408 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2409 var(--wui-color-fg-225) 2410 ); 2411 --wui-color-fg-250: color-mix( 2412 in srgb, 2413 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2414 var(--wui-color-fg-250) 2415 ); 2416 --wui-color-fg-275: color-mix( 2417 in srgb, 2418 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2419 var(--wui-color-fg-275) 2420 ); 2421 --wui-color-fg-300: color-mix( 2422 in srgb, 2423 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2424 var(--wui-color-fg-300) 2425 ); 2426 --wui-color-fg-325: color-mix( 2427 in srgb, 2428 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2429 var(--wui-color-fg-325) 2430 ); 2431 --wui-color-fg-350: color-mix( 2432 in srgb, 2433 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2434 var(--wui-color-fg-350) 2435 ); 2436 2437 --wui-color-bg-100: color-mix( 2438 in srgb, 2439 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2440 var(--wui-color-bg-100) 2441 ); 2442 --wui-color-bg-125: color-mix( 2443 in srgb, 2444 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2445 var(--wui-color-bg-125) 2446 ); 2447 --wui-color-bg-150: color-mix( 2448 in srgb, 2449 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2450 var(--wui-color-bg-150) 2451 ); 2452 --wui-color-bg-175: color-mix( 2453 in srgb, 2454 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2455 var(--wui-color-bg-175) 2456 ); 2457 --wui-color-bg-200: color-mix( 2458 in srgb, 2459 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2460 var(--wui-color-bg-200) 2461 ); 2462 --wui-color-bg-225: color-mix( 2463 in srgb, 2464 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2465 var(--wui-color-bg-225) 2466 ); 2467 --wui-color-bg-250: color-mix( 2468 in srgb, 2469 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2470 var(--wui-color-bg-250) 2471 ); 2472 --wui-color-bg-275: color-mix( 2473 in srgb, 2474 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2475 var(--wui-color-bg-275) 2476 ); 2477 --wui-color-bg-300: color-mix( 2478 in srgb, 2479 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2480 var(--wui-color-bg-300) 2481 ); 2482 --wui-color-bg-325: color-mix( 2483 in srgb, 2484 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2485 var(--wui-color-bg-325) 2486 ); 2487 --wui-color-bg-350: color-mix( 2488 in srgb, 2489 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2490 var(--wui-color-bg-350) 2491 ); 2492 2493 --wui-color-success-100: color-mix( 2494 in srgb, 2495 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2496 var(--wui-color-success-base-100) 2497 ); 2498 --wui-color-success-125: color-mix( 2499 in srgb, 2500 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2501 var(--wui-color-success-base-125) 2502 ); 2503 2504 --wui-color-warning-100: color-mix( 2505 in srgb, 2506 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2507 var(--wui-color-warning-base-100) 2508 ); 2509 2510 --wui-color-error-100: color-mix( 2511 in srgb, 2512 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2513 var(--wui-color-error-base-100) 2514 ); 2515 --wui-color-blue-100: color-mix( 2516 in srgb, 2517 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2518 var(--wui-color-blue-base-100) 2519 ); 2520 --wui-color-blue-90: color-mix( 2521 in srgb, 2522 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2523 var(--wui-color-blue-base-90) 2524 ); 2525 --wui-color-error-125: color-mix( 2526 in srgb, 2527 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2528 var(--wui-color-error-base-125) 2529 ); 2530 2531 --wui-icon-box-bg-error-100: color-mix( 2532 in srgb, 2533 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2534 var(--wui-icon-box-bg-error-base-100) 2535 ); 2536 --wui-icon-box-bg-accent-100: color-mix( 2537 in srgb, 2538 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2539 var(--wui-icon-box-bg-blue-base-100) 2540 ); 2541 --wui-icon-box-bg-success-100: color-mix( 2542 in srgb, 2543 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2544 var(--wui-icon-box-bg-success-base-100) 2545 ); 2546 --wui-icon-box-bg-inverse-100: color-mix( 2547 in srgb, 2548 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2549 var(--wui-icon-box-bg-inverse-base-100) 2550 ); 2551 2552 --wui-all-wallets-bg-100: color-mix( 2553 in srgb, 2554 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2555 var(--wui-all-wallets-bg-100) 2556 ); 2557 2558 --wui-avatar-border: color-mix( 2559 in srgb, 2560 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2561 var(--wui-avatar-border-base) 2562 ); 2563 2564 --wui-thumbnail-border: color-mix( 2565 in srgb, 2566 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2567 var(--wui-thumbnail-border-base) 2568 ); 2569 2570 --wui-wallet-button-bg: color-mix( 2571 in srgb, 2572 var(--w3m-color-mix) var(--w3m-color-mix-strength), 2573 var(--wui-wallet-button-bg-base) 2574 ); 2575 } 2576 } 2577 `,
2577light:Dp` 2578 :root { 2579 --w3m-color-mix: ${ca((t==null?void 0:t["--w3m-color-mix"])||"#fff")}; 2580 --w3m-accent: ${ca(tu(t,"dark")["--w3m-accent"])}; 2581 --w3m-default: #fff; 2582 2583 --wui-color-modal-bg-base: ${ca(tu(t,"dark")["--w3m-background"])}; 2584 --wui-color-accent-base-100: var(--w3m-accent); 2585 2586 --wui-color-blueberry-100: hsla(230, 100%, 67%, 1); 2587 --wui-color-blueberry-090: hsla(231, 76%, 61%, 1); 2588 --wui-color-blueberry-080: hsla(230, 59%, 55%, 1); 2589 --wui-color-blueberry-050: hsla(231, 100%, 70%, 0.1); 2590 2591 --wui-color-fg-100: #e4e7e7; 2592 --wui-color-fg-125: #d0d5d5; 2593 --wui-color-fg-150: #a8b1b1; 2594 --wui-color-fg-175: #a8b0b0; 2595 --wui-color-fg-200: #949e9e; 2596 --wui-color-fg-225: #868f8f; 2597 --wui-color-fg-250: #788080; 2598 --wui-color-fg-275: #788181; 2599 --wui-color-fg-300: #6e7777; 2600 --wui-color-fg-325: #9a9a9a; 2601 --wui-color-fg-350: #363636; 2602 2603 --wui-color-bg-100: #141414; 2604 --wui-color-bg-125: #191a1a; 2605 --wui-color-bg-150: #1e1f1f; 2606 --wui-color-bg-175: #222525; 2607 --wui-color-bg-200: #272a2a; 2608 --wui-color-bg-225: #2c3030; 2609 --wui-color-bg-250: #313535; 2610 --wui-color-bg-275: #363b3b; 2611 --wui-color-bg-300: #3b4040; 2612 --wui-color-bg-325: #252525; 2613 --wui-color-bg-350: #ffffff; 2614 2615 --wui-color-success-base-100: #26d962; 2616 --wui-color-success-base-125: #30a46b; 2617 2618 --wui-color-warning-base-100: #f3a13f; 2619 2620 --wui-color-error-base-100: #f25a67; 2621 --wui-color-error-base-125: #df4a34; 2622 2623 --wui-color-blue-base-100: rgba(102, 125, 255, 1); 2624 --wui-color-blue-base-90: rgba(102, 125, 255, 0.9); 2625 2626 --wui-color-success-glass-001: rgba(38, 217, 98, 0.01); 2627 --wui-color-success-glass-002: rgba(38, 217, 98, 0.02); 2628 --wui-color-success-glass-005: rgba(38, 217, 98, 0.05); 2629 --wui-color-success-glass-010: rgba(38, 217, 98, 0.1); 2630 --wui-color-success-glass-015: rgba(38, 217, 98, 0.15); 2631 --wui-color-success-glass-020: rgba(38, 217, 98, 0.2); 2632 --wui-color-success-glass-025: rgba(38, 217, 98, 0.25); 2633 --wui-color-success-glass-030: rgba(38, 217, 98, 0.3); 2634 --wui-color-success-glass-060: rgba(38, 217, 98, 0.6); 2635 --wui-color-success-glass-080: rgba(38, 217, 98, 0.8); 2636 2637 --wui-color-success-glass-reown-020: rgba(48, 164, 107, 0.2); 2638 2639 --wui-color-warning-glass-reown-020: rgba(243, 161, 63, 0.2); 2640 2641 --wui-color-error-glass-001: rgba(242, 90, 103, 0.01); 2642 --wui-color-error-glass-002: rgba(242, 90, 103, 0.02); 2643 --wui-color-error-glass-005: rgba(242, 90, 103, 0.05); 2644 --wui-color-error-glass-010: rgba(242, 90, 103, 0.1); 2645 --wui-color-error-glass-015: rgba(242, 90, 103, 0.15); 2646 --wui-color-error-glass-020: rgba(242, 90, 103, 0.2); 2647 --wui-color-error-glass-025: rgba(242, 90, 103, 0.25); 2648 --wui-color-error-glass-030: rgba(242, 90, 103, 0.3); 2649 --wui-color-error-glass-060: rgba(242, 90, 103, 0.6); 2650 --wui-color-error-glass-080: rgba(242, 90, 103, 0.8); 2651 2652 --wui-color-error-glass-reown-020: rgba(223, 74, 52, 0.2); 2653 2654 --wui-color-gray-glass-001: rgba(255, 255, 255, 0.01); 2655 --wui-color-gray-glass-002: rgba(255, 255, 255, 0.02); 2656 --wui-color-gray-glass-005: rgba(255, 255, 255, 0.05); 2657 --wui-color-gray-glass-010: rgba(255, 255, 255, 0.1); 2658 --wui-color-gray-glass-015: rgba(255, 255, 255, 0.15); 2659 --wui-color-gray-glass-020: rgba(255, 255, 255, 0.2); 2660 --wui-color-gray-glass-025: rgba(255, 255, 255, 0.25); 2661 --wui-color-gray-glass-030: rgba(255, 255, 255, 0.3); 2662 --wui-color-gray-glass-060: rgba(255, 255, 255, 0.6); 2663 --wui-color-gray-glass-080: rgba(255, 255, 255, 0.8); 2664 --wui-color-gray-glass-090: rgba(255, 255, 255, 0.9); 2665 2666 --wui-color-dark-glass-100: rgba(42, 42, 42, 1); 2667 2668 --wui-icon-box-bg-error-base-100: #3c2426; 2669 --wui-icon-box-bg-blue-base-100: #20303f; 2670 --wui-icon-box-bg-success-base-100: #1f3a28; 2671 --wui-icon-box-bg-inverse-base-100: #243240; 2672 2673 --wui-all-wallets-bg-100: #222b35; 2674 2675 --wui-avatar-border-base: #252525; 2676
2677 --wui-thumbnail-border-base: #252525; 2678 2679 --wui-wallet-button-bg-base: var(--wui-color-bg-125); 2680 2681 --w3m-card-embedded-shadow-color: rgb(17 17 18 / 25%); 2682 } 2683 `,dark:Dp` 2684 :root { 2685 --w3m-color-mix: ${ca((t==null?void 0:t["--w3m-color-mix"])||"#000")}; 2686 --w3m-accent: ${ca(tu(t,"light")["--w3m-accent"])}; 2687 --w3m-default: #000; 2688 2689 --wui-color-modal-bg-base: ${ca(tu(t,"light")["--w3m-background"])}; 2690 --wui-color-accent-base-100: var(--w3m-accent); 2691 2692 --wui-color-blueberry-100: hsla(231, 100%, 70%, 1); 2693 --wui-color-blueberry-090: hsla(231, 97%, 72%, 1); 2694 --wui-color-blueberry-080: hsla(231, 92%, 74%, 1); 2695 2696 --wui-color-fg-100: #141414; 2697 --wui-color-fg-125: #2d3131; 2698 --wui-color-fg-150: #474d4d; 2699 --wui-color-fg-175: #636d6d; 2700 --wui-color-fg-200: #798686; 2701 --wui-color-fg-225: #828f8f; 2702 --wui-color-fg-250: #8b9797; 2703 --wui-color-fg-275: #95a0a0; 2704 --wui-color-fg-300: #9ea9a9; 2705 --wui-color-fg-325: #9a9a9a; 2706 --wui-color-fg-350: #d0d0d0; 2707 2708 --wui-color-bg-100: #ffffff; 2709 --wui-color-bg-125: #f5fafa; 2710 --wui-color-bg-150: #f3f8f8; 2711 --wui-color-bg-175: #eef4f4; 2712 --wui-color-bg-200: #eaf1f1; 2713 --wui-color-bg-225: #e5eded; 2714 --wui-color-bg-250: #e1e9e9; 2715 --wui-color-bg-275: #dce7e7; 2716 --wui-color-bg-300: #d8e3e3; 2717 --wui-color-bg-325: #f3f3f3; 2718 --wui-color-bg-350: #202020; 2719 2720 --wui-color-success-base-100: #26b562; 2721 --wui-color-success-base-125: #30a46b; 2722 2723 --wui-color-warning-base-100: #f3a13f; 2724 2725 --wui-color-error-base-100: #f05142; 2726 --wui-color-error-base-125: #df4a34; 2727 2728 --wui-color-blue-base-100: rgba(102, 125, 255, 1); 2729 --wui-color-blue-base-90: rgba(102, 125, 255, 0.9); 2730 2731 --wui-color-success-glass-001: rgba(38, 181, 98, 0.01); 2732 --wui-color-success-glass-002: rgba(38, 181, 98, 0.02); 2733 --wui-color-success-glass-005: rgba(38, 181, 98, 0.05); 2734 --wui-color-success-glass-010: rgba(38, 181, 98, 0.1); 2735 --wui-color-success-glass-015: rgba(38, 181, 98, 0.15); 2736 --wui-color-success-glass-020: rgba(38, 181, 98, 0.2); 2737 --wui-color-success-glass-025: rgba(38, 181, 98, 0.25); 2738 --wui-color-success-glass-030: rgba(38, 181, 98, 0.3); 2739 --wui-color-success-glass-060: rgba(38, 181, 98, 0.6); 2740 --wui-color-success-glass-080: rgba(38, 181, 98, 0.8); 2741 2742 --wui-color-success-glass-reown-020: rgba(48, 164, 107, 0.2); 2743 2744 --wui-color-warning-glass-reown-020: rgba(243, 161, 63, 0.2); 2745 2746 --wui-color-error-glass-001: rgba(240, 81, 66, 0.01); 2747 --wui-color-error-glass-002: rgba(240, 81, 66, 0.02); 2748 --wui-color-error-glass-005: rgba(240, 81, 66, 0.05); 2749 --wui-color-error-glass-010: rgba(240, 81, 66, 0.1); 2750 --wui-color-error-glass-015: rgba(240, 81, 66, 0.15); 2751 --wui-color-error-glass-020: rgba(240, 81, 66, 0.2); 2752 --wui-color-error-glass-025: rgba(240, 81, 66, 0.25); 2753 --wui-color-error-glass-030: rgba(240, 81, 66, 0.3); 2754 --wui-color-error-glass-060: rgba(240, 81, 66, 0.6); 2755 --wui-color-error-glass-080: rgba(240, 81, 66, 0.8); 2756 2757 --wui-color-error-glass-reown-020: rgba(223, 74, 52, 0.2); 2758 2759 --wui-icon-box-bg-error-base-100: #f4dfdd; 2760 --wui-icon-box-bg-blue-base-100: #d9ecfb; 2761 --wui-icon-box-bg-success-base-100: #daf0e4; 2762 --wui-icon-box-bg-inverse-base-100: #dcecfc; 2763 2764 --wui-all-wallets-bg-100: #e8f1fa; 2765 2766 --wui-avatar-border-base: #f3f4f4; 2767 2768 --wui-thumbnail-border-base: #eaefef; 2769 2770 --wui-wallet-button-bg-base: var(--wui-color-bg-125); 2771 2772 --wui-color-gray-glass-001: rgba(0, 0, 0, 0.01); 2773 --wui-color-gray-glass-002: rgba(0, 0, 0, 0.02); 2774 --wui-color-gray-glass-005: rgba(0, 0, 0, 0.05); 2775 --wui-color-gray-glass-010: rgba(0, 0, 0, 0.1); 2776 --wui-color-gray-glass-015: rgba(0, 0, 0, 0.15); 2777 --wui-color-gray-glass-020: rgba(0, 0, 0, 0.2); 2778 --wui-color-gray-glass-025: rgba(0, 0, 0, 0.25); 2779 --wui-color-gray-glass-030: rgba(0, 0, 0, 0.3); 2780 --wui-color-gray-glass-060: rgba(0, 0, 0, 0.6); 2781 --wui-color-gray-glass-080: rgba(0, 0, 0, 0.8); 2782 --wui-color-gray-glass-090: rgba(0, 0, 0, 0.9); 2783 2784 --wui-color-dark-glass-100: rgba(233, 233, 233, 1); 2785 2786 --w3m-card-embedded-shadow-color: rgb(224 225 233 / 25%); 2787 } 2788 `}}const aBe=Dp` 2789 *, 2790 *::after, 2791 *::before, 2792 :host { 2793 margin: 0; 2794 padding: 0; 2795 box-sizing: border-box; 2796 font-style: normal; 2797 text-rendering: optimizeSpeed; 2798 -webkit-font-smoothing: antialiased; 2799 -moz-osx-font-smoothing: grayscale; 2800 -webkit-tap-highlight-color: transparent; 2801 font-family: var(--wui-font-family); 2802 backface-visibility: hidden; 2803 } 2804`,cBe=Dp` 2805 button, 2806 a { 2807 cursor: pointer; 2808 display: flex; 2809 justify-content: center;
2810 align-items: center; 2811 position: relative; 2812 transition: 2813 color var(--wui-duration-lg) var(--wui-ease-out-power-1), 2814 background-color var(--wui-duration-lg) var(--wui-ease-out-power-1), 2815 border var(--wui-duration-lg) var(--wui-ease-out-power-1), 2816 border-radius var(--wui-duration-lg) var(--wui-ease-out-power-1), 2817 box-shadow var(--wui-duration-lg) var(--wui-ease-out-power-1); 2818 will-change: background-color, color, border, box-shadow, border-radius; 2819 outline: none; 2820 border: none; 2821 column-gap: var(--wui-spacing-3xs); 2822 background-color: transparent; 2823 text-decoration: none; 2824 } 2825 2826 wui-flex { 2827 transition: border-radius var(--wui-duration-lg) var(--wui-ease-out-power-1); 2828 will-change: border-radius; 2829 } 2830 2831 button:disabled > wui-wallet-image, 2832 button:disabled > wui-all-wallets-image, 2833 button:disabled > wui-network-image, 2834 button:disabled > wui-image, 2835 button:disabled > wui-transaction-visual, 2836 button:disabled > wui-logo { 2837 filter: grayscale(1); 2838 } 2839 2840 @media (hover: hover) and (pointer: fine) { 2841 button:hover:enabled { 2842 background-color: var(--wui-color-gray-glass-005); 2843 } 2844 2845 button:active:enabled { 2846 background-color: var(--wui-color-gray-glass-010); 2847 } 2848 } 2849 2850 button:disabled > wui-icon-box { 2851 opacity: 0.5; 2852 } 2853 2854 input { 2855 border: none; 2856 outline: none; 2857 appearance: none; 2858 } 2859`,lBe=Dp` 2860 .wui-color-inherit { 2861 color: var(--wui-color-inherit); 2862 } 2863 2864 .wui-color-accent-100 { 2865 color: var(--wui-color-accent-100); 2866 } 2867 2868 .wui-color-error-100 { 2869 color: var(--wui-color-error-100); 2870 } 2871 2872 .wui-color-blue-100 { 2873 color: var(--wui-color-blue-100); 2874 } 2875 2876 .wui-color-blue-90 { 2877 color: var(--wui-color-blue-90); 2878 } 2879 2880 .wui-color-error-125 { 2881 color: var(--wui-color-error-125); 2882 } 2883 2884 .wui-color-success-100 { 2885 color: var(--wui-color-success-100); 2886 } 2887 2888 .wui-color-success-125 { 2889 color: var(--wui-color-success-125); 2890 } 2891 2892 .wui-color-inverse-100 { 2893 color: var(--wui-color-inverse-100); 2894 } 2895 2896 .wui-color-inverse-000 { 2897 color: var(--wui-color-inverse-000); 2898 } 2899 2900 .wui-color-fg-100 { 2901 color: var(--wui-color-fg-100); 2902 } 2903 2904 .wui-color-fg-200 { 2905 color: var(--wui-color-fg-200); 2906 } 2907 2908 .wui-color-fg-300 { 2909 color: var(--wui-color-fg-300); 2910 } 2911 2912 .wui-color-fg-325 { 2913 color: var(--wui-color-fg-325); 2914 } 2915 2916 .wui-color-fg-350 { 2917 color: var(--wui-color-fg-350); 2918 } 2919 2920 .wui-bg-color-inherit { 2921 background-color: var(--wui-color-inherit); 2922 } 2923 2924 .wui-bg-color-blue-100 { 2925 background-color: var(--wui-color-accent-100); 2926 } 2927 2928 .wui-bg-color-error-100 { 2929 background-color: var(--wui-color-error-100); 2930 } 2931 2932 .wui-bg-color-error-125 { 2933 background-color: var(--wui-color-error-125); 2934 } 2935 2936 .wui-bg-color-success-100 { 2937 background-color: var(--wui-color-success-100); 2938 } 2939 2940 .wui-bg-color-success-125 { 2941 background-color: var(--wui-color-success-100); 2942 } 2943 2944 .wui-bg-color-inverse-100 { 2945 background-color: var(--wui-color-inverse-100); 2946 } 2947 2948 .wui-bg-color-inverse-000 { 2949 background-color: var(--wui-color-inverse-000); 2950 } 2951 2952 .wui-bg-color-fg-100 { 2953 background-color: var(--wui-color-fg-100); 2954 } 2955 2956 .wui-bg-color-fg-200 { 2957 background-color: var(--wui-color-fg-200); 2958 } 2959 2960 .wui-bg-color-fg-300 { 2961 background-color: var(--wui-color-fg-300); 2962 } 2963 2964 .wui-color-fg-325 { 2965 background-color: var(--wui-color-fg-325); 2966 } 2967 2968 .wui-color-fg-350 { 2969 background-color: var(--wui-color-fg-350); 2970 } 2971`,Mp={hexStringToNumber(t){const e=t.startsWith("0x")?t.slice(2):t;return parseInt(e,16)},numberToHexString(t){return`0x${t.toString(16)}`},async getUserInfo(t){const[e,r]=await Promise.all([Mp.getAddresses(t),Mp.getChainId(t)]);return{chainId:r,addresses:e}},async getChainId(t){const e=await t.request({method:"eth_chainId"});return Number(e)},async getAddress(t){const[e]=await t.request({method:"eth_accounts"});return e},async getAddresses(t){return await t.request({method:"eth_accounts"})},async addEthereumChain(t,e){var n,i;const r=((n=e.rpcUrls.chainDefault)==null?void 0:n.http)||[];await t.request({method:"wallet_addEthereumChain",params:[{chainId:Mp.numberToHexString(e.id),rpcUrls:[...r],chainName:e.n
2971ame,nativeCurrency:{name:e.nativeCurrency.name,decimals:e.nativeCurrency.decimals,symbol:e.nativeCurrency.symbol},blockExplorerUrls:[(i=e.blockExplorers)==null?void 0:i.default.url],iconUrls:[Vc.NetworkImageIds[e.id]]}]})}},U0={ACCOUNT_INDEXES:{PAYMENT:0,ORDINAL:1}},FTe=gS({id:42161,name:"Arbitrum One",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://arbiscan.io",apiUrl:"https://api.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7654707}}}),aV=gS({id:56,name:"BNB Smart Chain",nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://56.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"BscScan",url:"https://bscscan.com",apiUrl:"https://api.bscscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15921452}}}),jTe=gS({id:97,name:"BNB Smart Chain Testnet",nativeCurrency:{decimals:18,name:"BNB",symbol:"tBNB"},rpcUrls:{default:{http:["https://data-seed-prebsc-1-s1.bnbchain.org:8545"]}},blockExplorers:{default:{name:"BscScan",url:"https://testnet.bscscan.com",apiUrl:"https://api-testnet.bscscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:17422483}},testnet:!0});function bb(t){return{formatters:void 0,fees:void 0,serializers:void 0,...t}}const ND=bb({id:"5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",name:"Solana",network:"solana-mainnet",nativeCurrency:{name:"Solana",symbol:"SOL",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Solscan",url:"https://solscan.io"}},testnet:!1,chainNamespace:"solana",caipNetworkId:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",deprecatedCaipNetworkId:"solana:4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZ"}),ID=bb({id:"EtWTRABZaYq6iMfeYKouRu166VU2xqa1",name:"Solana Devnet",network:"solana-devnet",nativeCurrency:{name:"Solana",symbol:"SOL",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Solscan",url:"https://solscan.io"}},testnet:!0,chainNamespace:"solana",caipNetworkId:"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",deprecatedCaipNetworkId:"solana:8E9rvCKLFQia2Y35HXjjpWzj8weVo44K"});bb({id:"4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z",name:"Solana Testnet",network:"solana-testnet",nativeCurrency:{name:"Solana",symbol:"SOL",decimals:9},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},blockExplorers:{default:{name:"Solscan",url:"https://solscan.io"}},testnet:!0,chainNamespace:"solana",caipNetworkId:"solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z"});bb({id:"000000000019d6689c085ae165831e93",caipNetworkId:"bip122:000000000019d6689c085ae165831e93",chainNamespace:"bip122",name:"Bitcoin",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:8},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}}});bb({id:"000000000933ea01ad0ee984209779ba",caipNetworkId:"bip122:000000000933ea01ad0ee984209779ba",chainNamespace:"bip122",name:"Bitcoin Testnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:8},rpcUrls:{default:{http:["https://rpc.walletconnect.org/v1"]}},testnet:!0});const zTe={solana:["solana_signMessage","solana_signTransaction","solana_requestAccounts","solana_getAccounts","solana_signAllTransactions","solana_signAndSendTransaction"],eip155:["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode","wallet_getCallsStatus","wallet_showCallsStatus","wallet_sendCalls","wallet_getCapabilities","wallet_grantPermissions","wallet_revokePermissions","wallet_getAssets"],bip122:["sendTransfer","signMessage","signPsbt","getAccountAddresses"]},al={getMethodsByChainNamespace(t){return zTe[t]||[]},createDefaultNamespace(t){return{methods:this.getMethodsByChainNamespace(t),events:["accountsChanged","chainChanged"],chains:[],rpcMap:{}}},applyNamespaceOverrides(t,e){if(!e)return{...t};const r={...t},n=new Set;
2971if(e.methods&&Object.keys(e.methods).forEach(i=>n.add(i)),e.chains&&Object.keys(e.chains).forEach(i=>n.add(i)),e.events&&Object.keys(e.events).forEach(i=>n.add(i)),e.rpcMap&&Object.keys(e.rpcMap).forEach(i=>{const[s]=i.split(":");s&&n.add(s)}),n.forEach(i=>{r[i]||(r[i]=this.createDefaultNamespace(i))}),e.methods&&Object.entries(e.methods).forEach(([i,s])=>{r[i]&&(r[i].methods=s)}),e.chains&&Object.entries(e.chains).forEach(([i,s])=>{r[i]&&(r[i].chains=s)}),e.events&&Object.entries(e.events).forEach(([i,s])=>{r[i]&&(r[i].events=s)}),e.rpcMap){const i=new Set;Object.entries(e.rpcMap).forEach(([s,o])=>{const[a,c]=s.split(":");!a||!c||!r[a]||(r[a].rpcMap||(r[a].rpcMap={}),i.has(a)||(r[a].rpcMap={},i.add(a)),r[a].rpcMap[c]=o)})}return r},createNamespaces(t,e){const r=t.reduce((n,i)=>{const{id:s,chainNamespace:o,rpcUrls:a}=i,c=a.default.http[0];n[o]||(n[o]=this.createDefaultNamespace(o));const l=`${o}:${s}`,u=n[o];switch(u.chains.push(l),l){case ND.caipNetworkId:u.chains.push(ND.deprecatedCaipNetworkId);break;case ID.caipNetworkId:u.chains.push(ID.deprecatedCaipNetworkId);break}return u!=null&&u.rpcMap&&c&&(u.rpcMap[s]=c),n},{});return this.applyNamespaceOverrides(r,e)},resolveReownName:async t=>{var n;const e=await Im.resolveName(t);return((n=(Object.values(e==null?void 0:e.addresses)||[])[0])==null?void 0:n.address)||!1},getChainsFromNamespaces(t={}){return Object.values(t).flatMap(e=>{const r=e.chains||[],n=e.accounts.map(i=>{const[s,o]=i.split(":");return`${s}:${o}`});return Array.from(new Set([...r,...n]))})},isSessionEventData(t){return typeof t=="object"&&t!==null&&"id"in t&&"topic"in t&&"params"in t&&typeof t.params=="object"&&t.params!==null&&"chainId"in t.params&&"event"in t.params&&typeof t.params.event=="object"&&t.params.event!==null},isOriginAllowed(t,e,r){for(const n of[...e,...r])if(n.includes("*")){const s=`^${n.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&").replace(/\\\*/gu,".*")}$`;if(new RegExp(s,"u").test(t))return!0}else try{if(new URL(n).origin===t)return!0}catch{if(n===t)return!0}return!1},listenWcProvider({universalProvider:t,namespace:e,onConnect:r,onDisconnect:n,onAccountsChanged:i,onChainChanged:s,onDisplayUri:o}){r&&t.on("connect",()=>{const a=al.getWalletConnectAccounts(t,e);r(a)}),n&&t.on("disconnect",()=>{n()}),i&&t.on("session_event",a=>{if(al.isSessionEventData(a)){const{name:c,data:l}=a.params.event;if(c==="accountsChanged"&&Array.isArray(l)){const u=l.filter(f=>it.isCaipAddress(f)).map(f=>Bs.parseCaipAddress(f)).filter(f=>f.chainNamespace===e);i(u)}}}),s&&t.on("chainChanged",a=>{s(a)}),o&&t.on("display_uri",a=>{o(a)})},getWalletConnectAccounts(t,e){var i,s,o,a;const r=new Set,n=(a=(o=(s=(i=t==null?void 0:t.session)==null?void 0:i.namespaces)==null?void 0:s[e])==null?void 0:o.accounts)==null?void 0:a.map(c=>Bs.parseCaipAddress(c)).filter(({address:c})=>r.has(c.toLowerCase())?!1:(r.add(c.toLowerCase()),!0));return n&&n.length>0?n:[]}};class WTe{constructor(e){this.namespace=e.namespace}async syncConnections(e){switch(this.namespace){case fe.CHAIN.EVM:await this.syncEVMConnections(e);break;case fe.CHAIN.SOLANA:await this.syncSolanaConnections(e);break;case fe.CHAIN.BITCOIN:await this.syncBitcoinConnections(e);break;default:throw new Error(`Unsupported chain namespace: ${this.namespace}`)}}async syncEVMConnections({connectors:e,caipNetworks:r,universalProvider:n,getConnectionStatusInfo:i,onConnection:s,onListenProvider:o}){await Promise.all(e.filter(a=>{const{hasDisconnected:c,hasConnected:l}=i(a.id);return!c&&l}).map(async a=>{if(a.id===fe.CONNECTOR_ID.WALLET_CONNECT){const c=al.getWalletConnectAccounts(n,this.namespace),l=r.find(u=>{var f,d;return u.chainNamespace===this.namespace&&u.id.toString()===((d=(f=c[0])==null?void 0:f.chainId)==null?void 0:d.toString())});c.length>0&&s({connectorId:a.id,accounts:c.map(u=>({address:u.address})),caipNetwork:l})}else{const{accounts:c,chainId:l}=await Av.fetchProviderData(a);if(c.length>0&&l){const u=r.find(f=>f.chainNamespace===this.namespace&&f.id.toString()===l.toString());s({connectorId:a.id,accounts:c.map(f=>({address:f})),caipNetwork:u}),a.provider&&a.id!==fe.CONNECTOR_ID.AUTH&&a.id!==fe.CONNECTOR_ID.WALLET_CONNECT&&o(a.id,a.provider)}}}))}async syncSolanaConnections({connectors:e,caipNetwork:r,universalProvider:n,getConnectionStatusInfo:i,onConnection:s,onListenProvi
2971der:o}){await Promise.all(e.filter(a=>{const{hasDisconnected:c,hasConnected:l}=i(a.id);return!c&&l}).map(async a=>{if(a.id===fe.CONNECTOR_ID.WALLET_CONNECT){const c=al.getWalletConnectAccounts(n,this.namespace);c.length>0&&s({connectorId:a.id,accounts:c.map(l=>({address:l.address})),caipNetwork:r})}else{const c=await a.connect({chainId:r==null?void 0:r.id});c&&(s({connectorId:a.id,accounts:[{address:c}],caipNetwork:r}),o(a.id,a.provider))}}))}async syncBitcoinConnections({connectors:e,caipNetwork:r,universalProvider:n,getConnectionStatusInfo:i,onConnection:s,onListenProvider:o}){await Promise.all(e.filter(a=>{const{hasDisconnected:c,hasConnected:l}=i(a.id);return!c&&l}).map(async a=>{var d,p,h,g,y,x;if(a.id===fe.CONNECTOR_ID.WALLET_CONNECT){const C=al.getWalletConnectAccounts(n,this.namespace);C.length>0&&s({connectorId:a.id,accounts:C.map(_=>({address:_.address})),caipNetwork:r});return}const c=await a.connect(),l=await a.getAccountAddresses();let u=l==null?void 0:l.map(C=>it.createAccount(fe.CHAIN.BITCOIN,C.address,C.purpose||"payment",C.publicKey,C.path));if(u&&u.length>1&&(u=[{namespace:fe.CHAIN.BITCOIN,publicKey:((d=u[U0.ACCOUNT_INDEXES.PAYMENT])==null?void 0:d.publicKey)??"",path:((p=u[U0.ACCOUNT_INDEXES.PAYMENT])==null?void 0:p.path)??"",address:((h=u[U0.ACCOUNT_INDEXES.PAYMENT])==null?void 0:h.address)??"",type:"payment"},{namespace:fe.CHAIN.BITCOIN,publicKey:((g=u[U0.ACCOUNT_INDEXES.ORDINAL])==null?void 0:g.publicKey)??"",path:((y=u[U0.ACCOUNT_INDEXES.ORDINAL])==null?void 0:y.path)??"",address:((x=u[U0.ACCOUNT_INDEXES.ORDINAL])==null?void 0:x.address)??"",type:"ordinal"}]),!(a.chains.find(C=>C.id===(r==null?void 0:r.id))||a.chains[0]))throw new Error("The connector does not support any of the requested chains");c&&(o(a.id,a.provider),s({connectorId:a.id,accounts:u.map(C=>({address:C.address,type:C.type})),caipNetwork:r}))}))}getConnection({address:e,connectorId:r,connections:n,connectors:i}){if(r){const o=n.find(l=>Ui.isLowerCaseMatch(l.connectorId,r));if(!o)return null;const a=i.find(l=>Ui.isLowerCaseMatch(l.id,o.connectorId)),c=e?o.accounts.find(l=>Ui.isLowerCaseMatch(l.address,e)):o.accounts[0];return{...o,account:c,connector:a}}const s=n.find(o=>o.accounts.length>0&&i.some(a=>Ui.isLowerCaseMatch(a.id,o.connectorId)));if(s){const[o]=s.accounts,a=i.find(c=>Ui.isLowerCaseMatch(c.id,s.connectorId));return{...s,account:o,connector:a}}return null}}const ru={ERROR_CODE_UNRECOGNIZED_CHAIN_ID:4902,ERROR_CODE_DEFAULT:5e3,ERROR_INVALID_CHAIN_ID:32603,DEFAULT_ALLOWED_ANCESTORS:["http://localhost:*","https://localhost:*","http://127.0.0.1:*","https://127.0.0.1:*","https://*.pages.dev","https://*.vercel.app","https://*.ngrok-free.app","https://secure-mobile.walletconnect.com","https://secure-mobile.walletconnect.org"]};class g7{constructor({provider:e,namespace:r}){this.id=fe.CONNECTOR_ID.WALLET_CONNECT,this.name=Vc.ConnectorNamesMap[fe.CONNECTOR_ID.WALLET_CONNECT],this.type="WALLET_CONNECT",this.imageId=Vc.ConnectorImageIds[fe.CONNECTOR_ID.WALLET_CONNECT],this.getCaipNetworks=X.getCaipNetworks.bind(X),this.caipNetworks=this.getCaipNetworks(),this.provider=e,this.chain=r}get chains(){return this.getCaipNetworks()}async connectWalletConnect(){if(!await this.authenticate()){const r=this.getCaipNetworks(),n=Ee.state.universalProviderConfigOverride,i=al.createNamespaces(r,n);await this.provider.connect({optionalNamespaces:i})}return{clientId:await this.provider.client.core.crypto.getClientId(),session:this.provider.session}}async disconnect(){await this.provider.disconnect()}async authenticate(){const e=this.chains.map(r=>r.caipNetworkId);return Fo.universalProviderAuthenticate({universalProvider:this.provider,chains:e,methods:HTe})}}const HTe=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode","wallet_getCallsStatus","wallet_sendCalls","wallet_getCapabilities","wallet_grantPermissions","wallet_revokePermissions","wallet_getAssets"],qTe=[fe.CONNECTOR_ID.AUTH,fe.CONNECTOR_ID.WALLET_CONNECT];class cV{constructor(e){this.availableConnectors=[],this.availableConnections=[],this.providerHandlers={},this.eventListeners=new Map,this.getCaipNetworks=r=>X.getCaipNetworks(r),this.getConnectorId=r=>Fe.getConnectorId(r),e&&this.construct(e),e!=null&&e.namespace&&(this.connectionManager=new WTe({namespace:e.namespace}))}construct(e){this.projectId=e.projectId,this.namespace=e.namespace,this.adapterType=e.adapterType}get connectors(){return this.availableConnectors}get connections(){return this.availableConnections}get networks(){return this.getCaipNetworks(this.namespace)}onAuthConnected({accounts:e,chainId:r}){const n=this.getCaipNetworks().filter(i=>i.chainNamespace===this.namespace).find(i=>i.id.toString()===(r==null?void 0:r.toString()));e&&n&&this.addConnection({connectorId:fe.CONNECTOR_ID.AUTH,accounts:e,caipNetwork:n})}setAuthProvider(e){e.onConnect(this.onAuthConnected.bind(this)),e.onSocialConnected(this.onAuthConnected.bind(this)),this.addConnector({id:fe.CONNECTOR_ID.AUTH,type:"AUTH",
2971name:fe.CONNECTOR_NAMES.AUTH,provider:e,imageId:Vc.ConnectorImageIds[fe.CONNECTOR_ID.AUTH],chain:this.namespace,chains:[]})}addConnector(...e){const r=new Set;this.availableConnectors=[...e,...this.availableConnectors].filter(n=>r.has(n.id)?!1:(r.add(n.id),!0)),this.emit("connectors",this.availableConnectors)}addConnection(...e){const r=new Set;this.availableConnections=[...e,...this.availableConnections].filter(n=>r.has(n.connectorId.toLowerCase())?!1:(r.add(n.connectorId.toLowerCase()),!0)),this.emit("connections",this.availableConnections)}deleteConnection(e){this.availableConnections=this.availableConnections.filter(r=>!Ui.isLowerCaseMatch(r.connectorId,e)),this.emit("connections",this.availableConnections)}clearConnections(e=!1){this.availableConnections=[],e&&this.emit("connections",this.availableConnections)}setStatus(e,r){ct.setStatus(e,r)}on(e,r){var n;this.eventListeners.has(e)||this.eventListeners.set(e,new Set),(n=this.eventListeners.get(e))==null||n.add(r)}off(e,r){const n=this.eventListeners.get(e);n&&n.delete(r)}removeAllEventListeners(){this.eventListeners.forEach(e=>{e.clear()})}emit(e,r){const n=this.eventListeners.get(e);n&&n.forEach(i=>i(r))}async connectWalletConnect(e){return{clientId:(await this.getWalletConnectConnector().connectWalletConnect()).clientId}}async switchNetwork(e){const{caipNetwork:r,providerType:n}=e;if(!e.provider)return;const i="provider"in e.provider?e.provider.provider:e.provider;if(n==="WALLET_CONNECT"){i.setDefaultChain(r.caipNetworkId);return}if(i&&n==="AUTH"){const s=i,o=Vo(r.chainNamespace);await s.switchNetwork({chainId:r.caipNetworkId});const a=await s.getUser({chainId:r.caipNetworkId,preferredAccountType:o});this.emit("switchNetwork",a)}}getWalletConnectConnector(){const e=this.connectors.find(r=>r instanceof g7);if(!e)throw new Error("WalletConnectConnector not found");return e}onConnect(e,r){if(e.length>0){const{address:n,chainId:i}=it.getAccount(e[0]),s=this.getCaipNetworks().filter(a=>a.chainNamespace===this.namespace).find(a=>a.id.toString()===(i==null?void 0:i.toString())),o=this.connectors.find(a=>a.id===r);n&&(this.emit("accountChanged",{address:n,chainId:i,connector:o}),this.addConnection({connectorId:r,accounts:e.map(a=>{const{address:c}=it.getAccount(a);return{address:c}}),caipNetwork:s}))}}onAccountsChanged(e,r,n=!0){var i,s;if(e.length>0){const{address:o}=it.getAccount(e[0]),a=(i=this.connectionManager)==null?void 0:i.getConnection({connectorId:r,connections:this.connections,connectors:this.connectors});o&&Ui.isLowerCaseMatch(this.getConnectorId(fe.CHAIN.EVM),r)&&this.emit("accountChanged",{address:o,chainId:(s=a==null?void 0:a.caipNetwork)==null?void 0:s.id,connector:a==null?void 0:a.connector}),this.addConnection({connectorId:r,accounts:e.map(c=>{const{address:l}=it.getAccount(c);return{address:l}}),caipNetwork:a==null?void 0:a.caipNetwork})}else n&&this.onDisconnect(r)}onDisconnect(e){this.removeProviderListeners(e),this.deleteConnection(e),Ui.isLowerCaseMatch(this.getConnectorId(fe.CHAIN.EVM),e)&&this.emitFirstAvailableConnection(),this.connections.length===0&&this.emit("disconnect")}onChainChanged(e,r){var o;const n=typeof e=="string"&&e.startsWith("0x")?Mp.hexStringToNumber(e).toString():e.toString(),i=(o=this.connectionManager)==null?void 0:o.getConnection({connectorId:r,connections:this.connections,connectors:this.connectors}),s=this.getCaipNetworks().filter(a=>a.chainNamespace===this.namespace).find(a=>a.id.toString()===n);i&&this.addConnection({connectorId:r,accounts:i.accounts,caipNetwork:s}),Ui.isLowerCaseMatch(this.getConnectorId(fe.CHAIN.EVM),r)&&this.emit("switchNetwork",{chainId:n})}listenProviderEvents(e,r){if(qTe.includes(e))return;const n=o=>this.onAccountsChanged(o,e),i=o=>this.onChainChanged(o,e),s=()=>this.onDisconnect(e);this.providerHandlers[e]||(r.on("disconnect",s),r.on("accountsChanged",n),r.on("chainChanged",i),this.providerHandlers[e]={provider:r,disconnect:s,accountsChanged:n,chainChanged:i})}removeProviderListeners(e){if(this.providerHandlers[e]){const{provider:r,disconnect:n,accountsChanged:i,chainChanged:s}=this.providerHandlers[e];r.removeListener("disconnect",n),r.removeListener("accountsChanged",i),r.removeListener("chainChanged",s),this.providerHandlers[e]=null}}emitFirstAvailableConnection(){var r,n;const e=(r=this.connectionManager)==null?void 0:r.getConnection({connections:this.connections,connectors:this.connectors});if(e){const[i]=e.accounts;
2971this.emit("accountChanged",{address:i==null?void 0:i.address,chainId:(n=e.caipNetwork)==null?void 0:n.id,connector:e.connector})}}}class VTe extends cV{async setUniversalProvider(e){if(!this.namespace)throw new Error("UniversalAdapter:setUniversalProvider - namespace is required");return this.addConnector(new g7({provider:e,caipNetworks:this.getCaipNetworks(),namespace:this.namespace})),Promise.resolve()}async connect(e){return Promise.resolve({id:"WALLET_CONNECT",type:"WALLET_CONNECT",chainId:Number(e.chainId),provider:this.provider,address:""})}async disconnect(){try{await this.getWalletConnectConnector().disconnect(),this.emit("disconnect")}catch(e){console.warn("UniversalAdapter:disconnect - error",e)}return{connections:[]}}syncConnections(){return Promise.resolve()}async getAccounts({namespace:e}){var i,s,o,a;const r=this.provider,n=((a=(o=(s=(i=r==null?void 0:r.session)==null?void 0:i.namespaces)==null?void 0:s[e])==null?void 0:o.accounts)==null?void 0:a.map(c=>{const[,,l]=c.split(":");return l}).filter((c,l,u)=>u.indexOf(c)===l))||[];return Promise.resolve({accounts:n.map(c=>it.createAccount(e,c,e==="bip122"?"payment":"eoa"))})}async syncConnectors(){return Promise.resolve()}async getBalance(e){var s,o,a,c,l;if(!(e.caipNetwork&&Zr.BALANCE_SUPPORTED_CHAINS.includes((s=e.caipNetwork)==null?void 0:s.chainNamespace))||(o=e.caipNetwork)!=null&&o.testnet)return{balance:"0.00",symbol:((a=e.caipNetwork)==null?void 0:a.nativeCurrency.symbol)||""};if(ct.state.balanceLoading&&e.chainId===((c=X.state.activeCaipNetwork)==null?void 0:c.id))return{balance:ct.state.balance||"0.00",symbol:ct.state.balanceSymbol||""};const i=(await ct.fetchTokenBalance()).find(u=>{var f,d;return u.chainId===`${(f=e.caipNetwork)==null?void 0:f.chainNamespace}:${e.chainId}`&&u.symbol===((d=e.caipNetwork)==null?void 0:d.nativeCurrency.symbol)});return{balance:(i==null?void 0:i.quantity.numeric)||"0.00",symbol:(i==null?void 0:i.symbol)||((l=e.caipNetwork)==null?void 0:l.nativeCurrency.symbol)||""}}async signMessage(e){var o,a,c;const{provider:r,message:n,address:i}=e;if(!r)throw new Error("UniversalAdapter:signMessage - provider is undefined");let s="";return((o=X.state.activeCaipNetwork)==null?void 0:o.chainNamespace)===fe.CHAIN.SOLANA?s=(await r.request({method:"solana_signMessage",params:{message:Fg.encode(new TextEncoder().encode(n)),pubkey:i}},(a=X.state.activeCaipNetwork)==null?void 0:a.caipNetworkId)).signature:s=await r.request({method:"personal_sign",params:[n,i]},(c=X.state.activeCaipNetwork)==null?void 0:c.caipNetworkId),{signature:s}}async estimateGas(){return Promise.resolve({gas:BigInt(0)})}async sendTransaction(){return Promise.resolve({hash:""})}walletGetAssets(e){return Promise.resolve({})}async writeContract(){return Promise.resolve({hash:""})}emitFirstAvailableConnection(){}parseUnits(){return 0n}formatUnits(){return"0"}async getCapabilities(){return Promise.resolve({})}async grantPermissions(){return Promise.resolve({})}async revokePermissions(){return Promise.resolve("0x")}async syncConnection(){return Promise.resolve({id:"WALLET_CONNECT",type:"WALLET_CONNECT",chainId:1,provider:this.provider,address:""})}async switchNetwork(e){var i,s,o,a,c,l;const{caipNetwork:r}=e,n=this.getWalletConnectConnector();if(r.chainNamespace===fe.CHAIN.EVM)try{await((i=n.provider)==null?void 0:i.request({method:"wallet_switchEthereumChain",params:[{chainId:jk(r.id)}]}))}catch(u){if(u.code===ru.ERROR_CODE_UNRECOGNIZED_CHAIN_ID||u.code===ru.ERROR_INVALID_CHAIN_ID||u.code===ru.ERROR_CODE_DEFAULT||((o=(s=u==null?void 0:u.data)==null?void 0:s.originalError)==null?void 0:o.code)===ru.ERROR_CODE_UNRECOGNIZED_CHAIN_ID)try{await((l=n.provider)==null?void 0:l.request({method:"wallet_addEthereumChain",params:[{chainId:jk(r.id),rpcUrls:[(a=r==null?void 0:r.rpcUrls.chainDefault)==null?void 0:a.http],chainName:r.name,nativeCurrency:r.nativeCurrency,blockExplorerUrls:[(c=r.blockExplorers)==null?void 0:c.default.url]}]}))}catch{throw new Error("Chain is not supported")}}n.provider.setDefaultChain(r.caipNetworkId)}getWalletConnectProvider(){const e=this.connectors.find(n=>n.type==="WALLET_CONNECT");return e==null?void 0:e.provider}}const KTe=["email","socials","swaps","onramp","activity","reownBranding","multiWallet"],Mw={email:{apiFeatureName:"social_login",localFeatureName:"email",returnType:!1,isLegacy:!1,isAvailableOnBasic:!1,processApi:t=>{if(!(t!=null&&t.config))return!1;const e=t.config;return!!t.isEnabled&&e.includes("email")},processFallback:t=>t===void 0?Zr.DEFAULT_REMOTE_FEATURES.email:!!t},socials:{apiFeatureName:"social_login",localFeatureName:"socials",returnType:!1,isLegacy:!1,isAvailableOnBasic:!1,processApi:t=>{if(!(t!=null&&t.config))return!1;const e=t.config;return t.isEnabled&&e.length>0?e.filter(r=>r!=="email"):!1},processFallback:t=>t===void 0?Zr.DEFAULT_REMOTE_FEATURES.socials:typeof t=="boolean"?t?Zr.DEFAULT_REMOTE_FEATURES.socials:!1:t},swaps:{apiFeatureName:"swap",localFeatureName:"swaps",returnType:!1,isLegacy:!1,isAvailableOnBasic:!1,processApi:t=>{if(!(t!=null&&t.config))return!1;const e=t.config;return t.isEnabled&&e.length>0?e:!1},processFallback:t=>t===void 0?Zr.DEFAULT_REMOTE_FEATURES.swaps:typeof t=="boolean"?t?Zr.DEFAULT_REMOTE_FEATURES.swaps:!1:t},onramp:{apiFeatureName:"onramp",localFeatureName:"onramp",returnType:!1,isLegacy:!1,isAvailableOnBasic:!1,processApi:t=>{if(!(t!=null&&t.config))return!1;const e=t.config;return t.isEnabled&&e.length>0?e:!1},processFallback:t=>t===void 0?Zr.DEFAULT_REMOTE_FEATURES.onramp:typeof t=="boolean"?t?Zr.DEFAULT_REMOTE_FEATURES.onramp:!1:t},activity:{apiFeatureName:"activity",localFeatureName:"history",returnType:!1,isLegacy:!0,isAvailableOnBasic:!1,processApi:t=>!!t.isEnabled,processFallback:t=>t===void 0?Zr.DEFAULT_REMOTE_FEATURES.activity:!!t},reownBranding:{apiFeatureName:"reown_branding",localFeatureName:"reownBranding",returnType:!1,isLegacy:!1,isAvailableOnBasic:!1,processApi:t=>!!t.isEnabled,processFallback:t=>t===void 0?Zr.DEFAULT_REMOTE_FEATURES.reownBranding:!!t},multiWallet:{apiFeatureName:"multi_wallet",localFeatureName:"multiWallet",returnType:!1,isLegacy:!1,isAvailableOnBasic:!1,processApi:t=>!!t.isEnabled,processFallback:()=>Zr.DEFAULT_REMOTE_FEATURES.multiWallet}},GTe={localSettingsOverridden:new Set,getApiConfig(t,e){return e==null?void 0:e.find(r=>r.id===t)},addWarning(t,e){if(t!==void 0){const r=Mw[e],n=r.isLegacy?`"features.${r.localFeatureName}" (now "${e}")`:`"features.${e}"`;this.localSettingsOverridden.add(n)}},processFeature(t,e,r,n,i){const s=Mw[t],o=e[s.localFeatureName];if(i&&!s.isAvailableOnBasic)return!1;if(n){const a=this.getApiConfig(s.apiFeatureName,r);return(a==null?void 0:a.config)===null?this.processFallbackFeature(t,o):a!=null&&a.config?(o!==void 0&&this.addWarning(o,t),this.processApiFeature(t,a)):!1}return this.processFallbackFeature(t,o)},processApiFeature(t,e){return Mw[t].processApi(e)},processFallbackFeature(t,e){return Mw[t].processFallback(e)},async fetchRemoteFeatures(t){const e=t.basic??!1,r=t.features||{};this.localSettingsOverridden.clear();let n=null,i=!1;try{n=await At.fetchProjectConfig(),i=n!=null}catch(o){console.warn("[Reown Config] Failed to fetch remote project configuration. Using local/default values.",o)}const s=i&&!e?Zr.DEFAULT_REMOTE_FEATURES:Zr.DEFAULT_REMOTE_FEATURES_DISABLED;try{for(const o of KTe){const a=this.processFeature(o,r,n,i,e);Object.assign(s,{[o]:a})}}catch(o){return console.warn("[Reown Config] Failed to process the configuration from Cloud. Using default values.",o),Zr.DEFAULT_REMOTE_FEATURES}if(i&&this.localSettingsOverridden.size>0){const o=`Your local configuration for ${Array.from(this.localSettingsOverridden).join(", ")} was ignored because a remote configuration was successfully fetched. Please manage these features via your project dashboard on dashboard.reown.com.`;Ci.open({shortMessage:"Local configuration ignored",longMessage:`[Reown Config Notice] ${o}`},"warning")}return s}};class YTe{constructor(e){this.chainNamespaces=[],this.remoteFeatures={},this.reportedAlertErrors={},this.getCaipNetwork=(r,n)=>{var i,s,o;if(r){const a=(i=X.getCaipNetworks(r))==null?void 0:i.find(u=>u.id===n);if(a)return a;const c=(s=X.getNetworkData(r))==null?void 0:s.caipNetwork;return c||((o=X.getRequestedCaipNetworks(r).filter(u=>u.chainNamespace===r))==null?void 0:o[0])}return X.state.activeCaipNetwork||this.defaultCaipNetwork},this.getCaipNetworkId=()=>{const r=this.getCaipNetwork();if(r)return r.id},this.getCaipNetworks=r=>X.getCaipNetworks(r),this.getActiveChainNamespace=()=>X.state.activeChain,this.setRequestedCaipNetworks=(r,n)=>{X.setRequestedCaipNetworks(r,n)},this.getApprovedCaipNetworkIds=()=>X.getAllApprovedCaipNetworkIds(),this.getCaipAddress=r=>X.state.activeChain===r||!r?X.state.activeCaipAddress:X.getAccountProp("caipAddress",r),this.setClientId=r=>{Tt.setClientId(r)},this.getProvider=r=>jr.getProvider(r),this.getProviderType=r=>jr.getProviderId(r),this.getPreferredAccountType=r=>Vo(r),this.setCaipAddress=(r,n)=>{ct.setCaipAddress(r,n)},this.setBalance=(r,n,i)=>{ct.setBalance(r,n,i)},this.setProfileName=(r,n)=>{ct.setProfileName(r,n)},this.setProfileImage=(r,n)=>{ct.setProfileImage(r,n)},this.setUser=(r,n)=>{ct.setUser(r,n)},this.resetAccount=r=>{ct.resetAccount(r)},this.setCaipNetwork=r=>{X.setActiveCaipNetwork(r)},this.setCaipNetworkOfNamespace=(r,n)=>{X.setChainNetworkData(n,{caipNetwork:r})},this.setStatus=(r,n)=>{ct.setStatus(r,n),Fe.isConnected()?Oe.setConnectionStatus("connected"):Oe.setConnectionStatus("disconnected")},this.getAddressByChainNamespace=r=>X.getAccountProp("address",r),this.setConnectors=r=>{const n=[...Fe.state.allConnectors,...r];Fe.setConnectors(n)},this.setConnections=(r,n)=>{Oe.setConnections(r,n),We.setConnections(r,n)},this.fetchIdentity=r=>Tt.fetchIdentity(r),this.getReownName=r=>Im.getNamesForAddress(r),this.getConnectors=()=>Fe.getConnectors(),this.getConnectorImage=r=>Uj.getConnectorImage(r),this.getConnections=r=>this.remoteFeatures.multiWallet?$3.getConnectionsData(r).connections:(Ci.open(fe.REMOTE_FEATURES_ALERTS.MULTI_WALLET_NOT_ENABLED.DEFAULT,"info"),[]),this.getRecentConnections=r=>this.remoteFeatures.multiWallet?$3.getConnectionsData(r).recentConnections:(Ci.open(fe.REMOTE_FEATURES_ALERTS.MULTI_WALLET_NOT_ENABLED.DEFAULT,"info"),[]),this.switchConnection=async r=>{if(!this.remoteFeatures.multiWallet){Ci.open(fe.REMOTE_FEATURES_ALERTS.MULTI_WALLET_NOT_ENABLED.DEFAULT,"info");return}await We.switchConnection(r)},this.deleteConnection=r=>{if(!this.remoteFeatures.multiWallet){Ci.open(fe.REMOTE_FEATURES_ALERTS.MULTI_WALLET_NOT_ENABLED.DEFAULT,"info");return}Oe.deleteAddressFromConnection(r),We.syncStorageConnections()},this.setConnectedWalletInfo=(r,n)=>{const i=jr.getProviderId(n),s=r?{...r,type:i}:void 0;ct.setConnectedWalletInfo(s,n)},this.getIsConnectedState=()=>!!X.state.activeCaipAddress,this.addAddressLabel=(r,n,i)=>{ct.addAddressLabel(r,n,i)},this.removeAddressLabel=(r,n)=>{ct.removeAddressLabel(r,n)},this.getAddress=r=>X.state.activeChain===r||!r?ct.state.address:X.getAccountProp("address",r),this.setApprovedCaipNetworksData=r=>X.setApprovedCaipNetworksData(r),this.resetNetwork=r=>{X.resetNetwork(r)},this.addConnector=r=>{Fe.addConnector(r)},this.resetWcConnection=()=>{We.resetWcConnection()},this.setAddressExplorerUrl=(r,n)=>{ct.setAddressExplorerUrl(r,n)},this.setSmartAccountDeployed=(r,n)=>{ct.setSmartAccountDeployed(r,n)},this.setPreferredAccountType=(r,n)=>{X.setAccountProp("preferredAccountType",r,n)},this.setEIP6963Enabled=r=>{Ee.setEIP6963Enabled(r)},this.handleUnsafeRPCRequest=()=>{if(this.isOpen()){if(this.isTransactionStackEmpty())return;this.redirect("ApproveTransaction")}else this.open({view:"ApproveTransaction"})},this.options=e,this.version=e.sdkVersion,this.caipNetworks=this.extendCaipNetworks(e),this.chainNamespaces=this.getChainNamespacesSet(e.adapters,this.caipNetworks),this.defaultCaipNetwork=this.extendDefaultCaipNetwork(e),this.chainAdapters=this.createAdapters(e.adapters),this.readyPromise=this.initialize(e)}getChainNamespacesSet(e,r){const n=e==null?void 0:e.map(s=>s.namespace).filter(s=>!!s);if(n!=null&&n.length)return[...new Set(n)];const i=r==null?void 0:r.map(s=>s.chainNamespace);return[...new Set(i)]}async initialize(e){var r,n,i;this.initializeProjectSettings(e),this.initControllers(e),await this.initChainAdapters(),this.sendInitializeEvent(e),Ee.state.enableReconnect?(await this.syncExistingConnection(),await this.syncAdapterConnections()):await this.unSyncExistingConnection(),this.remoteFeatures=await GTe.fetchRemoteFeatures(e),Ee.setRemoteFeatures(this.remoteFeatures),this.remoteFeatures.onramp&&GC.setOnrampProviders(this.remoteFeatures.onramp),((r=Ee.state.remoteFeatures)!=null&&r.email||Array.isArray((n=Ee.state.remoteFeatures)==null?void 0:n.socials)&&((i=Ee.state.remoteFeatures)==null?void 0:i.socials.length)>0)&&await this.checkAllowedOrigins()}async checkAllowedOrigins(){try{const e=await At.fetchAllowedOrigins();
2971if(!e||!it.isClient()){Ci.open(Ms.ALERT_ERRORS.PROJECT_ID_NOT_CONFIGURED,"error");return}const r=window.location.origin;al.isOriginAllowed(r,e,ru.DEFAULT_ALLOWED_ANCESTORS)||Ci.open(Ms.ALERT_ERRORS.ORIGIN_NOT_ALLOWED,"error")}catch(e){if(!(e instanceof Error)){Ci.open(Ms.ALERT_ERRORS.PROJECT_ID_NOT_CONFIGURED,"error");return}switch(e.message){case"RATE_LIMITED":Ci.open(Ms.ALERT_ERRORS.RATE_LIMITED_APP_CONFIGURATION,"error");break;case"SERVER_ERROR":{const r=e.cause instanceof Error?e.cause:e;Ci.open({shortMessage:Ms.ALERT_ERRORS.SERVER_ERROR_APP_CONFIGURATION.shortMessage,longMessage:Ms.ALERT_ERRORS.SERVER_ERROR_APP_CONFIGURATION.longMessage(r.message)},"error");break}default:Ci.open(Ms.ALERT_ERRORS.PROJECT_ID_NOT_CONFIGURED,"error")}}}sendInitializeEvent(e){var n;const{...r}=e;delete r.adapters,delete r.universalProvider,on.sendEvent({type:"track",event:"INITIALIZE",properties:{...r,networks:e.networks.map(i=>i.id),siweConfig:{options:((n=e.siweConfig)==null?void 0:n.options)||{}}}})}initControllers(e){this.initializeOptionsController(e),this.initializeChainController(e),this.initializeThemeController(e),this.initializeConnectionController(e),this.initializeConnectorController()}initializeThemeController(e){e.themeMode&&co.setThemeMode(e.themeMode),e.themeVariables&&co.setThemeVariables(e.themeVariables)}initializeChainController(e){if(!this.connectionControllerClient||!this.networkControllerClient)throw new Error("ConnectionControllerClient and NetworkControllerClient must be set");X.initialize(e.adapters??[],this.caipNetworks,{connectionControllerClient:this.connectionControllerClient,networkControllerClient:this.networkControllerClient});const r=this.getDefaultNetwork();r&&X.setActiveCaipNetwork(r)}initializeConnectionController(e){We.initialize(e.adapters??[]),We.setWcBasic(e.basic??!1)}initializeConnectorController(){Fe.initialize(this.chainNamespaces)}initializeProjectSettings(e){Ee.setProjectId(e.projectId),Ee.setSdkVersion(e.sdkVersion)}initializeOptionsController(e){var i;Ee.setDebug(e.debug!==!1),Ee.setEnableWalletConnect(e.enableWalletConnect!==!1),Ee.setEnableWalletGuide(e.enableWalletGuide!==!1),Ee.setEnableWallets(e.enableWallets!==!1),Ee.setEIP6963Enabled(e.enableEIP6963!==!1),Ee.setEnableNetworkSwitch(e.enableNetworkSwitch!==!1),Ee.setEnableReconnect(e.enableReconnect!==!1),Ee.setEnableAuthLogger(e.enableAuthLogger!==!1),Ee.setCustomRpcUrls(e.customRpcUrls),Ee.setEnableEmbedded(e.enableEmbedded),Ee.setAllWallets(e.allWallets),Ee.setIncludeWalletIds(e.includeWalletIds),Ee.setExcludeWalletIds(e.excludeWalletIds),Ee.setFeaturedWalletIds(e.featuredWalletIds),Ee.setTokens(e.tokens),Ee.setTermsConditionsUrl(e.termsConditionsUrl),Ee.setPrivacyPolicyUrl(e.privacyPolicyUrl),Ee.setCustomWallets(e.customWallets),Ee.setFeatures(e.features),Ee.setAllowUnsupportedChain(e.allowUnsupportedChain),Ee.setUniversalProviderConfigOverride(e.universalProviderConfigOverride),Ee.setPreferUniversalLinks(e.experimental_preferUniversalLinks),Ee.setDefaultAccountTypes(e.defaultAccountTypes);const r=this.getDefaultMetaData();if(!e.metadata&&r&&(e.metadata=r),Ee.setMetadata(e.metadata),Ee.setDisableAppend(e.disableAppend),Ee.setEnableEmbedded(e.enableEmbedded),Ee.setSIWX(e.siwx),!e.projectId){Ci.open(Ms.ALERT_ERRORS.PROJECT_ID_NOT_CONFIGURED,"error");return}if(((i=e.adapters)==null?void 0:i.find(s=>s.namespace===fe.CHAIN.EVM))&&e.siweConfig){if(e.siwx)throw new Error("Cannot set both `siweConfig` and `siwx` options");Ee.setSIWX(e.siweConfig.mapToSIWX())}}getDefaultMetaData(){var e,r,n,i;return it.isClient()?{name:((r=(e=document.getElementsByTagName("title"))==null?void 0:e[0])==null?void 0:r.textContent)||"",description:((n=document.querySelector('meta[property="og:description"]'))==null?void 0:n.content)||"",url:window.location.origin,icons:[((i=document.querySelector('link[rel~="icon"]'))==null?void 0:i.href)||""]}:null}setUnsupportedNetwork(e){const r=this.getActiveChainNamespace();if(r){const n=V0.getUnsupportedNetwork(`${r}:${e}`);X.setActiveCaipNetwork(n)}}getDefaultNetwork(){return V0.getCaipNetworkFromStorage(this.defaultCaipNetwork)}extendCaipNetwork(e,r){return V0.extendCaipNetwork(e,{customNetworkImageUrls:r.chainImages,projectId:r.projectId})}extendCaipNetworks(e){return V0.extendCaipNetworks(e.networks,{customNetworkImageUrls:e.chainImages,customRpcUrls:e.customRpcUrls,projectId:e.projectId})}extendDefaultCaipNetwork(e){const r=e.networks.find(i=>{var s;return i.id===((s=e.defaultNetwork)==null?void 0:s.id)});return r?V0.extendCaipNetwork(r,{customNetworkImageUrls:e.chainImages,customRpcUrls:e.customRpcUrls,projectId:e.projectId}):void 0}async disconnectNamespace(e,r){try{this.setLoading(!0,e);let n={connections:[]};const i=this.getAdapter(e),{caipAddress:s}=X.getAccountData(e)||{};return(s||!Ee.state.enableReconnect)&&(i!=null&&i.disconnect)&&(n=await i.disconnect({id:r})),this.setLoading(!1,e),n}catch(n){throw this.setLoading(!1,e),new Error(`Failed to disconnect chains: ${n.message}`)}}createClients(){this.connectionControllerClient={connectWalletConnect:async()=>{var l;const e=X.state.activeChain,r=this.getAdapter(e),n=(l=this.getCaipNetwork(e))==null?void 0:l.id,i=We.getConnections(e),s=this.remoteFeatures.multiWallet,o=i.length>0;if(!r)throw new Error("Adapter not found");const a=await r.connectWalletConnect(n);(!o||!s)&&this.close(),this.setClientId((a==null?void 0:a.clientId)||null),Oe.setConnectedNamespaces([...X.state.chains.keys()]),await this.syncWalletConnectAccount(),await Fo.initializeIfEnabled()},connectExternal:async({id:e,address:r,info:n,type:i,provider:s,chain:o,caipNetwork:a,socialUri:c}
2971)=>{var h,g,y,x,C,_;const l=X.state.activeChain,u=o||l,f=this.getAdapter(u);if(o&&o!==l&&!a){const L=this.getCaipNetworks().find(P=>P.chainNamespace===o);L&&this.setCaipNetwork(L)}if(!u)throw new Error("connectExternal: namespace not found");if(!f)throw new Error("connectExternal: adapter not found");const d=this.getCaipNetwork(u),p=await f.connect({id:e,address:r,info:n,type:i,provider:s,socialUri:c,chainId:(a==null?void 0:a.id)||(d==null?void 0:d.id),rpcUrl:((y=(g=(h=a==null?void 0:a.rpcUrls)==null?void 0:h.default)==null?void 0:g.http)==null?void 0:y[0])||((_=(C=(x=d==null?void 0:d.rpcUrls)==null?void 0:x.default)==null?void 0:C.http)==null?void 0:_[0])});if(p)return Oe.addConnectedNamespace(u),this.syncProvider({...p,chainNamespace:u}),this.setStatus("connected",u),this.syncConnectedWalletInfo(u),Oe.removeDisconnectedConnectorId(e,u),{address:p.address}},reconnectExternal:async({id:e,info:r,type:n,provider:i})=>{var a;const s=X.state.activeChain,o=this.getAdapter(s);if(!s)throw new Error("reconnectExternal: namespace not found");if(!o)throw new Error("reconnectExternal: adapter not found");o!=null&&o.reconnect&&(await(o==null?void 0:o.reconnect({id:e,info:r,type:n,provider:i,chainId:(a=this.getCaipNetwork())==null?void 0:a.id})),Oe.addConnectedNamespace(s),this.syncConnectedWalletInfo(s))},disconnect:async e=>{var l;const{id:r,chainNamespace:n,initialDisconnect:i}=e||{},s=n||X.state.activeChain,o=Fe.getConnectorId(s),a=r===fe.CONNECTOR_ID.AUTH||o===fe.CONNECTOR_ID.AUTH,c=r===fe.CONNECTOR_ID.WALLET_CONNECT||o===fe.CONNECTOR_ID.WALLET_CONNECT;try{const u=Array.from(X.state.chains.keys());let f=n?[n]:u;(c||a)&&(f=u);const d=f.map(async g=>{const y=Fe.getConnectorId(g),x=await this.disconnectNamespace(g,r||y);x&&(a&&Oe.deleteConnectedSocialProvider(),x.connections.forEach(C=>{Oe.addDisconnectedConnectorId(C.connectorId,g)})),i&&this.onDisconnectNamespace({chainNamespace:g,closeModal:!1})}),p=await Promise.allSettled(d);Gr.resetSend(),We.resetWcConnection(),(l=Fo.getSIWX())!=null&&l.signOutOnDisconnect&&await Fo.clearSessions(),Fe.setFilterByNamespace(void 0),We.syncStorageConnections();const h=p.filter(g=>g.status==="rejected");if(h.length>0)throw new Error(h.map(g=>g.reason.message).join(", "));on.sendEvent({type:"track",event:"DISCONNECT_SUCCESS",properties:{namespace:n||"all"}})}catch(u){throw new Error(`Failed to disconnect chains: ${u.message}`)}},checkInstalled:e=>e?e.some(r=>{var n;return!!((n=window.ethereum)!=null&&n[String(r)])}):!!window.ethereum,signMessage:async e=>{const r=X.state.activeChain,n=this.getAdapter(X.state.activeChain);if(!r)throw new Error("signMessage: namespace not found");if(!n)throw new Error("signMessage: adapter not found");const i=await(n==null?void 0:n.signMessage({message:e,address:ct.state.address,provider:jr.getProvider(r)}));return(i==null?void 0:i.signature)||""},sendTransaction:async e=>{const r=e.chainNamespace;if(!r)throw new Error("sendTransaction: namespace not found");if(Zr.SEND_SUPPORTED_NAMESPACES.includes(r)){const n=this.getAdapter(r);if(!n)throw new Error("sendTransaction: adapter not found");const i=jr.getProvider(r),s=await(n==null?void 0:n.sendTransaction({...e,caipNetwork:this.getCaipNetwork(),provider:i}));return(s==null?void 0:s.hash)||""}return""},estimateGas:async e=>{const r=e.chainNamespace;if(r===fe.CHAIN.EVM){const n=this.getAdapter(r);if(!n)throw new Error("estimateGas: adapter is required but got undefined");const i=jr.getProvider(r),s=this.getCaipNetwork();if(!s)throw new Error("estimateGas: caipNetwork is required but got undefined");const o=await(n==null?void 0:n.estimateGas({...e,provider:i,caipNetwork:s}));return(o==null?void 0:o.gas)||0n}return 0n},getEnsAvatar:async()=>{var r;const e=X.state.activeChain;if(!e)throw new Error("getEnsAvatar: namespace is required but got undefined");return await this.syncIdentity({address:ct.state.address,chainId:Number((r=this.getCaipNetwork())==null?void 0:r.id),chainNamespace:e}),ct.state.profileImage||!1},getEnsAddress:async e=>await al.resolveReownName(e),writeContract:async e=>{const r=X.state.activeChain,n=this.getAdapter(r);if(!r)throw new Error("writeContract: namespace is required but got undefined");if(!n)throw new Error("writeContract: adapter is required but got undefined");const i=this.getCaipNetwork(),s=this.getCaipAddress(),o=jr.getProvider(r);if(!i||!s)throw new Error("writeContract: caipNetwork or caipAddress is required but got undefined");const a=await(n==null?void 0:n.writeContract({...e,caipNetwork:i,provider:o,caipAddress:s}));return a==null?void 0:a.hash},parseUnits:(e,r)=>{const n=this.getAdapter(X.state.activeChain);if(!n)throw new Error("parseUnits: adapter is required but got undefined");return(n==null?void 0:n.parseUnits({value:e,decimals:r}))??0n},formatUnits:(e,r)=>{const n=this.getAdapter(X.state.activeChain);if(!n)throw new Error("formatUnits: adapter is required but got undefined");return(n==null?void 0:n.formatUnits({value:e,decimals:r}))??"0"},getCapabilities:async e=>{const r=this.getAdapter(X.state.activeChain);if(!r)throw new Error("getCapabilities: adapter is required but got undefined");return await(r==null?void 0:r.getCapabilities(e))},grantPermissions:async e=>{const r=this.getAdapter(X.state.activeChain);if(!r)throw new Error("grantPermissions: adapter is required but got undefined");return await(r==null?void 0:r.grantPermissions(e))},revokePermissions:async e=>{const r=this.getAdapter(X.state.activeChain);if(!r)throw new Error("revokePermissions: adapter is required but got undefined");return r!=null&&r.revokePermissions?await r.revokePermissions(e):"0x"},walletGetAssets:async e=>{const r=this.getAdapter(X.state.activeChain);if(!r)throw new Error("walletGetAssets: adapter is required but got undefined");return await(r==null?void 0:r.walletGetAssets(e))??{}},updateBalance:e=>{const r=this.getCaipNetwork(e);!r||!ct.state.address||this.updateNativeBalance(ct.state.address,r==null?void 0:r.id,e)}},this.networkControllerClient={switchCaipNetwork:async e=>await this.switchCaipNetwork(e),getApprovedCaipNetworksData:async()=>this.getApprovedCaipNetworksData()},We.setClient(this.connectionControllerClient)}getApprovedCaipNetworksData(){var r,n,i,s,o;if(jr.getProviderId(X.state.activeChain)===Yr.CONNECTOR_TYPE_WALLET_CONNECT){const a=(n=(r=this.universalProvider)==null?void 0:r.session)==null?void 0:n.namespaces;return{supportsAllNetworks:((o=(s=(i=this.universalProvider)==null?void 0:i.session)==null?void 0:s.peer)==null?void 0:o.metadata.name)==="MetaMask Wallet",approvedCaipNetworkIds:this.getChainsFromNamespaces(a)}}return{supportsAllNetworks:!0,approvedCaipNetworkIds:[]}}async switchCaipNetwork(e){if(!e)return;const r=e.chainNamespace;if(this.getAddressByChainNamespace(e.chainNamespace)){const i=jr.getProvider(r),s=jr.getProviderId(r);if(e.chainNamespace===X.state.activeChain){const o=this.getAdapter(r);await(o==null?void 0:o.switchNetwork({caipNetwork:e,provider:i,providerType:s}))}else if(this.setCaipNetwork(e),s===Yr.CONNECTOR_TYPE_WALLET_CONNECT)this.syncWalletConnectAccount();else{const o=this.getAddressByChainNamespace(r);o&&this.syncAccount({address:o,chainId:e.id,chainNamespace:r})}}else this.setCaipNetwork(e)}
2971getChainsFromNamespaces(e={}){return Object.values(e).flatMap(r=>{const n=r.chains||[],i=r.accounts.map(s=>{const{chainId:o,chainNamespace:a}=Bs.parseCaipAddress(s);return`${a}:${o}`});return Array.from(new Set([...n,...i]))})}createAdapters(e){return this.createClients(),this.chainNamespaces.reduce((r,n)=>{var s;const i=e==null?void 0:e.find(o=>o.namespace===n);return i?(i.construct({namespace:n,projectId:(s=this.options)==null?void 0:s.projectId,networks:this.getCaipNetworks()}),r[n]=i):r[n]=new VTe({namespace:n,networks:this.getCaipNetworks()}),r},{})}async initChainAdapter(e){var r;this.onConnectors(e),this.listenAdapter(e),await((r=this.chainAdapters)==null?void 0:r[e].syncConnectors(this.options,this)),await this.createUniversalProviderForAdapter(e)}async initChainAdapters(){await Promise.all(this.chainNamespaces.map(async e=>{await this.initChainAdapter(e)}))}onConnectors(e){const r=this.getAdapter(e);r==null||r.on("connectors",this.setConnectors.bind(this))}listenAdapter(e){const r=this.getAdapter(e);if(!r)return;const n=Oe.getConnectionStatus();Ee.state.enableReconnect===!1?this.setStatus("disconnected",e):n==="connected"?this.setStatus("connecting",e):n==="disconnected"?(Oe.clearAddressCache(),this.setStatus(n,e)):this.setStatus(n,e),r.on("switchNetwork",({address:i,chainId:s})=>{const o=this.getCaipNetworks().find(l=>l.id.toString()===s.toString()||l.caipNetworkId.toString()===s.toString()),a=X.state.activeChain===e,c=X.getAccountProp("address",e);if(o){const l=a&&i?i:c;l&&this.syncAccount({address:l,chainId:o.id,chainNamespace:e})}else this.setUnsupportedNetwork(s)}),r.on("disconnect",()=>{this.onDisconnectNamespace({chainNamespace:e})}),r.on("connections",i=>{this.setConnections(i,e)}),r.on("pendingTransactions",()=>{const i=ct.state.address,s=X.state.activeCaipNetwork;!i||!(s!=null&&s.id)||this.updateNativeBalance(i,s.id,s.chainNamespace)}),r.on("accountChanged",({address:i,chainId:s,connector:o})=>{var c,l;const a=X.state.activeChain===e;o!=null&&o.provider&&(this.syncProvider({id:o.id,type:o.type,provider:o.provider,chainNamespace:e}),this.syncConnectedWalletInfo(e)),a&&s?this.syncAccount({address:i,chainId:s,chainNamespace:e}):a&&((c=X.state.activeCaipNetwork)!=null&&c.id)?this.syncAccount({address:i,chainId:(l=X.state.activeCaipNetwork)==null?void 0:l.id,chainNamespace:e}):this.syncAccountInfo(i,s,e),Oe.addConnectedNamespace(e)})}async createUniversalProviderForAdapter(e){var r,n,i;await this.getUniversalProvider(),this.universalProvider&&await((i=(n=(r=this.chainAdapters)==null?void 0:r[e])==null?void 0:n.setUniversalProvider)==null?void 0:i.call(n,this.universalProvider))}async syncExistingConnection(){await Promise.allSettled(this.chainNamespaces.map(e=>this.syncNamespaceConnection(e)))}async unSyncExistingConnection(){try{await Promise.allSettled(this.chainNamespaces.map(e=>We.disconnect({namespace:e,initialDisconnect:!0})))}catch(e){console.error("Error disconnecting existing connections:",e)}}async syncNamespaceConnection(e){try{e===fe.CHAIN.EVM&&it.isSafeApp()&&Fe.setConnectorId(fe.CONNECTOR_ID.SAFE,e);const r=Fe.getConnectorId(e);switch(this.setStatus("connecting",e),r){case fe.CONNECTOR_ID.WALLET_CONNECT:await this.syncWalletConnectAccount();break;case fe.CONNECTOR_ID.AUTH:break;default:await this.syncAdapterConnection(e)}}catch(r){console.warn("AppKit couldn't sync existing connection",r),this.setStatus("disconnected",e)}}onDisconnectNamespace(e){const{chainNamespace:r,closeModal:n}=e||{};X.resetAccount(r),X.resetNetwork(r),Oe.removeConnectedNamespace(r);const i=Array.from(X.state.chains.keys());(r?[r]:i).forEach(o=>Oe.addDisconnectedConnectorId(Fe.getConnectorId(o)||"",o)),Fe.removeConnectorId(r),jr.resetChain(r),this.setUser(void 0,r),this.setStatus("disconnected",r),this.setConnectedWalletInfo(void 0,r),n!==!1&&Wr.close()}async syncAdapterConnections(){await Promise.allSettled(this.chainNamespaces.map(e=>{var i;const r=this.getCaipAddress(e),n=this.getCaipNetwork(e);return(i=this.chainAdapters)==null?void 0:i[e].syncConnections({connectToFirstConnector:!r,caipNetwork:n,getConnectorStorageInfo(s){const a=Oe.getConnections()[e]??[];return{hasDisconnected:Oe.isConnectorDisconnected(s,e),hasConnected:a.some(c=>Ui.isLowerCaseMatch(c.connectorId,s))}}})}))}async syncAdapterConnection(e){var a,c,l;const r=this.getAdapter(e),n=Fe.getConnectorId(e),i=this.getCaipNetwork(e),o=Fe.getConnectors(e).find(u=>u.id===n);try{if(!r||!o)throw new Error(`Adapter or connector not found for namespace ${e}`);if(!(i!=null&&i.id))throw new Error("CaipNetwork not found");const u=await(r==null?void 0:r.syncConnection({namespace:e,id:o.id,chainId:i.id,rpcUrl:(l=(c=(a=i==null?void 0:i.rpcUrls)==null?void 0:a.default)==null?void 0:c.http)==null?void 0:l[0]}));u?(this.syncProvider({...u,chainNamespace:e}),await this.syncAccount({...u,chainNamespace:e}),this.setStatus("connected",e)):this.setStatus("disconnected",e)}catch{this.onDisconnectNamespace({chainNamespace:e,closeModal:!1})}}async syncWalletConnectAccount(){var n,i;const e=Object.keys(((i=(n=this.universalProvider)==null?void 0:n.session)==null?void 0:i.namespaces)||{}),r=this.chainNamespaces.map(async s=>{var u,f,d,p,h;const o=this.getAdapter(s);if(!o)return;const a=((p=(d=(f=(u=this.universalProvider)==null?void 0:u.session)==null?void 0:f.namespaces)==null?void 0:d[s])==null?void 0:p.accounts)||[],c=(h=X.state.activeCaipNetwork)==null?void 0:h.id,l=a.find(g=>{const{chainId:y}=Bs.parseCaipAddress(g);return y===(c==null?void 0:c.toString())})||a[0];if(l){const g=Bs.validateCaipAddress(l),{chainId:y,address:x}=Bs.parseCaipAddress(g);if(jr.setProviderId(s,Yr.CONNECTOR_TYPE_WALLET_CONNECT),this.caipNetworks&&X.state.activeCaipNetwork&&o.namespace!==fe.CHAIN.EVM){const C=o.getWalletConnectProvider({caipNetworks:this.getCaipNetworks(),provider:this.universalProvider,activeCaipNetwork:X.state.activeCaipNetwork});jr.setProvider(s,C)}else jr.setProvider(s,this.universalProvider);Fe.setConnectorId(fe.CONNECTOR_ID.WALLET_CONNECT,s),Oe.addConnectedNamespace(s),await this.syncAccount({address:x,chainId:y,chainNamespace:s})}else e.includes(s)&&this.setStatus("disconnected",s);this.syncConnectedWalletInfo(s),await X.setApprovedCaipNetworksData(s)});await Promise.all(r)}syncProvider({type:e,provider:r,id:n,chainNamespace:i}){jr.setProviderId(i,e),jr.setProvider(i,r),Fe.setConnectorId(n,i)}async syncAccount(e){var f,d;const r=e.chainNamespace===X.state.activeChain,n=X.getCaipNetworkByNamespace(e.chainNamespace,e.chainId),{address:i,chainId:s,chainNamespace:o}=e,{chainId:a}=Oe.getActiveNetworkProps(),c=s||a,l=((f=X.state.activeCaipNetwork)==null?void 0:f.name)===fe.UNSUPPORTED_NETWORK_NAME,u=X.getNetworkProp("supportsAllNetworks",o);if(this.setStatus("connected",o),!(l&&!u)&&c){let p=this.getCaipNetworks().find(y=>y.id.toString()===c.toString()),h=this.getCaipNetworks().find(y=>y.chainNamespace===o);if(!u&&!p&&!h){const y=this.getApprovedCaipNetworkIds()||[],x=y.find(_=>{var L;return((L=Bs.parseCaipNetworkId(_))==null?void 0:L.chainId)===c.toString()}),C=y.find(_=>{var L;return((L=Bs.parseCaipNetworkId(_))==null?void 0:L.chainNamespace)===o});p=this.getCaipNetworks().find(_=>_.caipNetworkId===x),h=this.getCaipNetworks().find(_=>_.caipNetworkId===C||"deprecatedCaipNetworkId"in _&&_.deprecatedCaipNetworkId===C)}const g=p||h;(g==null?void 0:g.chainNamespace)===X.state.activeChain?Ee.state.enableNetworkSwitch&&!Ee.state.allowUnsupportedChain&&((d=X.state.activeCaipNetwork)==null?void 0:d.name)===fe.UNSUPPORTED_NETWORK_NAME?X.showUnsupportedChainUI():this.setCaipNetwork(g):r||n&&this.setCaipNetworkOfNamespace(n,o),this.syncConnectedWalletInfo(o),Ui.isLowerCaseMatch(i,ct.state.address)||this.syncAccountInfo(i,g==null?void 0:g.id,o),r?await this.syncBalance({address:i,chainId:g==null?void 0:g.id,chainNamespace:o}):await this.syncBalance({address:i,chainId:n==null?void 0:n.id,chainNamespace:o})}}async syncAccountInfo(e,r,n){const i=this.getCaipAddress(n),s=r||(i==null?void 0:i.split(":")[1]);if(!s)return;const o=`${n}:${s}:${e}`;this.setCaipAddress(o,n),await this.syncIdentity({address:e,chainId:s,chainNamespace:n})}async syncReownName(e,r){try{const n=await this.getReownName(e);
2971if(n[0]){const i=n[0];this.setProfileName(i.name,r)}else this.setProfileName(null,r)}catch{this.setProfileName(null,r)}}syncConnectedWalletInfo(e){var i;const r=Fe.getConnectorId(e),n=jr.getProviderId(e);if(n===Yr.CONNECTOR_TYPE_ANNOUNCED||n===Yr.CONNECTOR_TYPE_INJECTED){if(r){const s=this.getConnectors().find(o=>{var u,f;const a=o.id===r,c=((u=o.info)==null?void 0:u.rdns)===r,l=(f=o.connectors)==null?void 0:f.some(d=>{var p;return d.id===r||((p=d.info)==null?void 0:p.rdns)===r});return a||c||!!l});if(s){const{info:o,name:a,imageUrl:c}=s,l=c||this.getConnectorImage(s);this.setConnectedWalletInfo({name:a,icon:l,...o},e)}}}else if(n===Yr.CONNECTOR_TYPE_WALLET_CONNECT){const s=jr.getProvider(e);s!=null&&s.session&&this.setConnectedWalletInfo({...s.session.peer.metadata,name:s.session.peer.metadata.name,icon:(i=s.session.peer.metadata.icons)==null?void 0:i[0]},e)}else if(r&&r===fe.CONNECTOR_ID.COINBASE){const s=this.getConnectors().find(o=>o.id===fe.CONNECTOR_ID.COINBASE);this.setConnectedWalletInfo({name:"Coinbase Wallet",icon:this.getConnectorImage(s)},e)}}async syncBalance(e){!Dj.getNetworksByNamespace(this.getCaipNetworks(),e.chainNamespace).find(n=>{var i;return n.id.toString()===((i=e.chainId)==null?void 0:i.toString())})||!e.chainId||await this.updateNativeBalance(e.address,e.chainId,e.chainNamespace)}async ready(){await this.readyPromise}async updateNativeBalance(e,r,n){const i=this.getAdapter(n),s=X.getCaipNetworkByNamespace(n,r);if(i){const o=await i.getBalance({address:e,chainId:r,caipNetwork:s,tokens:this.options.tokens});return this.setBalance(o.balance,o.symbol,n),o}}async initializeUniversalAdapter(){var n,i,s,o,a,c,l,u,f,d;const e=Q7e.createLogger((p,...h)=>{p&&this.handleAlertError(p),console.error(...h)}),r={projectId:(n=this.options)==null?void 0:n.projectId,metadata:{name:(i=this.options)!=null&&i.metadata?(s=this.options)==null?void 0:s.metadata.name:"",description:(o=this.options)!=null&&o.metadata?(a=this.options)==null?void 0:a.metadata.description:"",url:(c=this.options)!=null&&c.metadata?(l=this.options)==null?void 0:l.metadata.url:"",icons:(u=this.options)!=null&&u.metadata?(f=this.options)==null?void 0:f.metadata.icons:[""]},logger:e};Ee.setManualWCControl(!!((d=this.options)!=null&&d.manualWCControl)),this.universalProvider=this.options.universalProvider??await H7e.init(r),Ee.state.enableReconnect===!1&&this.universalProvider.session&&await this.universalProvider.disconnect(),this.listenWalletConnect()}listenWalletConnect(){this.universalProvider&&this.chainNamespaces.forEach(e=>{al.listenWcProvider({universalProvider:this.universalProvider,namespace:e,onDisplayUri:r=>{We.setUri(r)},onConnect:()=>{We.finalizeWcConnection()},onDisconnect:()=>{X.state.noAdapters&&this.resetAccount(e),We.resetWcConnection()},onChainChanged:r=>{const n=X.state.activeChain,i=n&&Fe.state.activeConnectorIds[n]===fe.CONNECTOR_ID.WALLET_CONNECT;if(n===e&&(X.state.noAdapters||i)){const s=this.getCaipNetworks().find(a=>a.id.toString()===r.toString()||a.caipNetworkId.toString()===r.toString()),o=this.getCaipNetwork();if(!s){this.setUnsupportedNetwork(r);return}(o==null?void 0:o.id.toString())!==(s==null?void 0:s.id.toString())&&(o==null?void 0:o.chainNamespace)===(s==null?void 0:s.chainNamespace)&&this.setCaipNetwork(s)}},onAccountsChanged:r=>{const n=X.state.activeChain,i=n&&Fe.state.activeConnectorIds[n]===fe.CONNECTOR_ID.WALLET_CONNECT;if(n===e&&(X.state.noAdapters||i)&&r.length>0){const s=r[0];this.syncAccount({address:s.address,chainId:s.chainId,chainNamespace:s.chainNamespace})}}})})}createUniversalProvider(){var e;return!this.universalProviderInitPromise&&it.isClient()&&((e=this.options)!=null&&e.projectId)&&(this.universalProviderInitPromise=this.initializeUniversalAdapter()),this.universalProviderInitPromise}
2971async getUniversalProvider(){if(!this.universalProvider)try{await this.createUniversalProvider()}catch(e){on.sendEvent({type:"error",event:"INTERNAL_SDK_ERROR",properties:{errorType:"UniversalProviderInitError",errorMessage:e instanceof Error?e.message:"Unknown",uncaught:!1}}),console.error("AppKit:getUniversalProvider - Cannot create provider",e)}return this.universalProvider}handleAlertError(e){const r=Object.entries(Ms.UniversalProviderErrors).find(([,{message:a}])=>e.message.includes(a)),[n,i]=r??[],{message:s,alertErrorKey:o}=i??{};if(n&&s&&!this.reportedAlertErrors[n]){const a=Ms.ALERT_ERRORS[o];a&&(Ci.open(a,"error"),this.reportedAlertErrors[n]=!0)}}getAdapter(e){var r;if(e)return(r=this.chainAdapters)==null?void 0:r[e]}createAdapter(e){var i;if(!e)return;const r=e.namespace;if(!r)return;this.createClients();const n=e;n.namespace=r,n.construct({namespace:r,projectId:(i=this.options)==null?void 0:i.projectId,networks:this.getCaipNetworks()}),this.chainNamespaces.includes(r)||this.chainNamespaces.push(r),this.chainAdapters&&(this.chainAdapters[r]=n)}async open(e){if(await this.injectModalUi(),e!=null&&e.uri&&We.setUri(e.uri),e!=null&&e.arguments)switch(e==null?void 0:e.view){case"Swap":return Wr.open({...e,data:{swap:e.arguments}})}return Wr.open(e)}async close(){await this.injectModalUi(),Wr.close()}setLoading(e,r){Wr.setLoading(e,r)}async disconnect(e){await We.disconnect({namespace:e})}getSIWX(){return Ee.state.siwx}getError(){return""}getChainId(){var e;return(e=X.state.activeCaipNetwork)==null?void 0:e.id}async switchNetwork(e){const r=this.getCaipNetworks().find(n=>n.id===e.id);if(!r){Ci.open(Ms.ALERT_ERRORS.SWITCH_NETWORK_NOT_FOUND,"error");return}await X.switchActiveNetwork(r)}getWalletProvider(){return X.state.activeChain?jr.state.providers[X.state.activeChain]:null}getWalletProviderType(){return jr.getProviderId(X.state.activeChain)}subscribeProviders(e){return jr.subscribeProviders(e)}getThemeMode(){return co.state.themeMode}getThemeVariables(){return co.state.themeVariables}setThemeMode(e){co.setThemeMode(e),oV(co.state.themeMode)}setTermsConditionsUrl(e){Ee.setTermsConditionsUrl(e)}setPrivacyPolicyUrl(e){Ee.setPrivacyPolicyUrl(e)}setThemeVariables(e){co.setThemeVariables(e),BTe(co.state.themeVariables)}subscribeTheme(e){return co.subscribe(e)}subscribeConnections(e){return this.remoteFeatures.multiWallet?We.subscribe(e):(Ci.open(fe.REMOTE_FEATURES_ALERTS.MULTI_WALLET_NOT_ENABLED.DEFAULT,"info"),()=>{})}getWalletInfo(e){return e?X.getAccountProp("connectedWalletInfo",e):ct.state.connectedWalletInfo}getAccount(e){const r=e||X.state.activeChain,n=Fe.getAuthConnector(r),i=X.getAccountData(r),s=Oe.getConnectedConnectorId(X.state.activeChain),o=We.getConnections(r);if(!r)throw new Error("AppKit:getAccount - namespace is required");const a=o.flatMap(c=>c.accounts.map(({address:l,type:u})=>it.createAccount(r,l,u||"eoa")));if(i)return{allAccounts:a,caipAddress:i.caipAddress,address:it.getPlainAddress(i.caipAddress),isConnected:!!i.caipAddress,status:i.status,embeddedWalletInfo:n&&s===fe.CONNECTOR_ID.AUTH?{user:i.user?{...i.user,username:Oe.getConnectedSocialUsername()}:void 0,authProvider:i.socialProvider||"email",accountType:Vo(r),isSmartAccountDeployed:!!i.smartAccountDeployed}:void 0}}subscribeAccount(e,r){const n=()=>{const i=this.getAccount(r);i&&e(i)};r?X.subscribeChainProp("accountState",n,r):X.subscribe(n),Fe.subscribe(n)}subscribeNetwork(e){return X.subscribe(({activeCaipNetwork:r})=>{e({caipNetwork:r,chainId:r==null?void 0:r.id,caipNetworkId:r==null?void 0:r.caipNetworkId})})}subscribeWalletInfo(e,r){return r?ct.subscribeKey("connectedWalletInfo",e,r):ct.subscribeKey("connectedWalletInfo",e)}subscribeShouldUpdateToAddress(e){ct.subscribeKey("shouldUpdateToAddress",e)}subscribeCaipNetworkChange(e){X.subscribeKey("activeCaipNetwork",e)}getState(){return sl.state}getRemoteFeatures(){return Ee.state.remoteFeatures}subscribeState(e){return sl.subscribe(e)}subscribeRemoteFeatures(e){return Ee.subscribeKey("remoteFeatures",e)}showErrorMessage(e){Jc.showError(e)}showSuccessMessage(e){Jc.showSuccess(e)}getEvent(){return{...on.state}}subscribeEvents(e){return on.subscribe(e)}replace(e){Lt.replace(e)}redirect(e){Lt.push(e)}popTransactionStack(e){Lt.popTransactionStack(e)}isOpen(){return Wr.state.open}isTransactionStackEmpty(){return Lt.state.transactionStack.length===0}static getInstance(){return this.instance}updateFeatures(e){Ee.setFeatures(e)}updateRemoteFeatures(e){Ee.setRemoteFeatures(e)}updateOptions(e){const n={...Ee.state||{},...e};Ee.setOptions(n)}setConnectMethodsOrder(e){Ee.setConnectMethodsOrder(e)}setWalletFeaturesOrder(e){Ee.setWalletFeaturesOrder(e)}setCollapseWallets(e){Ee.setCollapseWallets(e)}setSocialsOrder(e){Ee.setSocialsOrder(e)}getConnectMethodsOrder(){return X_.getConnectOrderMethod(Ee.state.features,Fe.getConnectors())}addNetwork(e,r){if(this.chainAdapters&&!this.chainAdapters[e])throw new Error(`Adapter for namespace ${e} doesn't exist`);const n=this.extendCaipNetwork(r,this.options);this.getCaipNetworks().find(i=>i.id===n.id)||X.addNetwork(n)}removeNetwork(e,r){if(this.chainAdapters&&!this.chainAdapters[e])throw new Error(`Adapter for namespace ${e} doesn't exist`);this.getCaipNetworks().find(i=>i.id===r)&&X.removeNetwork(e,r)}}let TD=!1;class ZTe extends YTe{async onAuthProviderConnected(e){e.message&&e.signature&&e.siwxMessage&&await Fo.addEmbeddedWalletSession({chainId:e.siwxMessage.chainId,accountAddress:e.address,notBefore:e.siwxMessage.notBefore,statement:e.siwxMessage.statement,resources:e.siwxMessage.resources,requestId:e.siwxMessage.requestId,issuedAt:e.siwxMessage.issuedAt,domain:e.siwxMessage.domain,uri:e.siwxMessage.uri,version:e.siwxMessage.version,nonce:e.siwxMessage.nonce},e.message,e.signature);const r=X.state.activeChain;if(!r)throw new Error("AppKit:onAuthProviderConnected - namespace is required");const n=r===fe.CHAIN.EVM?`eip155:${e.chainId}:${e.address}`:`${e.chainId}:${e.address}`,i=Ee.state.defaultAccountTypes[r],s=Vo(r),o=e.preferredAccountType||s||i;Ui.isLowerCaseMatch(e.address,ct.state.address)||this.syncIdentity({address:e.address,chainId:e.chainId,chainNamespace:r}),this.setCaipAddress(n,r);const{signature:a,siwxMessage:c,message:l,...u}=e;this.setUser({...ct.state.user||{},...u},r),this.setSmartAccountDeployed(!!e.smartAccountDeployed,r),this.setPreferredAccountType(o,r),this.setLoading(!1,r)}setupAuthConnectorListeners(e){e.onRpcRequest(r=>{jo.checkIfRequestExists(r)?jo.checkIfRequestIsSafe(r)||this.handleUnsafeRPCRequest():(this.open(),console.error(Pi.RPC_METHOD_NOT_ALLOWED_MESSAGE,{method:r.method}),setTimeout(()=>{this.showErrorMessage(Pi.RPC_METHOD_NOT_ALLOWED_UI_MESSAGE)},300),e.rejectRpcRequests())}),e.onRpcError(()=>{this.isOpen()&&(this.isTransactionStackEmpty()?this.close():this.popTransactionStack("error"))}),e.onRpcSuccess((r,n)=>{const i=jo.checkIfRequestIsSafe(n),s=ct.state.address,o=X.state.activeCaipNetwork;
2971i||(s&&(o!=null&&o.id)&&this.updateNativeBalance(s,o.id,o.chainNamespace),this.isTransactionStackEmpty()?this.close():this.popTransactionStack("success"))}),e.onNotConnected(()=>{const r=X.state.activeChain;if(!r)throw new Error("AppKit:onNotConnected - namespace is required");Fe.getConnectorId(r)===fe.CONNECTOR_ID.AUTH&&(this.setCaipAddress(void 0,r),this.setLoading(!1,r))}),e.onConnect(this.onAuthProviderConnected.bind(this)),e.onSocialConnected(this.onAuthProviderConnected.bind(this)),e.onSetPreferredAccount(({address:r,type:n})=>{const i=X.state.activeChain;if(!i)throw new Error("AppKit:onSetPreferredAccount - namespace is required");r&&this.setPreferredAccountType(n,i)})}async syncAuthConnectorTheme(e){if(!e)return;const r=co.getSnapshot(),n=Ee.getSnapshot();await Promise.all([e.syncDappData({metadata:n.metadata,sdkVersion:n.sdkVersion,projectId:n.projectId,sdkType:n.sdkType}),e.syncTheme({themeMode:r.themeMode,themeVariables:r.themeVariables,w3mThemeVariables:tu(r.themeVariables,r.themeMode)})])}async syncAuthConnector(e,r){var l,u,f,d;const n=fe.AUTH_CONNECTOR_SUPPORTED_CHAINS.includes(r),i=r===X.state.activeChain;if(!n)return;this.setLoading(!0,r);const s=e.getLoginEmailUsed();this.setLoading(s,r),s&&this.setStatus("connecting",r);const o=e.getEmail(),a=e.getUsername();this.setUser({...((l=ct.state)==null?void 0:l.user)||{},username:a,email:o},r),this.setupAuthConnectorListeners(e);const{isConnected:c}=await e.isConnected();if(await this.syncAuthConnectorTheme(e),r&&n&&i){const p=await e.getSmartAccountEnabledNetworks();X.setSmartAccountEnabledNetworks((p==null?void 0:p.smartAccountEnabledNetworks)||[],r),c&&((u=this.connectionControllerClient)!=null&&u.connectExternal)?(await((d=this.connectionControllerClient)==null?void 0:d.connectExternal({id:fe.CONNECTOR_ID.AUTH,info:{name:fe.CONNECTOR_ID.AUTH},type:Yr.CONNECTOR_TYPE_AUTH,provider:e,chainId:(f=X.state.activeCaipNetwork)==null?void 0:f.id,chain:r})),this.setStatus("connected",r)):Fe.getConnectorId(r)===fe.CONNECTOR_ID.AUTH&&(this.setStatus("disconnected",r),Oe.removeConnectedNamespace(r))}this.setLoading(!1,r)}async checkExistingTelegramSocialConnection(e){var r,n;try{if(!it.isTelegram())return;const i=Oe.getTelegramSocialProvider();if(!i||!it.isClient())return;const o=new URL(window.location.href).searchParams.get("result_uri");if(!o)return;ct.setSocialProvider(i,e),await((r=this.authProvider)==null?void 0:r.init());const a=Fe.getAuthConnector();i&&a&&(this.setLoading(!0,e),await We.connectExternal({id:a.id,type:a.type,socialUri:o},a.chain),Oe.setConnectedSocialProvider(i),Oe.removeTelegramSocialProvider(),on.sendEvent({type:"track",event:"SOCIAL_LOGIN_SUCCESS",properties:{provider:i,caipNetworkId:(n=X.getActiveCaipNetwork())==null?void 0:n.caipNetworkId}}))}catch(i){this.setLoading(!1,e),console.error("checkExistingSTelegramocialConnection error",i)}try{const i=new URL(window.location.href);i.searchParams.delete("result_uri"),window.history.replaceState({},document.title,i.toString())}catch(i){console.error("tma social login failed",i)}}createAuthProvider(e){var l,u,f,d;if(!fe.AUTH_CONNECTOR_SUPPORTED_CHAINS.includes(e))return;const n=(l=this.remoteFeatures)==null?void 0:l.email,i=Array.isArray((u=this.remoteFeatures)==null?void 0:u.socials)&&this.remoteFeatures.socials.length>0,s=n||i,a=Ui.getActiveNamespaceConnectedToAuth()||e;!this.authProvider&&((f=this.options)!=null&&f.projectId)&&s&&(this.authProvider=jm.getInstance({projectId:this.options.projectId,enableLogger:this.options.enableAuthLogger,chainId:(d=this.getCaipNetwork(a))==null?void 0:d.caipNetworkId,abortController:Ms.EmbeddedWalletAbortController,onTimeout:p=>{p==="iframe_load_failed"?Ci.open(Ms.ALERT_ERRORS.IFRAME_LOAD_FAILED,"error"):p==="iframe_request_timeout"?Ci.open(Ms.ALERT_ERRORS.IFRAME_REQUEST_TIMEOUT,"error"):p==="unverified_domain"&&Ci.open(Ms.ALERT_ERRORS.UNVERIFIED_DOMAIN,"error")},getActiveCaipNetwork:p=>X.getActiveCaipNetwork(p)}),sl.subscribeOpen(p=>{var h;!p&&this.isTransactionStackEmpty()&&((h=this.authProvider)==null||h.rejectRpcRequests())}));const c=e===X.state.activeChain&&Ee.state.enableReconnect;Ee.state.enableReconnect===!1?this.syncAuthConnectorTheme(this.authProvider):this.authProvider&&c&&(this.syncAuthConnector(this.authProvider,e),this.checkExistingTelegramSocialConnection(e))}createAuthProviderForAdapter(e){var r,n,i;this.createAuthProvider(e),this.authProvider&&((i=(n=(r=this.chainAdapters)==null?void 0:r[e])==null?void 0:n.setAuthProvider)==null||i.call(n,this.authProvider))}initControllers(e){super.initControllers(e),this.options.excludeWalletIds&&At.initializeExcludedWallets({ids:this.options.excludeWalletIds})}async switchCaipNetwork(e){var o,a;if(!e)return;const r=X.state.activeChain,n=e.chainNamespace,i=this.getAddressByChainNamespace(n);if(n===r&&i){const c=this.getAdapter(n),l=jr.getProvider(n),u=jr.getProviderId(n);await(c==null?void 0:c.switchNetwork({caipNetwork:e,provider:l,providerType:u})),this.setCaipNetwork(e)}else{const l=jr.getProviderId(r)===Yr.CONNECTOR_TYPE_AUTH,u=jr.getProviderId(n),f=u===Yr.CONNECTOR_TYPE_AUTH,d=fe.AUTH_CONNECTOR_SUPPORTED_CHAINS.includes(n);if(!n)throw new Error("AppKit:switchCaipNetwork - networkNamespace is required");if((l&&u===void 0||f)&&d)try{if(X.state.activeChain=e.chainNamespace,i){const p=this.getAdapter(n);await(p==null?void 0:p.switchNetwork({caipNetwork:e,provider:this.authProvider,providerType:u}))}else await((a=(o=this.connectionControllerClient)==null?void 0:o.connectExternal)==null?void 0:a.call(o,{id:fe.CONNECTOR_ID.AUTH,provider:this.authProvider,chain:n,chainId:e.id,type:Yr.CONNECTOR_TYPE_AUTH,caipNetwork:e}));this.setCaipNetwork(e)}catch{const h=this.getAdapter(n);await(h==null?void 0:h.switchNetwork({caipNetwork:e,provider:this.authProvider,providerType:u}))}else if(u===Yr.CONNECTOR_TYPE_WALLET_CONNECT){if(!X.state.noAdapters){const p=this.getAdapter(n),h=jr.getProvider(n),g=jr.getProviderId(n);await(p==null?void 0:p.switchNetwork({caipNetwork:e,provider:h,providerType:g}))}this.setCaipNetwork(e),this.syncWalletConnectAccount()}else this.setCaipNetwork(e),i&&this.syncAccount({address:i,chainId:e.id,chainNamespace:n})}}async initialize(e){var r;await super.initialize(e),(r=this.chainNamespaces)==null||r.forEach(n=>{this.createAuthProviderForAdapter(n)}
2971),await this.injectModalUi(),sl.set({initialized:!0})}async syncIdentity({address:e,chainId:r,chainNamespace:n}){var o;const i=`${n}:${r}`,s=(o=this.caipNetworks)==null?void 0:o.find(a=>a.caipNetworkId===i);if(n!==fe.CHAIN.EVM||s!=null&&s.testnet){this.setProfileName(null,n),this.setProfileImage(null,n);return}try{const{name:a,avatar:c}=await this.fetchIdentity({address:e,caipNetworkId:i});this.setProfileName(a,n),this.setProfileImage(c,n)}catch{await this.syncReownName(e,n),r!==1&&this.setProfileImage(null,n)}}syncConnectedWalletInfo(e){const r=jr.getProviderId(e);if(r===Yr.CONNECTOR_TYPE_AUTH){const n=this.authProvider;if(n){const i=Oe.getConnectedSocialProvider()??"email",s=n.getEmail()??n.getUsername();this.setConnectedWalletInfo({name:r,identifier:s,social:i},e)}}else super.syncConnectedWalletInfo(e)}async injectModalUi(){if(it.isClient()&&!TD)try{const e={...Zr.DEFAULT_FEATURES,...this.options.features},r=this.remoteFeatures;if(await this.loadModalComponents(e,r),it.isClient()&&!document.querySelector("w3m-modal")){const i=document.createElement("w3m-modal");!Ee.state.disableAppend&&!Ee.state.enableEmbedded&&document.body.insertAdjacentElement("beforeend",i)}TD=!0}catch(e){console.error("Error injecting modal UI:",e)}}async loadModalComponents(e,r){if(!it.isClient())return;const n=[];(r.email||r.socials&&r.socials.length>0)&&n.push(Ie(()=>import("./embedded-wallet-DCHUEzWI.js"),__vite__mapDeps([98,99,100,101,102,103,104,105,106,107,108,109]))),r.email&&n.push(Ie(()=>import("./email-DcVMXyPE.js"),__vite__mapDeps([110,99,109,103,108,102,107,111,104]))),r.socials&&n.push(Ie(()=>import("./socials-Hezf8mB-.js"),__vite__mapDeps([112,99,113,102,114,115,108,116,107,103,109,117,101,118]))),r.swaps&&r.swaps.length>0&&n.push(Ie(()=>import("./swaps-kYGA5iFL.js"),__vite__mapDeps([119,99,107,103,120,121,122,101,108,118,104,102]))),e.send&&n.push(Ie(()=>import("./send-UfKqdzcB.js"),__vite__mapDeps([123,99,107,103,108,102,114,109,122,101,104,124,125]))),e.receive&&n.push(Ie(()=>import("./receive-CpQTVpTA.js"),__vite__mapDeps([126,99,127,101,117]))),r.onramp&&r.onramp.length>0&&n.push(Ie(()=>import("./onramp-CV30ebyU.js"),__vite__mapDeps([128,99,129,101,103,108,113,102,114,130,109,107,116,104]))),r.activity&&n.push(Ie(()=>import("./transactions-DjZy5Zt-.js"),__vite__mapDeps([131,99,132,66,108,109,101,118]))),e.pay&&n.push(Ie(()=>import("./index-C0yL8gtn.js"),__vite__mapDeps([133,99,107,103,134,101,108,105,129,125,116]))),await Promise.all([...n,Ie(()=>import("./index-xN3vPsci.js"),__vite__mapDeps([135,99,101,103,124,108,136,121,105,129,107,106,134,132,66,109,118,120,125,102,104,111,113,114,115,100,116,127,117,130])),Ie(()=>import("./w3m-modal-Cmq6Vq04.js"),__vite__mapDeps([137,99,105,101,108,106,103,121,136]))])}}const JTe="1.7.15";let $p;function QTe(t){return $p||($p=new ZTe({...t,sdkVersion:it.generateSdkVersion(t.adapters??[],"react",JTe)})),$p}function uBe(){const{caipNetwork:t,caipNetworkId:e,chainId:r}=Y7e();function n(i){$p==null||$p.switchNetwork(i)}return{caipNetwork:t,caipNetworkId:e,chainId:r,switchNetwork:n}}var m7={exports:{}};m7.exports;(function(t){(function(e,r){function n(T,m){if(!T)throw new Error(m||"Assertion failed")}function i(T,m){T.super_=m;var b=function(){};b.prototype=m.prototype,T.prototype=new b,T.prototype.constructor=T}function s(T,m,b){if(s.isBN(T))return T;this.negative=0,this.words=null,this.length=0,this.red=null,T!==null&&((m==="le"||m==="be")&&(b=m,m=10),this._init(T||0,m||10,b||"be"))}
vendor: 42,560 bytes, line 2971
2971typeof e=="object"?e.exports=s:r.BN=s,s.BN=s,s.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=GB.Buffer}catch{}s.isBN=function(m){return m instanceof s?!0:m!==null&&typeof m=="object"&&m.constructor.wordSize===s.wordSize&&Array.isArray(m.words)},s.max=function(m,b){return m.cmp(b)>0?m:b},s.min=function(m,b){return m.cmp(b)<0?m:b},s.prototype._init=function(m,b,E){if(typeof m=="number")return this._initNumber(m,b,E);if(typeof m=="object")return this._initArray(m,b,E);b==="hex"&&(b=16),n(b===(b|0)&&b>=2&&b<=36),m=m.toString().replace(/\s+/g,"");var k=0;m[0]==="-"&&(k++,this.negative=1),k<m.length&&(b===16?this._parseHex(m,k,E):(this._parseBase(m,b,k),E==="le"&&this._initArray(this.toArray(),b,E)))},s.prototype._initNumber=function(m,b,E){m<0&&(this.negative=1,m=-m),m<67108864?(this.words=[m&67108863],this.length=1):m<4503599627370496?(this.words=[m&67108863,m/67108864&67108863],this.length=2):(n(m<9007199254740992),this.words=[m&67108863,m/67108864&67108863,1],this.length=3),E==="le"&&this._initArray(this.toArray(),b,E)},s.prototype._initArray=function(m,b,E){if(n(typeof m.length=="number"),m.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(m.length/3),this.words=new Array(this.length);for(var k=0;k<this.length;k++)this.words[k]=0;var R,M,H=0;if(E==="be")for(k=m.length-1,R=0;k>=0;k-=3)M=m[k]|m[k-1]<<8|m[k-2]<<16,this.words[R]|=M<<H&67108863,this.words[R+1]=M>>>26-H&67108863,H+=24,H>=26&&(H-=26,R++);else if(E==="le")for(k=0,R=0;k<m.length;k+=3)M=m[k]|m[k+1]<<8|m[k+2]<<16,this.words[R]|=M<<H&67108863,this.words[R+1]=M>>>26-H&67108863,H+=24,H>=26&&(H-=26,R++);return this._strip()};function a(T,m){var b=T.charCodeAt(m);if(b>=48&&b<=57)return b-48;if(b>=65&&b<=70)return b-55;if(b>=97&&b<=102)return b-87;n(!1,"Invalid character in "+T)}function c(T,m,b){var E=a(T,b);return b-1>=m&&(E|=a(T,b-1)<<4),E}s.prototype._parseHex=function(m,b,E){this.length=Math.ceil((m.length-b)/6),this.words=new Array(this.length);for(var k=0;k<this.length;k++)this.words[k]=0;var R=0,M=0,H;if(E==="be")for(k=m.length-1;k>=b;k-=2)H=c(m,b,k)<<R,this.words[M]|=H&67108863,R>=18?(R-=18,M+=1,this.words[M]|=H>>>26):R+=8;else{var N=m.length-b;for(k=N%2===0?b+1:b;k<m.length;k+=2)H=c(m,b,k)<<R,this.words[M]|=H&67108863,R>=18?(R-=18,M+=1,this.words[M]|=H>>>26):R+=8}this._strip()};function l(T,m,b,E){for(var k=0,R=0,M=Math.min(T.length,b),H=m;H<M;H++){var N=T.charCodeAt(H)-48;k*=E,N>=49?R=N-49+10:N>=17?R=N-17+10:R=N,n(N>=0&&R<E,"Invalid character"),k+=R}return k}s.prototype._parseBase=function(m,b,E){this.words=[0],this.length=1;for(var k=0,R=1;R<=67108863;R*=b)k++;k--,R=R/b|0;for(var M=m.length-E,H=M%k,N=Math.min(M,M-H)+E,v=0,U=E;U<N;U+=k)v=l(m,U,U+k,b),this.imuln(R),this.words[0]+v<67108864?this.words[0]+=v:this._iaddn(v);if(H!==0){var G=1;for(v=l(m,U,m.length,b),U=0;U<H;U++)G*=b;this.imuln(G),this.words[0]+v<67108864?this.words[0]+=v:this._iaddn(v)}this._strip()},s.prototype.copy=function(m){m.words=new Array(this.length);for(var b=0;b<this.length;b++)m.words[b]=this.words[b];m.length=this.length,m.negative=this.negative,m.red=this.red};function u(T,m){T.words=m.words,T.length=m.length,T.negative=m.negative,T.red=m.red}if(s.prototype._move=function(m){u(m,this)},s.prototype.clone=function(){var m=new s(null);return this.copy(m),m},s.prototype._expand=function(m){for(;this.length<m;)this.words[this.length++]=0;return this},s.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch{s.prototype.inspect=f}else s.prototype.inspect=f;function f(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(m,b){m=m||10,b=b|0||1;var E;if(m===16||m==="hex"){E="";for(var k=0,R=0,M=0;M<this.length;M++){var H=this.words[M],N=((H<<k|R)&16777215).toString(16);R=H>>>24-k&16777215,k+=2,k>=26&&(k-=26,M--),R!==0||M!==this.length-1?E=d[6-N.length]+N+E:E=N+E}for(R!==0&&(E=R.toString(16)+E);E.length%b!==0;)E="0"+E;return this.negative!==0&&(E="-"+E),E}if(m===(m|0)&&m>=2&&m<=36){var v=p[m],U=h[m];E="";var G=this.clone();for(G.negative=0;!G.isZero();){var S=G.modrn(U).toString(m);G=G.idivn(U),G.isZero()?E=S+E:E=d[v-S.length]+S+E}for(this.isZero()&&(E="0"+E);E.length%b!==0;)E="0"+E;return this.negative!==0&&(E="-"+E),E}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var m=this.words[0];return this.length===2?m+=this.words[1]*67108864:this.length===3&&this.words[2]===1?m+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-m:m},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(m,b){return this.toArrayLike(o,m,b)}),s.prototype.toArray=function(m,b){return this.toArrayLike(Array,m,b)};var g=function(m,b){return m.allocUnsafe?m.allocUnsafe(b):new m(b)};s.prototype.toArrayLike=function(m,b,E){this._strip();var k=this.byteLength(),R=E||Math.max(1,k);n(k<=R,"byte array longer than desired length"),n(R>0,"Requested array length <= 0");var M=g(m,R),H=b==="le"?"LE":"BE";return this["_toArrayLike"+H](M,k),M},s.prototype._toArrayLikeLE=function(m,b){for(var E=0,k=0,R=0,M=0;R<this.length;R++){var H=this.words[R]<<M|k;m[E++]=H&255,E<m.length&&(m[E++]=H>>8&255),E<m.length&&(m[E++]=H>>16&255),M===6?(E<m.length&&(m[E++]=H>>24&255),k=0,M=0):(k=H>>>24,M+=2)}if(E<m.length)for(m[E++]=k;E<m.length;)m[E++]=0},s.prototype._toArrayLikeBE=function(m,b){for(var E=m.length-1,k=0,R=0,M=0;R<this.length;R++){var H=this.words[R]<<M|k;m[E--]=H&255,E>=0&&(m[E--]=H>>8&255),E>=0&&(m[E--]=H>>16&255),M===6?(E>=0&&(m[E--]=H>>24&255),k=0,M=0):(k=H>>>24,M+=2)}if(E>=0)for(m[E--]=k;E>=0;)m[E--]=0},Math.clz32?s.prototype._countBits=function(m){return 32-Math.clz32(m)}:s.prototype._countBits=function(m){var b=m,E=0;return b>=4096&&(E+=13,b>>>=13),b>=64&&(E+=7,b>>>=7),b>=8&&(E+=4,b>>>=4),b>=2&&(E+=2,b>>>=2),E+b},s.prototype._zeroBits=function(m){if(m===0)return 26;var b=m,E=0;return b&8191||(E+=13,b>>>=13),b&127||(E+=7,b>>>=7),b&15||(E+=4,b>>>=4),b&3||(E+=2,b>>>=2),b&1||E++,E},s.prototype.bitLength=function(){var m=this.words[this.length-1],b=this._countBits(m);return(this.length-1)*26+b};function y(T){for(var m=new Array(T.bitLength()),b=0;b<m.length;b++){var E=b/26|0,k=b%26;m[b]=T.words[E]>>>k&1}return m}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var m=0,b=0;b<this.length;b++){var E=this._zeroBits(this.words[b]);if(m+=E,E!==26)break}return m},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(m){return this.negative!==0?this.abs().inotn(m).iaddn(1):this.clone()},s.prototype.fromTwos=function(m){return this.testn(m-1)?this.notn(m).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return this.negative!==0},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(m){for(;this.length<m.length;)this.words[this.length++]=0;for(var b=0;b<m.length;b++)this.words[b]=this.words[b]|m.words[b];return this._strip()},s.prototype.ior=function(m){return n((this.negative|m.negative)===0),this.iuor(m)},s.prototype.or=function(m){return this.length>m.length?this.clone().ior(m):m.clone().ior(this)},s.prototype.uor=function(m){return this.length>m.length?this.clone().iuor(m):m.clone().iuor(this)},s.prototype.iuand=function(m){var b;this.length>m.length?b=m:b=this;for(var E=0;E<b.length;E++)this.words[E]=this.words[E]&m.words[E];return this.length=b.length,this._strip()},s.prototype.iand=function(m){return n((this.negative|m.negative)===0),this.iuand(m)},s.prototype.and=function(m){return this.length>m.length?this.clone().iand(m):m.clone().iand(this)},s.prototype.uand=function(m){return this.length>m.length?this.clone().iuand(m):m.clone().iuand(this)},s.prototype.iuxor=function(m){var b,E;this.length>m.length?(b=this,E=m):(b=m,E=this);for(var k=0;k<E.length;k++)this.words[k]=b.words[k]^E.words[k];if(this!==b)for(;k<b.length;k++)this.words[k]=b.words[k];return this.length=b.length,this._strip()},s.prototype.ixor=function(m){return n((this.negative|m.negative)===0),this.iuxor(m)},s.prototype.xor=function(m){return this.length>m.length?this.clone().ixor(m):m.clone().ixor(this)},s.prototype.uxor=function(m){return this.length>m.length?this.clone().iuxor(m):m.clone().iuxor(this)},s.prototype.inotn=function(m){n(typeof m=="number"&&m>=0);var b=Math.ceil(m/26)|0,E=m%26;this._expand(b),E>0&&b--;for(var k=0;k<b;k++)this.words[k]=~this.words[k]&67108863;return E>0&&(this.words[k]=~this.words[k]&67108863>>26-E),this._strip()},s.prototype.notn=function(m){return this.clone().inotn(m)},s.prototype.setn=function(m,b){n(typeof m=="number"&&m>=0);var E=m/26|0,k=m%26;return this._expand(E+1),b?this.words[E]=this.words[E]|1<<k:this.words[E]=this.words[E]&~(1<<k),this._strip()},s.prototype.iadd=function(m){var b;if(this.negative!==0&&m.negative===0)return this.negative=0,b=this.isub(m),this.negative^=1,this._normSign();if(this.negative===0&&m.negative!==0)return m.negative=0,b=this.isub(m),m.negative=1,b._normSign();var E,k;this.length>m.length?(E=this,k=m):(E=m,k=this);for(var R=0,M=0;M<k.length;M++)b=(E.words[M]|0)+(k.words[M]|0)+R,this.words[M]=b&67108863,R=b>>>26;for(;R!==0&&M<E.length;M++)b=(E.words[M]|0)+R,this.words[M]=b&67108863,R=b>>>26;if(this.length=E.length,R!==0)this.words[this.length]=R,this.length++;else if(E!==this)for(;M<E.length;M++)this.words[M]=E.words[M];return this},s.prototype.add=function(m){var b;return m.negative!==0&&this.negative===0?(m.negative=0,b=this.sub(m),m.negative^=1,b):m.negative===0&&this.negative!==0?(this.negative=0,b=m.sub(this),this.negative=1,b):this.length>m.length?this.clone().iadd(m):m.clone().iadd(this)},s.prototype.isub=function(m){if(m.negative!==0){m.negative=0;var b=this.iadd(m);return m.negative=1,b._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(m),this.negative=1,this._normSign();var E=this.cmp(m);if(E===0)return this.negative=0,this.length=1,this.words[0]=0,this;var k,R;E>0?(k=this,R=m):(k=m,R=this);for(var M=0,H=0;H<R.length;H++)b=(k.words[H]|0)-(R.words[H]|0)+M,M=b>>26,this.words[H]=b&67108863;for(;M!==0&&H<k.length;H++)b=(k.words[H]|0)+M,M=b>>26,this.words[H]=b&67108863;if(M===0&&H<k.length&&k!==this)for(;H<k.length;H++)this.words[H]=k.words[H];return this.length=Math.max(this.length,H),k!==this&&(this.negative=1),this._strip()},s.prototype.sub=function(m){return this.clone().isub(m)};function x(T,m,b){b.negative=m.negative^T.negative;var E=T.length+m.length|0;b.length=E,E=E-1|0;var k=T.words[0]|0,R=m.words[0]|0,M=k*R,H=M&67108863,N=M/67108864|0;b.words[0]=H;for(var v=1;v<E;v++){for(var U=N>>>26,G=N&67108863,S=Math.min(v,m.length-1),J=Math.max(0,v-T.length+1);J<=S;J++){var ne=v-J|0;k=T.words[ne]|0,R=m.words[J]|0,M=k*R+G,U+=M/67108864|0,G=M&67108863}b.words[v]=G|0,N=U|0}return N!==0?b.words[v]=N|0:b.length--,b._strip()}var C=function(m,b,E){var k=m.words,R=b.words,M=E.words,H=0,N,v,U,G=k[0]|0,S=G&8191,J=G>>>13,ne=k[1]|0,Z=ne&8191,Q=ne>>>13,ee=k[2]|0,re=ee&8191,ie=ee>>>13,me=k[3]|0,le=me&8191,ye=me>>>13,$t=k[4]|0,wt=$t&8191,ze=$t>>>13,gr=k[5]|0,Ut=gr&8191,ur=gr>>>13,hi=k[6]|0,Bt=hi&8191,Ht=hi>>>13,Pn=k[7]|0,Je=Pn&8191,ut=Pn>>>13,xt=k[8]|0,vt=xt&8191,ar=xt>>>13,Kn=k[9]|0,pt=Kn&8191,qe=Kn>>>13,Rn=R[0]|0,mr=Rn&8191,Ar=Rn>>>13,na=R[1]|0,Vr=na&8191,Kr=na>>>13,La=R[2]|0,un=La&8191,pn=La>>>13,Il=R[3]|0,vr=Il&8191,kr=Il>>>13,Js=R[4]|0,en=Js&8191,tn=Js>>>13,Cc=R[5]|0,gn=Cc&8191,cr=Cc>>>13,_c=R[6]|0,$=_c&8191,q=_c>>>13,K=R[7]|0,A=K&8191,Y=K>>>13,ae=R[8]|0,oe=ae&8191,pe=ae>>>13,Ce=R[9]|0,Le=Ce&8191,_e=Ce>>>13;E.negative=m.negative^b.negative,E.length=19,N=Math.imul(S,mr),v=Math.imul(S,Ar),v=v+Math.imul(J,mr)|0,U=Math.imul(J,Ar);var Kt=(H+N|0)+((v&8191)<<13)|0;H=(U+(v>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,N=Math.imul(Z,mr),v=Math.imul(Z,Ar),v=v+Math.imul(Q,mr)|0,U=Math.imul(Q,Ar),N=N+Math.imul(S,Vr)|0,v=v+Math.imul(S,Kr)|0,v=v+Math.imul(J,Vr)|0,U=U+Math.imul(J,Kr)|0;var Ve=(H+N|0)+((v&8191)<<13)|0;H=(U+(v>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,N=Math.imul(re,mr),v=Math.imul(re,Ar),v=v+Math.imul(ie,mr)|0,U=Math.imul(ie,Ar),N=N+Math.imul(Z,Vr)|0,v=v+Math.imul(Z,Kr)|0,v=v+Math.imul(Q,Vr)|0,U=U+Math.imul(Q,Kr)|0,N=N+Math.imul(S,un)|0,v=v+Math.imul(S,pn)|0,v=v+Math.imul(J,un)|0,U=U+Math.imul(J,pn)|0;var Et=(H+N|0)+((v&8191)<<13)|0;H=(U+(v>>>13)|0)+(Et>>>26)|0,Et&=67108863,N=Math.imul(le,mr),v=Math.imul(le,Ar),v=v+Math.imul(ye,mr)|0,U=Math.imul(ye,Ar),N=N+Math.imul(re,Vr)|0,v=v+Math.imul(re,Kr)|0,v=v+Math.imul(ie,Vr)|0,U=U+Math.imul(ie,Kr)|0,N=N+Math.imul(Z,un)|0,v=v+Math.imul(Z,pn)|0,v=v+Math.imul(Q,un)|0,U=U+Math.imul(Q,pn)|0,N=N+Math.imul(S,vr)|0,v=v+Math.imul(S,kr)|0,v=v+Math.imul(J,vr)|0,U=U+Math.imul(J,kr)|0;var Ct=(H+N|0)+((v&8191)<<13)|0;H=(U+(v>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,N=Math.imul(wt,mr),v=Math.imul(wt,Ar),v=v+Math.imul(ze,mr)|0,U=Math.imul(ze,Ar),N=N+Math.imul(le,Vr)|0,v=v+Math.imul(le,Kr)|0,v=v+Math.imul(ye,Vr)|0,U=U+Math.imul(ye,Kr)|0,N=N+Math.imul(re,un)|0,v=v+Math.imul(re,pn)|0,v=v+Math.imul(ie,un)|0,U=U+Math.imul(ie,pn)|0,N=N+Math.imul(Z,vr)|0,v=v+Math.imul(Z,kr)|0,v=v+Math.imul(Q,vr)|0,U=U+Math.imul(Q,kr)|0,N=N+Math.imul(S,en)|0,v=v+Math.imul(S,tn)|0,v=v+Math.imul(J,en)|0,U=U+Math.imul(J,tn)|0;var kt=(H+N|0)+((v&8191)<<13)|0;H=(U+(v>>>13)|0)+(kt>>>26)|0,kt&=67108863,N=Math.imul(Ut,mr),v=Math.imul(Ut,Ar),v=v+Math.imul(ur,mr)|0,U=Math.imul(ur,Ar),N=N+Math.imul(wt,Vr)|0,v=v+Math.imul(wt,Kr)|0,v=v+Math.imul(ze,Vr)|0,U=U+Math.imul(ze,Kr)|0,N=N+Math.imul(le,un)|0,v=v+Math.imul(le,pn)|0,v=v+Math.imul(ye,un)|0,U=U+Math.imul(ye,pn)|0,N=N+Math.imul(re,vr)|0,v=v+Math.imul(re,kr)|0,v=v+Math.imul(ie,vr)|0,U=U+Math.imul(ie,kr)|0,N=N+Math.imul(Z,en)|0,v=v+Math.imul(Z,tn)|0,v=v+Math.imul(Q,en)|0,U=U+Math.imul(Q,tn)|0,N=N+Math.imul(S,gn)|0,v=v+Math.imul(S,cr)|0,v=v+Math.imul(J,gn)|0,U=U+Math.imul(J,cr)|0;var Ft=(H+N|0)+((v&8191)<<13)|0;H=(U+(v>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,N=Math.imul(Bt,mr),v=Math.imul(Bt,Ar),v=v+Math.imul(Ht,mr)|0,U=Math.imul(Ht,Ar),N=N+Math.imul(Ut,Vr)|0,v=v+Math.imul(Ut,Kr)|0,v=v+Math.imul(ur,Vr)|0,U=U+Math.imul(ur,Kr)|0,N=N+Math.imul(wt,un)|0,v=v+Math.imul(wt,pn)|0,v=v+Math.imul(ze,un)|0,U=U+Math.imul(ze,pn)|0,N=N+Math.imul(le,vr)|0,v=v+Math.imul(le,kr)|0,v=v+Math.imul(ye,vr)|0,U=U+Math.imul(ye,kr)|0,N=N+Math.imul(re,en)|0,v=v+Math.imul(re,tn)|0,v=v+Math.imul(ie,en)|0,U=U+Math.imul(ie,tn)|0,N=N+Math.imul(Z,gn)|0,v=v+Math.imul(Z,cr)|0,v=v+Math.imul(Q,gn)|0,U=U+Math.imul(Q,cr)|0,N=N+Math.imul(S,$)|0,v=v+Math.imul(S,q)|0,v=v+Math.imul(J,$)|0,U=U+Math.imul(J,q)|0;var Pt=(H+N|0)+((v&8191)<<13)|0;H=(U+(v>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,N=Math.imul(Je,mr),v=Math.imul(Je,Ar),v=v+Math.imul(ut,mr)|0,U=Math.imul(ut,Ar),N=N+Math.imul(Bt,Vr)|0,v=v+Math.imul(Bt,Kr)|0,v=v+Math.imul(Ht,Vr)|0,U=U+Math.imul(Ht,Kr)|0,N=N+Math.imul(Ut,un)|0,v=v+Math.imul(Ut,pn)|0,v=v+Math.imul(ur,un)|0,U=U+Math.imul(ur,pn)|0,N=N+Math.imul(wt,vr)|0,v=v+Math.imul(wt,kr)|0,v=v+Math.imul(ze,vr)|0,U=U+Math.imul(ze,kr)|0,N=N+Math.imul(le,en)|0,v=v+Math.imul(le,tn)|0,v=v+Math.imul(ye,en)|0,U=U+Math.imul(ye,tn)|0,N=N+Math.imul(re,gn)|0,v=v+Math.imul(re,cr)|0,v=v+Math.imul(ie,gn)|0,U=U+Math.imul(ie,cr)|0,N=N+Math.imul(Z,$)|0,v=v+Math.imul(Z,q)|0,v=v+Math.imul(Q,$)|0,U=U+Math.imul(Q,q)|0,N=N+Math.imul(S,A)|0,v=v+Math.imul(S,Y)|0,v=v+Math.imul(J,A)|0,U=U+Math.imul(J,Y)|0;var Ot=(H+N|0)+((v&8191)<<13)|0;H=(U+(v>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,N=Math.imul(vt,mr),v=Math.imul(vt,Ar),v=v+Math.imul(ar,mr)|0,U=Math.imul(ar,Ar),N=N+Math.imul(Je,Vr)|0,v=v+Math.imul(Je,Kr)|0,v=v+Math.imul(ut,Vr)|0,U=U+Math.imul(ut,Kr)|0,N=N+Math.imul(Bt,un)|0,v=v+Math.imul(Bt,pn)|0,v=v+Math.imul(Ht,un)|0,U=U+Math.imul(Ht,pn)|0,N=N+Math.imul(Ut,vr)|0,v=v+Math.imul(Ut,kr)|0,v=v+Math.imul(ur,vr)|0,U=U+Math.imul(ur,kr)|0,N=N+Math.imul(wt,en)|0,v=v+Math.imul(wt,tn)|0,v=v+Math.imul(ze,en)|0,U=U+Math.imul(ze,tn)|0,N=N+Math.imul(le,gn)|0,v=v+Math.imul(le,cr)|0,v=v+Math.imul(ye,gn)|0,U=U+Math.imul(ye,cr)|0,N=N+Math.imul(re,$)|0,v=v+Math.imul(re,q)|0,v=v+Math.imul(ie,$)|0,U=U+Math.imul(ie,q)|0,N=N+Math.imul(Z,A)|0,v=v+Math.imul(Z,Y)|0,v=v+Math.imul(Q,A)|0,U=U+Math.imul(Q,Y)|0,N=N+Math.imul(S,oe)|0,v=v+Math.imul(S,pe)|0,v=v+Math.imul(J,oe)|0,U=U+Math.imul(J,pe)|0;var Rt=(H+N|0)+((v&8191)<<13)|0;H=(U+(v>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,N=Math.imul(pt,mr),v=Math.imul(pt,Ar),v=v+Math.imul(qe,mr)|0,U=Math.imul(qe,Ar),N=N+Math.imul(vt,Vr)|0,v=v+Math.imul(vt,Kr)|0,v=v+Math.imul(ar,Vr)|0,U=U+Math.imul(ar,Kr)|0,N=N+Math.imul(Je,un)|0,v=v+Math.imul(Je,pn)|0,v=v+Math.imul(ut,un)|0,U=U+Math.imul(ut,pn)|0,N=N+Math.imul(Bt,vr)|0,v=v+Math.imul(Bt,kr)|0,v=v+Math.imul(Ht,vr)|0,U=U+Math.imul(Ht,kr)|0,N=N+Math.imul(Ut,en)|0,v=v+Math.imul(Ut,tn)|0,v=v+Math.imul(ur,en)|0,U=U+Math.imul(ur,tn)|0,N=N+Math.imul(wt,gn)|0,v=v+Math.imul(wt,cr)|0,v=v+Math.imul(ze,gn)|0,U=U+Math.imul(ze,cr)|0,N=N+Math.imul(le,$)|0,v=v+Math.imul(le,q)|0,v=v+Math.imul(ye,$)|0,U=U+Math.imul(ye,q)|0,N=N+Math.imul(re,A)|0,v=v+Math.imul(re,Y)|0,v=v+Math.imul(ie,A)|0,U=U+Math.imul(ie,Y)|0,N=N+Math.imul(Z,oe)|0,v=v+Math.imul(Z,pe)|0,v=v+Math.imul(Q,oe)|0,U=U+Math.imul(Q,pe)|0,N=N+Math.imul(S,Le)|0,v=v+Math.imul(S,_e)|0,v=v+Math.imul(J,Le)|0,U=U+Math.imul(J,_e)|0;var Qe=(H+N|0)+((v&8191)<<13)|0;H=(U+(v>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,N=Math.imul(pt,Vr),v=Math.imul(pt,Kr),v=v+Math.imul(qe,Vr)|0,U=Math.imul(qe,Kr),N=N+Math.imul(vt,un)|0,v=v+Math.imul(vt,pn)|0,v=v+Math.imul(ar,un)|0,U=U+Math.imul(ar,pn)|0,N=N+Math.imul(Je,vr)|0,v=v+Math.imul(Je,kr)|0,v=v+Math.imul(ut,vr)|0,U=U+Math.imul(ut,kr)|0,N=N+Math.imul(Bt,en)|0,v=v+Math.imul(Bt,tn)|0,v=v+Math.imul(Ht,en)|0,U=U+Math.imul(Ht,tn)|0,N=N+Math.imul(Ut,gn)|0,v=v+Math.imul(Ut,cr)|0,v=v+Math.imul(ur,gn)|0,U=U+Math.imul(ur,cr)|0,N=N+Math.imul(wt,$)|0,v=v+Math.imul(wt,q)|0,v=v+Math.imul(ze,$)|0,U=U+Math.imul(ze,q)|0,N=N+Math.imul(le,A)|0,v=v+Math.imul(le,Y)|0,v=v+Math.imul(ye,A)|0,U=U+Math.imul(ye,Y)|0,N=N+Math.imul(re,oe)|0,v=v+Math.imul(re,pe)|0,v=v+Math.imul(ie,oe)|0,U=U+Math.imul(ie,pe)|0,N=N+Math.imul(Z,Le)|0,v=v+Math.imul(Z,_e)|0,v=v+Math.imul(Q,Le)|0,U=U+Math.imul(Q,_e)|0;var dt=(H+N|0)+((v&8191)<<13)|0;H=(U+(v>>>13)|0)+(dt>>>26)|0,dt&=67108863,N=Math.imul(pt,un),v=Math.imul(pt,pn),v=v+Math.imul(qe,un)|0,U=Math.imul(qe,pn),N=N+Math.imul(vt,vr)|0,v=v+Math.imul(vt,kr)|0,v=v+Math.imul(ar,vr)|0,U=U+Math.imul(ar,kr)|0,N=N+Math.imul(Je,en)|0,v=v+Math.imul(Je,tn)|0,v=v+Math.imul(ut,en)|0,U=U+Math.imul(ut,tn)|0,N=N+Math.imul(Bt,gn)|0,v=v+Math.imul(Bt,cr)|0,v=v+Math.imul(Ht,gn)|0,U=U+Math.imul(Ht,cr)|0,N=N+Math.imul(Ut,$)|0,v=v+Math.imul(Ut,q)|0,v=v+Math.imul(ur,$)|0,U=U+Math.imul(ur,q)|0,N=N+Math.imul(wt,A)|0,v=v+Math.imul(wt,Y)|0,v=v+Math.imul(ze,A)|0,U=U+Math.imul(ze,Y)|0,N=N+Math.imul(le,oe)|0,v=v+Math.imul(le,pe)|0,v=v+Math.imul(ye,oe)|0,U=U+Math.imul(ye,pe)|0,N=N+Math.imul(re,Le)|0,v=v+Math.imul(re,_e)|0,v=v+Math.imul(ie,Le)|0,U=U+Math.imul(ie,_e)|0;var Ke=(H+N|0)+((v&8191)<<13)|0;H=(U+(v>>>13)|0)+(Ke>>>26)|0,Ke&=67108863,N=Math.imul(pt,vr),v=Math.imul(pt,kr),v=v+Math.imul(qe,vr)|0,U=Math.imul(qe,kr),N=N+Math.imul(vt,en)|0,v=v+Math.imul(vt,tn)|0,v=v+Math.imul(ar,en)|0,U=U+Math.imul(ar,tn)|0,N=N+Math.imul(Je,gn)|0,v=v+Math.imul(Je,cr)|0,v=v+Math.imul(ut,gn)|0,U=U+Math.imul(ut,cr)|0,N=N+Math.imul(Bt,$)|0,v=v+Math.imul(Bt,q)|0,v=v+Math.imul(Ht,$)|0,U=U+Math.imul(Ht,q)|0,N=N+Math.imul(Ut,A)|0,v=v+Math.imul(Ut,Y)|0,v=v+Math.imul(ur,A)|0,U=U+Math.imul(ur,Y)|0,N=N+Math.imul(wt,oe)|0,v=v+Math.imul(wt,pe)|0,v=v+Math.imul(ze,oe)|0,U=U+Math.imul(ze,pe)|0,N=N+Math.imul(le,Le)|0,v=v+Math.imul(le,_e)|0,v=v+Math.imul(ye,Le)|0,U=U+Math.imul(ye,_e)|0;var tt=(H+N|0)+((v&8191)<<13)|0;H=(U+(v>>>13)|0)+(tt>>>26)|0,tt&=67108863,N=Math.imul(pt,en),v=Math.imul(pt,tn),v=v+Math.imul(qe,en)|0,U=Math.imul(qe,tn),N=N+Math.imul(vt,gn)|0,v=v+Math.imul(vt,cr)|0,v=v+Math.imul(ar,gn)|0,U=U+Math.imul(ar,cr)|0,N=N+Math.imul(Je,$)|0,v=v+Math.imul(Je,q)|0,v=v+Math.imul(ut,$)|0,U=U+Math.imul(ut,q)|0,N=N+Math.imul(Bt,A)|0,v=v+Math.imul(Bt,Y)|0,v=v+Math.imul(Ht,A)|0,U=U+Math.imul(Ht,Y)|0,N=N+Math.imul(Ut,oe)|0,v=v+Math.imul(Ut,pe)|0,v=v+Math.imul(ur,oe)|0,U=U+Math.imul(ur,pe)|0,N=N+Math.imul(wt,Le)|0,v=v+Math.imul(wt,_e)|0,v=v+Math.imul(ze,Le)|0,U=U+Math.imul(ze,_e)|0;var ot=(H+N|0)+((v&8191)<<13)|0;H=(U+(v>>>13)|0)+(ot>>>26)|0,ot&=67108863,N=Math.imul(pt,gn),v=Math.imul(pt,cr),v=v+Math.imul(qe,gn)|0,U=Math.imul(qe,cr),N=N+Math.imul(vt,$)|0,v=v+Math.imul(vt,q)|0,v=v+Math.imul(ar,$)|0,U=U+Math.imul(ar,q)|0,N=N+Math.imul(Je,A)|0,v=v+Math.imul(Je,Y)|0,v=v+Math.imul(ut,A)|0,U=U+Math.imul(ut,Y)|0,N=N+Math.imul(Bt,oe)|0,v=v+Math.imul(Bt,pe)|0,v=v+Math.imul(Ht,oe)|0,U=U+Math.imul(Ht,pe)|0,N=N+Math.imul(Ut,Le)|0,v=v+Math.imul(Ut,_e)|0,v=v+Math.imul(ur,Le)|0,U=U+Math.imul(ur,_e)|0;var He=(H+N|0)+((v&8191)<<13)|0;H=(U+(v>>>13)|0)+(He>>>26)|0,He&=67108863,N=Math.imul(pt,$),v=Math.imul(pt,q),v=v+Math.imul(qe,$)|0,U=Math.imul(qe,q),N=N+Math.imul(vt,A)|0,v=v+Math.imul(vt,Y)|0,v=v+Math.imul(ar,A)|0,U=U+Math.imul(ar,Y)|0,N=N+Math.imul(Je,oe)|0,v=v+Math.imul(Je,pe)|0,v=v+Math.imul(ut,oe)|0,U=U+Math.imul(ut,pe)|0,N=N+Math.imul(Bt,Le)|0,v=v+Math.imul(Bt,_e)|0,v=v+Math.imul(Ht,Le)|0,U=U+Math.imul(Ht,_e)|0;var de=(H+N|0)+((v&8191)<<13)|0;H=(U+(v>>>13)|0)+(de>>>26)|0,de&=67108863,N=Math.imul(pt,A),v=Math.imul(pt,Y),v=v+Math.imul(qe,A)|0,U=Math.imul(qe,Y),N=N+Math.imul(vt,oe)|0,v=v+Math.imul(vt,pe)|0,v=v+Math.imul(ar,oe)|0,U=U+Math.imul(ar,pe)|0,N=N+Math.imul(Je,Le)|0,v=v+Math.imul(Je,_e)|0,v=v+Math.imul(ut,Le)|0,U=U+Math.imul(ut,_e)|0;var he=(H+N|0)+((v&8191)<<13)|0;H=(U+(v>>>13)|0)+(he>>>26)|0,he&=67108863,N=Math.imul(pt,oe),v=Math.imul(pt,pe),v=v+Math.imul(qe,oe)|0,U=Math.imul(qe,pe),N=N+Math.imul(vt,Le)|0,v=v+Math.imul(vt,_e)|0,v=v+Math.imul(ar,Le)|0,U=U+Math.imul(ar,_e)|0;var xe=(H+N|0)+((v&8191)<<13)|0;H=(U+(v>>>13)|0)+(xe>>>26)|0,xe&=67108863,N=Math.imul(pt,Le),v=Math.imul(pt,_e),v=v+Math.imul(qe,Le)|0,U=Math.imul(qe,_e);var be=(H+N|0)+((v&8191)<<13)|0;return H=(U+(v>>>13)|0)+(be>>>26)|0,be&=67108863,M[0]=Kt,M[1]=Ve,M[2]=Et,M[3]=Ct,M[4]=kt,M[5]=Ft,M[6]=Pt,M[7]=Ot,M[8]=Rt,M[9]=Qe,M[10]=dt,M[11]=Ke,M[12]=tt,M[13]=ot,M[14]=He,M[15]=de,M[16]=he,M[17]=xe,M[18]=be,H!==0&&(M[19]=H,E.length++),E};Math.imul||(C=x);function _(T,m,b){b.negative=m.negative^T.negative,b.length=T.length+m.length;for(var E=0,k=0,R=0;R<b.length-1;R++){var M=k;k=0;for(var H=E&67108863,N=Math.min(R,m.length-1),v=Math.max(0,R-T.length+1);v<=N;v++){var U=R-v,G=T.words[U]|0,S=m.words[v]|0,J=G*S,ne=J&67108863;M=M+(J/67108864|0)|0,ne=ne+H|0,H=ne&67108863,M=M+(ne>>>26)|0,k+=M>>>26,M&=67108863}b.words[R]=H,E=M,M=k}return E!==0?b.words[R]=E:b.length--,b._strip()}function L(T,m,b){return _(T,m,b)}s.prototype.mulTo=function(m,b){var E,k=this.length+m.length;return this.length===10&&m.length===10?E=C(this,m,b):k<63?E=x(this,m,b):k<1024?E=_(this,m,b):E=L(this,m,b),E},s.prototype.mul=function(m){var b=new s(null);return b.words=new Array(this.length+m.length),this.mulTo(m,b)},s.prototype.mulf=function(m){var b=new s(null);return b.words=new Array(this.length+m.length),L(this,m,b)},s.prototype.imul=function(m){return this.clone().mulTo(m,this)},s.prototype.imuln=function(m){var b=m<0;b&&(m=-m),n(typeof m=="number"),n(m<67108864);for(var E=0,k=0;k<this.length;k++){var R=(this.words[k]|0)*m,M=(R&67108863)+(E&67108863);E>>=26,E+=R/67108864|0,E+=M>>>26,this.words[k]=M&67108863}return E!==0&&(this.words[k]=E,this.length++),this.length=m===0?1:this.length,b?this.ineg():this},s.prototype.muln=function(m){return this.clone().imuln(m)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(m){var b=y(m);if(b.length===0)return new s(1);for(var E=this,k=0;k<b.length&&b[k]===0;k++,E=E.sqr());if(++k<b.length)for(var R=E.sqr();k<b.length;k++,R=R.sqr())b[k]!==0&&(E=E.mul(R));return E},s.prototype.iushln=function(m){n(typeof m=="number"&&m>=0);var b=m%26,E=(m-b)/26,k=67108863>>>26-b<<26-b,R;if(b!==0){var M=0;for(R=0;R<this.length;R++){var H=this.words[R]&k,N=(this.words[R]|0)-H<<b;this.words[R]=N|M,M=H>>>26-b}M&&(this.words[R]=M,this.length++)}if(E!==0){for(R=this.length-1;R>=0;R--)this.words[R+E]=this.words[R];for(R=0;R<E;R++)this.words[R]=0;this.length+=E}return this._strip()},s.prototype.ishln=function(m){return n(this.negative===0),this.iushln(m)},s.prototype.iushrn=function(m,b,E){n(typeof m=="number"&&m>=0);var k;b?k=(b-b%26)/26:k=0;var R=m%26,M=Math.min((m-R)/26,this.length),H=67108863^67108863>>>R<<R,N=E;if(k-=M,k=Math.max(0,k),N){for(var v=0;v<M;v++)N.words[v]=this.words[v];N.length=M}if(M!==0)if(this.length>M)for(this.length-=M,v=0;v<this.length;v++)this.words[v]=this.words[v+M];else this.words[0]=0,this.length=1;var U=0;for(v=this.length-1;v>=0&&(U!==0||v>=k);v--){var G=this.words[v]|0;this.words[v]=U<<26-R|G>>>R,U=G&H}return N&&U!==0&&(N.words[N.length++]=U),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(m,b,E){return n(this.negative===0),this.iushrn(m,b,E)},s.prototype.shln=function(m){return this.clone().ishln(m)},s.prototype.ushln=function(m){return this.clone().iushln(m)},s.prototype.shrn=function(m){return this.clone().ishrn(m)},s.prototype.ushrn=function(m){return this.clone().iushrn(m)},s.prototype.testn=function(m){n(typeof m=="number"&&m>=0);var b=m%26,E=(m-b)/26,k=1<<b;if(this.length<=E)return!1;var R=this.words[E];return!!(R&k)},s.prototype.imaskn=function(m){n(typeof m=="number"&&m>=0);var b=m%26,E=(m-b)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=E)return this;if(b!==0&&E++,this.length=Math.min(E,this.length),b!==0){var k=67108863^67108863>>>b<<b;this.words[this.length-1]&=k}return this._strip()},s.prototype.maskn=function(m){return this.clone().imaskn(m)},s.prototype.iaddn=function(m){return n(typeof m=="number"),n(m<67108864),m<0?this.isubn(-m):this.negative!==0?this.length===1&&(this.words[0]|0)<=m?(this.words[0]=m-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(m),this.negative=1,this):this._iaddn(m)},s.prototype._iaddn=function(m){this.words[0]+=m;for(var b=0;b<this.length&&this.words[b]>=67108864;b++)this.words[b]-=67108864,b===this.length-1?this.words[b+1]=1:this.words[b+1]++;return this.length=Math.max(this.length,b+1),this},s.prototype.isubn=function(m){if(n(typeof m=="number"),n(m<67108864),m<0)return this.iaddn(-m);if(this.negative!==0)return this.negative=0,this.iaddn(m),this.negative=1,this;if(this.words[0]-=m,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var b=0;b<this.length&&this.words[b]<0;b++)this.words[b]+=67108864,this.words[b+1]-=1;return this._strip()},s.prototype.addn=function(m){return this.clone().iaddn(m)},s.prototype.subn=function(m){return this.clone().isubn(m)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(m,b,E){var k=m.length+E,R;this._expand(k);var M,H=0;for(R=0;R<m.length;R++){M=(this.words[R+E]|0)+H;var N=(m.words[R]|0)*b;M-=N&67108863,H=(M>>26)-(N/67108864|0),this.words[R+E]=M&67108863}for(;R<this.length-E;R++)M=(this.words[R+E]|0)+H,H=M>>26,this.words[R+E]=M&67108863;if(H===0)return this._strip();for(n(H===-1),H=0,R=0;R<this.length;R++)M=-(this.words[R]|0)+H,H=M>>26,this.words[R]=M&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(m,b){var E=this.length-m.length,k=this.clone(),R=m,M=R.words[R.length-1]|0,H=this._countBits(M);E=26-H,E!==0&&(R=R.ushln(E),k.iushln(E),M=R.words[R.length-1]|0);var N=k.length-R.length,v;if(b!=="mod"){v=new s(null),v.length=N+1,v.words=new Array(v.length);for(var U=0;U<v.length;U++)v.words[U]=0}var G=k.clone()._ishlnsubmul(R,1,N);G.negative===0&&(k=G,v&&(v.words[N]=1));for(var S=N-1;S>=0;S--){var J=(k.words[R.length+S]|0)*67108864+(k.words[R.length+S-1]|0);for(J=Math.min(J/M|0,67108863),k._ishlnsubmul(R,J,S);k.negative!==0;)J--,k.negative=0,k._ishlnsubmul(R,1,S),k.isZero()||(k.negative^=1);v&&(v.words[S]=J)}return v&&v._strip(),k._strip(),b!=="div"&&E!==0&&k.iushrn(E),{div:v||null,mod:k}},s.prototype.divmod=function(m,b,E){if(n(!m.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var k,R,M;return this.negative!==0&&m.negative===0?(M=this.neg().divmod(m,b),b!=="mod"&&(k=M.div.neg()),b!=="div"&&(R=M.mod.neg(),E&&R.negative!==0&&R.iadd(m)),{div:k,mod:R}):this.negative===0&&m.negative!==0?(M=this.divmod(m.neg(),b),b!=="mod"&&(k=M.div.neg()),{div:k,mod:M.mod}):this.negative&m.negative?(M=this.neg().divmod(m.neg(),b),b!=="div"&&(R=M.mod.neg(),E&&R.negative!==0&&R.isub(m)),{div:M.div,mod:R}):m.length>this.length||this.cmp(m)<0?{div:new s(0),mod:this}:m.length===1?b==="div"?{div:this.divn(m.words[0]),mod:null}:b==="mod"?{div:null,mod:new s(this.modrn(m.words[0]))}:{div:this.divn(m.words[0]),mod:new s(this.modrn(m.words[0]))}:this._wordDiv(m,b)},s.prototype.div=function(m){return this.divmod(m,"div",!1).div},s.prototype.mod=function(m){return this.divmod(m,"mod",!1).mod},s.prototype.umod=function(m){return this.divmod(m,"mod",!0).mod},s.prototype.divRound=function(m){var b=this.divmod(m);if(b.mod.isZero())return b.div;var E=b.div.negative!==0?b.mod.isub(m):b.mod,k=m.ushrn(1),R=m.andln(1),M=E.cmp(k);return M<0||R===1&&M===0?b.div:b.div.negative!==0?b.div.isubn(1):b.div.iaddn(1)},s.prototype.modrn=function(m){var b=m<0;b&&(m=-m),n(m<=67108863);for(var E=(1<<26)%m,k=0,R=this.length-1;R>=0;R--)k=(E*k+(this.words[R]|0))%m;return b?-k:k},s.prototype.modn=function(m){return this.modrn(m)},s.prototype.idivn=function(m){var b=m<0;b&&(m=-m),n(m<=67108863);for(var E=0,k=this.length-1;k>=0;k--){var R=(this.words[k]|0)+E*67108864;this.words[k]=R/m|0,E=R%m}return this._strip(),b?this.ineg():this},s.prototype.divn=function(m){return this.clone().idivn(m)},s.prototype.egcd=function(m){n(m.negative===0),n(!m.isZero());var b=this,E=m.clone();b.negative!==0?b=b.umod(m):b=b.clone();for(var k=new s(1),R=new s(0),M=new s(0),H=new s(1),N=0;b.isEven()&&E.isEven();)b.iushrn(1),E.iushrn(1),++N;for(var v=E.clone(),U=b.clone();!b.isZero();){for(var G=0,S=1;!(b.words[0]&S)&&G<26;++G,S<<=1);if(G>0)for(b.iushrn(G);G-- >0;)(k.isOdd()||R.isOdd())&&(k.iadd(v),R.isub(U)),k.iushrn(1),R.iushrn(1);for(var J=0,ne=1;!(E.words[0]&ne)&&J<26;++J,ne<<=1);if(J>0)for(E.iushrn(J);J-- >0;)(M.isOdd()||H.isOdd())&&(M.iadd(v),H.isub(U)),M.iushrn(1),H.iushrn(1);b.cmp(E)>=0?(b.isub(E),k.isub(M),R.isub(H)):(E.isub(b),M.isub(k),H.isub(R))}return{a:M,b:H,gcd:E.iushln(N)}},s.prototype._invmp=function(m){n(m.negative===0),n(!m.isZero());var b=this,E=m.clone();b.negative!==0?b=b.umod(m):b=b.clone();for(var k=new s(1),R=new s(0),M=E.clone();b.cmpn(1)>0&&E.cmpn(1)>0;){for(var H=0,N=1;!(b.words[0]&N)&&H<26;++H,N<<=1);if(H>0)for(b.iushrn(H);H-- >0;)k.isOdd()&&k.iadd(M),k.iushrn(1);for(var v=0,U=1;!(E.words[0]&U)&&v<26;++v,U<<=1);if(v>0)for(E.iushrn(v);v-- >0;)R.isOdd()&&R.iadd(M),R.iushrn(1);b.cmp(E)>=0?(b.isub(E),k.isub(R)):(E.isub(b),R.isub(k))}var G;return b.cmpn(1)===0?G=k:G=R,G.cmpn(0)<0&&G.iadd(m),G},s.prototype.gcd=function(m){if(this.isZero())return m.abs();if(m.isZero())return this.abs();var b=this.clone(),E=m.clone();b.negative=0,E.negative=0;for(var k=0;b.isEven()&&E.isEven();k++)b.iushrn(1),E.iushrn(1);do{for(;b.isEven();)b.iushrn(1);for(;E.isEven();)E.iushrn(1);var R=b.cmp(E);if(R<0){var M=b;b=E,E=M}else if(R===0||E.cmpn(1)===0)break;b.isub(E)}while(!0);return E.iushln(k)},s.prototype.invm=function(m){return this.egcd(m).a.umod(m)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(m){return this.words[0]&m},s.prototype.bincn=function(m){n(typeof m=="number");var b=m%26,E=(m-b)/26,k=1<<b;if(this.length<=E)return this._expand(E+1),this.words[E]|=k,this;for(var R=k,M=E;R!==0&&M<this.length;M++){var H=this.words[M]|0;H+=R,R=H>>>26,H&=67108863,this.words[M]=H}return R!==0&&(this.words[M]=R,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(m){var b=m<0;if(this.negative!==0&&!b)return-1;if(this.negative===0&&b)return 1;this._strip();var E;if(this.length>1)E=1;else{b&&(m=-m),n(m<=67108863,"Number is too big");var k=this.words[0]|0;E=k===m?0:k<m?-1:1}return this.negative!==0?-E|0:E},s.prototype.cmp=function(m){if(this.negative!==0&&m.negative===0)return-1;if(this.negative===0&&m.negative!==0)return 1;var b=this.ucmp(m);return this.negative!==0?-b|0:b},s.prototype.ucmp=function(m){if(this.length>m.length)return 1;if(this.length<m.length)return-1;for(var b=0,E=this.length-1;E>=0;E--){var k=this.words[E]|0,R=m.words[E]|0;if(k!==R){k<R?b=-1:k>R&&(b=1);break}}return b},s.prototype.gtn=function(m){return this.cmpn(m)===1},s.prototype.gt=function(m){return this.cmp(m)===1},s.prototype.gten=function(m){return this.cmpn(m)>=0},s.prototype.gte=function(m){return this.cmp(m)>=0},s.prototype.ltn=function(m){return this.cmpn(m)===-1},s.prototype.lt=function(m){return this.cmp(m)===-1},s.prototype.lten=function(m){return this.cmpn(m)<=0},s.prototype.lte=function(m){return this.cmp(m)<=0},s.prototype.eqn=function(m){return this.cmpn(m)===0},s.prototype.eq=function(m){return this.cmp(m)===0},s.red=function(m){return new D(m)},s.prototype.toRed=function(m){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),m.convertTo(this)._forceRed(m)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(m){return this.red=m,this},s.prototype.forceRed=function(m){return n(!this.red,"Already a number in reduction context"),this._forceRed(m)},s.prototype.redAdd=function(m){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,m)},s.prototype.redIAdd=function(m){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,m)},s.prototype.redSub=function(m){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,m)},s.prototype.redISub=function(m){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,m)},s.prototype.redShl=function(m){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,m)},s.prototype.redMul=function(m){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,m),this.red.mul(this,m)},s.prototype.redIMul=function(m){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,m),this.red.imul(this,m)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(m){return n(this.red&&!m.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,m)};var P={k256:null,p224:null,p192:null,p25519:null};function z(T,m){this.name=T,this.p=new s(m,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}z.prototype._tmp=function(){var m=new s(null);return m.words=new Array(Math.ceil(this.n/13)),m},z.prototype.ireduce=function(m){var b=m,E;do this.split(b,this.tmp),b=this.imulK(b),b=b.iadd(this.tmp),E=b.bitLength();while(E>this.n);var k=E<this.n?-1:b.ucmp(this.p);return k===0?(b.words[0]=0,b.length=1):k>0?b.isub(this.p):b.strip!==void 0?b.strip():b._strip(),b},z.prototype.split=function(m,b){m.iushrn(this.n,0,b)},z.prototype.imulK=function(m){return m.imul(this.k)};function W(){z.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(W,z),W.prototype.split=function(m,b){for(var E=4194303,k=Math.min(m.length,9),R=0;R<k;R++)b.words[R]=m.words[R];if(b.length=k,m.length<=9){m.words[0]=0,m.length=1;return}var M=m.words[9];for(b.words[b.length++]=M&E,R=10;R<m.length;R++){var H=m.words[R]|0;m.words[R-10]=(H&E)<<4|M>>>22,M=H}M>>>=22,m.words[R-10]=M,M===0&&m.length>10?m.length-=10:m.length-=9},W.prototype.imulK=function(m){m.words[m.length]=0,m.words[m.length+1]=0,m.length+=2;for(var b=0,E=0;E<m.length;E++){var k=m.words[E]|0;b+=k*977,m.words[E]=b&67108863,b=k*64+(b/67108864|0)}return m.words[m.length-1]===0&&(m.length--,m.words[m.length-1]===0&&m.length--),m};function B(){z.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(B,z);function I(){z.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(I,z);function j(){z.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(j,z),j.prototype.imulK=function(m){for(var b=0,E=0;E<m.length;E++){var k=(m.words[E]|0)*19+b,R=k&67108863;k>>>=26,m.words[E]=R,b=k}return b!==0&&(m.words[m.length++]=b),m},s._prime=function(m){if(P[m])return P[m];var b;if(m==="k256")b=new W;else if(m==="p224")b=new B;else if(m==="p192")b=new I;else if(m==="p25519")b=new j;else throw new Error("Unknown prime "+m);return P[m]=b,b};function D(T){if(typeof T=="string"){var m=s._prime(T);this.m=m.p,this.prime=m}else n(T.gtn(1),"modulus must be greater than 1"),this.m=T,this.prime=null}D.prototype._verify1=function(m){n(m.negative===0,"red works only with positives"),n(m.red,"red works only with red numbers")},D.prototype._verify2=function(m,b){n((m.negative|b.negative)===0,"red works only with positives"),n(m.red&&m.red===b.red,"red works only with red numbers")},D.prototype.imod=function(m){return this.prime?this.prime.ireduce(m)._forceRed(this):(u(m,m.umod(this.m)._forceRed(this)),m)},D.prototype.neg=function(m){return m.isZero()?m.clone():this.m.sub(m)._forceRed(this)},D.prototype.add=function(m,b){this._verify2(m,b);var E=m.add(b);return E.cmp(this.m)>=0&&E.isub(this.m),E._forceRed(this)},D.prototype.iadd=function(m,b){this._verify2(m,b);var E=m.iadd(b);return E.cmp(this.m)>=0&&E.isub(this.m),E},D.prototype.sub=function(m,b){this._verify2(m,b);var E=m.sub(b);return E.cmpn(0)<0&&E.iadd(this.m),E._forceRed(this)},D.prototype.isub=function(m,b){this._verify2(m,b);var E=m.isub(b);return E.cmpn(0)<0&&E.iadd(this.m),E},D.prototype.shl=function(m,b){return this._verify1(m),this.imod(m.ushln(b))},D.prototype.imul=function(m,b){return this._verify2(m,b),this.imod(m.imul(b))},D.prototype.mul=function(m,b){return this._verify2(m,b),this.imod(m.mul(b))},D.prototype.isqr=function(m){return this.imul(m,m.clone())},D.prototype.sqr=function(m){return this.mul(m,m)},D.prototype.sqrt=function(m){if(m.isZero())return m.clone();var b=this.m.andln(3);if(n(b%2===1),b===3){var E=this.m.add(new s(1)).iushrn(2);return this.pow(m,E)}for(var k=this.m.subn(1),R=0;!k.isZero()&&k.andln(1)===0;)R++,k.iushrn(1);n(!k.isZero());var M=new s(1).toRed(this),H=M.redNeg(),N=this.m.subn(1).iushrn(1),v=this.m.bitLength();for(v=new s(2*v*v).toRed(this);this.pow(v,N).cmp(H)!==0;)v.redIAdd(H);for(var U=this.pow(v,k),G=this.pow(m,k.addn(1).iushrn(1)),S=this.pow(m,k),J=R;S.cmp(M)!==0;){for(var ne=S,Z=0;ne.cmp(M)!==0;Z++)ne=ne.redSqr();n(Z<J);var Q=this.pow(U,new s(1).iushln(J-Z-1));G=G.redMul(Q),U=Q.redSqr(),S=S.redMul(U),J=Z}return G},D.prototype.invm=function(m){var b=m._invmp(this.m);return b.negative!==0?(b.negative=0,this.imod(b).redNeg()):this.imod(b)},D.prototype.pow=function(m,b){if(b.isZero())return new s(1).toRed(this);if(b.cmpn(1)===0)return m.clone();var E=4,k=new Array(1<<E);k[0]=new s(1).toRed(this),k[1]=m;for(var R=2;R<k.length;R++)k[R]=this.mul(k[R-1],m);var M=k[0],H=0,N=0,v=b.bitLength()%26;for(v===0&&(v=26),R=b.length-1;R>=0;R--){for(var U=b.words[R],G=v-1;G>=0;G--){var S=U>>G&1;if(M!==k[0]&&(M=this.sqr(M)),S===0&&H===0){N=0;continue}H<<=1,H|=S,N++,!(N!==E&&(R!==0||G!==0))&&(M=this.mul(M,k[H]),N=0,H=0)}v=26}return M},D.prototype.convertTo=function(m){var b=m.umod(this.m);return b===m?b.clone():b},D.prototype.convertFrom=function(m){var b=m.clone();return b.red=null,b},s.mont=function(m){return new O(m)};function O(T){D.call(this,T),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(O,D),O.prototype.convertTo=function(m){return this.imod(m.ushln(this.shift))},O.prototype.convertFrom=function(m){var b=this.imod(m.mul(this.rinv));return b.red=null,b},O.prototype.imul=function(m,b){if(m.isZero()||b.isZero())return m.words[0]=0,m.length=1,m;var E=m.imul(b),k=E.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),R=E.isub(k).iushrn(this.shift),M=R;return R.cmp(this.m)>=0?M=R.isub(this.m):R.cmpn(0)<0&&(M=R.iadd(this.m)),M._forceRed(this)},O.prototype.mul=function(m,b){if(m.isZero()||b.isZero())return new s(0)._forceRed(this);var E=m.mul(b),k=E.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),R=E.isub(k).iushrn(this.shift),M=R;return R.cmp(this.m)>=0?M=R.isub(this.m):R.cmpn(0)<0&&(M=R.iadd(this.m)),M._forceRed(this)},O.prototype.invm=function(m){var b=this.imod(m._invmp(this.m).mul(this.r2));return b._forceRed(this)}})(t,li)})(m7);var XTe=m7.exports;const jt=is(XTe),eke="logger/5.8.0";let kD=!1,PD=!1;const Iv={debug:1,default:2,info:2,warning:3,error:4,off:5};let RD=Iv.default,S6=null;function tke(){try{const t=[];
2971if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{t.push(e)}}),t.length)throw new Error("missing "+t.join(", "));if("é".normalize("NFD")!=="eÌ")throw new Error("broken implementation")}catch(t){return t.message}return null}const OD=tke();var d4;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"})(d4||(d4={}));var ha;(function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"})(ha||(ha={}));const DD="0123456789abcdef";class ce{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,r){const n=e.toLowerCase();Iv[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(RD>Iv[n])&&console.log.apply(console,r)}debug(...e){this._log(ce.levels.DEBUG,e)}info(...e){this._log(ce.levels.INFO,e)}warn(...e){this._log(ce.levels.WARNING,e)}makeError(e,r,n){if(PD)return this.makeError("censored error",r,{});r||(r=ce.errors.UNKNOWN_ERROR),n||(n={});const i=[];Object.keys(n).forEach(c=>{const l=n[c];try{if(l instanceof Uint8Array){let u="";for(let f=0;f<l.length;f++)u+=DD[l[f]>>4],u+=DD[l[f]&15];i.push(c+"=Uint8Array(0x"+u+")")}else i.push(c+"="+JSON.stringify(l))}catch{i.push(c+"="+JSON.stringify(n[c].toString()))}}),i.push(`code=${r}`),i.push(`version=${this.version}`);const s=e;let o="";switch(r){case ha.NUMERIC_FAULT:{o="NUMERIC_FAULT";const c=e;switch(c){case"overflow":case"underflow":case"division-by-zero":o+="-"+c;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result";break}break}case ha.CALL_EXCEPTION:case ha.INSUFFICIENT_FUNDS:case ha.MISSING_NEW:case ha.NONCE_EXPIRED:case ha.REPLACEMENT_UNDERPRICED:case ha.TRANSACTION_REPLACED:case ha.UNPREDICTABLE_GAS_LIMIT:o=r;break}o&&(e+=" [ See: https://links.ethers.org/v5-errors-"+o+" ]"),i.length&&(e+=" ("+i.join(", ")+")");const a=new Error(e);return a.reason=s,a.code=r,Object.keys(n).forEach(function(c){a[c]=n[c]}),a}throwError(e,r,n){throw this.makeError(e,r,n)}throwArgumentError(e,r,n){return this.throwError(e,ce.errors.INVALID_ARGUMENT,{argument:r,value:n})}assert(e,r,n,i){e||this.throwError(r,n,i)}assertArgument(e,r,n,i){e||this.throwArgumentError(r,n,i)}checkNormalize(e){OD&&this.throwError("platform missing String.prototype.normalize",ce.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:OD})}checkSafeUint53(e,r){typeof e=="number"&&(r==null&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,ce.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,ce.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,r,n){n?n=": "+n:n="",e<r&&this.throwError("missing argument"+n,ce.errors.MISSING_ARGUMENT,{count:e,expectedCount:r}),e>r&&this.throwError("too many arguments"+n,ce.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})}checkNew(e,r){(e===Object||e==null)&&this.throwError("missing new",ce.errors.MISSING_NEW,{name:r.name})}checkAbstract(e,r){e===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",ce.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",ce.errors.MISSING_NEW,{name:r.name})}static globalLogger(){return S6||(S6=new ce(eke)),S6}static setCensorship(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",ce.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),kD){if(!e)return;this.globalLogger().throwError("error censorship permanent",ce.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}PD=!!e,kD=!!r}static setLogLevel(e){const r=Iv[e.toLowerCase()];if(r==null){ce.globalLogger().warn("invalid log level - "+e);return}RD=r}static from(e){return new ce(e)}}ce.errors=ha;ce.levels=d4;const rke=Object.freeze(Object.defineProperty({__proto__:null,get ErrorCode(){return ha},get LogLevel(){return d4},Logger:ce},Symbol.toStringTag,{value:"Module"}
2971)),nke="bytes/5.8.0",ei=new ce(nke);function lV(t){return!!t.toHexString}function Up(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return Up(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function wb(t){return Cr(t)&&!(t.length%2)||c0(t)}function LD(t){return typeof t=="number"&&t==t&&t%1===0}function c0(t){if(t==null)return!1;if(t.constructor===Uint8Array)return!0;if(typeof t=="string"||!LD(t.length)||t.length<0)return!1;for(let e=0;e<t.length;e++){const r=t[e];if(!LD(r)||r<0||r>=256)return!1}return!0}function Se(t,e){if(e||(e={}),typeof t=="number"){ei.checkSafeUint53(t,"invalid arrayify value");const r=[];for(;t;)r.unshift(t&255),t=parseInt(String(t/256));return r.length===0&&r.push(0),Up(new Uint8Array(r))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),lV(t)&&(t=t.toHexString()),Cr(t)){let r=t.substring(2);r.length%2&&(e.hexPad==="left"?r="0"+r:e.hexPad==="right"?r+="0":ei.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let i=0;i<r.length;i+=2)n.push(parseInt(r.substring(i,i+2),16));return Up(new Uint8Array(n))}return c0(t)?Up(new Uint8Array(t)):ei.throwArgumentError("invalid arrayify value","value",t)}function Cn(t){const e=t.map(i=>Se(i)),r=e.reduce((i,s)=>i+s.length,0),n=new Uint8Array(r);return e.reduce((i,s)=>(n.set(s,i),i+s.length),0),Up(n)}function cl(t){let e=Se(t);if(e.length===0)return e;let r=0;for(;r<e.length&&e[r]===0;)r++;return r&&(e=e.slice(r)),e}function qm(t,e){t=Se(t),t.length>e&&ei.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),Up(r)}function Cr(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}const N6="0123456789abcdef";function $e(t,e){if(e||(e={}),typeof t=="number"){ei.checkSafeUint53(t,"invalid hexlify value");let r="";for(;t;)r=N6[t&15]+r,t=Math.floor(t/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if(typeof t=="bigint")return t=t.toString(16),t.length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),lV(t))return t.toHexString();if(Cr(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":ei.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(c0(t)){let r="0x";for(let n=0;n<t.length;n++){let i=t[n];r+=N6[(i&240)>>4]+N6[i&15]}return r}return ei.throwArgumentError("invalid hexlify value","value",t)}function yl(t){if(typeof t!="string")t=$e(t);else if(!Cr(t)||t.length%2)return null;return(t.length-2)/2}function ci(t,e,r){return typeof t!="string"?t=$e(t):(!Cr(t)||t.length%2)&&ei.throwArgumentError("invalid hexData","value",t),e=2+2*e,r!=null?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function Fs(t){let e="0x";return t.forEach(r=>{e+=$e(r).substring(2)}),e}function qx(t){const e=uV($e(t,{hexPad:"left"}));return e==="0x"?"0x0":e}function uV(t){typeof t!="string"&&(t=$e(t)),Cr(t)||ei.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e<t.length&&t[e]==="0";)e++;return"0x"+t.substring(e)}function bn(t,e){for(typeof t!="string"?t=$e(t):Cr(t)||ei.throwArgumentError("invalid hex string","value",t),t.length>2*e+2&&ei.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function l0(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(wb(t)){let r=Se(t);r.length===64?(e.v=27+(r[32]>>7),r[32]&=127,e.r=$e(r.slice(0,32)),e.s=$e(r.slice(32,64))):r.length===65?(e.r=$e(r.slice(0,32)),e.s=$e(r.slice(32,64)),e.v=r[64]):ei.throwArgumentError("invalid signature string","signature",t),e.v<27&&(e.v===0||e.v===1?e.v+=27:ei.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=$e(r.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,e._vs!=null){const i=qm(Se(e._vs),32);e._vs=$e(i);const s=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=s:e.recoveryParam!==s&&ei.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),i[0]&=127;const o=$e(i);e.s==null?e.s=o:e.s!==o&&ei.throwArgumentError("signature v mismatch _vs","signature",t)}if(e.recoveryParam==null)e.v==null?ei.throwArgumentError("signature missing v and recoveryParam","signature",t):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{const i=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==i&&ei.throwArgumentError("signature recoveryParam mismatch v","signature",t)}e.r==null||!Cr(e.r)?ei.throwArgumentError("signature missing or invalid r","signature",t):e.r=bn(e.r,32),e.s==null||!Cr(e.s)?ei.throwArgumentError("signature missing or invalid s","signature",t):e.s=bn(e.s,32);const r=Se(e.s);r[0]>=128&&ei.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const n=$e(r);e._vs&&(Cr(e._vs)||ei.throwArgumentError("signature invalid _vs","signature",t),e._vs=bn(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&ei.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function rA(t){return t=l0(t),$e(Cn([t.r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}const ike=Object.freeze(Object.defineProperty({__proto__:null,arrayify:Se,concat:Cn,hexConcat:Fs,hexDataLength:yl,hexDataSlice:ci,hexStripZeros:uV,hexValue:qx,hexZeroPad:bn,hexlify:$e,isBytes:c0,isBytesLike:wb,isHexString:Cr,joinSignature:rA,splitSignature:l0,stripZeros:cl,zeroPad:qm},Symbol.toStringTag,{value:"Module"})),fV="bignumber/5.8.0";var Ey=jt.BN;const Vl=new ce(fV),I6={},MD=9007199254740991;function ske(t){return t!=null&&(De.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||Cr(t)||typeof t=="bigint"||c0(t))}let $D=!1;class De{constructor(e,r){e!==I6&&Vl.throwError("cannot call constructor directly; use BigNumber.from",ce.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return so(yr(this).fromTwos(e))}toTwos(e){return so(yr(this).toTwos(e))}abs(){return this._hex[0]==="-"?De.from(this._hex.substring(1)):this}add(e){return so(yr(this).add(yr(e)))}sub(e){return so(yr(this).sub(yr(e)))}div(e){return De.from(e).isZero()&&aa("division-by-zero","div"),so(yr(this).div(yr(e)))}mul(e){return so(yr(this).mul(yr(e)))}mod(e){const r=yr(e);return r.isNeg()&&aa("division-by-zero","mod"),so(yr(this).umod(r))}pow(e){const r=yr(e);return r.isNeg()&&aa("negative-power","pow"),so(yr(this).pow(r))}and(e){const r=yr(e);return(this.isNegative()||r.isNeg())&&aa("unbound-bitwise-result","and"),so(yr(this).and(r))}or(e){const r=yr(e);return(this.isNegative()||r.isNeg())&&aa("unbound-bitwise-result","or"),so(yr(this).or(r))}xor(e){const r=yr(e);return(this.isNegative()||r.isNeg())&&aa("unbound-bitwise-result","xor"),so(yr(this).xor(r))}mask(e){return(this.isNegative()||e<0)&&aa("negative-width","mask"),so(yr(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&aa("negative-width","shl"),so(yr(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&aa("negative-width","shr"),so(yr(this).shrn(e))}eq(e){return yr(this).eq(yr(e))}lt(e){return yr(this).lt(yr(e))}lte(e){return yr(this).lte(yr(e))}gt(e){return yr(this).gt(yr(e))}gte(e){return yr(this).gte(yr(e))}isNegative(){return this._hex[0]==="-"}isZero(){return yr(this).isZero()}toNumber(){try{return yr(this).toNumber()}catch{aa("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return Vl.throwError("this platform does not support BigInt",ce.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?$D||($D=!0,Vl.warn("BigNumber.toString does not accept any parameters;
2971 base-10 is assumed")):arguments[0]===16?Vl.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",ce.errors.UNEXPECTED_ARGUMENT,{}):Vl.throwError("BigNumber.toString does not accept parameters",ce.errors.UNEXPECTED_ARGUMENT,{})),yr(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof De)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new De(I6,Cy(e)):e.match(/^-?[0-9]+$/)?new De(I6,Cy(new Ey(e))):Vl.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&aa("underflow","BigNumber.from",e),(e>=MD||e<=-MD)&&aa("overflow","BigNumber.from",e),De.from(String(e));const r=e;if(typeof r=="bigint")return De.from(r.toString());if(c0(r))return De.from($e(r));if(r)if(r.toHexString){const n=r.toHexString();if(typeof n=="string")return De.from(n)}else{let n=r._hex;if(n==null&&r.type==="BigNumber"&&(n=r.hex),typeof n=="string"&&(Cr(n)||n[0]==="-"&&Cr(n.substring(1))))return De.from(n)}return Vl.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function Cy(t){if(typeof t!="string")return Cy(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&Vl.throwArgumentError("invalid hex","value",t),t=Cy(t),t==="0x00"?t:"-"+t;if(t.substring(0,2)!=="0x"&&(t="0x"+t),t==="0x")return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&t.substring(0,4)==="0x00";)t="0x"+t.substring(4);return t}function so(t){return De.from(Cy(t))}function yr(t){const e=De.from(t).toHexString();return e[0]==="-"?new Ey("-"+e.substring(3),16):new Ey(e.substring(2),16)}function aa(t,e,r){const n={fault:t,operation:e};return r!=null&&(n.value=r),Vl.throwError(t,ce.errors.NUMERIC_FAULT,n)}function oke(t){return new Ey(t,36).toString(16)}function ake(t){return new Ey(t,16).toString(36)}const js=new ce(fV),Vm={},dV=De.from(0),hV=De.from(-1);function pV(t,e,r,n){const i={fault:e,operation:r};return n!==void 0&&(i.value=n),js.throwError(t,ce.errors.NUMERIC_FAULT,i)}let Km="0";for(;Km.length<256;)Km+=Km;function y7(t){if(typeof t!="number")try{t=De.from(t).toNumber()}catch{}return typeof t=="number"&&t>=0&&t<=256&&!(t%1)?"1"+Km.substring(0,t):js.throwArgumentError("invalid decimal size","decimals",t)}function Tv(t,e){e==null&&(e=0);const r=y7(e);t=De.from(t);const n=t.lt(dV);n&&(t=t.mul(hV));let i=t.mod(r).toString();for(;i.length<r.length-1;)i="0"+i;i=i.match(/^([0-9]*[1-9]|0)(0*)/)[1];const s=t.div(r).toString();return r.length===1?t=s:t=s+"."+i,n&&(t="-"+t),t}function Lc(t,e){e==null&&(e=0);const r=y7(e);(typeof t!="string"||!t.match(/^-?[0-9.]+$/))&&js.throwArgumentError("invalid decimal value","value",t);const n=t.substring(0,1)==="-";n&&(t=t.substring(1)),t==="."&&js.throwArgumentError("missing value","value",t);const i=t.split(".");i.length>2&&js.throwArgumentError("too many decimal points","value",t);let s=i[0],o=i[1];for(s||(s="0"),o||(o="0");o[o.length-1]==="0";)o=o.substring(0,o.length-1);for(o.length>r.length-1&&pV("fractional component exceeds decimals","underflow","parseFixed"),o===""&&(o="0");o.length<r.length-1;)o+="0";const a=De.from(s),c=De.from(o);let l=a.mul(r).add(c);return n&&(l=l.mul(hV)),l}class Bp{constructor(e,r,n,i){e!==Vm&&js.throwError("cannot use FixedFormat constructor; use FixedFormat.from",ce.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.signed=r,this.width=n,this.decimals=i,this.name=(r?"":"u")+"fixed"+String(n)+"x"+String(i),this._multiplier=y7(i),Object.freeze(this)}static from(e){if(e instanceof Bp)return e;typeof e=="number"&&(e=`fixed128x${e}`);let r=!0,n=128,i=18;if(typeof e=="string"){if(e!=="fixed")if(e==="ufixed")r=!1;else{const s=e.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);s||js.throwArgumentError("invalid fixed format","format",e),r=s[1]!=="u",n=parseInt(s[2]),i=parseInt(s[3])}}else if(e){const s=(o,a,c)=>e[o]==null?c:(typeof e[o]!==a&&js.throwArgumentError("invalid fixed format ("+o+" not "+a+")","format."+o,e[o]),e[o]);r=s("signed","boolean",r),n=s("width","number",n),i=s("decimals","number",i)}return n%8&&js.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),i>80&&js.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new Bp(Vm,r,n,i)}}class Ji{constructor(e,r,n,i){e!==Vm&&js.throwError("cannot use FixedNumber constructor; use FixedNumber.from",ce.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=r,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&js.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const r=Lc(this._value,this.format.decimals),n=Lc(e._value,e.format.decimals);return Ji.fromValue(r.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const r=Lc(this._value,this.format.decimals),n=Lc(e._value,e.format.decimals);return Ji.fromValue(r.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const r=Lc(this._value,this.format.decimals),n=Lc(e._value,e.format.decimals);return Ji.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const r=Lc(this._value,this.format.decimals),n=Lc(e._value,e.format.decimals);return Ji.fromValue(r.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=Ji.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(UD.toFormat(r.format))),r}ceiling(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=Ji.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(UD.toFormat(r.format))),r}round(e){e==null&&(e=0);const r=this.toString().split(".");if(r.length===1&&r.push("0"),(e<0||e>80||e%1)&&js.throwArgumentError("invalid decimal count","decimals",e),r[1].length<=e)return this;const n=Ji.from("1"+Km.substring(0,e),this.format),i=cke.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&js.throwArgumentError("invalid byte width","width",e);const r=De.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return bn(r,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return Ji.fromString(this._value,e)}static fromValue(e,r,n){return n==null&&r!=null&&!ske(r)&&(n=r,r=null),r==null&&(r=0),n==null&&(n="fixed"),Ji.fromString(Tv(e,r),Bp.from(n))}static fromString(e,r){r==null&&(r="fixed");const n=Bp.from(r),i=Lc(e,n.decimals);!n.signed&&i.lt(dV)&&pV("unsigned value cannot be negative","overflow","value",e);let s=null;n.signed?s=i.toTwos(n.width).toHexString():(s=i.toHexString(),s=bn(s,n.width/8));const o=Tv(i,n.decimals);return new Ji(Vm,s,o,n)}static fromBytes(e,r){r==null&&(r="fixed");const n=Bp.from(r);
2971if(Se(e).length>n.width/8)throw new Error("overflow");let i=De.from(e);n.signed&&(i=i.fromTwos(n.width));const s=i.toTwos((n.signed?0:1)+n.width).toHexString(),o=Tv(i,n.decimals);return new Ji(Vm,s,o,n)}static from(e,r){if(typeof e=="string")return Ji.fromString(e,r);if(c0(e))return Ji.fromBytes(e,r);try{return Ji.fromValue(e,0,r)}catch(n){if(n.code!==ce.errors.INVALID_ARGUMENT)throw n}return js.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}}const UD=Ji.from(1),cke=Ji.from("0.5"),lke="properties/5.8.0";var uke=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const h4=new ce(lke);function we(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function ic(t,e){for(let r=0;r<32;r++){if(t[e])return t[e];if(!t.prototype||typeof t.prototype!="object")break;t=Object.getPrototypeOf(t.prototype).constructor}return null}function ti(t){return uke(this,void 0,void 0,function*(){const e=Object.keys(t).map(n=>{const i=t[n];return Promise.resolve(i).then(s=>({key:n,value:s}))});return(yield Promise.all(e)).reduce((n,i)=>(n[i.key]=i.value,n),{})})}function b7(t,e){(!t||typeof t!="object")&&h4.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(r=>{e[r]||h4.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)})}function bi(t){const e={};for(const r in t)e[r]=t[r];return e}const fke={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function gV(t){if(t==null||fke[typeof t])return!0;if(Array.isArray(t)||typeof t=="object"){if(!Object.isFrozen(t))return!1;const e=Object.keys(t);for(let r=0;r<e.length;r++){let n=null;try{n=t[e[r]]}catch{continue}if(!gV(n))return!1}return!0}return h4.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function dke(t){if(gV(t))return t;if(Array.isArray(t))return Object.freeze(t.map(e=>bl(e)));if(typeof t=="object"){const e={};for(const r in t){const n=t[r];n!==void 0&&we(e,r,bl(n))}return e}return h4.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function bl(t){return dke(t)}class vd{constructor(e){for(const r in e)this[r]=bl(e[r])}}const hke=Object.freeze(Object.defineProperty({__proto__:null,Description:vd,checkProperties:b7,deepCopy:bl,defineReadOnly:we,getStatic:ic,resolveProperties:ti,shallowCopy:bi},Symbol.toStringTag,{value:"Module"})),vb="abi/5.8.0",_r=new ce(vb),zh={};let BD={calldata:!0,memory:!0,storage:!0},pke={calldata:!0,memory:!0};function $w(t,e){if(t==="bytes"||t==="string"){if(BD[e])return!0}else if(t==="address"){if(e==="payable")return!0}else if((t.indexOf("[")>=0||t==="tuple")&&pke[e])return!0;return(BD[e]||e==="payable")&&_r.throwArgumentError("invalid modifier","name",e),!1}function gke(t,e){let r=t;function n(a){_r.throwArgumentError(`unexpected character at position ${a}`,"param",t)}t=t.replace(/\s/g," ");function i(a){let c={type:"",name:"",parent:a,state:{allowType:!0}};return e&&(c.indexed=!1),c}let s={type:"",name:"",state:{allowType:!0}},o=s;for(let a=0;a<t.length;a++){let c=t[a];switch(c){case"(":o.state.allowType&&o.type===""?o.type="tuple":o.state.allowParams||n(a),o.state.allowType=!1,o.type=Y0(o.type),o.components=[i(o)],o=o.components[0];break;case")":delete o.state,o.name==="indexed"&&(e||n(a),o.indexed=!0,o.name=""),$w(o.type,o.name)&&(o.name=""),o.type=Y0(o.type);let l=o;o=o.parent,o||n(a),delete l.parent,o.state.allowParams=!1,o.state.allowName=!0,o.state.allowArray=!0;break;case",":delete o.state,o.name==="indexed"&&(e||n(a),o.indexed=!0,o.name=""),$w(o.type,o.name)&&(o.name=""),o.type=Y0(o.type);let u=i(o.parent);o.parent.components.push(u),delete o.parent,o=u;break;case" ":o.state.allowType&&o.type!==""&&(o.type=Y0(o.type),delete o.state.allowType,o.state.allowName=!0,o.state.allowParams=!0),o.state.allowName&&o.name!==""&&(o.name==="indexed"?(e||n(a),o.indexed&&n(a),o.indexed=!0,o.name=""):$w(o.type,o.name)?o.name="":o.state.allowName=!1);break;case"[":o.state.allowArray||n(a),o.type+=c,o.state.allowArray=!1,o.state.allowName=!1,o.state.readArray=!0;break;case"]":o.state.readArray||n(a),o.type+=c,o.state.readArray=!1,o.state.allowArray=!0,o.state.allowName=!0;break;default:o.state.allowType?(o.type+=c,o.state.allowParams=!0,o.state.allowArray=!0):o.state.allowName?(o.name+=c,delete o.state.allowArray):o.state.readArray?o.type+=c:n(a)}}return o.parent&&_r.throwArgumentError("unexpected eof","param",t),delete s.state,o.name==="indexed"?(e||n(r.length-7),o.indexed&&n(r.length-7),o.indexed=!0,o.name=""):$w(o.type,o.name)&&(o.name=""),s.type=Y0(s.type),s}function kv(t,e){for(let r in e)we(t,r,e[r])}const Dr=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),mke=new RegExp(/^(.*)\[([0-9]*)\]$/);class Ii{constructor(e,r){e!==zh&&_r.throwError("use fromString",ce.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),kv(this,r);let n=this.type.match(mke);n?kv(this,{arrayLength:parseInt(n[2]||"-1"),arrayChildren:Ii.fromObject({type:n[1],components:this.components}),baseType:"array"}):kv(this,{arrayLength:null,arrayChildren:null,baseType:this.components!=null?"tuple":this.t
2971ype}),this._isParamType=!0,Object.freeze(this)}format(e){if(e||(e=Dr.sighash),Dr[e]||_r.throwArgumentError("invalid format type","format",e),e===Dr.json){let n={type:this.baseType==="tuple"?"tuple":this.type,name:this.name||void 0};return typeof this.indexed=="boolean"&&(n.indexed=this.indexed),this.components&&(n.components=this.components.map(i=>JSON.parse(i.format(e)))),JSON.stringify(n)}let r="";return this.baseType==="array"?(r+=this.arrayChildren.format(e),r+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==Dr.sighash&&(r+=this.type),r+="("+this.components.map(n=>n.format(e)).join(e===Dr.full?", ":",")+")"):r+=this.type,e!==Dr.sighash&&(this.indexed===!0&&(r+=" indexed"),e===Dr.full&&this.name&&(r+=" "+this.name)),r}static from(e,r){return typeof e=="string"?Ii.fromString(e,r):Ii.fromObject(e)}static fromObject(e){return Ii.isParamType(e)?e:new Ii(zh,{name:e.name||null,type:Y0(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(Ii.fromObject):null})}static fromString(e,r){function n(i){return Ii.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return n(gke(e,!!r))}static isParamType(e){return!!(e!=null&&e._isParamType)}}function _y(t,e){return bke(t).map(r=>Ii.fromString(r,e))}class Qc{constructor(e,r){e!==zh&&_r.throwError("use a static from method",ce.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),kv(this,r),this._isFragment=!0,Object.freeze(this)}static from(e){return Qc.isFragment(e)?e:typeof e=="string"?Qc.fromString(e):Qc.fromObject(e)}static fromObject(e){if(Qc.isFragment(e))return e;switch(e.type){case"function":return tc.fromObject(e);case"event":return Kc.fromObject(e);case"constructor":return ec.fromObject(e);case"error":return Ql.fromObject(e);case"fallback":case"receive":return null}return _r.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?Kc.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?tc.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?ec.fromString(e.trim()):e.split(" ")[0]==="error"?Ql.fromString(e.substring(5).trim()):_r.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}}class Kc extends Qc{format(e){if(e||(e=Dr.sighash),Dr[e]||_r.throwArgumentError("invalid format type","format",e),e===Dr.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==Dr.sighash&&(r+="event "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Dr.full?", ":",")+") ",e!==Dr.sighash&&this.anonymous&&(r+="anonymous "),r.trim()}static from(e){return typeof e=="string"?Kc.fromString(e):Kc.fromObject(e)}static fromObject(e){if(Kc.isEventFragment(e))return e;e.type!=="event"&&_r.throwArgumentError("invalid event object","value",e);const r={name:Ay(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(Ii.fromObject):[],type:"event"};return new Kc(zh,r)}static fromString(e){let r=e.match(Sy);r||_r.throwArgumentError("invalid event string","value",e);let n=!1;return r[3].split(" ").forEach(i=>{switch(i.trim()){case"anonymous":n=!0;break;case"":break;default:_r.warn("unknown modifier: "+i)}}),Kc.fromObject({name:r[1].trim(),anonymous:n,inputs:_y(r[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}}function mV(t,e){e.gas=null;let r=t.split("@");return r.length!==1?(r.length>2&&_r.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||_r.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=De.from(r[1]),r[0]):t}function yV(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach(r=>{switch(r.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+r)}})}function bV(t){let e={constant:!1,payable:!0,stateMutability:"payable"};return t.stateMutability!=null?(e.stateMutability=t.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",t.constant!=null&&!!t.constant!==e.constant&&_r.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable=e.stateMutability==="payable",t.payable!=null&&!!t.payable!==e.payable&&_r.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):t.payable!=null?(e.payable=!!t.payable,t.constant==null&&!e.payable&&t.type!=="constructor"&&_r.throwArgumentError("unable to determine stateMutability","value",t),e.constant=!!t.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&_r.throwArgumentError("cannot have constant payable function","value",t)):t.constant!=null?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):t.type!=="constructor"&&_r.throwArgumentError("unable to determine stateMutability","value",t),e}class ec extends Qc{format(e){if(e||(e=Dr.sighash),Dr[e]||_r.throwArgumentError("invalid format type","format",e),e===Dr.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===Dr.sighash&&_r.throwError("cannot format a constructor for sighash",ce.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let r="constructor("+this.inputs.map(n=>n.format(e)).join(e===Dr.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "),r.trim()}static from(e){return typeof e=="string"?ec.fromString(e):ec.fromObject(e)}static fromObject(e){if(ec.isConstructorFragment(e))return e;e.type!=="constructor"&&_r.throwArgumentError("invalid constructor object","value",e);let r=bV(e);r.constant&&_r.throwArgumentError("constructor cannot be constant","value",e);const n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(Ii.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?De.from(e.gas):null};return new ec(zh,n)}static fromString(e){let r={type:"constructor"};e=mV(e,r);let n=e.match(Sy);return(!n||n[1].trim()!=="constructor")&&_r.throwArgumentError("invalid constructor string","value",e),r.inputs=_y(n[2].trim(),!1),yV(n[3].trim(),r),ec.fromObject(r)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}}
2971class tc extends ec{format(e){if(e||(e=Dr.sighash),Dr[e]||_r.throwArgumentError("invalid format type","format",e),e===Dr.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==Dr.sighash&&(r+="function "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Dr.full?", ":",")+") ",e!==Dr.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "):this.constant&&(r+="view "),this.outputs&&this.outputs.length&&(r+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(r+="@"+this.gas.toString()+" ")),r.trim()}static from(e){return typeof e=="string"?tc.fromString(e):tc.fromObject(e)}static fromObject(e){if(tc.isFunctionFragment(e))return e;e.type!=="function"&&_r.throwArgumentError("invalid function object","value",e);let r=bV(e);const n={type:e.type,name:Ay(e.name),constant:r.constant,inputs:e.inputs?e.inputs.map(Ii.fromObject):[],outputs:e.outputs?e.outputs.map(Ii.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?De.from(e.gas):null};return new tc(zh,n)}static fromString(e){let r={type:"function"};e=mV(e,r);let n=e.split(" returns ");n.length>2&&_r.throwArgumentError("invalid function string","value",e);let i=n[0].match(Sy);if(i||_r.throwArgumentError("invalid function signature","value",e),r.name=i[1].trim(),r.name&&Ay(r.name),r.inputs=_y(i[2],!1),yV(i[3].trim(),r),n.length>1){let s=n[1].match(Sy);(s[1].trim()!=""||s[3].trim()!="")&&_r.throwArgumentError("unexpected tokens","value",e),r.outputs=_y(s[2],!1)}else r.outputs=[];return tc.fromObject(r)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}}function FD(t){const e=t.format();return(e==="Error(string)"||e==="Panic(uint256)")&&_r.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}class Ql extends Qc{format(e){if(e||(e=Dr.sighash),Dr[e]||_r.throwArgumentError("invalid format type","format",e),e===Dr.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==Dr.sighash&&(r+="error "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Dr.full?", ":",")+") ",r.trim()}static from(e){return typeof e=="string"?Ql.fromString(e):Ql.fromObject(e)}static fromObject(e){if(Ql.isErrorFragment(e))return e;e.type!=="error"&&_r.throwArgumentError("invalid error object","value",e);const r={type:e.type,name:Ay(e.name),inputs:e.inputs?e.inputs.map(Ii.fromObject):[]};return FD(new Ql(zh,r))}static fromString(e){let r={type:"error"},n=e.match(Sy);return n||_r.throwArgumentError("invalid error signature","value",e),r.name=n[1].trim(),r.name&&Ay(r.name),r.inputs=_y(n[2],!1),FD(Ql.fromObject(r))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}}function Y0(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const yke=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Ay(t){return(!t||!t.match(yke))&&_r.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}const Sy=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function bke(t){t=t.trim();let e=[],r="",n=0;for(let i=0;i<t.length;i++){let s=t[i];s===","&&n===0?(e.push(r),r=""):(r+=s,s==="("?n++:s===")"&&(n--,n===-1&&_r.throwArgumentError("unbalanced parenthesis","value",t)))}return r&&e.push(r),e}const w7=new ce(vb);function wV(t){const e=[],r=function(n,i){if(Array.isArray(i))for(let s in i){const o=n.slice();o.push(s);try{r(o,i[s])}catch(a){e.push({path:o,error:a})}}};return r([],t),e}class Du{constructor(e,r,n,i){this.name=e,this.type=r,this.localName=n,this.dynamic=i}_throwError(e,r){w7.throwArgumentError(e,this.localName,r)}}class nA{constructor(e){we(this,"wordSize",e||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(e)}get data(){return Fs(this._data)}get length(){return this._dataLength}_writeData(e){return this._data.push(e),this._dataLength+=e.length,e.length}appendWriter(e){return this._writeData(Cn(e._data))}writeBytes(e){let r=Se(e);const n=r.length%this.wordSize;
2971return n&&(r=Cn([r,this._padding.slice(n)])),this._writeData(r)}_getValue(e){let r=Se(De.from(e));return r.length>this.wordSize&&w7.throwError("value out-of-bounds",ce.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:r.length}),r.length%this.wordSize&&(r=Cn([this._padding.slice(r.length%this.wordSize),r])),r}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,r=>{this._data[e]=this._getValue(r)}}}class p4{constructor(e,r,n,i){we(this,"_data",Se(e)),we(this,"wordSize",r||32),we(this,"_coerceFunc",n),we(this,"allowLoose",i),this._offset=0}get data(){return $e(this._data)}get consumed(){return this._offset}static coerce(e,r){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(r=r.toNumber()),r}coerce(e,r){return this._coerceFunc?this._coerceFunc(e,r):p4.coerce(e,r)}_peekBytes(e,r,n){let i=Math.ceil(r/this.wordSize)*this.wordSize;return this._offset+i>this._data.length&&(this.allowLoose&&n&&this._offset+r<=this._data.length?i=r:w7.throwError("data out-of-bounds",ce.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+i})),this._data.slice(this._offset,this._offset+i)}subReader(e){return new p4(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,r){let n=this._peekBytes(0,e,!!r);return this._offset+=n.length,n.slice(0,e)}readValue(){return De.from(this.readBytes(this.wordSize))}}var vV={exports:{}};/** 2972 * [js-sha3]{@link https://github.com/emn178/js-sha3} 2973 * 2974 * @version 0.8.0 2975 * @author Chen, Yi-Cyuan [[email protected]] 2976 * @copyright Chen, Yi-Cyuan 2015-2018 2977 * @license MIT 2978 */(function(t){(function(){var e="input is invalid type",r="finalize already called",n=typeof window=="object",i=n?window:{};i.JS_SHA3_NO_WINDOW&&(n=!1);var s=!n&&typeof self=="object",o=!i.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;o?i=li:s&&(i=self);var a=!i.JS_SHA3_NO_COMMON_JS&&!0&&t.exports,c=!i.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",l="0123456789abcdef".split(""),u=[31,7936,2031616,520093696],f=[4,1024,262144,67108864],d=[1,256,65536,16777216],p=[6,1536,393216,100663296],h=[0,8,16,24],g=[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],y=[224,256,384,512],x=[128,256],C=["hex","buffer","arrayBuffer","array","digest"],_={128:168,256:136};(i.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(S){return Object.prototype.toString.call(S)==="[object Array]"}),c&&(i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(S){return typeof S=="object"&&S.buffer&&S.buffer.constructor===ArrayBuffer});for(var L=function(S,J,ne){return function(Z){return new v(S,J,S).update(Z)[ne]()}},P=function(S,J,ne){return function(Z,Q){return new v(S,J,Q).update(Z)[ne]()}},z=function(S,J,ne){return function(Z,Q,ee,re){return m["cshake"+S].update(Z,Q,ee,re)[ne]()}},W=function(S,J,ne){return function(Z,Q,ee,re){return m["kmac"+S].update(Z,Q,ee,re)[ne]()}},B=function(S,J,ne,Z){for(var Q=0;Q<C.length;++Q){var ee=C[Q];S[ee]=J(ne,Z,ee)}return S},I=function(S,J){var ne=L(S,J,"hex");return ne.create=function(){return new v(S,J,S)},ne.update=function(Z){return ne.create().update(Z)},B(ne,L,S,J)},j=function(S,J){var ne=P(S,J,"hex");return ne.create=function(Z){return new v(S,J,Z)},ne.update=function(Z,Q){return ne.create(Q).update(Z)},B(ne,P,S,J)},D=function(S,J){var ne=_[S],Z=z(S,J,"hex");return Z.create=function(Q,ee,re){return!ee&&!re?m["shake"+S].create(Q):new v(S,J,Q).bytepad([ee,re],ne)},Z.update=function(Q,ee,re,ie){return Z.create(ee,re,ie).update(Q)},B(Z,z,S,J)},O=function(S,J){var ne=_[S],Z=W(S,J,"hex");return Z.create=function(Q,ee,re){return new U(S,J,ee).bytepad(["KMAC",re],ne).bytepad([Q],ne)},Z.update=function(Q,ee,re,ie){return Z.create(Q,re,ie).update(ee)},B(Z,W,S,J)},T=[{name:"keccak",padding:d,bits:y,createMethod:I},{name:"sha3",padding:p,bits:y,createMethod:I},{name:"shake",padding:u,bits:x,createMethod:j},{name:"cshake",padding:f,bits:x,createMethod:D},{name:"kmac",padding:f,bits:x,createMethod:O}],m={},b=[],E=0;E<T.length;++E)for(var k=T[E],R=k.bits,M=0;M<R.length;++M){var H=k.name+"_"+R[M];if(b.push(H),m[H]=k.createMethod(R[M],k.padding),k.name!=="sha3"){var N=k.name+R[M];b.push(N),m[N]=m[H]}}function v(S,J,ne){this.blocks=[],this.s=[],this.padding=J,this.outputBits=ne,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(S<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=ne>>5,this.extraBytes=(ne&31)>>3;for(var Z=0;Z<50;++Z)this.s[Z]=0}v.prototype.update=function(S){if(this.finalized)throw new Error(r);var J,ne=typeof S;if(ne!=="string"){if(ne==="object"){if(S===null)throw new Error(e);
2978if(c&&S.constructor===ArrayBuffer)S=new Uint8Array(S);else if(!Array.isArray(S)&&(!c||!ArrayBuffer.isView(S)))throw new Error(e)}else throw new Error(e);J=!0}for(var Z=this.blocks,Q=this.byteCount,ee=S.length,re=this.blockCount,ie=0,me=this.s,le,ye;ie<ee;){if(this.reset)for(this.reset=!1,Z[0]=this.block,le=1;le<re+1;++le)Z[le]=0;if(J)for(le=this.start;ie<ee&&le<Q;++ie)Z[le>>2]|=S[ie]<<h[le++&3];else for(le=this.start;ie<ee&&le<Q;++ie)ye=S.charCodeAt(ie),ye<128?Z[le>>2]|=ye<<h[le++&3]:ye<2048?(Z[le>>2]|=(192|ye>>6)<<h[le++&3],Z[le>>2]|=(128|ye&63)<<h[le++&3]):ye<55296||ye>=57344?(Z[le>>2]|=(224|ye>>12)<<h[le++&3],Z[le>>2]|=(128|ye>>6&63)<<h[le++&3],Z[le>>2]|=(128|ye&63)<<h[le++&3]):(ye=65536+((ye&1023)<<10|S.charCodeAt(++ie)&1023),Z[le>>2]|=(240|ye>>18)<<h[le++&3],Z[le>>2]|=(128|ye>>12&63)<<h[le++&3],Z[le>>2]|=(128|ye>>6&63)<<h[le++&3],Z[le>>2]|=(128|ye&63)<<h[le++&3]);if(this.lastByteIndex=le,le>=Q){for(this.start=le-Q,this.block=Z[re],le=0;le<re;++le)me[le]^=Z[le];G(me),this.reset=!0}else this.start=le}return this},v.prototype.encode=function(S,J){var ne=S&255,Z=1,Q=[ne];for(S=S>>8,ne=S&255;ne>0;)Q.unshift(ne),S=S>>8,ne=S&255,++Z;return J?Q.push(Z):Q.unshift(Z),this.update(Q),Q.length},v.prototype.encodeString=function(S){var J,ne=typeof S;if(ne!=="string"){if(ne==="object"){if(S===null)throw new Error(e);
2978if(c&&S.constructor===ArrayBuffer)S=new Uint8Array(S);else if(!Array.isArray(S)&&(!c||!ArrayBuffer.isView(S)))throw new Error(e)}else throw new Error(e);J=!0}var Z=0,Q=S.length;if(J)Z=Q;else for(var ee=0;ee<S.length;++ee){var re=S.charCodeAt(ee);re<128?Z+=1:re<2048?Z+=2:re<55296||re>=57344?Z+=3:(re=65536+((re&1023)<<10|S.charCodeAt(++ee)&1023),Z+=4)}return Z+=this.encode(Z*8),this.update(S),Z},v.prototype.bytepad=function(S,J){for(var ne=this.encode(J),Z=0;Z<S.length;++Z)ne+=this.encodeString(S[Z]);var Q=J-ne%J,ee=[];return ee.length=Q,this.update(ee),this},v.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var S=this.blocks,J=this.lastByteIndex,ne=this.blockCount,Z=this.s;if(S[J>>2]|=this.padding[J&3],this.lastByteIndex===this.byteCount)for(S[0]=S[ne],J=1;J<ne+1;++J)S[J]=0;for(S[ne-1]|=2147483648,J=0;J<ne;++J)Z[J]^=S[J];G(Z)}},v.prototype.toString=v.prototype.hex=function(){this.finalize();for(var S=this.blockCount,J=this.s,ne=this.outputBlocks,Z=this.extraBytes,Q=0,ee=0,re="",ie;ee<ne;){for(Q=0;Q<S&&ee<ne;++Q,++ee)ie=J[Q],re+=l[ie>>4&15]+l[ie&15]+l[ie>>12&15]+l[ie>>8&15]+l[ie>>20&15]+l[ie>>16&15]+l[ie>>28&15]+l[ie>>24&15];ee%S===0&&(G(J),Q=0)}return Z&&(ie=J[Q],re+=l[ie>>4&15]+l[ie&15],Z>1&&(re+=l[ie>>12&15]+l[ie>>8&15]),Z>2&&(re+=l[ie>>20&15]+l[ie>>16&15])),re},v.prototype.arrayBuffer=function(){this.finalize();var S=this.blockCount,J=this.s,ne=this.outputBlocks,Z=this.extraBytes,Q=0,ee=0,re=this.outputBits>>3,ie;Z?ie=new ArrayBuffer(ne+1<<2):ie=new ArrayBuffer(re);for(var me=new Uint32Array(ie);ee<ne;){for(Q=0;Q<S&&ee<ne;++Q,++ee)me[ee]=J[Q];ee%S===0&&G(J)}return Z&&(me[Q]=J[Q],ie=ie.slice(0,re)),ie},v.prototype.buffer=v.prototype.arrayBuffer,v.prototype.digest=v.prototype.array=function(){this.finalize();for(var S=this.blockCount,J=this.s,ne=this.outputBlocks,Z=this.extraBytes,Q=0,ee=0,re=[],ie,me;ee<ne;){for(Q=0;Q<S&&ee<ne;++Q,++ee)ie=ee<<2,me=J[Q],re[ie]=me&255,re[ie+1]=me>>8&255,re[ie+2]=me>>16&255,re[ie+3]=me>>24&255;ee%S===0&&G(J)}return Z&&(ie=ee<<2,me=J[Q],re[ie]=me&255,Z>1&&(re[ie+1]=me>>8&255),Z>2&&(re[ie+2]=me>>16&255)),re};function U(S,J,ne){v.call(this,S,J,ne)}U.prototype=new v,U.prototype.finalize=function(){return this.encode(this.outputBits,!0),v.prototype.finalize.call(this)};var G=function(S){var J,ne,Z,Q,ee,re,ie,me,le,ye,$t,wt,ze,gr,Ut,ur,hi,Bt,Ht,Pn,Je,ut,xt,vt,ar,Kn,pt,qe,Rn,mr,Ar,na,Vr,Kr,La,un,pn,Il,vr,kr,Js,en,tn,Cc,gn,cr,_c,$,q,K,A,Y,ae,oe,pe,Ce,Le,_e,Kt,Ve,Et,Ct,kt;for(Z=0;Z<48;Z+=2)Q=S[0]^S[10]^S[20]^S[30]^S[40],ee=S[1]^S[11]^S[21]^S[31]^S[41],re=S[2]^S[12]^S[22]^S[32]^S[42],ie=S[3]^S[13]^S[23]^S[33]^S[43],me=S[4]^S[14]^S[24]^S[34]^S[44],le=S[5]^S[15]^S[25]^S[35]^S[45],ye=S[6]^S[16]^S[26]^S[36]^S[46],$t=S[7]^S[17]^S[27]^S[37]^S[47],wt=S[8]^S[18]^S[28]^S[38]^S[48],ze=S[9]^S[19]^S[29]^S[39]^S[49],J=wt^(re<<1|ie>>>31),ne=ze^(ie<<1|re>>>31),S[0]^=J,S[1]^=ne,S[10]^=J,S[11]^=ne,S[20]^=J,S[21]^=ne,S[30]^=J,S[31]^=ne,S[40]^=J,S[41]^=ne,J=Q^(me<<1|le>>>31),ne=ee^(le<<1|me>>>31),S[2]^=J,S[3]^=ne,S[12]^=J,S[13]^=ne,S[22]^=J,S[23]^=ne,S[32]^=J,S[33]^=ne,S[42]^=J,S[43]^=ne,J=re^(ye<<1|$t>>>31),ne=ie^($t<<1|ye>>>31),S[4]^=J,S[5]^=ne,S[14]^=J,S[15]^=ne,S[24]^=J,S[25]^=ne,S[34]^=J,S[35]^=ne,S[44]^=J,S[45]^=ne,J=me^(wt<<1|ze>>>31),ne=le^(ze<<1|wt>>>31),S[6]^=J,S[7]^=ne,S[16]^=J,S[17]^=ne,S[26]^=J,S[27]^=ne,S[36]^=J,S[37]^=ne,S[46]^=J,S[47]^=ne,J=ye^(Q<<1|ee>>>31),ne=$t^(ee<<1|Q>>>31),S[8]^=J,S[9]^=ne,S[18]^=J,S[19]^=ne,S[28]^=J,S[29]^=ne,S[38]^=J,S[39]^=ne,S[48]^=J,S[49]^=ne,gr=S[0],Ut=S[1],cr=S[11]<<4|S[10]>>>28,_c=S[10]<<4|S[11]>>>28,qe=S[20]<<3|S[21]>>>29,Rn=S[21]<<3|S[20]>>>29,Ve=S[31]<<9|S[30]>>>23,Et=S[30]<<9|S[31]>>>23,en=S[40]<<18|S[41]>>>14,tn=S[41]<<18|S[40]>>>14,Kr=S[2]<<1|S[3]>>>31,La=S[3]<<1|S[2]>>>31,ur=S[13]<<12|S[12]>>>20,hi=S[12]<<12|S[13]>>>20,$=S[22]<<10|S[23]>>>22,q=S[23]<<10|S[22]>>>22,mr=S[33]<<13|S[32]>>>19,Ar=S[32]<<13|S[33]>>>19,Ct=S[42]<<2|S[43]>>>30,kt=S[43]<<2|S[42]>>>30,oe=S[5]<<30|S[4]>>>2,pe=S[4]<<30|S[5]>>>2,un=S[14]<<6|S[15]>>>26,pn=S[15]<<6|S[14]>>>26,Bt=S[25]<<11|S[24]>>>21,Ht=S[24]<<11|S[25]>>>21,K=S[34]<<15|S[35]>>>17,A=S[35]<<15|S[34]>>>17,na=S[45]<<29|S[44]>>>3,Vr=S[44]<<29|S[45]>>>3,vt=S[6]<<28|S[7]>>>4,ar=S[7]<<28|S[6]>>>4,Ce=S[17]<<23|S[16]>>>9,Le=S[16]<<23|S[17]>>>9,Il=S[26]<<25|S[27]>>>7,vr=S[27]<<25|S[26]>>>7,Pn=S[36]<<21|S[37]>>>11,Je=S[37]<<21|S[36]>>>11,Y=S[47]<<24|S[46]>>>8,ae=S[46]<<24|S[47]>>>8,Cc=S[8]<<27|S[9]>>>5,gn=S[9]<<27|S[8]>>>5,Kn=S[18]<<20|S[19]>>>
297812,pt=S[19]<<20|S[18]>>>12,_e=S[29]<<7|S[28]>>>25,Kt=S[28]<<7|S[29]>>>25,kr=S[38]<<8|S[39]>>>24,Js=S[39]<<8|S[38]>>>24,ut=S[48]<<14|S[49]>>>18,xt=S[49]<<14|S[48]>>>18,S[0]=gr^~ur&Bt,S[1]=Ut^~hi&Ht,S[10]=vt^~Kn&qe,S[11]=ar^~pt&Rn,S[20]=Kr^~un&Il,S[21]=La^~pn&vr,S[30]=Cc^~cr&$,S[31]=gn^~_c&q,S[40]=oe^~Ce&_e,S[41]=pe^~Le&Kt,S[2]=ur^~Bt&Pn,S[3]=hi^~Ht&Je,S[12]=Kn^~qe&mr,S[13]=pt^~Rn&Ar,S[22]=un^~Il&kr,S[23]=pn^~vr&Js,S[32]=cr^~$&K,S[33]=_c^~q&A,S[42]=Ce^~_e&Ve,S[43]=Le^~Kt&Et,S[4]=Bt^~Pn&ut,S[5]=Ht^~Je&xt,S[14]=qe^~mr&na,S[15]=Rn^~Ar&Vr,S[24]=Il^~kr&en,S[25]=vr^~Js&tn,S[34]=$^~K&Y,S[35]=q^~A&ae,S[44]=_e^~Ve&Ct,S[45]=Kt^~Et&kt,S[6]=Pn^~ut&gr,S[7]=Je^~xt&Ut,S[16]=mr^~na&vt,S[17]=Ar^~Vr&ar,S[26]=kr^~en&Kr,S[27]=Js^~tn&La,S[36]=K^~Y&Cc,S[37]=A^~ae&gn,S[46]=Ve^~Ct&oe,S[47]=Et^~kt&pe,S[8]=ut^~gr&ur,S[9]=xt^~Ut&hi,S[18]=na^~vt&Kn,S[19]=Vr^~ar&pt,S[28]=en^~Kr&un,S[29]=tn^~La&pn,S[38]=Y^~Cc&cr,S[39]=ae^~gn&_c,S[48]=Ct^~oe&Ce,S[49]=kt^~pe&Le,S[0]^=g[Z],S[1]^=g[Z+1]};if(a)t.exports=m;else for(E=0;E<b.length;++E)i[b[E]]=m[b[E]]})()})(vV);var wke=vV.exports;const vke=is(wke);function dn(t){return"0x"+vke.keccak_256(Se(t))}const xke=Object.freeze(Object.defineProperty({__proto__:null,keccak256:dn},Symbol.toStringTag,{value:"Module"})),Eke="rlp/5.8.0",Bc=new ce(Eke);function jD(t){const e=[];for(;t;)e.unshift(t&255),t>>=8;return e}function zD(t,e,r){let n=0;for(let i=0;i<r;i++)n=n*256+t[e+i];return n}function xV(t){if(Array.isArray(t)){let n=[];if(t.forEach(function(s){n=n.concat(xV(s))}),n.length<=55)return n.unshift(192+n.length),n;const i=jD(n.length);return i.unshift(247+i.length),i.concat(n)}wb(t)||Bc.throwArgumentError("RLP object must be BytesLike","object",t);const e=Array.prototype.slice.call(Se(t));if(e.length===1&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const r=jD(e.length);return r.unshift(183+r.length),r.concat(e)}function Wh(t){return $e(xV(t))}function WD(t,e,r,n){const i=[];for(;r<e+1+n;){const s=EV(t,r);i.push(s.result),r+=s.consumed,r>e+1+n&&Bc.throwError("child data too short",ce.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function EV(t,e){if(t.length===0&&Bc.throwError("data too short",ce.errors.BUFFER_OVERRUN,{}),t[e]>=248){const r=t[e]-247;e+1+r>t.length&&Bc.throwError("data short segment too short",ce.errors.BUFFER_OVERRUN,{});const n=zD(t,e+1,r);return e+1+r+n>t.length&&Bc.throwError("data long segment too short",ce.errors.BUFFER_OVERRUN,{}),WD(t,e,e+1+r,r+n)}else if(t[e]>=192){const r=t[e]-192;return e+1+r>t.length&&Bc.throwError("data array too short",ce.errors.BUFFER_OVERRUN,{}),WD(t,e,e+1,r)}else if(t[e]>=184){const r=t[e]-183;e+1+r>t.length&&Bc.throwError("data array too short",ce.errors.BUFFER_OVERRUN,{});const n=zD(t,e+1,r);e+1+r+n>t.length&&Bc.throwError("data array too short",ce.errors.BUFFER_OVERRUN,{});const i=$e(t.slice(e+1+r,e+1+r+n));return{consumed:1+r+n,result:i}}else if(t[e]>=128){const r=t[e]-128;e+1+r>t.length&&Bc.throwError("data too short",ce.errors.BUFFER_OVERRUN,{});const n=$e(t.slice(e+1,e+1+r));return{consumed:1+r,result:n}}return{consumed:1,result:$e(t[e])}}function Vx(t){const e=Se(t),r=EV(e,0);return r.consumed!==e.length&&Bc.throwArgumentError("invalid rlp data","data",t),r.result}const Cke=Object.freeze(Object.defineProperty({__proto__:null,decode:Vx,encode:Wh},Symbol.toStringTag,{value:"Module"})),_ke="address/5.8.0",Tf=new ce(_ke);function HD(t){Cr(t,20)||Tf.throwArgumentError("invalid address","address",t),t=t.toLowerCase();const e=t.substring(2).split(""),r=new Uint8Array(40);for(let i=0;i<40;i++)r[i]=e[i].charCodeAt(0);const n=Se(dn(r));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const Ake=9007199254740991;function Ske(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}const v7={};for(let t=0;t<10;t++)v7[String(t)]=String(t);for(let t=0;t<26;t++)v7[String.fromCharCode(65+t)]=String(10+t);const qD=Math.floor(Ske(Ake));function CV(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>v7[n]).join("");for(;e.length>=qD;){let n=e.substring(0,qD);e=parseInt(n,10)%97+e.substring(n.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}function ln(t){let e=null;if(typeof t!="string"&&Tf.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=HD(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&Tf.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==CV(t)&&Tf.throwArgumentError("bad icap checksum","address",t),e=oke(t.substring(4));e.length<40;)e="0"+e;e=HD("0x"+e)}else Tf.throwArgumentError("invalid address","address",t);return e}function Nke(t){try{return ln(t),!0}catch{}return!1}function Ike(t){let e=ake(ln(t).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+CV("XE00"+e)+e}function x7(t){let e=null;try{e=ln(t.from)}catch{Tf.throwArgumentError("missing from address","transaction",t)}
2978const r=cl(Se(De.from(t.nonce).toHexString()));return ln(ci(dn(Wh([e,r])),12))}function Tke(t,e,r){return yl(e)!==32&&Tf.throwArgumentError("salt must be 32 bytes","salt",e),yl(r)!==32&&Tf.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),ln(ci(dn(Cn(["0xff",ln(t),e,r])),12))}const kke=Object.freeze(Object.defineProperty({__proto__:null,getAddress:ln,getContractAddress:x7,getCreate2Address:Tke,getIcapAddress:Ike,isAddress:Nke},Symbol.toStringTag,{value:"Module"}));class Pke extends Du{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){try{r=ln(r)}catch(n){this._throwError(n.message,r)}return e.writeValue(r)}decode(e){return ln(bn(e.readValue().toHexString(),20))}}class Rke extends Du{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,r){return this.coder.encode(e,r)}decode(e){return this.coder.decode(e)}}const bp=new ce(vb);function _V(t,e,r){let n=null;if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let c={};n=e.map(l=>{const u=l.localName;return u||bp.throwError("cannot encode object for signature with missing names",ce.errors.INVALID_ARGUMENT,{argument:"values",coder:l,value:r}),c[u]&&bp.throwError("cannot encode object for signature with duplicate names",ce.errors.INVALID_ARGUMENT,{argument:"values",coder:l,value:r}),c[u]=!0,r[u]})}else bp.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&bp.throwArgumentError("types/value length mismatch","tuple",r);let i=new nA(t.wordSize),s=new nA(t.wordSize),o=[];e.forEach((c,l)=>{let u=n[l];if(c.dynamic){let f=s.length;c.encode(s,u);let d=i.writeUpdatableValue();o.push(p=>{d(p+f)})}else c.encode(i,u)}),o.forEach(c=>{c(i.length)});let a=t.appendWriter(i);return a+=t.appendWriter(s),a}function AV(t,e){let r=[],n=t.subReader(0);e.forEach(s=>{let o=null;if(s.dynamic){let a=t.readValue(),c=n.subReader(a.toNumber());try{o=s.decode(c)}catch(l){if(l.code===ce.errors.BUFFER_OVERRUN)throw l;o=l,o.baseType=s.name,o.name=s.localName,o.type=s.type}}else try{o=s.decode(t)}catch(a){if(a.code===ce.errors.BUFFER_OVERRUN)throw a;o=a,o.baseType=s.name,o.name=s.localName,o.type=s.type}o!=null&&r.push(o)});const i=e.reduce((s,o)=>{const a=o.localName;return a&&(s[a]||(s[a]=0),s[a]++),s},{});e.forEach((s,o)=>{let a=s.localName;if(!a||i[a]!==1||(a==="length"&&(a="_length"),r[a]!=null))return;const c=r[o];c instanceof Error?Object.defineProperty(r,a,{enumerable:!0,get:()=>{throw c}}):r[a]=c});for(let s=0;s<r.length;s++){const o=r[s];o instanceof Error&&Object.defineProperty(r,s,{enumerable:!0,get:()=>{throw o}})}return Object.freeze(r)}class Oke extends Du{constructor(e,r,n){const i=e.type+"["+(r>=0?r:"")+"]",s=r===-1||e.dynamic;super("array",i,n,s),this.coder=e,this.length=r}defaultValue(){const e=this.coder.defaultValue(),r=[];for(let n=0;n<this.length;n++)r.push(e);return r}encode(e,r){Array.isArray(r)||this._throwError("expected array value",r);let n=this.length;n===-1&&(n=r.length,e.writeValue(r.length)),bp.checkArgumentCount(r.length,n,"coder array"+(this.localName?" "+this.localName:""));let i=[];for(let s=0;s<r.length;s++)i.push(this.coder);return _V(e,i,r)}decode(e){let r=this.length;r===-1&&(r=e.readValue().toNumber(),r*32>e._data.length&&bp.throwError("insufficient data length",ce.errors.BUFFER_OVERRUN,{length:e._data.length,count:r}));let n=[];for(let i=0;i<r;i++)n.push(new Rke(this.coder));return e.coerce(this.name,AV(e,n))}}class Dke extends Du{constructor(e){super("bool","bool",e,!1)}defaultValue(){return!1}encode(e,r){return e.writeValue(r?1:0)}decode(e){return e.coerce(this.type,!e.readValue().isZero())}}class SV extends Du{constructor(e,r){super(e,e,r,!0)}defaultValue(){return"0x"}encode(e,r){r=Se(r);let n=e.writeValue(r.length);return n+=e.writeBytes(r),n}decode(e){return e.readBytes(e.readValue().toNumber(),!0)}}class Lke extends SV{constructor(e){super("bytes",e)}decode(e){return e.coerce(this.name,$e(super.decode(e)))}}class Mke extends Du{constructor(e,r){let n="bytes"+String(e);super(n,n,r,!1),this.size=e}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+this.size*2)}encode(e,r){let n=Se(r);return n.length!==this.size&&this._throwError("incorrect data length",r),e.writeBytes(n)}decode(e){return e.coerce(this.name,$e(e.readBytes(this.size)))}}class $ke extends Du{constructor(e){super("null","",e,!1)}defaultValue(){return null}encode(e,r){return r!=null&&this._throwError("not null",r),e.writeBytes([])}decode(e){return e.readBytes(0),e.coerce(this.name,null)}}const Uke="0x0000000000000000000000000000000000000000",Bke=De.from(-1),NV=De.from(0),Fke=De.from(1),jke=De.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),IV="0x0000000000000000000000000000000000000000000000000000000000000000";class zke extends Du{constructor(e,r,n){const i=(r?"int":"uint")+e*8;super(i,i,n,!1),this.size=e,this.signed=r}defaultValue(){return 0}encode(e,r){let n=De.from(r),i=jke.mask(e.wordSize*8);if(this.signed){let s=i.mask(this.size*8-1);(n.gt(s)||n.lt(s.add(Fke).mul(Bke)))&&this._throwError("value out-of-bounds",r)}else(n.lt(NV)||n.gt(i.mask(this.size*8)))&&this._throwError("value out-of-bounds",r);return n=n.toTwos(this.size*8).mask(this.size*8),this.signed&&(n=n.fromTwos(this.size*8).toTwos(8*e.wordSize)),e.writeValue(n)}decode(e){let r=e.readValue().mask(this.size*8);return this.signed&&(r=r.fromTwos(this.size*8)),e.coerce(this.name,r)}}const Wke="strings/5.8.0",TV=new ce(Wke);var wl;(function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD"})(wl||(wl={}));var go;(function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation"})(go||(go={}));function Hke(t,e,r,n,i){return TV.throwArgumentError(`invalid codepoint at offset ${e}; ${t}`,"bytes",r)}function kV(t,e,r,n,i){if(t===go.BAD_PREFIX||t===go.UNEXPECTED_CONTINUE){let s=0;for(let o=e+1;o<r.length&&r[o]>>6===2;o++)s++;return s}return t===go.OVERRUN?r.length-e-1:0}function qke(t,e,r,n,i){return t===go.OVERLONG?(n.push(i),0):(n.push(65533),kV(t,e,r))}const PV=Object.freeze({error:Hke,ignore:kV,replace:qke});function E7(t,e){e==null&&(e=PV.error),t=Se(t);const r=[];let n=0;for(;n<t.length;){const i=t[n++];if(!(i>>7)){r.push(i);continue}let s=null,o=null;if((i&224)===192)s=1,o=127;else if((i&240)===224)s=2,o=2047;else if((i&248)===240)s=3,o=65535;else{(i&192)===128?n+=e(go.UNEXPECTED_CONTINUE,n-1,t,r):n+=e(go.BAD_PREFIX,n-1,t,r);continue}if(n-1+s>=t.length){n+=e(go.OVERRUN,n-1,t,r);continue}let a=i&(1<<8-s-1)-1;for(let c=0;c<s;c++){let l=t[n];if((l&192)!=128){n+=e(go.MISSING_CONTINUE,n,t,r),a=null;break}a=a<<6|l&63,n++}if(a!==null){if(a>1114111){n+=e(go.OUT_OF_RANGE,n-1-s,t,r,a);continue}if(a>=55296&&a<=57343){n+=e(go.UTF16_SURROGATE,n-1-s,t,r,a);continue}if(a<=o){n+=e(go.OVERLONG,n-1-s,t,r,a);continue}r.push(a)}}return r}function ii(t,e=wl.current){e!=wl.current&&(TV.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n<t.length;n++){const i=t.charCodeAt(n);if(i<128)r.push(i);else if(i<2048)r.push(i>>6|192),r.push(i&63|128);else if((i&64512)==55296){n++;const s=t.charCodeAt(n);if(n>=t.length||(s&64512)!==56320)throw new Error("invalid utf-8 string");const o=65536+((i&1023)<<10)+(s&1023);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(o&63|128)}else r.push(i>>12|224),r.push(i>>6&63|128),r.push(i&63|128)}return Se(r)}function T6(t){const e="0000"+t.toString(16);return"\\u"+e.substring(e.length-4)}function Vke(t,e){return'"'+E7(t,e).map(r=>{if(r<256){switch(r){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(r>=32&&r<127)return String.fromCharCode(r)}return r<=65535?T6(r):(r-=65536,T6((r>>10&1023)+55296)+T6((r&1023)+56320))}).join("")+'"'}function iA(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function xd(t,e){return iA(E7(t,e))}function g4(t,e=wl.current){return E7(ii(t,e))}function Kke(t){const e=ii(t);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return $e(Cn([e,IV]).slice(0,32))}function Gke(t){const e=Se(t);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;e[r-1]===0;)r--;return xd(e.slice(0,r))}function Yke(t){if(t.length%4!==0)throw new Error("bad data");let e=[];for(let r=0;r<t.length;r+=4)e.push(parseInt(t.substring(r,r+4),16));return e}function C7(t,e){e||(e=function(i){return[parseInt(i,16)]});let r=0,n={};return t.split(",").forEach(i=>
2978{let s=i.split(":");r+=parseInt(s[0],16),n[r]=e(s[1])}),n}function RV(t){let e=0;return t.split(",").map(r=>{let n=r.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let i=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:i,h:e}})}function _7(t,e){let r=0;for(let n=0;n<e.length;n++){let i=e[n];if(r+=i.l,t>=r&&t<=r+i.h&&(t-r)%(i.d||1)===0){if(i.e&&i.e.indexOf(t-r)!==-1)continue;return i}}return null}const Zke=RV("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),Jke="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(t=>parseInt(t,16)),Qke=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],Xke=C7("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),ePe=C7("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),tPe=C7("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",Yke),rPe=RV("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function nPe(t){return t.reduce((e,r)=>(r.forEach(n=>{e.push(n)}),e),[])}function iPe(t){return!!_7(t,Zke)}function sPe(t){let e=_7(t,Qke);if(e)return[t+e.s];let r=Xke[t];if(r)return r;let n=ePe[t];if(n)return[t+n[0]];let i=tPe[t];return i||null}function oPe(t){return!!_7(t,rPe)}function aPe(t){if(t.match(/^[a-z0-9-]*$/i)&&t.length<=59)return t.toLowerCase();let e=g4(t);e=nPe(e.map(n=>{if(Jke.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let i=sPe(n);return i||[n]})),e=g4(iA(e),wl.NFKC),e.forEach(n=>{if(oPe(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(iPe(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let r=iA(e);if(r.substring(0,1)==="-"||r.substring(2,4)==="--"||r.substring(r.length-1)==="-")throw new Error("invalid hyphen");return r}const cPe=Object.freeze(Object.defineProperty({__proto__:null,get UnicodeNormalizationForm(){return wl},Utf8ErrorFuncs:PV,get Utf8ErrorReason(){return go},_toEscapedUtf8String:Vke,formatBytes32String:Kke,nameprep:aPe,parseBytes32String:Gke,toUtf8Bytes:ii,toUtf8CodePoints:g4,toUtf8String:xd},Symbol.toStringTag,{value:"Module"}));class lPe extends SV{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,ii(r))}decode(e){return xd(super.decode(e))}}class Uw extends Du{constructor(e,r){let n=!1;const i=[];e.forEach(o=>{o.dynamic&&(n=!0),i.push(o.type)});const s="tuple("+i.join(",")+")";super("tuple",s,r,n),this.coders=e}defaultValue(){const e=[];
2978this.coders.forEach(n=>{e.push(n.defaultValue())});const r=this.coders.reduce((n,i)=>{const s=i.localName;return s&&(n[s]||(n[s]=0),n[s]++),n},{});return this.coders.forEach((n,i)=>{let s=n.localName;!s||r[s]!==1||(s==="length"&&(s="_length"),e[s]==null&&(e[s]=e[i]))}),Object.freeze(e)}encode(e,r){return _V(e,this.coders,r)}decode(e){return e.coerce(this.name,AV(e,this.coders))}}const Bw=new ce(vb),uPe=new RegExp(/^bytes([0-9]*)$/),fPe=new RegExp(/^(u?int)([0-9]*)$/);class OV{constructor(e){we(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new Pke(e.name);case"bool":return new Dke(e.name);case"string":return new lPe(e.name);case"bytes":return new Lke(e.name);case"array":return new Oke(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new Uw((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new $ke(e.name)}let r=e.type.match(fPe);if(r){let n=parseInt(r[2]||"256");return(n===0||n>256||n%8!==0)&&Bw.throwArgumentError("invalid "+r[1]+" bit length","param",e),new zke(n/8,r[1]==="int",e.name)}if(r=e.type.match(uPe),r){let n=parseInt(r[1]);return(n===0||n>32)&&Bw.throwArgumentError("invalid bytes length","param",e),new Mke(n,e.name)}return Bw.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,r){return new p4(e,this._getWordSize(),this.coerceFunc,r)}_getWriter(){return new nA(this._getWordSize())}getDefaultValue(e){const r=e.map(i=>this._getCoder(Ii.from(i)));return new Uw(r,"_").defaultValue()}encode(e,r){e.length!==r.length&&Bw.throwError("types/values length mismatch",ce.errors.INVALID_ARGUMENT,{count:{types:e.length,values:r.length},value:{types:e,values:r}});const n=e.map(o=>this._getCoder(Ii.from(o))),i=new Uw(n,"_"),s=this._getWriter();return i.encode(s,r),s.data}decode(e,r,n){const i=e.map(o=>this._getCoder(Ii.from(o)));return new Uw(i,"_").decode(this._getReader(Se(r),n))}}const DV=new OV;function kf(t){return dn(ii(t))}const LV="hash/5.8.0";function A7(t){t=atob(t);const e=[];for(let r=0;r<t.length;r++)e.push(t.charCodeAt(r));return Se(e)}function S7(t){t=Se(t);let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}const dPe=Object.freeze(Object.defineProperty({__proto__:null,decode:A7,encode:S7},Symbol.toStringTag,{value:"Module"}));function MV(t,e){e==null&&(e=1);const r=[],n=r.forEach,i=function(s,o){n.call(s,function(a){o>0&&Array.isArray(a)?i(a,o-1):r.push(a)})};return i(t,e),r}function hPe(t){const e={};for(let r=0;r<t.length;r++){const n=t[r];e[n[0]]=n[1]}return e}function pPe(t){let e=0;function r(){return t[e++]<<8|t[e++]}let n=r(),i=1,s=[0,1];for(let P=1;P<n;P++)s.push(i+=r());let o=r(),a=e;e+=o;let c=0,l=0;function u(){return c==0&&(l=l<<8|t[e++],c=8),l>>--c&1}const f=31,d=Math.pow(2,f),p=d>>>1,h=p>>1,g=d-1;let y=0;for(let P=0;P<f;P++)y=y<<1|u();let x=[],C=0,_=d;for(;;){let P=Math.floor(((y-C+1)*i-1)/_),z=0,W=n;for(;W-z>1;){let j=z+W>>>1;P<s[j]?W=j:z=j}if(z==0)break;x.push(z);let B=C+Math.floor(_*s[z]/i),I=C+Math.floor(_*s[z+1]/i)-1;for(;!((B^I)&p);)y=y<<1&g|u(),B=B<<1&g,I=I<<1&g|1;for(;B&~I&h;)y=y&p|y<<1&g>>>1|u(),B=B<<1^p,I=(I^p)<<1|p|1;C=B,_=1+I-B}let L=n-4;return x.map(P=>{switch(P-L){case 3:return L+65792+(t[a++]<<16|t[a++]<<8|t[a++]);case 2:return L+256+(t[a++]<<8|t[a++]);case 1:return L+t[a++];default:return P-1}})}function gPe(t){let e=0;return()=>t[e++]}function mPe(t){return gPe(pPe(t))}function yPe(t){return t&1?~t>>1:t>>1}function bPe(t,e){let r=Array(t);for(let n=0;n<t;n++)r[n]=1+e();return r}function VD(t,e){let r=Array(t);for(let n=0,i=-1;n<t;n++)r[n]=i+=1+e();return r}function wPe(t,e){let r=Array(t);for(let n=0,i=0;n<t;n++)r[n]=i+=yPe(e());return r}function m4(t,e){let r=VD(t(),t),n=t(),i=VD(n,t),s=bPe(n,t);for(let o=0;o<n;o++)for(let a=0;a<s[o];a++)r.push(i[o]+a);return e?r.map(o=>e[o]):r}function vPe(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(EPe(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(CPe(r,t))}return hPe(MV(e))}function xPe(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(r)}return e}function $V(t,e,r){let n=Array(t).fill(void 0).map(()=>[]);for(let i=0;i<e;i++)wPe(t,r).forEach((s,o)=>n[o].push(s));return n}function EPe(t,e){let r=1+e(),n=e(),i=xPe(e),s=$V(i.length,1+t,e);return MV(s.map((o,a)=>{const c=o[0],l=o.slice(1);return Array(i[a]).fill(void 0).map((u,f)=>{let d=f*n;return[c+f*r,l.map(p=>p+d)]})}))}function CPe(t,e){let r=1+e();return $V(r,1+t,e).map(i=>[i[0],i.slice(1)])}function _Pe(t){let e=m4(t).sort((n,i)=>n-i);return r();function r(){let n=[];for(;;){let l=m4(t,e);if(l.length==0)break;n.push({set:new Set(l),node:r()})}n.sort((l,u)=>u.set.size-l.set.size);let i=t(),s=i%3;i=i/3|0;let o=!!(i&1);i>>=1;let a=i==1,c=i==2;return{branches:n,valid:s,fe0f:o,save:a,check:c}}}function APe(){return mPe(A7
vendor: 14,757 bytes, line 2978
2978("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))
2978}const Kx=APe(),SPe=new Set(m4(Kx)),NPe=new Set(m4(Kx)),IPe=vPe(Kx),TPe=_Pe(Kx),KD=45,GD=95;function UV(t){return g4(t)}function kPe(t){return t.filter(e=>e!=65039)}function BV(t){for(let e of t.split(".")){let r=UV(e);try{for(let n=r.lastIndexOf(GD)-1;n>=0;n--)if(r[n]!==GD)throw new Error("underscore only allowed at start");if(r.length>=4&&r.every(n=>n<128)&&r[2]===KD&&r[3]===KD)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return t}function PPe(t){return BV(RPe(t,kPe))}function RPe(t,e){let r=UV(t).reverse(),n=[];for(;r.length;){let i=DPe(r);if(i){n.push(...e(i));continue}let s=r.pop();if(SPe.has(s)){n.push(s);continue}if(NPe.has(s))continue;let o=IPe[s];if(o){n.push(...o);continue}throw new Error(`Disallowed codepoint: 0x${s.toString(16).toUpperCase()}`)}return BV(OPe(String.fromCodePoint(...n)))}function OPe(t){return t.normalize("NFC")}function DPe(t,e){var r;let n=TPe,i,s,o=[],a=t.length;for(;a;){let c=t[--a];if(n=(r=n.branches.find(l=>l.set.has(c)))===null||r===void 0?void 0:r.node,!n)break;if(n.save)s=c;else if(n.check&&c===s)break;o.push(c),n.fe0f&&(o.push(65039),a>0&&t[a-1]==65039&&a--),n.valid&&(i=o.slice(),n.valid==2&&i.splice(1,1),t.length=a)}return i}const LPe=new ce(LV),FV=new Uint8Array(32);FV.fill(0);function YD(t){if(t.length===0)throw new Error("invalid ENS name; empty component");return t}function Gx(t){const e=ii(PPe(t)),r=[];if(t.length===0)return r;let n=0;for(let i=0;i<e.length;i++)e[i]===46&&(r.push(YD(e.slice(n,i))),n=i+1);if(n>=e.length)throw new Error("invalid ENS name; empty component");return r.push(YD(e.slice(n))),r}function MPe(t){return Gx(t).map(e=>xd(e)).join(".")}function $Pe(t){try{return Gx(t).length!==0}catch{}return!1}function Gm(t){typeof t!="string"&&LPe.throwArgumentError("invalid ENS name; not a string","name",t);let e=FV;const r=Gx(t);for(;r.length;)e=dn(Cn([e,dn(r.pop())]));return $e(e)}function jV(t){return $e(Cn(Gx(t).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const r=new Uint8Array(e.length+1);return r.set(e,1),r[0]=r.length-1,r})))+"00"}const zV=`�Ethereum Signed Message: 2979`;function N7(t){return typeof t=="string"&&(t=ii(t)),dn(Cn([ii(zV),ii(String(t.length)),t]))}var UPe=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const $n=new ce(LV),WV=new Uint8Array(32);WV.fill(0);const BPe=De.from(-1),HV=De.from(0),qV=De.from(1),FPe=De.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function jPe(t){const e=Se(t),r=e.length%32;return r?Fs([e,WV.slice(r)]):$e(e)}const zPe=bn(qV.toHexString(),32),WPe=bn(HV.toHexString(),32),ZD={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},k6=["name","version","chainId","verifyingContract","salt"];function JD(t){return function(e){return typeof e!="string"&&$n.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const HPe={name:JD("name"),version:JD("version"),chainId:function(t){try{return De.from(t).toString()}catch{}return $n.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return ln(t).toLowerCase()}catch{}return $n.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=Se(t);if(e.length!==32)throw new Error("bad length");return $e(e)}catch{}return $n.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function P6(t){{const e=t.match(/^(u?)int(\d*)$/);if(e){const r=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&$n.throwArgumentError("invalid numeric width","type",t);const i=FPe.mask(r?n-1:n),s=r?i.add(qV).mul(BPe):HV;return function(o){const a=De.from(o);return(a.lt(s)||a.gt(i))&&$n.throwArgumentError(`value out-of-bounds for ${t}`,"value",o),bn(a.toTwos(256).toHexString(),32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return(r===0||r>32||e[1]!==String(r))&&$n.throwArgumentError("invalid bytes width","type",t),function(n){return Se(n).length!==r&&$n.throwArgumentError(`invalid length for ${t}`,"value",n),jPe(n)}}}switch(t){case"address":return function(e){return bn(ln(e),32)};case"bool":return function(e){return e?zPe:WPe};case"bytes":return function(e){return dn(e)};case"string":return function(e){return kf(e)}}return null}function QD(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}class Xi{constructor(e){we(this,"types",Object.freeze(bl(e))),we(this,"_encoderCache",{}),we(this,"_types",{});const r={},n={},i={};Object.keys(e).forEach(a=>{r[a]={},n[a]=[],i[a]={}});for(const a in e){const c={};
2979e[a].forEach(l=>{c[l.name]&&$n.throwArgumentError(`duplicate variable name ${JSON.stringify(l.name)} in ${JSON.stringify(a)}`,"types",e),c[l.name]=!0;const u=l.type.match(/^([^\x5b]*)(\x5b|$)/)[1];u===a&&$n.throwArgumentError(`circular type reference to ${JSON.stringify(u)}`,"types",e),!P6(u)&&(n[u]||$n.throwArgumentError(`unknown type ${JSON.stringify(u)}`,"types",e),n[u].push(a),r[a][u]=!0)})}const s=Object.keys(n).filter(a=>n[a].length===0);s.length===0?$n.throwArgumentError("missing primary type","types",e):s.length>1&&$n.throwArgumentError(`ambiguous primary types or unused types: ${s.map(a=>JSON.stringify(a)).join(", ")}`,"types",e),we(this,"primaryType",s[0]);function o(a,c){c[a]&&$n.throwArgumentError(`circular type reference to ${JSON.stringify(a)}`,"types",e),c[a]=!0,Object.keys(r[a]).forEach(l=>{n[l]&&(o(l,c),Object.keys(c).forEach(u=>{i[u][l]=!0}))}),delete c[a]}o(this.primaryType,{});for(const a in i){const c=Object.keys(i[a]);c.sort(),this._types[a]=QD(a,e[a])+c.map(l=>QD(l,e[l])).join("")}}getEncoder(e){let r=this._encoderCache[e];return r||(r=this._encoderCache[e]=this._getEncoder(e)),r}_getEncoder(e){{const i=P6(e);if(i)return i}const r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){const i=r[1],s=this.getEncoder(i),o=parseInt(r[3]);return a=>{o>=0&&a.length!==o&&$n.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",a);let c=a.map(s);return this._types[i]&&(c=c.map(dn)),dn(Fs(c))}}const n=this.types[e];if(n){const i=kf(this._types[e]);return s=>{const o=n.map(({name:a,type:c})=>{const l=this.getEncoder(c)(s[a]);return this._types[c]?dn(l):l});return o.unshift(i),Fs(o)}}return $n.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const r=this._types[e];return r||$n.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return dn(this.encodeData(e,r))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,r,n){if(P6(e))return n(e,r);const i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){const o=i[1],a=parseInt(i[3]);return a>=0&&r.length!==a&&$n.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",r),r.map(c=>this._visit(o,c,n))}const s=this.types[e];return s?s.reduce((o,{name:a,type:c})=>(o[a]=this._visit(c,r[a],n),o),{}):$n.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new Xi(e)}static getPrimaryType(e){return Xi.from(e).primaryType}static hashStruct(e,r,n){return Xi.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){const i=ZD[n];i||$n.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:i})}return r.sort((n,i)=>k6.indexOf(n.name)-k6.indexOf(i.name)),Xi.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return Fs(["0x1901",Xi.hashDomain(e),Xi.from(r).hash(n)])}static hash(e,r,n){return dn(Xi.encode(e,r,n))}static resolveNames(e,r,n,i){return UPe(this,void 0,void 0,function*(){e=bi(e);const s={};e.verifyingContract&&!Cr(e.verifyingContract,20)&&(s[e.verifyingContract]="0x");const o=Xi.from(r);o.visit(n,(a,c)=>(a==="address"&&!Cr(c,20)&&(s[c]="0x"),c));for(const a in s)s[a]=yield i(a);return e.verifyingContract&&s[e.verifyingContract]&&(e.verifyingContract=s[e.verifyingContract]),n=o.visit(n,(a,c)=>a==="address"&&s[c]?s[c]:c),{domain:e,value:n}})}static getPayload(e,r,n){Xi.hashDomain(e);const i={},s=[];k6.forEach(c=>{const l=e[c];l!=null&&(i[c]=HPe[c](l),s.push({name:c,type:ZD[c]}))});const o=Xi.from(r),a=bi(r);return a.EIP712Domain?$n.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):a.EIP712Domain=s,o.encode(n),{types:a,domain:i,primaryType:o.primaryType,message:o.visit(n,(c,l)=>{if(c.match(/^bytes(\d*)/))return $e(Se(l));if(c.match(/^u?int/))return De.from(l).toString();switch(c){case"address":return l.toLowerCase();case"bool":return!!l;case"string":return typeof l!="string"&&$n.throwArgumentError("invalid string","value",l),l}return $n.throwArgumentError("unsupported type","type",c)})}}}const qPe=Object.freeze(Object.defineProperty({__proto__:null,_TypedDataEncoder:Xi,dnsEncode:jV,ensNormalize:MPe,hashMessage:N7,id:kf,isValidName:$Pe,messagePrefix:zV,namehash:Gm},Symbol.toStringTag,{value:"Module"})),Mn=new ce(vb);class VV extends vd{}class KV extends vd{}class VPe extends vd{}class y4 extends vd{static isIndexed(e){return!!(e&&e._isIndexed)}}const KPe={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function XD(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return r.error=e,r}class sA{constructor(e){let r=[];typeof e=="string"?r=JSON.parse(e):r=e,we(this,"fragments",r.map(n=>Qc.from(n)).filter(n=>n!=null)),we(this,"_abiCoder",ic(new.target,"getAbiCoder")()),we(this,"functions",{}),we(this,"errors",{}),we(this,"events",{}),we(this,"structs",{}
2979),this.fragments.forEach(n=>{let i=null;switch(n.type){case"constructor":if(this.deploy){Mn.warn("duplicate definition - constructor");return}we(this,"deploy",n);return;case"function":i=this.functions;break;case"event":i=this.events;break;case"error":i=this.errors;break;default:return}let s=n.format();if(i[s]){Mn.warn("duplicate definition - "+s);return}i[s]=n}),this.deploy||we(this,"deploy",ec.from({payable:!1,type:"constructor"})),we(this,"_isInterface",!0)}format(e){e||(e=Dr.full),e===Dr.sighash&&Mn.throwArgumentError("interface does not support formatting sighash","format",e);const r=this.fragments.map(n=>n.format(e));return e===Dr.json?JSON.stringify(r.map(n=>JSON.parse(n))):r}static getAbiCoder(){return DV}static getAddress(e){return ln(e)}static getSighash(e){return ci(kf(e.format()),0,4)}static getEventTopic(e){return kf(e.format())}getFunction(e){if(Cr(e)){for(const n in this.functions)if(e===this.getSighash(n))return this.functions[n];Mn.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.functions).filter(s=>s.split("(")[0]===n);return i.length===0?Mn.throwArgumentError("no matching function","name",n):i.length>1&&Mn.throwArgumentError("multiple matching functions","name",n),this.functions[i[0]]}const r=this.functions[tc.fromString(e).format()];return r||Mn.throwArgumentError("no matching function","signature",e),r}getEvent(e){if(Cr(e)){const n=e.toLowerCase();for(const i in this.events)if(n===this.getEventTopic(i))return this.events[i];Mn.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.events).filter(s=>s.split("(")[0]===n);return i.length===0?Mn.throwArgumentError("no matching event","name",n):i.length>1&&Mn.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}const r=this.events[Kc.fromString(e).format()];return r||Mn.throwArgumentError("no matching event","signature",e),r}getError(e){if(Cr(e)){const n=ic(this.constructor,"getSighash");for(const i in this.errors){const s=this.errors[i];if(e===n(s))return this.errors[i]}Mn.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.errors).filter(s=>s.split("(")[0]===n);return i.length===0?Mn.throwArgumentError("no matching error","name",n):i.length>1&&Mn.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}const r=this.errors[tc.fromString(e).format()];return r||Mn.throwArgumentError("no matching error","signature",e),r}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(r){try{e=this.getError(e)}catch{throw r}}return ic(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),ic(this.constructor,"getEventTopic")(e)}_decodeParams(e,r){return this._abiCoder.decode(e,r)}_encodeParams(e,r){return this._abiCoder.encode(e,r)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,r){typeof e=="string"&&(e=this.getError(e));const n=Se(r);return $e(n.slice(0,4))!==this.getSighash(e)&&Mn.throwArgumentError(`data signature does not match error ${e.name}.`,"data",$e(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,r){return typeof e=="string"&&(e=this.getError(e)),$e(Cn([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionData(e,r){typeof e=="string"&&(e=this.getFunction(e));const n=Se(r);return $e(n.slice(0,4))!==this.getSighash(e)&&Mn.throwArgumentError(`data signature does not match function ${e.name}.`,"data",$e(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,r){return typeof e=="string"&&(e=this.getFunction(e)),$e(Cn([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionResult(e,r){typeof e=="string"&&(e=this.getFunction(e));let n=Se(r),i=null,s="",o=null,a=null,c=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{const l=$e(n.slice(0,4)),u=KPe[l];if(u)o=this._abiCoder.decode(u.inputs,n.slice(4)),a=u.name,c=u.signature,u.reason&&(i=o[0]),a==="Error"?s=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(o[0])}`:a==="Panic"&&(s=`; VM Exception while processing transaction: reverted with panic code ${o[0]}`);else try{const f=this.getError(l);o=this._abiCoder.decode(f.inputs,n.slice(4)),a=f.name,c=f.format()}catch{}break}}return Mn.throwError("call revert exception"+s,ce.errors.CALL_EXCEPTION,{method:e.format(),data:$e(r),errorArgs:o,errorName:a,errorSignature:c,reason:i})}encodeFunctionResult(e,r){return typeof e=="string"&&(e=this.getFunction(e)),$e(this._abiCoder.encode(e.outputs,r||[]))}encodeFilterTopics(e,r){typeof e=="string"&&(e=this.getEvent(e)),r.length>
2979e.inputs.length&&Mn.throwError("too many arguments for "+e.format(),ce.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:r});let n=[];e.anonymous||n.push(this.getEventTopic(e));const i=(s,o)=>s.type==="string"?kf(o):s.type==="bytes"?dn($e(o)):(s.type==="bool"&&typeof o=="boolean"&&(o=o?"0x01":"0x00"),s.type.match(/^u?int/)&&(o=De.from(o).toHexString()),s.type==="address"&&this._abiCoder.encode(["address"],[o]),bn($e(o),32));for(r.forEach((s,o)=>{let a=e.inputs[o];if(!a.indexed){s!=null&&Mn.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+a.name,s);return}s==null?n.push(null):a.baseType==="array"||a.baseType==="tuple"?Mn.throwArgumentError("filtering with tuples or arrays not supported","contract."+a.name,s):Array.isArray(s)?n.push(s.map(c=>i(a,c))):n.push(i(a,s))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,r){typeof e=="string"&&(e=this.getEvent(e));const n=[],i=[],s=[];return e.anonymous||n.push(this.getEventTopic(e)),r.length!==e.inputs.length&&Mn.throwArgumentError("event arguments/values mismatch","values",r),e.inputs.forEach((o,a)=>{const c=r[a];if(o.indexed)if(o.type==="string")n.push(kf(c));else if(o.type==="bytes")n.push(dn(c));else{if(o.baseType==="tuple"||o.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([o.type],[c]))}else i.push(o),s.push(c)}),{data:this._abiCoder.encode(i,s),topics:n}}decodeEventLog(e,r,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let d=this.getEventTopic(e);(!Cr(n[0],32)||n[0].toLowerCase()!==d)&&Mn.throwError("fragment/topic mismatch",ce.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:d,value:n[0]}),n=n.slice(1)}let i=[],s=[],o=[];e.inputs.forEach((d,p)=>{d.indexed?d.type==="string"||d.type==="bytes"||d.baseType==="tuple"||d.baseType==="array"?(i.push(Ii.fromObject({type:"bytes32",name:d.name})),o.push(!0)):(i.push(d),o.push(!1)):(s.push(d),o.push(!1))});let a=n!=null?this._abiCoder.decode(i,Cn(n)):null,c=this._abiCoder.decode(s,r,!0),l=[],u=0,f=0;e.inputs.forEach((d,p)=>{if(d.indexed)if(a==null)l[p]=new y4({_isIndexed:!0,hash:null});else if(o[p])l[p]=new y4({_isIndexed:!0,hash:a[f++]});else try{l[p]=a[f++]}catch(h){l[p]=h}else try{l[p]=c[u++]}catch(h){l[p]=h}if(d.name&&l[d.name]==null){const h=l[p];h instanceof Error?Object.defineProperty(l,d.name,{enumerable:!0,get:()=>{throw XD(`property ${JSON.stringify(d.name)}`,h)}}):l[d.name]=h}});for(let d=0;d<l.length;d++){const p=l[d];p instanceof Error&&Object.defineProperty(l,d,{enumerable:!0,get:()=>{throw XD(`index ${d}`,p)}})}return Object.freeze(l)}parseTransaction(e){let r=this.getFunction(e.data.substring(0,10).toLowerCase());return r?new KV({args:this._abiCoder.decode(r.inputs,"0x"+e.data.substring(10)),functionFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r),value:De.from(e.value||"0")}):null}parseLog(e){let r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new VV({eventFragment:r,name:r.name,signature:r.format(),topic:this.getEventTopic(r),args:this.decodeEventLog(r,e.data,e.topics)})}parseError(e){const r=$e(e);let n=this.getError(r.substring(0,10).toLowerCase());return n?new VPe({args:this._abiCoder.decode(n.inputs,"0x"+r.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}}const GPe=Object.freeze(Object.defineProperty({__proto__:null,AbiCoder:OV,ConstructorFragment:ec,ErrorFragment:Ql,EventFragment:Kc,FormatTypes:Dr,Fragment:Qc,FunctionFragment:tc,Indexed:y4,Interface:sA,LogDescription:VV,ParamType:Ii,TransactionDescription:KV,checkResultErrors:wV,defaultAbiCoder:DV},Symbol.toStringTag,{value:"Module"})),YPe="abstract-provider/5.8.0";var ZPe=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const JPe=new ce(YPe);class QPe extends vd{static isForkEvent(e){return!!(e&&e._isForkEvent)}}class xb{constructor(){JPe.checkAbstract(new.target,xb),we(this,"_isProvider",!0)}getFeeData(){return ZPe(this,void 0,void 0,function*(){const{block:e,gasPrice:r}=yield ti({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(o=>null)});
2979let n=null,i=null,s=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,s=De.from("1500000000"),i=e.baseFeePerGas.mul(2).add(s)),{lastBaseFeePerGas:n,maxFeePerGas:i,maxPriorityFeePerGas:s,gasPrice:r}})}addListener(e,r){return this.on(e,r)}removeListener(e,r){return this.off(e,r)}static isProvider(e){return!!(e&&e._isProvider)}}const XPe="abstract-signer/5.8.0";var ja=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const la=new ce(XPe),eRe=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],tRe=[ce.errors.INSUFFICIENT_FUNDS,ce.errors.NONCE_EXPIRED,ce.errors.REPLACEMENT_UNDERPRICED];class Vg{constructor(){la.checkAbstract(new.target,Vg),we(this,"_isSigner",!0)}getBalance(e){return ja(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return ja(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return ja(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const r=yield ti(this.checkTransaction(e));return yield this.provider.estimateGas(r)})}call(e,r){return ja(this,void 0,void 0,function*(){this._checkProvider("call");const n=yield ti(this.checkTransaction(e));return yield this.provider.call(n,r)})}sendTransaction(e){return ja(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const r=yield this.populateTransaction(e),n=yield this.signTransaction(r);return yield this.provider.sendTransaction(n)})}getChainId(){return ja(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return ja(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return ja(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return ja(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const n in e)eRe.indexOf(n)===-1&&la.throwArgumentError("invalid transaction key: "+n,"transaction",e);const r=bi(e);return r.from==null?r.from=this.getAddress():r.from=Promise.all([Promise.resolve(r.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&la.throwArgumentError("from address mismatch","transaction",e),n[0])),r}populateTransaction(e){return ja(this,void 0,void 0,function*(){const r=yield ti(this.checkTransaction(e));r.to!=null&&(r.to=Promise.resolve(r.to).then(i=>ja(this,void 0,void 0,function*(){if(i==null)return null;const s=yield this.resolveName(i);return s==null&&la.throwArgumentError("provided ENS name resolves to null","tx.to",i),s})),r.to.catch(i=>{}));const n=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null;if(r.gasPrice!=null&&(r.type===2||n)?la.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(r.type===0||r.type===1)&&n&&la.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(r.type===2||r.type==null)&&r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)r.type=2;else if(r.type===0||r.type===1)r.gasPrice==null&&(r.gasPrice=this.getGasPrice());else{const i=yield this.getFeeData();if(r.type==null)if(i.maxFeePerGas!=null&&i.maxPriorityFeePerGas!=null)if(r.type=2,r.gasPrice!=null){const s=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=s,r.maxPriorityFeePerGas=s}else r.maxFeePerGas==null&&(r.maxFeePerGas=i.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas);else i.gasPrice!=null?(n&&la.throwError("network does not support EIP-1559",ce.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=i.gasPrice),r.type=0):la.throwError("failed to get consistent fee data",ce.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else r.type===2&&(r.maxFeePerGas==null&&(r.maxFeePerGas=i.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas))}return r.nonce==null&&(r.nonce=this.getTransactionCount("pending")),r.gasLim
2979it==null&&(r.gasLimit=this.estimateGas(r).catch(i=>{if(tRe.indexOf(i.code)>=0)throw i;return la.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",ce.errors.UNPREDICTABLE_GAS_LIMIT,{error:i,tx:r})})),r.chainId==null?r.chainId=this.getChainId():r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then(i=>(i[1]!==0&&i[0]!==i[1]&&la.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield ti(r)})}_checkProvider(e){this.provider||la.throwError("missing provider",ce.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}}class I7 extends Vg{constructor(e,r){super(),we(this,"address",e),we(this,"provider",r||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,r){return Promise.resolve().then(()=>{la.throwError(e,ce.errors.UNSUPPORTED_OPERATION,{operation:r})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,r,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new I7(this.address,e)}}var GV={},wr={},Eb=YV;function YV(t,e){if(!t)throw new Error(e||"Assertion failed")}YV.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)};var oA={exports:{}};typeof Object.create=="function"?oA.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:oA.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}};var rRe=oA.exports,nRe=Eb,iRe=rRe;wr.inherits=iRe;function sRe(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function oRe(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t=="string")if(e){if(e==="hex")for(t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t),i=0;i<t.length;i+=2)r.push(parseInt(t[i]+t[i+1],16))}else for(var n=0,i=0;i<t.length;i++){var s=t.charCodeAt(i);s<128?r[n++]=s:s<2048?(r[n++]=s>>6|192,r[n++]=s&63|128):sRe(t,i)?(s=65536+((s&1023)<<10)+(t.charCodeAt(++i)&1023),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=s&63|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=s&63|128)}else for(i=0;i<t.length;i++)r[i]=t[i]|0;return r}wr.toArray=oRe;function aRe(t){for(var e="",r=0;r<t.length;r++)e+=JV(t[r].toString(16));return e}wr.toHex=aRe;function ZV(t){var e=t>>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}wr.htonl=ZV;function cRe(t,e){for(var r="",n=0;n<t.length;n++){var i=t[n];e==="little"&&(i=ZV(i)),r+=QV(i.toString(16))}return r}wr.toHex32=cRe;function JV(t){return t.length===1?"0"+t:t}wr.zero2=JV;function QV(t){return t.length===7?"0"+t:t.length===6?"00"+t:t.length===5?"000"+t:t.length===4?"0000"+t:t.length===3?"00000"+t:t.length===2?"000000"+t:t.length===1?"0000000"+t:t}wr.zero8=QV;function lRe(t,e,r,n){var i=r-e;nRe(i%4===0);for(var s=new Array(i/4),o=0,a=e;o<s.length;o++,a+=4){var c;n==="big"?c=t[a]<<24|t[a+1]<<16|t[a+2]<<8|t[a+3]:c=t[a+3]<<24|t[a+2]<<16|t[a+1]<<8|t[a],s[o]=c>>>0}return s}wr.join32=lRe;function uRe(t,e){for(var r=new Array(t.length*4),n=0,i=0;n<t.length;n++,i+=4){var s=t[n];e==="big"?(r[i]=s>>>24,r[i+1]=s>>>16&255,r[i+2]=s>>>8&255,r[i+3]=s&255):(r[i+3]=s>>>24,r[i+2]=s>>>16&255,r[i+1]=s>>>8&255,r[i]=s&255)}return r}wr.split32=uRe;function fRe(t,e){return t>>>e|t<<32-e}wr.rotr32=fRe;function dRe(t,e){return t<<e|t>>>32-e}wr.rotl32=dRe;function hRe(t,e){return t+e>>>0}wr.sum32=hRe;function pRe(t,e,r){return t+e+r>>>0}wr.sum32_3=pRe;function gRe(t,e,r,n){return t+e+r+n>>>0}wr.sum32_4=gRe;function mRe(t,e,r,n,i){return t+e+r+n+i>>>0}wr.sum32_5=mRe;function yRe(t,e,r,n){var i=t[e],s=t[e+1],o=n+s>>>0,a=(o<n?1:0)+r+i;t[e]=a>>>0,t[e+1]=o}wr.sum64=yRe;function bRe(t,e,r,n){var i=e+n>>>0,s=(i<e?1:0)+t+r;return s>>>0}wr.sum64_hi=bRe;function wRe(t,e,r,n){var i=e+n;return i>>>0}wr.sum64_lo=wRe;function vRe(t,e,r,n,i,s,o,a){var c=0,l=e;l=l+n>>>0,c+=l<e?1:0,l=l+s>>>0,c+=l<s?1:0,l=l+a>>>0,c+=l<a?1:0;var u=t+r+i+o+c;return u>>>0}wr.sum64_4_hi=vRe;function xRe(t,e,r,n,i,s,o,a){var c=e+n+s+a;return c>>>0}wr.sum64_4_lo=xRe;function ERe(t,e,r,n,i,s,o,a,c,l){var u=0,f=e;f=f+n>>>0,u+=f<e?1:0,f=f+s>>>0,u+=f<s?1:0,f=f+a>>>0,u+=f<a?1:0,f=f+l>>>0,u+=f<l?1:0;var d=t+r+i+o+c+u;return d>>>0}wr.sum64_5_hi=ERe;function CRe(t,e,r,n,i,s,o,a,c,l){var u=e+n+s+a+l;return u>>>0}wr.sum64_5_lo=CRe;function _Re(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}wr.rotr64_hi=_Re;function ARe(t,e,r){var n=t<<32-r|e>>
2979>r;return n>>>0}wr.rotr64_lo=ARe;function SRe(t,e,r){return t>>>r}wr.shr64_hi=SRe;function NRe(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}wr.shr64_lo=NRe;var Kg={},eL=wr,IRe=Eb;function Yx(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}Kg.BlockHash=Yx;Yx.prototype.update=function(e,r){if(e=eL.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=eL.join32(e,0,e.length-n,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this};Yx.prototype.digest=function(e){return this.update(this._pad()),IRe(this.pending===null),this._digest(e)};Yx.prototype._pad=function(){var e=this.pendingTotal,r=this._delta8,n=r-(e+this.padLength)%r,i=new Array(n+this.padLength);i[0]=128;for(var s=1;s<n;s++)i[s]=0;if(e<<=3,this.endian==="big"){for(var o=8;o<this.padLength;o++)i[s++]=0;i[s++]=0,i[s++]=0,i[s++]=0,i[s++]=0,i[s++]=e>>>24&255,i[s++]=e>>>16&255,i[s++]=e>>>8&255,i[s++]=e&255}else for(i[s++]=e&255,i[s++]=e>>>8&255,i[s++]=e>>>16&255,i[s++]=e>>>24&255,i[s++]=0,i[s++]=0,i[s++]=0,i[s++]=0,o=8;o<this.padLength;o++)i[s++]=0;return i};var Gg={},Nl={},TRe=wr,ll=TRe.rotr32;function kRe(t,e,r,n){if(t===0)return XV(e,r,n);if(t===1||t===3)return tK(e,r,n);if(t===2)return eK(e,r,n)}Nl.ft_1=kRe;function XV(t,e,r){return t&e^~t&r}Nl.ch32=XV;function eK(t,e,r){return t&e^t&r^e&r}Nl.maj32=eK;function tK(t,e,r){return t^e^r}Nl.p32=tK;function PRe(t){return ll(t,2)^ll(t,13)^ll(t,22)}Nl.s0_256=PRe;function RRe(t){return ll(t,6)^ll(t,11)^ll(t,25)}Nl.s1_256=RRe;function ORe(t){return ll(t,7)^ll(t,18)^t>>>3}Nl.g0_256=ORe;function DRe(t){return ll(t,17)^ll(t,19)^t>>>10}Nl.g1_256=DRe;var yg=wr,LRe=Kg,MRe=Nl,R6=yg.rotl32,P1=yg.sum32,$Re=yg.sum32_5,URe=MRe.ft_1,rK=LRe.BlockHash,BRe=[1518500249,1859775393,2400959708,3395469782];function vl(){if(!(this instanceof vl))return new vl;rK.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}yg.inherits(vl,rK);var FRe=vl;vl.blockSize=512;vl.outSize=160;vl.hmacStrength=80;vl.padLength=64;vl.prototype._update=function(e,r){for(var n=this.W,i=0;i<16;i++)n[i]=e[r+i];for(;i<n.length;i++)n[i]=R6(n[i-3]^n[i-8]^n[i-14]^n[i-16],1);var s=this.h[0],o=this.h[1],a=this.h[2],c=this.h[3],l=this.h[4];for(i=0;i<n.length;i++){var u=~~(i/20),f=$Re(R6(s,5),URe(u,o,a,c),l,n[i],BRe[u]);l=c,c=a,a=R6(o,30),o=s,s=f}this.h[0]=P1(this.h[0],s),this.h[1]=P1(this.h[1],o),this.h[2]=P1(this.h[2],a),this.h[3]=P1(this.h[3],c),this.h[4]=P1(this.h[4],l)};vl.prototype._digest=function(e){return e==="hex"?yg.toHex32(this.h,"big"):yg.split32(this.h,"big")};var bg=wr,jRe=Kg,Yg=Nl,zRe=Eb,za=bg.sum32,WRe=bg.sum32_4,HRe=bg.sum32_5,qRe=Yg.ch32,VRe=Yg.maj32,KRe=Yg.s0_256,GRe=Yg.s1_256,YRe=Yg.g0_256,ZRe=Yg.g1_256,nK=jRe.BlockHash,JRe=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function xl(){if(!(this instanceof xl))return new xl;nK.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=JRe,this.W=new Array(64)}bg.inherits(xl,nK);var iK=xl;xl.blockSize=512;xl.outSize=256;xl.hmacStrength=192;xl.padLength=64;xl.prototype._update=function(e,r){for(var n=this.W,i=0;i<16;i++)n[i]=e[r+i];for(;i<n.length;i++)n[i]=WRe(ZRe(n[i-2]),n[i-7],YRe(n[i-15]),n[i-16]);var s=this.h[0],o=this.h[1],a=this.h[2],c=this.h[3],l=this.h[4],u=this.h[5],f=this.h[6],d=this.h[7];for(zRe(this.k.length===n.length),i=0;i<n.length;i++){var p=HRe(d,GRe(l),qRe(l,u,f),this.k[i],n[i]),h=za(KRe(s),VRe(s,o,a));d=f,f=u,u=l,l=za(c,p),c=a,a=o,o=s,s=za(p,h)}this.h[0]=za(this.h[0],s),this.h[1]=za(this.h[1],o),this.h[2]=za(this.h[2],a),this.h[3]=za(this.h[3],c),this.h[4]=za(this.h[4],l),this.h[5]=za(this.h[5],u),this.h[6]=za(this.h[6],f),this.h[7]=za(this.h[7],d)};xl.prototype._digest=function(e){return e==="hex"?bg.toHex32(this.h,"big"):bg.split32(this.h,"big")};var aA=wr,sK=iK;
2979function Eu(){if(!(this instanceof Eu))return new Eu;sK.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}aA.inherits(Eu,sK);var QRe=Eu;Eu.blockSize=512;Eu.outSize=224;Eu.hmacStrength=192;Eu.padLength=64;Eu.prototype._digest=function(e){return e==="hex"?aA.toHex32(this.h.slice(0,7),"big"):aA.split32(this.h.slice(0,7),"big")};var To=wr,XRe=Kg,eOe=Eb,ul=To.rotr64_hi,fl=To.rotr64_lo,oK=To.shr64_hi,aK=To.shr64_lo,rf=To.sum64,O6=To.sum64_hi,D6=To.sum64_lo,tOe=To.sum64_4_hi,rOe=To.sum64_4_lo,nOe=To.sum64_5_hi,iOe=To.sum64_5_lo,cK=XRe.BlockHash,sOe=[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,
29791126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function bc(){if(!(this instanceof bc))return new bc;cK.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=sOe,this.W=new Array(160)}To.inherits(bc,cK);var lK=bc;bc.blockSize=1024;bc.outSize=512;bc.hmacStrength=192;bc.padLength=128;bc.prototype._prepareBlock=function(e,r){for(var n=this.W,i=0;i<32;i++)n[i]=e[r+i];for(;i<n.length;i+=2){var s=mOe(n[i-4],n[i-3]),o=yOe(n[i-4],n[i-3]),a=n[i-14],c=n[i-13],l=pOe(n[i-30],n[i-29]),u=gOe(n[i-30],n[i-29]),f=n[i-32],d=n[i-31];n[i]=tOe(s,o,a,c,l,u,f,d),n[i+1]=rOe(s,o,a,c,l,u,f,d)}};bc.prototype._update=function(e,r){this._prepareBlock(e,r);var n=this.W,i=this.h[0],s=this.h[1],o=this.h[2],a=this.h[3],c=this.h[4],l=this.h[5],u=this.h[6],f=this.h[7],d=this.h[8],p=this.h[9],h=this.h[10],g=this.h[11],y=this.h[12],x=this.h[13],C=this.h[14],_=this.h[15];eOe(this.k.length===n.length);for(var L=0;L<n.length;L+=2){var P=C,z=_,W=dOe(d,p),B=hOe(d,p),I=oOe(d,p,h,g,y),j=aOe(d,p,h,g,y,x),D=this.k[L],O=this.k[L+1],T=n[L],m=n[L+1],b=nOe(P,z,W,B,I,j,D,O,T,m),E=iOe(P,z,W,B,I,j,D,O,T,m);P=uOe(i,s),z=fOe(i,s),W=cOe(i,s,o,a,c),B=lOe(i,s,o,a,c,l);var k=O6(P,z,W,B),R=D6(P,z,W,B);C=y,_=x,y=h,x=g,h=d,g=p,d=O6(u,f,b,E),p=D6(f,f,b,E),u=c,f=l,c=o,l=a,o=i,a=s,i=O6(b,E,k,R),s=D6(b,E,k,R)}rf(this.h,0,i,s),rf(this.h,2,o,a),rf(this.h,4,c,l),rf(this.h,6,u,f),rf(this.h,8,d,p),rf(this.h,10,h,g),rf(this.h,12,y,x),rf(this.h,14,C,_)};bc.prototype._digest=function(e){return e==="hex"?To.toHex32(this.h,"big"):To.split32(this.h,"big")};function oOe(t,e,r,n,i){var s=t&r^~t&i;return s<0&&(s+=4294967296),s}function aOe(t,e,r,n,i,s){var o=e&n^~e&s;return o<0&&(o+=4294967296),o}function cOe(t,e,r,n,i){var s=t&r^t&i^r&i;return s<0&&(s+=4294967296),s}function lOe(t,e,r,n,i,s){var o=e&n^e&s^n&s;return o<0&&(o+=4294967296),o}function uOe(t,e){var r=ul(t,e,28),n=ul(e,t,2),i=ul(e,t,7),s=r^n^i;return s<0&&(s+=4294967296),s}function fOe(t,e){var r=fl(t,e,28),n=fl(e,t,2),i=fl(e,t,7),s=r^n^i;return s<0&&(s+=4294967296),s}function dOe(t,e){var r=ul(t,e,14),n=ul(t,e,18),i=ul(e,t,9),s=r^n^i;return s<0&&(s+=4294967296),s}function hOe(t,e){var r=fl(t,e,14),n=fl(t,e,18),i=fl(e,t,9),s=r^n^i;return s<0&&(s+=4294967296),s}function pOe(t,e){var r=ul(t,e,1),n=ul(t,e,8),i=oK(t,e,7),s=r^n^i;return s<0&&(s+=4294967296),s}function gOe(t,e){var r=fl(t,e,1),n=fl(t,e,8),i=aK(t,e,7),s=r^n^i;return s<0&&(s+=4294967296),s}function mOe(t,e){var r=ul(t,e,19),n=ul(e,t,29),i=oK(t,e,6),s=r^n^i;return s<0&&(s+=4294967296),s}function yOe(t,e){var r=fl(t,e,19),n=fl(e,t,29),i=aK(t,e,6),s=r^n^i;return s<0&&(s+=4294967296),s}var cA=wr,uK=lK;function Cu(){if(!(this instanceof Cu))return new Cu;uK.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}cA.inherits(Cu,uK);var bOe=Cu;Cu.blockSize=1024;Cu.outSize=384;Cu.hmacStrength=192;Cu.padLength=128;Cu.prototype._digest=function(e){return e==="hex"?cA.toHex32(this.h.slice(0,12),"big"):cA.split32(this.h.slice(0,12),"big")};Gg.sha1=FRe;Gg.sha224=QRe;Gg.sha256=iK;Gg.sha384=bOe;Gg.sha512=lK;var fK={},Hh=wr,wOe=Kg,Fw=Hh.rotl32,tL=Hh.sum32,R1=Hh.sum32_3,rL=Hh.sum32_4,dK=wOe.BlockHash;function El(){if(!(this instanceof El))return new El;dK.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}Hh.inherits(El,dK);fK.ripemd160=El;El.blockSize=512;El.outSize=160;El.hmacStrength=192;El.padLength=64;El.prototype._update=function(e,r){for(var n=this.h[0],i=this.h[1],s=this.h[2],o=this.h[3],a=this.h[4],c=n,l=i,u=s,f=o,d=a,p=0;p<80;p++){var h=tL(Fw(rL(n,nL(p,i,s,o),e[EOe[p]+r],vOe(p)),_Oe[p]),a);n=a,a=o,o=Fw(s,10),s=i,i=h,h=tL(Fw(rL(c,nL(79-p,l,u,f),e[COe[p]+r],xOe(p)),AOe[p]),d),c=d,d=f,f=Fw(u,10),u=l,l=h}h=R1(this.h[1],s,f),this.h[1]=R1(this.h[2],o,d),this.h[2]=R1(this.h[3],a,c),this.h[3]=R1(this.h[4],n,l),this.h[4]=R1(this.h[0],i,u),this.h[0]=h};El.prototype._digest=function(e){return e==="hex"?Hh.toHex32(this.h,"little"):Hh.split32(this.h,"little")};function nL(t,e,r,n){return t<=15?e^r^n:t<=31?e&r|~e&n:t<=47?(e|~r)^n:t<=63?e&n|r&~n:e^(r|~n)}function vOe(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function xOe(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}var EOe=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],COe=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],_Oe=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],AOe=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],SOe=wr,NOe=Eb;function wg(t,e,r){if(!(this instanceof wg))return new wg(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(SOe.toArray(e,r))}var IOe=wg;wg.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),NOe(e.length<=this.blockSize);for(var r=e.length;r<this.blockSize;r++)e.push(0);for(r=0;r<e.length;r++)e[r]^=54;for(this.inner=new this.Hash().update(e),r=0;r<e.length;r++)e[r]^=106;this.outer=new this.Hash().update(e)};wg.prototype.update=function(e,r){return this.inner.update(e,r),this};wg.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)};(function(t){var e=t;e.utils=wr,e.common=Kg,e.sha=Gg,e.ripemd=fK,e.hmac=IOe,e.sha1=e.sha.sha1,e.sha256=e.sha.sha256,e.sha224=e.sha.sha224,e.sha384=e.sha.sha384,e.sha512=e.sha.sha512,e.ripemd160=e.ripemd.ripemd160})(GV);const fo=is(GV);function Zg(t,e,r){return r={path:e,exports:{},require:function(n,i){return TOe(n,i??r.path)}},t(r,r.exports),r.exports}function TOe(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var T7=hK;function hK(t,e){if(!t)throw new Error(e||"Assertion failed")}hK.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)};var sc=Zg(function(t,e){var r=e;function n(o,a){if(Array.isArray(o))return o.slice();if(!o)return[];var c=[];if(typeof o!="string"){for(var l=0;l<o.length;l++)c[l]=o[l]|0;return c}if(a==="hex"){o=o.replace(/[^a-z0-9]+/ig,""),o.length%2!==0&&(o="0"+o);for(var l=0;l<o.length;l+=2)c.push(parseInt(o[l]+o[l+1],16))}else for(var l=0;l<o.length;
2979l++){var u=o.charCodeAt(l),f=u>>8,d=u&255;f?c.push(f,d):c.push(d)}return c}r.toArray=n;function i(o){return o.length===1?"0"+o:o}r.zero2=i;function s(o){for(var a="",c=0;c<o.length;c++)a+=i(o[c].toString(16));return a}r.toHex=s,r.encode=function(a,c){return c==="hex"?s(a):a}}),ra=Zg(function(t,e){var r=e;r.assert=T7,r.toArray=sc.toArray,r.zero2=sc.zero2,r.toHex=sc.toHex,r.encode=sc.encode;function n(c,l,u){var f=new Array(Math.max(c.bitLength(),u)+1),d;for(d=0;d<f.length;d+=1)f[d]=0;var p=1<<l+1,h=c.clone();for(d=0;d<f.length;d++){var g,y=h.andln(p-1);h.isOdd()?(y>(p>>1)-1?g=(p>>1)-y:g=y,h.isubn(g)):g=0,f[d]=g,h.iushrn(1)}return f}r.getNAF=n;function i(c,l){var u=[[],[]];c=c.clone(),l=l.clone();for(var f=0,d=0,p;c.cmpn(-f)>0||l.cmpn(-d)>0;){var h=c.andln(3)+f&3,g=l.andln(3)+d&3;h===3&&(h=-1),g===3&&(g=-1);var y;h&1?(p=c.andln(7)+f&7,(p===3||p===5)&&g===2?y=-h:y=h):y=0,u[0].push(y);var x;g&1?(p=l.andln(7)+d&7,(p===3||p===5)&&h===2?x=-g:x=g):x=0,u[1].push(x),2*f===y+1&&(f=1-f),2*d===x+1&&(d=1-d),c.iushrn(1),l.iushrn(1)}return u}r.getJSF=i;function s(c,l,u){var f="_"+l;c.prototype[l]=function(){return this[f]!==void 0?this[f]:this[f]=u.call(this)}}r.cachedProperty=s;function o(c){return typeof c=="string"?r.toArray(c,"hex"):c}r.parseBytes=o;function a(c){return new jt(c,"hex","le")}r.intFromLE=a}),b4=ra.getNAF,kOe=ra.getJSF,w4=ra.assert;function Ed(t,e){this.type=t,this.p=new jt(e.p,16),this.red=e.prime?jt.red(e.prime):jt.mont(this.p),this.zero=new jt(0).toRed(this.red),this.one=new jt(1).toRed(this.red),this.two=new jt(2).toRed(this.red),this.n=e.n&&new jt(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var u0=Ed;Ed.prototype.point=function(){throw new Error("Not implemented")};Ed.prototype.validate=function(){throw new Error("Not implemented")};Ed.prototype._fixedNafMul=function(e,r){w4(e.precomputed);var n=e._getDoubles(),i=b4(r,1,this._bitLength),s=(1<<n.step+1)-(n.step%2===0?2:1);s/=3;var o=[],a,c;for(a=0;a<i.length;a+=n.step){c=0;for(var l=a+n.step-1;l>=a;l--)c=(c<<1)+i[l];o.push(c)}for(var u=this.jpoint(null,null,null),f=this.jpoint(null,null,null),d=s;d>0;d--){for(a=0;a<o.length;a++)c=o[a],c===d?f=f.mixedAdd(n.points[a]):c===-d&&(f=f.mixedAdd(n.points[a].neg()));u=u.add(f)}return u.toP()};Ed.prototype._wnafMul=function(e,r){var n=4,i=e._getNAFPoints(n);n=i.wnd;for(var s=i.points,o=b4(r,n,this._bitLength),a=this.jpoint(null,null,null),c=o.length-1;c>=0;c--){for(var l=0;c>=0&&o[c]===0;c--)l++;if(c>=0&&l++,a=a.dblp(l),c<0)break;var u=o[c];w4(u!==0),e.type==="affine"?u>0?a=a.mixedAdd(s[u-1>>1]):a=a.mixedAdd(s[-u-1>>1].neg()):u>0?a=a.add(s[u-1>>1]):a=a.add(s[-u-1>>1].neg())}return e.type==="affine"?a.toP():a};Ed.prototype._wnafMulAdd=function(e,r,n,i,s){var o=this._wnafT1,a=this._wnafT2,c=this._wnafT3,l=0,u,f,d;for(u=0;u<i;u++){d=r[u];var p=d._getNAFPoints(e);o[u]=p.wnd,a[u]=p.points}for(u=i-1;u>=1;u-=2){var h=u-1,g=u;if(o[h]!==1||o[g]!==1){c[h]=b4(n[h],o[h],this._bitLength),c[g]=b4(n[g],o[g],this._bitLength),l=Math.max(c[h].length,l),l=Math.max(c[g].length,l);continue}var y=[r[h],null,null,r[g]];r[h].y.cmp(r[g].y)===0?(y[1]=r[h].add(r[g]),y[2]=r[h].toJ().mixedAdd(r[g].neg())):r[h].y.cmp(r[g].y.redNeg())===0?(y[1]=r[h].toJ().mixedAdd(r[g]),y[2]=r[h].add(r[g].neg())):(y[1]=r[h].toJ().mixedAdd(r[g]),y[2]=r[h].toJ().mixedAdd(r[g].neg()));var x=[-3,-1,-5,-7,0,7,5,1,3],C=kOe(n[h],n[g]);for(l=Math.max(C[0].length,l),c[h]=new Array(l),c[g]=new Array(l),f=0;f<l;f++){var _=C[0][f]|0,L=C[1][f]|0;c[h][f]=x[(_+1)*3+(L+1)],c[g][f]=0,a[h]=y}}var P=this.jpoint(null,null,null),z=this._wnafT4;for(u=l;u>=0;u--){for(var W=0;u>=0;){var B=!0;for(f=0;f<i;f++)z[f]=c[f][u]|0,z[f]!==0&&(B=!1);if(!B)break;W++,u--}if(u>=0&&W++,P=P.dblp(W),u<0)break;for(f=0;f<i;f++){var I=z[f];I!==0&&(I>0?d=a[f][I-1>>1]:I<0&&(d=a[f][-I-1>>1].neg()),d.type==="affine"?P=P.mixedAdd(d):P=P.add(d))}}for(u=0;
2979u<i;u++)a[u]=null;return s?P:P.toP()};function Oa(t,e){this.curve=t,this.type=e,this.precomputed=null}Ed.BasePoint=Oa;Oa.prototype.eq=function(){throw new Error("Not implemented")};Oa.prototype.validate=function(){return this.curve.validate(this)};Ed.prototype.decodePoint=function(e,r){e=ra.toArray(e,r);var n=this.p.byteLength();if((e[0]===4||e[0]===6||e[0]===7)&&e.length-1===2*n){e[0]===6?w4(e[e.length-1]%2===0):e[0]===7&&w4(e[e.length-1]%2===1);var i=this.point(e.slice(1,1+n),e.slice(1+n,1+2*n));return i}else if((e[0]===2||e[0]===3)&&e.length-1===n)return this.pointFromX(e.slice(1,1+n),e[0]===3);throw new Error("Unknown point format")};Oa.prototype.encodeCompressed=function(e){return this.encode(e,!0)};Oa.prototype._encode=function(e){var r=this.curve.p.byteLength(),n=this.getX().toArray("be",r);return e?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",r))};Oa.prototype.encode=function(e,r){return ra.encode(this._encode(r),e)};Oa.prototype.precompute=function(e){if(this.precomputed)return this;var r={doubles:null,naf:null,beta:null};return r.naf=this._getNAFPoints(8),r.doubles=this._getDoubles(4,e),r.beta=this._getBeta(),this.precomputed=r,this};Oa.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var r=this.precomputed.doubles;return r?r.points.length>=Math.ceil((e.bitLength()+1)/r.step):!1};Oa.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,s=0;s<r;s+=e){for(var o=0;o<e;o++)i=i.dbl();n.push(i)}return{step:e,points:n}};Oa.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var r=[this],n=(1<<e)-1,i=n===1?null:this.dbl(),s=1;s<n;s++)r[s]=r[s-1].add(i);return{wnd:e,points:r}};Oa.prototype._getBeta=function(){return null};Oa.prototype.dblp=function(e){for(var r=this,n=0;n<e;n++)r=r.dbl();return r};var k7=Zg(function(t){typeof Object.create=="function"?t.exports=function(r,n){n&&(r.super_=n,r.prototype=Object.create(n.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(r,n){if(n){r.super_=n;var i=function(){};i.prototype=n.prototype,r.prototype=new i,r.prototype.constructor=r}}}),POe=ra.assert;function Da(t){u0.call(this,"short",t),this.a=new jt(t.a,16).toRed(this.red),this.b=new jt(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}k7(Da,u0);var ROe=Da;Da.prototype._getEndomorphism=function(e){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var r,n;if(e.beta)r=new jt(e.beta,16).toRed(this.red);else{var i=this._getEndoRoots(this.p);r=i[0].cmp(i[1])<0?i[0]:i[1],r=r.toRed(this.red)}if(e.lambda)n=new jt(e.lambda,16);else{var s=this._getEndoRoots(this.n);this.g.mul(s[0]).x.cmp(this.g.x.redMul(r))===0?n=s[0]:(n=s[1],POe(this.g.mul(n).x.cmp(this.g.x.redMul(r))===0))}var o;return e.basis?o=e.basis.map(function(a){return{a:new jt(a.a,16),b:new jt(a.b,16)}}):o=this._getEndoBasis(n),{beta:r,lambda:n,basis:o}}};Da.prototype._getEndoRoots=function(e){var r=e===this.p?this.red:jt.mont(e),n=new jt(2).toRed(r).redInvm(),i=n.redNeg(),s=new jt(3).toRed(r).redNeg().redSqrt().redMul(n),o=i.redAdd(s).fromRed(),a=i.redSub(s).fromRed();return[o,a]};Da.prototype._getEndoBasis=function(e){for(var r=this.n.ushrn(Math.floor(this.n.bitLength()/2)),n=e,i=this.n.clone(),s=new jt(1),o=new jt(0),a=new jt(0),c=new jt(1),l,u,f,d,p,h,g,y=0,x,C;n.cmpn(0)!==0;){var _=i.div(n);x=i.sub(_.mul(n)),C=a.sub(_.mul(s));var L=c.sub(_.mul(o));if(!f&&x.cmp(r)<0)l=g.neg(),u=s,f=x.neg(),d=C;else if(f&&++y===2)break;g=x,i=n,n=x,a=s,s=C,c=o,o=L}p=x.neg(),h=C;var P=f.sqr().add(d.sqr()),z=p.sqr().add(h.sqr());return z.cmp(P)>=0&&(p=l,h=u),f.negative&&(f=f.neg(),d=d.neg()),p.negative&&(p=p.neg(),h=h.neg()),[{a:f,b:d},{a:p,b:h}]};Da.prototype._endoSplit=function(e){var r=this.endo.basis,n=r[0],i=r[1],s=i.b.mul(e).divRound(this.n),o=n.b.neg().mul(e).divRound(this.n),a=s.mul(n.a),c=o.mul(i.a),l=s.mul(n.b),u=o.mul(i.b),f=e.sub(a).sub(c),d=l.add(u).neg();return{k1:f,k2:d}};Da.prototype.pointFromX=function(e,r){e=new jt(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var s=i.fromRed().isOdd();return(r&&!s||!r&&s)&&(i=i.redNeg()),this.point(e,i)};Da.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,n=e.y,i=this.a.redMul(r),s=r.redSqr().redMul(r).redIAdd(i).redIAdd(this.b);return n.redSqr().redISub(s).cmpn(0)===0};Da.prototype._endoWnafMulAdd=function(e,r,n){for(var i=this._endoWnafT1,s=this._endoWnafT2,o=0;o<e.length;o++){var a=this._endoSplit(r[o]),c=e[o],l=c._getBeta();a.k1.negative&&(a.k1.ineg(),c=c.neg(!0)),a.k2.negative&&(a.k2.ineg(),l=l.neg(!0)),i[o*2]=c,i[o*2+1]=l,s[o*2]=a.k1,s[o*2+1]=a.k2}for(var u=this._wnafMulAdd(1,i,s,o*2,n),f=0;f<o*2;f++)i[f]=null,s[f]=null;return u};function Hi(t,e,r,n){u0.BasePoint.call(this,t,"affine"),e===null&&r===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new jt(e,16),this.y=new jt(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}k7(Hi,u0.BasePoint);Da.prototype.point=function(e,r,n){return new Hi(this,e,r,n)};Da.prototype.pointFromJSON=function(e,r){return Hi.fromJSON(this,e,r)};Hi.prototype._getBeta=function(){if(this.curve.endo){var e=this.prec
2979omputed;if(e&&e.beta)return e.beta;var r=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var n=this.curve,i=function(s){return n.point(s.x.redMul(n.endo.beta),s.y)};e.beta=r,r.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(i)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(i)}}}return r}};Hi.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]};Hi.fromJSON=function(e,r,n){typeof r=="string"&&(r=JSON.parse(r));var i=e.point(r[0],r[1],n);if(!r[2])return i;function s(a){return e.point(a[0],a[1],n)}var o=r[2];return i.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[i].concat(o.doubles.points.map(s))},naf:o.naf&&{wnd:o.naf.wnd,points:[i].concat(o.naf.points.map(s))}},i};Hi.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"};Hi.prototype.isInfinity=function(){return this.inf};Hi.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(e.x),i=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)};Hi.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),s=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(i),o=s.redSqr().redISub(this.x.redAdd(this.x)),a=s.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)};Hi.prototype.getX=function(){return this.x.fromRed()};Hi.prototype.getY=function(){return this.y.fromRed()};Hi.prototype.mul=function(e){return e=new jt(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};Hi.prototype.mulAdd=function(e,r,n){var i=[this,r],s=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,s):this.curve._wnafMulAdd(1,i,s,2)};Hi.prototype.jmulAdd=function(e,r,n){var i=[this,r],s=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,s,!0):this.curve._wnafMulAdd(1,i,s,2,!0)};Hi.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};Hi.prototype.neg=function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(s){return s.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return r};Hi.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function cs(t,e,r,n){u0.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new jt(0)):(this.x=new jt(e,16),this.y=new jt(r,16),this.z=new jt(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}k7(cs,u0.BasePoint);Da.prototype.jpoint=function(e,r,n){return new cs(this,e,r,n)};cs.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),n=this.x.redMul(r),i=this.y.redMul(r).redMul(e);return this.curve.point(n,i)};cs.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};cs.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(r),s=e.x.redMul(n),o=this.y.redMul(r.redMul(e.z)),a=e.y.redMul(n.redMul(this.z)),c=i.redSub(s),l=o.redSub(a);if(c.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var u=c.redSqr(),f=u.redMul(c),d=i.redMul(u),p=l.redSqr().redIAdd(f).redISub(d).redISub(d),h=l.redMul(
2979d.redISub(p)).redISub(o.redMul(f)),g=this.z.redMul(e.z).redMul(c);return this.curve.jpoint(p,h,g)};cs.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,i=e.x.redMul(r),s=this.y,o=e.y.redMul(r).redMul(this.z),a=n.redSub(i),c=s.redSub(o);if(a.cmpn(0)===0)return c.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var l=a.redSqr(),u=l.redMul(a),f=n.redMul(l),d=c.redSqr().redIAdd(u).redISub(f).redISub(f),p=c.redMul(f.redISub(d)).redISub(s.redMul(u)),h=this.z.redMul(a);return this.curve.jpoint(d,p,h)};cs.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var n=this;for(r=0;r<e;r++)n=n.dbl();return n}var i=this.curve.a,s=this.curve.tinv,o=this.x,a=this.y,c=this.z,l=c.redSqr().redSqr(),u=a.redAdd(a);for(r=0;r<e;r++){var f=o.redSqr(),d=u.redSqr(),p=d.redSqr(),h=f.redAdd(f).redIAdd(f).redIAdd(i.redMul(l)),g=o.redMul(d),y=h.redSqr().redISub(g.redAdd(g)),x=g.redISub(y),C=h.redMul(x);C=C.redIAdd(C).redISub(p);var _=u.redMul(c);r+1<e&&(l=l.redMul(p)),o=y,c=_,u=C}return this.curve.jpoint(o,u.redMul(s),c)};cs.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()};cs.prototype._zeroDbl=function(){var e,r,n;if(this.zOne){var i=this.x.redSqr(),s=this.y.redSqr(),o=s.redSqr(),a=this.x.redAdd(s).redSqr().redISub(i).redISub(o);a=a.redIAdd(a);var c=i.redAdd(i).redIAdd(i),l=c.redSqr().redISub(a).redISub(a),u=o.redIAdd(o);u=u.redIAdd(u),u=u.redIAdd(u),e=l,r=c.redMul(a.redISub(l)).redISub(u),n=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),d=this.y.redSqr(),p=d.redSqr(),h=this.x.redAdd(d).redSqr().redISub(f).redISub(p);h=h.redIAdd(h);var g=f.redAdd(f).redIAdd(f),y=g.redSqr(),x=p.redIAdd(p);x=x.redIAdd(x),x=x.redIAdd(x),e=y.redISub(h).redISub(h),r=g.redMul(h.redISub(e)).redISub(x),n=this.y.redMul(this.z),n=n.redIAdd(n)}return this.curve.jpoint(e,r,n)};cs.prototype._threeDbl=function(){var e,r,n;if(this.zOne){var i=this.x.redSqr(),s=this.y.redSqr(),o=s.redSqr(),a=this.x.redAdd(s).redSqr().redISub(i).redISub(o);a=a.redIAdd(a);var c=i.redAdd(i).redIAdd(i).redIAdd(this.curve.a),l=c.redSqr().redISub(a).redISub(a);e=l;var u=o.redIAdd(o);u=u.redIAdd(u),u=u.redIAdd(u),r=c.redMul(a.redISub(l)).redISub(u),n=this.y.redAdd(this.y)}else{var f=this.z.redSqr(),d=this.y.redSqr(),p=this.x.redMul(d),h=this.x.redSub(f).redMul(this.x.redAdd(f));h=h.redAdd(h).redIAdd(h);var g=p.redIAdd(p);g=g.redIAdd(g);var y=g.redAdd(g);e=h.redSqr().redISub(y),n=this.y.redAdd(this.z).redSqr().redISub(d).redISub(f);var x=d.redSqr();x=x.redIAdd(x),x=x.redIAdd(x),x=x.redIAdd(x),r=h.redMul(g.redISub(e)).redISub(x)}return this.curve.jpoint(e,r,n)};cs.prototype._dbl=function(){var e=this.curve.a,r=this.x,n=this.y,i=this.z,s=i.redSqr().redSqr(),o=r.redSqr(),a=n.redSqr(),c=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(s)),l=r.redAdd(r);l=l.redIAdd(l);var u=l.redMul(a),f=c.redSqr().redISub(u.redAdd(u)),d=u.redISub(f),p=a.redSqr();p=p.redIAdd(p),p=p.redIAdd(p),p=p.redIAdd(p);var h=c.redMul(d).redISub(p),g=n.redAdd(n).redMul(i);return this.curve.jpoint(f,h,g)};cs.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),r=this.y.redSqr(),n=this.z.redSqr(),i=r.redSqr(),s=e.redAdd(e).redIAdd(e),o=s.redSqr(),a=this.x.redAdd(r).redSqr().redISub(e).redISub(i);a=a.redIAdd(a),a=a.redAdd(a).redIAdd(a),a=a.redISub(o);var c=a.redSqr(),l=i.redIAdd(i);l=l.redIAdd(l),l=l.redIAdd(l),l=l.redIAdd(l);var u=s.redIAdd(a).redSqr().redISub(o).redISub(c).redISub(l),f=r.redMul(u);f=f.redIAdd(f),f=f.redIAdd(f);var d=this.x.redMul(c).redISub(f);d=d.redIAdd(d),d=d.redIAdd(d);var p=this.y.redMul(u.redMul(l.redISub(u)).redISub(a.redMul(c)));p=p.redIAdd(p),p=p.redIAdd(p),p=p.redIAdd(p);var h=this.z.redAdd(a).redSqr().redISub(n).redISub(c);return this.curve.jpoint(d,p,h)};cs.prototype.mul=function(e,r){return e=new jt(e,r),this.curve._wnafMul(this,e)};cs.prototype.eq=function(e){if(e.type==="affine")return this.eq(e.toJ());if(this===e)return!0;var r=this.z.redSqr(),n=e.z.redSqr();if(this.x.redMul(n).redISub(e.x.redMul(r)).cmpn(0)!==0)return!1;var i=r.redMul(this.z),s=n.redMul(e.z);return this.y.redMul(s).redISub(e.y.redMul(i)).cmpn(0)===0};cs.prototype.eqXToP=function(e){var r=this.z.redSqr(),n=e.toRed(this.curve.red).redMul(r);if(this.x.cmp(n)===0)return!0;for(var i=e.clone(),s=this.curve.redN.redMul(r);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(s),this.x.cmp(n)===0)return!0}};cs.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>
2979":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"};cs.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var Pv=Zg(function(t,e){var r=e;r.base=u0,r.short=ROe,r.mont=null,r.edwards=null}),Rv=Zg(function(t,e){var r=e,n=ra.assert;function i(a){a.type==="short"?this.curve=new Pv.short(a):a.type==="edwards"?this.curve=new Pv.edwards(a):this.curve=new Pv.mont(a),this.g=this.curve.g,this.n=this.curve.n,this.hash=a.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}r.PresetCurve=i;function s(a,c){Object.defineProperty(r,a,{configurable:!0,enumerable:!0,get:function(){var l=new i(c);return Object.defineProperty(r,a,{configurable:!0,enumerable:!0,value:l}),l}})}s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:fo.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:fo.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:fo.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:fo.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:fo.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:fo.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:fo.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var o;try{o=null.crash()}catch{o=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:fo.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"}
2979,{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",o]})});function fd(t){if(!(this instanceof fd))return new fd(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=sc.toArray(t.entropy,t.entropyEnc||"hex"),r=sc.toArray(t.nonce,t.nonceEnc||"hex"),n=sc.toArray(t.pers,t.persEnc||"hex");T7(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var pK=fd;fd.prototype._init=function(e,r,n){var i=e.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var s=0;s<this.V.length;s++)this.K[s]=0,this.V[s]=1;this._update(i),this._reseed=1,this.reseedInterval=281474976710656};fd.prototype._hmac=function(){return new fo.hmac(this.hash,this.K)};fd.prototype._update=function(e){var r=this._hmac().update(this.V).update([0]);e&&(r=r.update(e)),this.K=r.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())};fd.prototype.reseed=function(e,r,n,i){typeof r!="string"&&(i=n,n=r,r=null),e=sc.toArray(e,r),n=sc.toArray(n,i),T7(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};fd.prototype.generate=function(e,r,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(i=n,n=r,r=null),n&&(n=sc.toArray(n,i||"hex"),this._update(n));for(var s=[];s.length<e;)this.V=this._hmac().update(this.V).digest(),s=s.concat(this.V);var o=s.slice(0,e);return this._update(n),this._reseed++,sc.encode(o,r)};var lA=ra.assert;function Ts(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}var P7=Ts;Ts.fromPublic=function(e,r,n){return r instanceof Ts?r:new Ts(e,{pub:r,pubEnc:n})};Ts.fromPrivate=function(e,r,n){return r instanceof Ts?r:new Ts(e,{priv:r,privEnc:n})};Ts.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}};Ts.prototype.getPublic=function(e,r){return typeof e=="string"&&(r=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),r?this.pub.encode(r,e):this.pub};Ts.prototype.getPrivate=function(e){return e==="hex"?this.priv.toString(16,2):this.priv};Ts.prototype._importPrivate=function(e,r){this.priv=new jt(e,r||16),this.priv=this.priv.umod(this.ec.curve.n)};Ts.prototype._importPublic=function(e,r){if(e.x||e.y){this.ec.curve.type==="mont"?lA(e.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&lA(e.x&&e.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(e.x,e.y);return}this.pub=this.ec.curve.decodePoint(e,r)};Ts.prototype.derive=function(e){return e.validate()||lA(e.validate(),"public point not validated"),e.mul(this.priv).getX()};Ts.prototype.sign=function(e,r,n){return this.ec.sign(e,this,r,n)};Ts.prototype.verify=function(e,r,n){return this.ec.verify(e,r,this,void 0,n)};Ts.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var OOe=ra.assert;function Zx(t,e){if(t instanceof Zx)return t;this._importDER(t,e)||(OOe(t.r&&t.s,"Signature without r or s"),this.r=new jt(t.r,16),this.s=new jt(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var Jx=Zx;function DOe(){this.place=0}function L6(t,e){var r=t[e.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4||t[e.place]===0)return!1;for(var i=0,s=0,o=e.place;s<n;s++,o++)i<<=8,i|=t[o],i>>>=0;return i<=127?!1:(e.place=o,i)}function iL(t){for(var e=0,r=t.length-1;!t[e]&&!(t[e+1]&128)&&e<r;)e++;return e===0?t:t.slice(e)}Zx.prototype._importDER=function(e,r){e=ra.toArray(e,r);var n=new DOe;if(e[n.place++]!==48)return!1;var i=L6(e,n);if(i===!1||i+n.place!==e.length||e[n.place++]!==2)return!1;var s=L6(e,n);if(s===!1||e[n.place]&128)return!1;var o=e.slice(n.place,s+n.place);if(n.place+=s,e[n.place++]!==2)return!1;var a=L6(e,n);if(a===!1||e.length!==a+n.place||e[n.place]&128)return!1;var c=e.slice(n.place,a+n.place);
2979if(o[0]===0)if(o[1]&128)o=o.slice(1);else return!1;if(c[0]===0)if(c[1]&128)c=c.slice(1);else return!1;return this.r=new jt(o),this.s=new jt(c),this.recoveryParam=null,!0};function M6(t,e){if(e<128){t.push(e);return}var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(r|128);--r;)t.push(e>>>(r<<3)&255);t.push(e)}Zx.prototype.toDER=function(e){var r=this.r.toArray(),n=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),n[0]&128&&(n=[0].concat(n)),r=iL(r),n=iL(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];M6(i,r.length),i=i.concat(r),i.push(2),M6(i,n.length);var s=i.concat(n),o=[48];return M6(o,s.length),o=o.concat(s),ra.encode(o,e)};var LOe=function(){throw new Error("unsupported")},Fd=ra.assert;function Ta(t){if(!(this instanceof Ta))return new Ta(t);typeof t=="string"&&(Fd(Object.prototype.hasOwnProperty.call(Rv,t),"Unknown curve "+t),t=Rv[t]),t instanceof Rv.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}var MOe=Ta;Ta.prototype.keyPair=function(e){return new P7(this,e)};Ta.prototype.keyFromPrivate=function(e,r){return P7.fromPrivate(this,e,r)};Ta.prototype.keyFromPublic=function(e,r){return P7.fromPublic(this,e,r)};Ta.prototype.genKeyPair=function(e){e||(e={});for(var r=new pK({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||LOe(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new jt(2));;){var s=new jt(r.generate(n));if(!(s.cmp(i)>0))return s.iaddn(1),this.keyFromPrivate(s)}};Ta.prototype._truncateToN=function(e,r,n){var i;if(jt.isBN(e)||typeof e=="number")e=new jt(e,16),i=e.byteLength();else if(typeof e=="object")i=e.length,e=new jt(e,16);else{var s=e.toString();i=s.length+1>>>1,e=new jt(s,16)}typeof n!="number"&&(n=i*8);var o=n-this.n.bitLength();return o>0&&(e=e.ushrn(o)),!r&&e.cmp(this.n)>=0?e.sub(this.n):e};Ta.prototype.sign=function(e,r,n,i){if(typeof n=="object"&&(i=n,n=null),i||(i={}),typeof e!="string"&&typeof e!="number"&&!jt.isBN(e)){Fd(typeof e=="object"&&e&&typeof e.length=="number","Expected message to be an array-like, a hex string, or a BN instance"),Fd(e.length>>>0===e.length);for(var s=0;s<e.length;s++)Fd((e[s]&255)===e[s])}r=this.keyFromPrivate(r,n),e=this._truncateToN(e,!1,i.msgBitLength),Fd(!e.isNeg(),"Can not sign a negative message");var o=this.n.byteLength(),a=r.getPrivate().toArray("be",o),c=e.toArray("be",o);Fd(new jt(c).eq(e),"Can not sign message");for(var l=new pK({hash:this.hash,entropy:a,nonce:c,pers:i.pers,persEnc:i.persEnc||"utf8"}),u=this.n.sub(new jt(1)),f=0;;f++){var d=i.k?i.k(f):new jt(l.generate(this.n.byteLength()));if(d=this._truncateToN(d,!0),!(d.cmpn(1)<=0||d.cmp(u)>=0)){var p=this.g.mul(d);if(!p.isInfinity()){var h=p.getX(),g=h.umod(this.n);if(g.cmpn(0)!==0){var y=d.invm(this.n).mul(g.mul(r.getPrivate()).iadd(e));if(y=y.umod(this.n),y.cmpn(0)!==0){var x=(p.getY().isOdd()?1:0)|(h.cmp(g)!==0?2:0);return i.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),x^=1),new Jx({r:g,s:y,recoveryParam:x})}}}}}};Ta.prototype.verify=function(e,r,n,i,s){s||(s={}),e=this._truncateToN(e,!1,s.msgBitLength),n=this.keyFromPublic(n,i),r=new Jx(r,"hex");var o=r.r,a=r.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0||a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var c=a.invm(this.n),l=c.mul(e).umod(this.n),u=c.mul(o).umod(this.n),f;return this.curve._maxwellTrick?(f=this.g.jmulAdd(l,n.getPublic(),u),f.isInfinity()?!1:f.eqXToP(o)):(f=this.g.mulAdd(l,n.getPublic(),u),f.isInfinity()?!1:f.getX().umod(this.n).cmp(o)===0)};Ta.prototype.recoverPubKey=function(t,e,r,n){Fd((3&r)===r,"The recovery param is more than two bits"),e=new Jx(e,n);var i=this.n,s=new jt(t),o=e.r,a=e.s,c=r&1,l=r>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");l?o=this.curve.pointFromX(o.add(this.curve.n),c):o=this.curve.pointFromX(o,c);var u=e.r.invm(i),f=i.sub(s).mul(u).umod(i),d=a.mul(u).umod(i);return this.g.mulAdd(f,o,d)};Ta.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new Jx(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var s;try{s=this.recoverPubKey(t,e,i)}catch{continue}if(s.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var $Oe=Zg(function(t,e){var r=e;r.version="6.6.1",r.utils=ra,r.rand=function(){throw new Error("unsupported")},r.curve=Pv,r.curves=Rv,r.ec=MOe,r.eddsa=null}),UOe=$Oe.ec;const BOe="signing-key/5.8.0",uA=new ce(BOe);let $6=null;function Wc(){return $6||($6=new UOe("secp256k1")),$6}class yh{constructor(e){we(this,"curve","secp256k1"),we(this,"privateKey",$e(e)),yl(this.privateKey)!==32&&uA.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const r=Wc().keyFromPrivate(Se(this.privateKey));we(this,"publicKey","0x"+r.getPublic(!1,"hex")),we(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),we(this,"_isSigningKey",!0)}_addPoint(e){const r=Wc().keyFromPublic(Se(this.publicKey)),n=Wc().keyFromPublic(Se(e));return"0x"+r.pub.add(n.pub).encodeCompressed("hex")}
2979signDigest(e){const r=Wc().keyFromPrivate(Se(this.privateKey)),n=Se(e);n.length!==32&&uA.throwArgumentError("bad digest length","digest",e);const i=r.sign(n,{canonical:!0});return l0({recoveryParam:i.recoveryParam,r:bn("0x"+i.r.toString(16),32),s:bn("0x"+i.s.toString(16),32)})}computeSharedSecret(e){const r=Wc().keyFromPrivate(Se(this.privateKey)),n=Wc().keyFromPublic(Se(R7(e)));return bn("0x"+r.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function gK(t,e){const r=l0(e),n={r:Se(r.r),s:Se(r.s)};return"0x"+Wc().recoverPubKey(Se(t),n,r.recoveryParam).encode("hex",!1)}function R7(t,e){const r=Se(t);if(r.length===32){const n=new yh(r);return e?"0x"+Wc().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}else{if(r.length===33)return e?$e(r):"0x"+Wc().keyFromPublic(r).getPublic(!1,"hex");if(r.length===65)return e?"0x"+Wc().keyFromPublic(r).getPublic(!0,"hex"):$e(r)}return uA.throwArgumentError("invalid public or private key","key","[REDACTED]")}const FOe=Object.freeze(Object.defineProperty({__proto__:null,SigningKey:yh,computePublicKey:R7,recoverPublicKey:gK},Symbol.toStringTag,{value:"Module"})),jOe="transactions/5.8.0",Ns=new ce(jOe);var fA;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})(fA||(fA={}));function O7(t){return t==="0x"?null:ln(t)}function As(t){return t==="0x"?NV:De.from(t)}const zOe=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],WOe={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function Gf(t){const e=R7(t);return ln(ci(dn(ci(e,1)),12))}function Cb(t,e){return Gf(gK(Se(t),e))}function Uo(t,e){const r=cl(De.from(t).toHexString());return r.length>32&&Ns.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function U6(t,e){return{address:ln(t),storageKeys:(e||[]).map((r,n)=>(yl(r)!==32&&Ns.throwArgumentError("invalid access list storageKey",`accessList[${t}:${n}]`,r),r.toLowerCase()))}}function f0(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(r.length>2&&Ns.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,r),U6(r[0],r[1])):U6(r.address,r.storageKeys));const e=Object.keys(t).map(r=>{const n=t[r].reduce((i,s)=>(i[s]=!0,i),{});return U6(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function mK(t){return f0(t).map(e=>[e.address,e.storageKeys])}function yK(t,e){if(t.gasPrice!=null){const n=De.from(t.gasPrice),i=De.from(t.maxFeePerGas||0);n.eq(i)||Ns.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:i})}const r=[Uo(t.chainId||0,"chainId"),Uo(t.nonce||0,"nonce"),Uo(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),Uo(t.maxFeePerGas||0,"maxFeePerGas"),Uo(t.gasLimit||0,"gasLimit"),t.to!=null?ln(t.to):"0x",Uo(t.value||0,"value"),t.data||"0x",mK(t.accessList||[])];if(e){const n=l0(e);r.push(Uo(n.recoveryParam,"recoveryParam")),r.push(cl(n.r)),r.push(cl(n.s))}return Fs(["0x02",Wh(r)])}function bK(t,e){const r=[Uo(t.chainId||0,"chainId"),Uo(t.nonce||0,"nonce"),Uo(t.gasPrice||0,"gasPrice"),Uo(t.gasLimit||0,"gasLimit"),t.to!=null?ln(t.to):"0x",Uo(t.value||0,"value"),t.data||"0x",mK(t.accessList||[])];if(e){const n=l0(e);r.push(Uo(n.recoveryParam,"recoveryParam")),r.push(cl(n.r)),r.push(cl(n.s))}return Fs(["0x01",Wh(r)])}function HOe(t,e){b7(t,WOe);const r=[];zOe.forEach(function(o){let a=t[o.name]||[];const c={};o.numeric&&(c.hexPad="left"),a=Se($e(a,c)),o.length&&a.length!==o.length&&a.length>0&&Ns.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a),o.maxLength&&(a=cl(a),a.length>o.maxLength&&Ns.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a)),r.push($e(a))});let n=0;if(t.chainId!=null?(n=t.chainId,typeof n!="number"&&Ns.throwArgumentError("invalid transaction.chainId","transaction",t)):e&&!wb(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(r.push($e(n)),r.push("0x"),r.push("0x")),!e)return Wh(r);const i=l0(e);let s=27+i.recoveryParam;return n!==0?(r.pop(),r.pop(),r.pop(),s+=n*2+8,i.v>28&&i.v!==s&&Ns.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==s&&Ns.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push($e(s)),r.push(cl(Se(i.r))),r.push(cl(Se(i.s))),Wh(r)}function dA(t,e){if(t.type==null||t.type===0)return t.accessList!=null&&Ns.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),HOe(t,e);switch(t.type){case 1:return bK(t,e);case 2:return yK(t,e)}return Ns.throwError(`unsupported transaction type: ${t.type}`,ce.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}function wK(t,e,r){try{const n=As(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");t.v=n}catch{Ns.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=bn(e[1],32),t.s=bn(e[2],32);try{const n=dn(r(t));t.from=Cb(n,{r:t.r,s:t.s,recoveryParam:t.v})}catch{}}function qOe(t){const e=Vx(t.slice(1));e.length!==9&&e.length!==12&&Ns.throwArgumentError("invalid component count for transaction type: 2","payload",$e(t));const r=As(e[2]),n=As(e[3]),i={type:2,chainId:As(e[0]).toNumber(),nonce:As(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:As(e[4]),to:O7(e[5]),value:As(e[6]),data:e[7],accessList:f0(e[8])};return e.length===9||(i.hash=dn(t),wK(i,e.slice(9),yK)),i}function VOe(t){const e=Vx(t.slice(1));e.length!==8&&e.length!==11&&Ns.throwArgumentError("invalid component count for transaction type: 1","payload",$e(t));const r={type:1,chainId:As(e[0]).toNumber(),nonce:As(e[1]).toNumber(),gasPrice:As(e[2]),gasLimit:As(e[3]),to:O7(e[4]),value:As(e[5]),data:e[6],accessList:f0(e[7])};return e.length===8||(r.hash=dn(t),wK(r,e.slice(8),bK)),r}function KOe(t){const e=Vx(t);e.length!==9&&e.length!==6&&Ns.throwArgumentError("invalid raw transaction","rawTransaction",t);const r={nonce:As(e[0]).toNumber(),gasPrice:As(e[1]),gasLimit:As(e[2]),to:O7(e[3]),value:As(e[4]),data:e[5],chainId:0};if(e.length===6)return r;try{r.v=De.from(e[6]).toNumber()}catch{return r}if(r.r=bn(e[7],32),r.s=bn(e[8],32),De.from(r.r).isZero()&&De.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let n=r.v-27;const i=e.slice(0,6);r.chainId!==0&&(i.push($e(r.chainId)),i.push("0x"),i.push("0x"),n-=r.chainId*2+8);const s=dn(Wh(i));try{r.from=Cb(s,{r:$e(r.r),s:$e(r.s),recoveryParam:n})}catch{}r.hash=dn(t)}return r.type=null,r}function vK(t){const e=Se(t);if(e[0]>127)return KOe(e);switch(e[0]){case 1:return VOe(e);case 2:return qOe(e)}return Ns.throwError(`unsupported transaction type: ${e[0]}`,ce.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}const GOe=Object.freeze(Object.defineProperty({__proto__:null,get TransactionTypes(){return fA},accessListify:f0,computeAddress:Gf,parse:vK,recoverAddress:Cb,serialize:dA},Symbol.toStringTag,{value:"Module"})),YOe="contracts/5.8.0";var qh=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const oi=new ce(YOe);function v4(t,e){return qh(this,void 0,void 0,function*(){const r=yield e;typeof r!="string"&&oi.throwArgumentError("invalid address or ENS name","name",r);try{return ln(r)}catch{}t||oi.throwError("a provider or signer is needed to resolve ENS names",ce.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield t.resolveName(r);return n==null&&oi.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n})}function Ov(t,e,r){return qh(this,void 0,void 0,function*(){return Array.isArray(r)?yield Promise.all(r.map((n,i)=>Ov(t,Array.isArray(e)?e[i]:e[n.name],n))):r.type==="address"?yield v4(t,e):r.type==="tuple"?yield Ov(t,e,r.components):r.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>Ov(t,n,r.arrayChildren))):Promise.reject(oi.makeError("invalid value for array",ce.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Qx(t,e,r){return qh(this,void 0,void 0,function*(){let n={};r.length===e.inputs.length+1&&typeof r[r.length-1]=="object"&&(n=bi(r.pop())
2979),oi.checkArgumentCount(r.length,e.inputs.length,"passed to contract"),t.signer?n.from?n.from=ti({override:v4(t.signer,n.from),signer:t.signer.getAddress()}).then(l=>qh(this,void 0,void 0,function*(){return ln(l.signer)!==l.override&&oi.throwError("Contract with a Signer cannot override from",ce.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),l.override})):n.from=t.signer.getAddress():n.from&&(n.from=v4(t.provider,n.from));const i=yield ti({args:Ov(t.signer||t.provider,r,e.inputs),address:t.resolvedAddress,overrides:ti(n)||{}}),s=t.interface.encodeFunctionData(e,i.args),o={data:s,to:i.address},a=i.overrides;if(a.nonce!=null&&(o.nonce=De.from(a.nonce).toNumber()),a.gasLimit!=null&&(o.gasLimit=De.from(a.gasLimit)),a.gasPrice!=null&&(o.gasPrice=De.from(a.gasPrice)),a.maxFeePerGas!=null&&(o.maxFeePerGas=De.from(a.maxFeePerGas)),a.maxPriorityFeePerGas!=null&&(o.maxPriorityFeePerGas=De.from(a.maxPriorityFeePerGas)),a.from!=null&&(o.from=a.from),a.type!=null&&(o.type=a.type),a.accessList!=null&&(o.accessList=f0(a.accessList)),o.gasLimit==null&&e.gas!=null){let l=21e3;const u=Se(s);for(let f=0;f<u.length;f++)l+=4,u[f]&&(l+=64);o.gasLimit=De.from(e.gas).add(l)}if(a.value){const l=De.from(a.value);!l.isZero()&&!e.payable&&oi.throwError("non-payable method cannot override value",ce.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:n.value}),o.value=l}a.customData&&(o.customData=bi(a.customData)),a.ccipReadEnabled&&(o.ccipReadEnabled=!!a.ccipReadEnabled),delete n.nonce,delete n.gasLimit,delete n.gasPrice,delete n.from,delete n.value,delete n.type,delete n.accessList,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.customData,delete n.ccipReadEnabled;const c=Object.keys(n).filter(l=>n[l]!=null);return c.length&&oi.throwError(`cannot override ${c.map(l=>JSON.stringify(l)).join(",")}`,ce.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:c}),o})}function ZOe(t,e){return function(...r){return Qx(t,e,r)}}function JOe(t,e){const r=t.signer||t.provider;return function(...n){return qh(this,void 0,void 0,function*(){r||oi.throwError("estimate require a provider or signer",ce.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const i=yield Qx(t,e,n);return yield r.estimateGas(i)})}}function QOe(t,e){const r=e.wait.bind(e);e.wait=n=>r(n).then(i=>(i.events=i.logs.map(s=>{let o=bl(s),a=null;try{a=t.interface.parseLog(s)}catch{}return a&&(o.args=a.args,o.decode=(c,l)=>t.interface.decodeEventLog(a.eventFragment,c,l),o.event=a.name,o.eventSignature=a.signature),o.removeListener=()=>t.provider,o.getBlock=()=>t.provider.getBlock(i.blockHash),o.getTransaction=()=>t.provider.getTransaction(i.transactionHash),o.getTransactionReceipt=()=>Promise.resolve(i),o}),i))}function xK(t,e,r){const n=t.signer||t.provider;return function(...i){return qh(this,void 0,void 0,function*(){let s;if(i.length===e.inputs.length+1&&typeof i[i.length-1]=="object"){const c=bi(i.pop());c.blockTag!=null&&(s=yield c.blockTag),delete c.blockTag,i.push(c)}t.deployTransaction!=null&&(yield t._deployed(s));const o=yield Qx(t,e,i),a=yield n.call(o,s);try{let c=t.interface.decodeFunctionResult(e,a);return r&&e.outputs.length===1&&(c=c[0]),c}catch(c){throw c.code===ce.errors.CALL_EXCEPTION&&(c.address=t.address,c.args=i,c.transaction=o),c}})}}function XOe(t,e){return function(...r){return qh(this,void 0,void 0,function*(){t.signer||oi.throwError("sending a transaction requires a signer",ce.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),t.deployTransaction!=null&&(yield t._deployed());const n=yield Qx(t,e,r),i=yield t.signer.sendTransaction(n);return QOe(t,i),i})}}function sL(t,e,r){return e.constant?xK(t,e,r):XOe(t,e)}function EK(t){return t.address&&(t.topics==null||t.topics.length===0)?"*":(t.address||"*")+"@"+(t.topics?t.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}class Ny{constructor(e,r){we(this,"tag",e),we(this,"filter",r),this._listeners=[]}addListener(e,r){this._listeners.push({listener:e,once:r})}removeListener(e){let r=!1;this._listeners=this._listeners.filter(n=>r||n.listener!==e?!0:(r=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){const r=this.listenerCount();return this._listeners=this._listeners.filter(n=>{const i=e.slice();return setTimeout(()=>{n.listener.apply(this,i)},0),!n.once}),r}prepareEvent(e){}getEmit(e){return[e]}}class eDe extends Ny{constructor(){super("error",null)}}class oL extends Ny{constructor(e,r,n,i){const s={address:e};let o=r.getEventTopic(n);i?(o!==i[0]&&oi.throwArgumentError("topic mismatch","topics",i),s.topics=i.slice()):s.topics=[o],super(EK(s),s),we(this,"address",e),we(this,"interface",r),we(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(r,n)=>this.interface.decodeEventLog(this.fragment,r,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(r){e.args=null,e.decodeError=r}}getEmit(e){const r=wV(e.args);if(r.length)throw r[0].error;const n=(e.args||[]).slice();return n.push(e),n}}class aL extends Ny{constructor(e,r){super("*",{address:e}),we(this,"address",e),we(this,"interface",r)}prepareEvent(e){super.prepareEvent(e);try{const r=this.interface.parseLog(e);e.event=r.name,e.eventSignature=r.signature,e.decode=(n,i)=>this.interface.decodeEventLog(r.eventFragment,n,i),e.args=r.args}catch{}}}class tDe{constructor(e,r,n){we(this,"interface",ic(new.target,"getInterface")(r)),n==null?(we(this,"provider",null),we(this,"signer",null)):Vg.isSigner(n)?(we(this,"provider",n.provider||null),we(this,"signer",n)):xb.isProvider(n)?(we(this,"provider",n),we(this,"signer",null)):oi.throwArgumentError("invalid signer or provider","signerOrProvider",n),we(this,"callStatic",{}),we(this,"estimateGas",{}),we(this,"functions",{}),we(this,"populateTransaction",{}),we(this,"filters",{});{const o={};
2979Object.keys(this.interface.events).forEach(a=>{const c=this.interface.events[a];we(this.filters,a,(...l)=>({address:this.address,topics:this.interface.encodeFilterTopics(c,l)})),o[c.name]||(o[c.name]=[]),o[c.name].push(a)}),Object.keys(o).forEach(a=>{const c=o[a];c.length===1?we(this.filters,a,this.filters[c[0]]):oi.warn(`Duplicate definition of ${a} (${c.join(", ")})`)})}if(we(this,"_runningEvents",{}),we(this,"_wrappedEmits",{}),e==null&&oi.throwArgumentError("invalid contract address or ENS name","addressOrName",e),we(this,"address",e),this.provider)we(this,"resolvedAddress",v4(this.provider,e));else try{we(this,"resolvedAddress",Promise.resolve(ln(e)))}catch{oi.throwError("provider is required to use ENS name as contract address",ce.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(o=>{});const i={},s={};Object.keys(this.interface.functions).forEach(o=>{const a=this.interface.functions[o];if(s[o]){oi.warn(`Duplicate ABI entry for ${JSON.stringify(o)}`);return}s[o]=!0;{const c=a.name;i[`%${c}`]||(i[`%${c}`]=[]),i[`%${c}`].push(o)}this[o]==null&&we(this,o,sL(this,a,!0)),this.functions[o]==null&&we(this.functions,o,sL(this,a,!1)),this.callStatic[o]==null&&we(this.callStatic,o,xK(this,a,!0)),this.populateTransaction[o]==null&&we(this.populateTransaction,o,ZOe(this,a)),this.estimateGas[o]==null&&we(this.estimateGas,o,JOe(this,a))}
2979),Object.keys(i).forEach(o=>{const a=i[o];if(a.length>1)return;o=o.substring(1);const c=a[0];try{this[o]==null&&we(this,o,this[c])}catch{}this.functions[o]==null&&we(this.functions,o,this.functions[c]),this.callStatic[o]==null&&we(this.callStatic,o,this.callStatic[c]),this.populateTransaction[o]==null&&we(this.populateTransaction,o,this.populateTransaction[c]),this.estimateGas[o]==null&&we(this.estimateGas,o,this.estimateGas[c])})}static getContractAddress(e){return x7(e)}static getInterface(e){return sA.isInterface(e)?e:new sA(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(r=>(r==="0x"&&oi.throwError("contract not deployed",ce.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||oi.throwError("sending a transactions require a signer",ce.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const r=bi(e||{});return["from","to"].forEach(function(n){r[n]!=null&&oi.throwError("cannot override "+n,ce.errors.UNSUPPORTED_OPERATION,{operation:n})}),r.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(r))}connect(e){typeof e=="string"&&(e=new I7(e,this.provider));const r=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&we(r,"deployTransaction",this.deployTransaction),r}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return y4.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new eDe);if(e==="event")return this._normalizeRunningEvent(new Ny("event",null));if(e==="*")return this._normalizeRunningEvent(new aL(this.address,this.interface));const r=this.interface.getEvent(e);return this._normalizeRunningEvent(new oL(this.address,this.interface,r))}if(e.topics&&e.topics.length>0){try{const n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");const i=this.interface.getEvent(n);return this._normalizeRunningEvent(new oL(this.address,this.interface,i,e.topics))}catch{}const r={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new Ny(EK(r),r))}return this._normalizeRunningEvent(new aL(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];const r=this._wrappedEmits[e.tag];r&&e.filter&&(this.provider.off(e.filter,r),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,r,n){const i=bl(r);return i.removeListener=()=>{n&&(e.removeListener(n),this._checkRunningEvents(e))},i.getBlock=()=>this.provider.getBlock(r.blockHash),i.getTransaction=()=>this.provider.getTransaction(r.transactionHash),i.getTransactionReceipt=()=>this.provider.getTransactionReceipt(r.transactionHash),e.prepareEvent(i),i}_addEventListener(e,r,n){if(this.provider||oi.throwError("events require a provider or a signer with a provider",ce.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(r,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const i=s=>{let o=this._wrapEvent(e,s,r);if(o.decodeError==null)try{const a=e.getEmit(o);this.emit(e.filter,...a)}catch(a){o.decodeError=a.error}e.filter!=null&&this.emit("event",o),o.decodeError!=null&&this.emit("error",o.decodeError,o)};this._wrappedEmits[e.tag]=i,e.filter!=null&&this.provider.on(e.filter,i)}}queryFilter(e,r,n){const i=this._getRunningEvent(e),s=bi(i.filter);return typeof r=="string"&&Cr(r,32)?(n!=null&&oi.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),s.blockHash=r):(s.fromBlock=r??0,s.toBlock=n??"latest"),this.provider.getLogs(s).then(o=>o.map(a=>this._wrapEvent(i,a,null)))}on(e,r){return this._addEventListener(this._getRunningEvent(e),r,!1),this}once(e,r){return this._addEventListener(this._getRunningEvent(e),r,!0),this}emit(e,...r){if(!this.provider)return!1;const n=this._getRunningEvent(e),i=n.run(r)>0;return this._checkRunningEvents(n),i}
2979listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((r,n)=>r+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){const r=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(i=>{r.push(i)});return r}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(const n in this._runningEvents){const i=this._runningEvents[n];i.removeAllListeners(),this._checkRunningEvents(i)}return this}const r=this._getRunningEvent(e);return r.removeAllListeners(),this._checkRunningEvents(r),this}off(e,r){if(!this.provider)return this;const n=this._getRunningEvent(e);return n.removeListener(r),this._checkRunningEvents(n),this}removeListener(e,r){return this.off(e,r)}}class rDe extends tDe{}class D7{constructor(e){we(this,"alphabet",e),we(this,"base",e.length),we(this,"_alphabetMap",{}),we(this,"_leader",e.charAt(0));for(let r=0;r<e.length;r++)this._alphabetMap[e.charAt(r)]=r}encode(e){let r=Se(e);if(r.length===0)return"";let n=[0];for(let s=0;s<r.length;++s){let o=r[s];for(let a=0;a<n.length;++a)o+=n[a]<<8,n[a]=o%this.base,o=o/this.base|0;for(;o>0;)n.push(o%this.base),o=o/this.base|0}let i="";for(let s=0;r[s]===0&&s<r.length-1;++s)i+=this._leader;for(let s=n.length-1;s>=0;--s)i+=this.alphabet[n[s]];return i}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let r=[];if(e.length===0)return new Uint8Array(r);r.push(0);for(let n=0;n<e.length;n++){let i=this._alphabetMap[e[n]];if(i===void 0)throw new Error("Non-base"+this.base+" character");let s=i;for(let o=0;o<r.length;++o)s+=r[o]*this.base,r[o]=s&255,s>>=8;for(;s>0;)r.push(s&255),s>>=8}for(let n=0;e[n]===this._leader&&n<e.length-1;++n)r.push(0);return Se(new Uint8Array(r.reverse()))}}const nDe=new D7("abcdefghijklmnopqrstuvwxyz234567"),vg=new D7("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),iDe=Object.freeze(Object.defineProperty({__proto__:null,Base32:nDe,Base58:vg,BaseX:D7},Symbol.toStringTag,{value:"Module"}));var xg;(function(t){t.sha256="sha256",t.sha512="sha512"})(xg||(xg={}));const sDe="sha2/5.8.0",oDe=new ce(sDe);function CK(t){return"0x"+fo.ripemd160().update(Se(t)).digest("hex")}function _u(t){return"0x"+fo.sha256().update(Se(t)).digest("hex")}function aDe(t){return"0x"+fo.sha512().update(Se(t)).digest("hex")}function Iy(t,e,r){return xg[t]||oDe.throwError("unsupported algorithm "+t,ce.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:t}),"0x"+fo.hmac(fo[t],Se(e)).update(Se(r)).digest("hex")}const cDe=Object.freeze(Object.defineProperty({__proto__:null,get SupportedAlgorithm(){return xg},computeHmac:Iy,ripemd160:CK,sha256:_u,sha512:aDe},Symbol.toStringTag,{value:"Module"}));function L7(t,e,r,n,i){t=Se(t),e=Se(e);let s,o=1;const a=new Uint8Array(n),c=new Uint8Array(e.length+4);c.set(e);let l,u;for(let f=1;f<=o;f++){c[e.length]=f>>24&255,c[e.length+1]=f>>16&255,c[e.length+2]=f>>8&255,c[e.length+3]=f&255;let d=Se(Iy(i,t,c));s||(s=d.length,u=new Uint8Array(s),o=Math.ceil(n/s),l=n-(o-1)*s),u.set(d);for(let g=1;g<r;g++){d=Se(Iy(i,t,d));for(let y=0;y<s;y++)u[y]^=d[y]}const p=(f-1)*s,h=f===o?l:s;a.set(Se(u).slice(0,h),p)}return $e(a)}const lDe="wordlists/5.8.0",uDe=new ce(lDe);class _b{constructor(e){uDe.checkAbstract(new.target,_b),we(this,"locale",e)}split(e){return e.toLowerCase().split(/ +/g)}join(e){return e.join(" ")}static check(e){const r=[];for(let n=0;n<2048;n++){const i=e.getWord(n);if(n!==e.getWordIndex(i))return"0x";r.push(i)}return kf(r.join(` 2980`)+` 2981`)}static register(e,r){r||(r=e.locale)}}const fDe="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCat
2981chCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobster
2981LocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThe
2981nTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo";let Ym=null;function cL(t){if(Ym==null&&(Ym=fDe.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),_b.check(t)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw Ym=null,new Error("BIP39 Wordlist for en (English) FAILED")}class dDe extends _b{constructor(){super("en")}getWord(e){return cL(this),Ym[e]}getWordIndex(e){return cL(this),Ym.indexOf(e)}}const _K=new dDe;_b.register(_K);const lL={en:_K},hDe="hdnode/5.8.0",Ty=new ce(hDe),pDe=De.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),gDe=ii("Bitcoin seed"),Z0=2147483648;function AK(t){return(1<<t)-1<<8-t}function mDe(t){return(1<<t)-1}function jw(t){return bn($e(t),32)}function uL(t){return vg.encode(Cn([t,ci(_u(_u(t)),0,4)]))}function M7(t){if(t==null)return lL.en;if(typeof t=="string"){const e=lL[t];return e==null&&Ty.throwArgumentError("unknown locale","wordlist",t),e}return t}const B0={},Eg="m/44'/60'/0'/0/0";class Bo{constructor(e,r,n,i,s,o,a,c){if(e!==B0)throw new Error("HDNode constructor cannot be called directly");if(r){const l=new yh(r);we(this,"privateKey",l.privateKey),we(this,"publicKey",l.compressedPublicKey)}else we(this,"privateKey",null),we(this,"publicKey",$e(n));we(this,"parentFingerprint",i),we(this,"fingerprint",ci(CK(_u(this.publicKey)),0,4)),we(this,"address",Gf(this.publicKey)),we(this,"chainCode",s),we(this,"index",o),we(this,"depth",a),c==null?(we(this,"mnemonic",null),we(this,"path",null)):typeof c=="string"?(we(this,"mnemonic",null),we(this,"path",c)):(we(this,"mnemonic",c),we(this,"path",c.path))}get extendedKey(){if(this.depth>=256)throw new Error("Depth too large!");return uL(Cn([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",$e(this.depth),this.parentFingerprint,bn($e(this.index),4),this.chainCode,this.privateKey!=null?Cn(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new Bo(B0,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let r=this.path;r&&(r+="/"+(e&~Z0));const n=new Uint8Array(37);if(e&Z0){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(Se(this.privateKey),1),r&&(r+="'")}else n.set(Se(this.publicKey));for(let f=24;f>=0;f-=8)n[33+(f>>3)]=e>>24-f&255;const i=Se(Iy(xg.sha512,this.chainCode,n)),s=i.slice(0,32),o=i.slice(32);let a=null,c=null;this.privateKey?a=jw(De.from(s).add(this.privateKey).mod(pDe)):c=new yh($e(s))._addPoint(this.publicKey);let l=r;const u=this.mnemonic;return u&&(l=Object.freeze({phrase:u.phrase,path:r,locale:u.locale||"en"})),new Bo(B0,a,c,this.fingerprint,jw(o),e,this.depth+1,l)}derivePath(e){const r=e.split("/");if(r.length===0||r[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);r[0]==="m"&&r.shift();let n=this;for(let i=0;i<r.length;i++){const s=r[i];if(s.match(/^[0-9]+'$/)){const o=parseInt(s.substring(0,s.length-1));if(o>=Z0)throw new Error("invalid path index - "+s);n=n._derive(Z0+o)}else if(s.match(/^[0-9]+$/)){const o=parseInt(s);if(o>=Z0)throw new Error("invalid path index - "+s);n=n._derive(o)}else throw new Error("invalid path component - "+s)}return n}static _fromSeed(e,r){const n=Se(e);if(n.length<16||n.length>64)throw new Error("invalid seed");
2981const i=Se(Iy(xg.sha512,gDe,n));return new Bo(B0,jw(i.slice(0,32)),null,"0x00000000",jw(i.slice(32)),0,0,r)}static fromMnemonic(e,r,n){return n=M7(n),e=e5(Xx(e,n),n),Bo._fromSeed(SK(e,r),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return Bo._fromSeed(e,null)}static fromExtendedKey(e){const r=vg.decode(e);(r.length!==82||uL(r.slice(0,78))!==e)&&Ty.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const n=r[4],i=$e(r.slice(5,9)),s=parseInt($e(r.slice(9,13)).substring(2),16),o=$e(r.slice(13,45)),a=r.slice(45,78);switch($e(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new Bo(B0,null,$e(a),i,o,s,n,null);case"0x0488ade4":case"0x04358394 ":if(a[0]!==0)break;return new Bo(B0,$e(a.slice(1)),null,i,o,s,n,null)}return Ty.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function SK(t,e){e||(e="");const r=ii("mnemonic"+e,wl.NFKD);return L7(ii(t,wl.NFKD),r,2048,64,"sha512")}function Xx(t,e){e=M7(e),Ty.checkNormalize();const r=e.split(t);if(r.length%3!==0)throw new Error("invalid mnemonic");const n=Se(new Uint8Array(Math.ceil(11*r.length/8)));let i=0;for(let l=0;l<r.length;l++){let u=e.getWordIndex(r[l].normalize("NFKD"));if(u===-1)throw new Error("invalid mnemonic");for(let f=0;f<11;f++)u&1<<10-f&&(n[i>>3]|=1<<7-i%8),i++}const s=32*r.length/3,o=r.length/3,a=AK(o);if((Se(_u(n.slice(0,s/8)))[0]&a)!==(n[n.length-1]&a))throw new Error("invalid checksum");return $e(n.slice(0,s/8))}function e5(t,e){if(e=M7(e),t=Se(t),t.length%4!==0||t.length<16||t.length>32)throw new Error("invalid entropy");const r=[0];let n=11;for(let o=0;o<t.length;o++)n>8?(r[r.length-1]<<=8,r[r.length-1]|=t[o],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=t[o]>>8-n,r.push(t[o]&mDe(8-n)),n+=3);const i=t.length/4,s=Se(_u(t))[0]&AK(i);return r[r.length-1]<<=i,r[r.length-1]|=s>>8-i,e.join(r.map(o=>e.getWord(o)))}function yDe(t,e){try{return Xx(t,e),!0}catch{}return!1}function bDe(t){return(typeof t!="number"||t<0||t>=Z0||t%1)&&Ty.throwArgumentError("invalid account index","index",t),`m/44'/60'/${t}'/0/0`}const wDe=Object.freeze(Object.defineProperty({__proto__:null,HDNode:Bo,defaultPath:Eg,entropyToMnemonic:e5,getAccountPath:bDe,isValidMnemonic:yDe,mnemonicToEntropy:Xx,mnemonicToSeed:SK},Symbol.toStringTag,{value:"Module"})),vDe="random/5.8.0",hA=new ce(vDe);function xDe(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}const fL=xDe();let Dv=fL.crypto||fL.msCrypto;(!Dv||!Dv.getRandomValues)&&(hA.warn("WARNING: Missing strong random number source"),Dv={getRandomValues:function(t){return hA.throwError("no secure random source avaialble",ce.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function wp(t){(t<=0||t>1024||t%1||t!=t)&&hA.throwArgumentError("invalid length","length",t);const e=new Uint8Array(t);return Dv.getRandomValues(e),Se(e)}function EDe(t){t=t.slice();for(let e=t.length-1;e>0;e--){const r=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[r],t[r]=n}return t}const CDe=Object.freeze(Object.defineProperty({__proto__:null,randomBytes:wp,shuffled:EDe},Symbol.toStringTag,{value:"Module"}));var NK={exports:{}};(function(t,e){(function(r){function n(N){return parseInt(N)===N}function i(N){if(!n(N.length))return!1;for(var v=0;v<N.length;v++)if(!n(N[v])||N[v]<0||N[v]>255)return!1;return!0}function s(N,v){if(N.buffer&&ArrayBuffer.isView(N)&&N.name==="Uint8Array")return v&&(N.slice?N=N.slice():N=Array.prototype.slice.call(N)),N;if(Array.isArray(N)){if(!i(N))throw new Error("Array contains invalid value: "+N);return new Uint8Array(N)}if(n(N.length)&&i(N))return new Uint8Array(N);throw new Error("unsupported array-like object")}function o(N){return new Uint8Array(N)}function a(N,v,U,G,S){(G!=null||S!=null)&&(N.slice?N=N.slice(G,S):N=Array.prototype.slice.call(N,G,S)),v.set(N,U)}var c=function(){function N(U){var G=[],S=0;for(U=encodeURI(U);S<U.length;){var J=U.charCodeAt(S++);J===37?(G.push(parseInt(U.substr(S,2),16)),S+=2):G.push(J)}return s(G)}function v(U){for(var G=[],S=0;S<U.length;){var J=U[S];J<128?(G.push(String.fromCharCode(J)),S++):J>191&&J<224?(G.push(String.fromCharCode((J&31)<<6|U[S+1]&63)),S+=2):(G.push(String.fromCharCode((J&15)<<12|(U[S+1]&63)<<6|U[S+2]&63)),S+=3)}return G.join("")}return{toBytes:N,fromBytes:v}}(),l=function(){function N(G){for(var S=[],J=0;J<G.length;J+=2)S.push(parseInt(G.substr(J,2),16));return S}var v="0123456789abcdef";function U(G){for(var S=[],J=0;J<G.length;J++){var ne=G[J];S.push(v[(ne&240)>>4]+v[ne&15])}return S.join("")}return{toBytes:N,fromBytes:U}}(),u={16:10,24:12,32:14},f=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],d=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,9
29810,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],p=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],h=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,16733
298113503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],g=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],y=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389
2981623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],x=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],C=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,
2981632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],_=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],L=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,12974
298103050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],P=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,60
29817398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],z=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],W=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,12
298101765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],B=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],I=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861
2981748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function j(N){for(var v=[],U=0;U<N.length;U+=4)v.push(N[U]<<24|N[U+1]<<16|N[U+2]<<8|N[U+3]);return v}var D=function(N){if(!(this instanceof D))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:s(N,!0)}),this._prepare()};D.prototype._prepare=function(){var N=u[this.key.length];if(N==null)throw new Error("invalid key size (must be 16, 24 or 32 bytes)");this._Ke=[],this._Kd=[];for(var v=0;v<=N;v++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);for(var U=(N+1)*4,G=this.key.length/4,S=j(this.key),J,v=0;v<G;v++)J=v>>2,this._Ke[J][v%4]=S[v],this._Kd[N-J][v%4]=S[v];for(var ne=0,Z=G,Q;Z<U;){if(Q=S[G-1],S[0]^=d[Q>>16&255]<<24^d[Q>>8&255]<<16^d[Q&255]<<8^d[Q>>24&255]^f[ne]<<24,ne+=1,G!=8)for(var v=1;v<G;v++)S[v]^=S[v-1];else{for(var v=1;v<G/2;v++)S[v]^=S[v-1];Q=S[G/2-1],S[G/2]^=d[Q&255]^d[Q>>8&255]<<8^d[Q>>16&255]<<16^d[Q>>24&255]<<24;for(var v=G/2+1;v<G;v++)S[v]^=S[v-1]}for(var v=0,ee,re;v<G&&Z<U;)ee=Z>>2,re=Z%4,this._Ke[ee][re]=S[v],this._Kd[N-ee][re]=S[v++],Z++}for(var ee=1;ee<N;ee++)for(var re=0;re<4;re++)Q=this._Kd[ee][re],this._Kd[ee][re]=z[Q>>24&255]^W[Q>>16&255]^B[Q>>8&255]^I[Q&255]},D.prototype.encrypt=function(N){if(N.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var v=this._Ke.length-1,U=[0,0,0,0],G=j(N),S=0;S<4;S++)G[S]^=this._Ke[0][S];for(var J=1;J<v;J++){for(var S=0;S<4;S++)U[S]=h[G[S]>>24&255]^g[G[(S+1)%4]>>16&255]^y[G[(S+2)%4]>>8&255]^x[G[(S+3)%4]&255]^this._Ke[J][S];G=U.slice()}for(var ne=o(16),Z,S=0;S<4;S++)Z=this._Ke[v][S],ne[4*S]=(d[G[S]>>24&255]^Z>>24)&255,ne[4*S+1]=(d[G[(S+1)%4]>>16&255]^Z>>16)&255,ne[4*S+2]=(d[G[(S+2)%4]>>8&255]^Z>>8)&255,ne[4*S+3]=(d[G[(S+3)%4]&255]^Z)&255;return ne},D.prototype.decrypt=function(N){if(N.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var v=this._Kd.length-1,U=[0,0,0,0],G=j(N),S=0;S<4;S++)G[S]^=this._Kd[0][S];for(var J=1;J<v;J++){for(var S=0;S<4;S++)U[S]=C[G[S]>>24&255]^_[G[(S+3)%4]>>16&255]^L[G[(S+2)%4]>>8&255]^P[G[(S+1)%4]&255]^this._Kd[J][S];G=U.slice()}for(var ne=o(16),Z,S=0;S<4;S++)Z=this._Kd[v][S],ne[4*S]=(p[G[S]>>24&255]^Z>>24)&255,ne[4*S+1]=(p[G[(S+3)%4]>>16&255]^Z>>16)&255,ne[4*S+2]=(p[G[(S+2)%4]>>8&255]^Z>>8)&255,ne[4*S+3]=(p[G[(S+1)%4]&255]^Z)&255;return ne};var O=function(N){if(!(this instanceof O))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new D(N)};O.prototype.encrypt=function(N){if(N=s(N),N.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var v=o(N.length),U=o(16),G=0;G<N.length;
2981G+=16)a(N,U,0,G,G+16),U=this._aes.encrypt(U),a(U,v,G);return v},O.prototype.decrypt=function(N){if(N=s(N),N.length%16!==0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var v=o(N.length),U=o(16),G=0;G<N.length;G+=16)a(N,U,0,G,G+16),U=this._aes.decrypt(U),a(U,v,G);return v};var T=function(N,v){if(!(this instanceof T))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",!v)v=o(16);else if(v.length!=16)throw new Error("invalid initialation vector size (must be 16 bytes)");this._lastCipherblock=s(v,!0),this._aes=new D(N)};T.prototype.encrypt=function(N){if(N=s(N),N.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var v=o(N.length),U=o(16),G=0;G<N.length;G+=16){a(N,U,0,G,G+16);for(var S=0;S<16;S++)U[S]^=this._lastCipherblock[S];this._lastCipherblock=this._aes.encrypt(U),a(this._lastCipherblock,v,G)}return v},T.prototype.decrypt=function(N){if(N=s(N),N.length%16!==0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var v=o(N.length),U=o(16),G=0;G<N.length;G+=16){a(N,U,0,G,G+16),U=this._aes.decrypt(U);for(var S=0;S<16;S++)v[G+S]=U[S]^this._lastCipherblock[S];a(N,this._lastCipherblock,0,G,G+16)}return v};var m=function(N,v,U){if(!(this instanceof m))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Feedback",this.name="cfb",!v)v=o(16);else if(v.length!=16)throw new Error("invalid initialation vector size (must be 16 size)");U||(U=1),this.segmentSize=U,this._shiftRegister=s(v,!0),this._aes=new D(N)};m.prototype.encrypt=function(N){if(N.length%this.segmentSize!=0)throw new Error("invalid plaintext size (must be segmentSize bytes)");for(var v=s(N,!0),U,G=0;G<v.length;G+=this.segmentSize){U=this._aes.encrypt(this._shiftRegister);for(var S=0;S<this.segmentSize;S++)v[G+S]^=U[S];a(this._shiftRegister,this._shiftRegister,0,this.segmentSize),a(v,this._shiftRegister,16-this.segmentSize,G,G+this.segmentSize)}return v},m.prototype.decrypt=function(N){if(N.length%this.segmentSize!=0)throw new Error("invalid ciphertext size (must be segmentSize bytes)");for(var v=s(N,!0),U,G=0;G<v.length;G+=this.segmentSize){U=this._aes.encrypt(this._shiftRegister);for(var S=0;S<this.segmentSize;S++)v[G+S]^=U[S];a(this._shiftRegister,this._shiftRegister,0,this.segmentSize),a(N,this._shiftRegister,16-this.segmentSize,G,G+this.segmentSize)}return v};var b=function(N,v){if(!(this instanceof b))throw Error("AES must be instanitated with `new`");if(this.description="Output Feedback",this.name="ofb",!v)v=o(16);else if(v.length!=16)throw new Error("invalid initialation vector size (must be 16 bytes)");this._lastPrecipher=s(v,!0),this._lastPrecipherIndex=16,this._aes=new D(N)};b.prototype.encrypt=function(N){for(var v=s(N,!0),U=0;U<v.length;U++)this._lastPrecipherIndex===16&&(this._lastPrecipher=this._aes.encrypt(this._lastPrecipher),this._lastPrecipherIndex=0),v[U]^=this._lastPrecipher[this._lastPrecipherIndex++];return v},b.prototype.decrypt=b.prototype.encrypt;var E=function(N){if(!(this instanceof E))throw Error("Counter must be instanitated with `new`");N!==0&&!N&&(N=1),typeof N=="number"?(this._counter=o(16),this.setValue(N)):this.setBytes(N)};E.prototype.setValue=function(N){if(typeof N!="number"||parseInt(N)!=N)throw new Error("invalid counter value (must be an integer)");for(var v=15;v>=0;--v)this._counter[v]=N%256,N=N>>8},E.prototype.setBytes=function(N){if(N=s(N,!0),N.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=N},E.prototype.increment=function(){for(var N=15;N>=0;N--)if(this._counter[N]===255)this._counter[N]=0;else{this._counter[N]++;break}};var k=function(N,v){if(!(this instanceof k))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",v instanceof E||(v=new E(v)),this._counter=v,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new D(N)};k.prototype.encrypt=function(N){for(var v=s(N,!0),U=0;U<v.length;U++)this._remainingCounterIndex===16&&(this._remainingCounter=this._aes.encrypt
2981(this._counter._counter),this._remainingCounterIndex=0,this._counter.increment()),v[U]^=this._remainingCounter[this._remainingCounterIndex++];return v},k.prototype.decrypt=k.prototype.encrypt;function R(N){N=s(N,!0);var v=16-N.length%16,U=o(N.length+v);a(N,U);for(var G=N.length;G<U.length;G++)U[G]=v;return U}function M(N){if(N=s(N,!0),N.length<16)throw new Error("PKCS#7 invalid length");var v=N[N.length-1];if(v>16)throw new Error("PKCS#7 padding byte out of range");for(var U=N.length-v,G=0;G<v;G++)if(N[U+G]!==v)throw new Error("PKCS#7 invalid padding byte");var S=o(U);return a(N,S,0,0,U),S}var H={AES:D,Counter:E,ModeOfOperation:{ecb:O,cbc:T,cfb:m,ofb:b,ctr:k},utils:{hex:l,utf8:c},padding:{pkcs7:{pad:R,strip:M}},_arrayTest:{coerceArray:s,createArray:o,copyArray:a}};t.exports=H})()})(NK);var _De=NK.exports;const Xc=is(_De),IK="json-wallets/5.8.0";function bh(t){return typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),Se(t)}function O1(t,e){for(t=String(t);t.length<e;)t="0"+t;return t}function $7(t){return typeof t=="string"?ii(t,wl.NFKC):Se(t)}function ai(t,e){let r=t;const n=e.toLowerCase().split("/");for(let i=0;i<n.length;i++){let s=null;for(const o in r)if(o.toLowerCase()===n[i]){s=r[o];break}if(s===null)return null;r=s}return r}function ADe(t){const e=Se(t);e[6]=e[6]&15|64,e[8]=e[8]&63|128;const r=$e(e);return[r.substring(2,10),r.substring(10,14),r.substring(14,18),r.substring(18,22),r.substring(22,34)].join("-")}const SDe=new ce(IK);class NDe extends vd{isCrowdsaleAccount(e){return!!(e&&e._isCrowdsaleAccount)}}function U7(t,e){const r=JSON.parse(t);e=$7(e);const n=ln(ai(r,"ethaddr")),i=bh(ai(r,"encseed"));(!i||i.length%16!==0)&&SDe.throwArgumentError("invalid encseed","json",t);const s=Se(L7(e,e,2e3,32,"sha256")).slice(0,16),o=i.slice(0,16),a=i.slice(16),c=new Xc.ModeOfOperation.cbc(s,o),l=Xc.padding.pkcs7.strip(Se(c.decrypt(a)));let u="";for(let p=0;p<l.length;p++)u+=String.fromCharCode(l[p]);const f=ii(u),d=dn(f);return new NDe({_isCrowdsaleAccount:!0,address:n,privateKey:d})}function t5(t){let e=null;try{e=JSON.parse(t)}catch{return!1}return e.encseed&&e.ethaddr}function r5(t){let e=null;try{e=JSON.parse(t)}catch{return!1}return!(!e.version||parseInt(e.version)!==e.version||parseInt(e.version)!==3)}function IDe(t){if(t5(t))try{return ln(JSON.parse(t).ethaddr)}catch{return null}if(r5(t))try{return ln(JSON.parse(t).address)}catch{return null}return null}var TK={exports:{}};(function(t,e){(function(r){function i(g){const y=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);let x=1779033703,C=3144134277,_=1013904242,L=2773480762,P=1359893119,z=2600822924,W=528734635,B=1541459225;const I=new Uint32Array(64);function j(k){let R=0,M=k.length;for(;M>=64;){let H=x,N=C,v=_,U=L,G=P,S=z,J=W,ne=B,Z,Q,ee,re,ie;for(Q=0;Q<16;Q++)ee=R+Q*4,I[Q]=(k[ee]&255)<<24|(k[ee+1]&255)<<16|(k[ee+2]&255)<<8|k[ee+3]&255;for(Q=16;Q<64;Q++)Z=I[Q-2],re=(Z>>>17|Z<<15)^(Z>>>19|Z<<13)^Z>>>10,Z=I[Q-15],ie=(Z>>>7|Z<<25)^(Z>>>18|Z<<14)^Z>>>3,I[Q]=(re+I[Q-7]|0)+(ie+I[Q-16]|0)|0;for(Q=0;Q<64;Q++)re=(((G>>>6|G<<26)^(G>>>11|G<<21)^(G>>>25|G<<7))+(G&S^~G&J)|0)+(ne+(y[Q]+I[Q]|0)|0)|0,ie=((H>>>2|H<<30)^(H>>>13|H<<19)^(H>>>22|H<<10))+(H&N^H&v^N&v)|0,ne=J,J=S,S=G,G=U+re|0,U=v,v=N,N=H,H=re+ie|0;x=x+H|0,C=C+N|0,_=_+v|0,L=L+U|0,P=P+G|0,z=z+S|0,W=W+J|0,B=B+ne|0,R+=64,M-=64}}j(g);let D,O=g.length%64,T=g.length/536870912|0,m=g.length<<3,b=O<56?56:120,E=g.slice(g.length-O,g.length);for(E.push(128),D=O+1;D<b;D++)E.push(0);return E.push(T>>>24&255),E.push(T>>>16&255),E.push(T>>>8&255),E.push(T>>>0&255),E.push(m>>>24&255),E.push(m>>>16&255),E.push(m>>>8&255),E.push(m>>>0&255),j(E),[x>>>24&255,x>>>16&255,x>>>8&255,x>>>0&255,C>>>24&255,C>>>16&255,C>>>
29818&255,C>>>0&255,_>>>24&255,_>>>16&255,_>>>8&255,_>>>0&255,L>>>24&255,L>>>16&255,L>>>8&255,L>>>0&255,P>>>24&255,P>>>16&255,P>>>8&255,P>>>0&255,z>>>24&255,z>>>16&255,z>>>8&255,z>>>0&255,W>>>24&255,W>>>16&255,W>>>8&255,W>>>0&255,B>>>24&255,B>>>16&255,B>>>8&255,B>>>0&255]}function s(g,y,x){g=g.length<=64?g:i(g);const C=64+y.length+4,_=new Array(C),L=new Array(64);let P,z=[];for(P=0;P<64;P++)_[P]=54;for(P=0;P<g.length;P++)_[P]^=g[P];for(P=0;P<y.length;P++)_[64+P]=y[P];for(P=C-4;P<C;P++)_[P]=0;for(P=0;P<64;P++)L[P]=92;for(P=0;P<g.length;P++)L[P]^=g[P];function W(){for(let B=C-1;B>=C-4;B--){if(_[B]++,_[B]<=255)return;_[B]=0}}for(;x>=32;)W(),z=z.concat(i(L.concat(i(_)))),x-=32;return x>0&&(W(),z=z.concat(i(L.concat(i(_))).slice(0,x))),z}function o(g,y,x,C,_){let L;for(u(g,(2*x-1)*16,_,0,16),L=0;L<2*x;L++)l(g,L*16,_,16),c(_,C),u(_,0,g,y+L*16,16);for(L=0;L<x;L++)u(g,y+L*2*16,g,L*16,16);for(L=0;L<x;L++)u(g,y+(L*2+1)*16,g,(L+x)*16,16)}function a(g,y){return g<<y|g>>>32-y}function c(g,y){u(g,0,y,0,16);for(let x=8;x>0;x-=2)y[4]^=a(y[0]+y[12],7),y[8]^=a(y[4]+y[0],9),y[12]^=a(y[8]+y[4],13),y[0]^=a(y[12]+y[8],18),y[9]^=a(y[5]+y[1],7),y[13]^=a(y[9]+y[5],9),y[1]^=a(y[13]+y[9],13),y[5]^=a(y[1]+y[13],18),y[14]^=a(y[10]+y[6],7),y[2]^=a(y[14]+y[10],9),y[6]^=a(y[2]+y[14],13),y[10]^=a(y[6]+y[2],18),y[3]^=a(y[15]+y[11],7),y[7]^=a(y[3]+y[15],9),y[11]^=a(y[7]+y[3],13),y[15]^=a(y[11]+y[7],18),y[1]^=a(y[0]+y[3],7),y[2]^=a(y[1]+y[0],9),y[3]^=a(y[2]+y[1],13),y[0]^=a(y[3]+y[2],18),y[6]^=a(y[5]+y[4],7),y[7]^=a(y[6]+y[5],9),y[4]^=a(y[7]+y[6],13),y[5]^=a(y[4]+y[7],18),y[11]^=a(y[10]+y[9],7),y[8]^=a(y[11]+y[10],9),y[9]^=a(y[8]+y[11],13),y[10]^=a(y[9]+y[8],18),y[12]^=a(y[15]+y[14],7),y[13]^=a(y[12]+y[15],9),y[14]^=a(y[13]+y[12],13),y[15]^=a(y[14]+y[13],18);for(let x=0;x<16;++x)g[x]+=y[x]}function l(g,y,x,C){for(let _=0;_<C;_++)x[_]^=g[y+_]}function u(g,y,x,C,_){for(;_--;)x[C++]=g[y++]}function f(g){if(!g||typeof g.length!="number")return!1;for(let y=0;y<g.length;y++){const x=g[y];if(typeof x!="number"||x%1||x<0||x>=256)return!1}return!0}function d(g,y){if(typeof g!="number"||g%1)throw new Error("invalid "+y);return g}function p(g,y,x,C,_,L,P){if(x=d(x,"N"),C=d(C,"r"),_=d(_,"p"),L=d(L,"dkLen"),x===0||x&x-1)throw new Error("N must be power of 2");if(x>2147483647/128/C)throw new Error("N too large");if(C>2147483647/128/_)throw new Error("r too large");if(!f(g))throw new Error("password must be an array or buffer");if(g=Array.prototype.slice.call(g),!f(y))throw new Error("salt must be an array or buffer");y=Array.prototype.slice.call(y);let z=s(g,y,_*128*C);const W=new Uint32Array(_*32*C);for(let G=0;G<W.length;G++){const S=G*4;W[G]=(z[S+3]&255)<<24|(z[S+2]&255)<<16|(z[S+1]&255)<<8|(z[S+0]&255)<<0}const B=new Uint32Array(64*C),I=new Uint32Array(32*C*x),j=32*C,D=new Uint32Array(16),O=new Uint32Array(16),T=_*x*2;let m=0,b=null,E=!1,k=0,R=0,M,H;const N=P?parseInt(1e3/C):4294967295,v=typeof setImmediate<"u"?setImmediate:setTimeout,U=function(){if(E)return P(new Error("cancelled"),m/T);let G;switch(k){case 0:H=R*32*C,u(W,H,B,0,j),k=1,M=0;case 1:G=x-M,G>N&&(G=N);for(let J=0;J<G;J++)u(B,0,I,(M+J)*j,j),o(B,j,C,D,O);if(M+=G,m+=G,P){const J=parseInt(1e3*m/T);if(J!==b){if(E=P(null,m/T),E)break;b=J}}if(M<x)break;M=0,k=2;case 2:G=x-M,G>N&&(G=N);for(let J=0;J<G;J++){const ne=(2*C-1)*16,Z=B[ne]&x-1;l(I,Z*j,B,j),o(B,j,C,D,O)}if(M+=G,m+=G,P){const J=parseInt(1e3*m/T);if(J!==b){if(E=P(null,m/T),E)break;b=J}}if(M<x)break;if(u(B,0,W,H,j),R++,R<_){k=0;break}z=[];for(let J=0;J<W.length;J++)z.push(W[J]>>0&255),z.push(W[J]>>8&255),z.push(W[J]>>16&255),z.push(W[J]>>24&255);const S=s(g,z,L);return P&&P(null,1,S),S}P&&v(U)};if(!P)for(;;){const G=U();if(G!=null)return G}U()}const h={scrypt:function(g,y,x,C,_,L,P){return new Promise(function(z,W){let B=0;P&&P(0),p(g,y,x,C,_,L,function(I,j,D){if(I)W(I);else if(D)P&&B!==1&&P(1),z(new Uint8Array(D));else if(P&&j!==B)return B=j,P(j)})})},syncScrypt:function(g,y,x,C,_,L){return new Uint8Array(p(g,y,x,C,_,L))}};t.exports=h})()})(TK);var TDe=TK.exports;const B7=is(TDe);var kDe=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const pA=new ce(IK);function dL(t){return t!=null&&t.mnemonic&&t.mnemonic.phrase}class PDe extends vd{isKeystoreAccount(e){return!!(e&&e._isKeystoreAccount)}}function RDe(t,e,r){if(ai(t,"crypto/cipher")==="aes-128-ctr"){const i=bh(ai(t,"crypto/cipherparams/iv")),s=new Xc.Counter(i),o=new Xc.ModeOfOperation.ctr(e,s);return Se(o.decrypt(r))}return null}function kK(t,e){const r=bh(ai(t,"crypto/ciphertext"));if($e(dn(Cn([e.slice(16,32),r]))).substring(2)!==ai(t,"crypto/mac").toLowerCase())throw new Error("invalid password");const i=RDe(t,e.slice(0,16),r);i||pA.throwError("unsupported cipher",ce.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const s=e.slice(32,64),o=Gf(i);if(t.address){let c=t.address.toLowerCase();if(c.substring(0,2)!=="0x"&&(c="0x"+c),ln(c)!==o)throw new Error("address mismatch")}const a={_isKeystoreAccount:!0,address:o,privateKey:$e(i)};if(ai(t,"x-ethers/version")==="0.1"){const c=bh(ai(t,"x-ethers/mnemonicCiphertext")),l=bh(ai(t,"x-ethers/mnemonicCounter")),u=new Xc.Counter(l),f=new Xc.ModeOfOperation.ctr(s,u),d=ai(t,"x-ethers/path")||Eg,p=ai(t,"x-ethers/locale")||"en",h=Se(f.decrypt(c));try{const g=e5(h,p),y=Bo.fromMnemonic(g,null,p).derivePath(d);if(y.privateKey!=a.privateKey)throw new Error("mnemonic mismatch");a.mnemonic=y.mnemonic}catch(g){if(g.code!==ce.errors.INVALID_ARGUMENT||g.argument!=="wordlist")throw g}}return new PDe(a)}function PK(t,e,r,n,i){return Se(L7(t,e,r,n,i))}function ODe(t,e,r,n,i){return Promise.resolve(PK(t,e,r,n,i))}function RK(t,e,r,n,i){const s=$7(e),o=ai(t,"crypto/kdf");
2981if(o&&typeof o=="string"){const a=function(c,l){return pA.throwArgumentError("invalid key-derivation function parameters",c,l)};if(o.toLowerCase()==="scrypt"){const c=bh(ai(t,"crypto/kdfparams/salt")),l=parseInt(ai(t,"crypto/kdfparams/n")),u=parseInt(ai(t,"crypto/kdfparams/r")),f=parseInt(ai(t,"crypto/kdfparams/p"));(!l||!u||!f)&&a("kdf",o),l&l-1&&a("N",l);const d=parseInt(ai(t,"crypto/kdfparams/dklen"));return d!==32&&a("dklen",d),n(s,c,l,u,f,64,i)}else if(o.toLowerCase()==="pbkdf2"){const c=bh(ai(t,"crypto/kdfparams/salt"));let l=null;const u=ai(t,"crypto/kdfparams/prf");u==="hmac-sha256"?l="sha256":u==="hmac-sha512"?l="sha512":a("prf",u);const f=parseInt(ai(t,"crypto/kdfparams/c")),d=parseInt(ai(t,"crypto/kdfparams/dklen"));return d!==32&&a("dklen",d),r(s,c,f,d,l)}}return pA.throwArgumentError("unsupported key-derivation function","kdf",o)}function OK(t,e){const r=JSON.parse(t),n=RK(r,e,PK,B7.syncScrypt);return kK(r,n)}function DK(t,e,r){return kDe(this,void 0,void 0,function*(){const n=JSON.parse(t),i=yield RK(n,e,ODe,B7.scrypt,r);return kK(n,i)})}function LK(t,e,r,n){try{if(ln(t.address)!==Gf(t.privateKey))throw new Error("address/privateKey mismatch");if(dL(t)){const y=t.mnemonic;if(Bo.fromMnemonic(y.phrase,null,y.locale).derivePath(y.path||Eg).privateKey!=t.privateKey)throw new Error("mnemonic mismatch")}}catch(y){return Promise.reject(y)}typeof r=="function"&&!n&&(n=r,r={}),r||(r={});const i=Se(t.privateKey),s=$7(e);let o=null,a=null,c=null;if(dL(t)){const y=t.mnemonic;o=Se(Xx(y.phrase,y.locale||"en")),a=y.path||Eg,c=y.locale||"en"}let l=r.client;l||(l="ethers.js");let u=null;r.salt?u=Se(r.salt):u=wp(32);let f=null;if(r.iv){if(f=Se(r.iv),f.length!==16)throw new Error("invalid iv")}else f=wp(16);let d=null;if(r.uuid){if(d=Se(r.uuid),d.length!==16)throw new Error("invalid uuid")}else d=wp(16);let p=1<<17,h=8,g=1;return r.scrypt&&(r.scrypt.N&&(p=r.scrypt.N),r.scrypt.r&&(h=r.scrypt.r),r.scrypt.p&&(g=r.scrypt.p)),B7.scrypt(s,u,p,h,g,64,n).then(y=>{y=Se(y);const x=y.slice(0,16),C=y.slice(16,32),_=y.slice(32,64),L=new Xc.Counter(f),P=new Xc.ModeOfOperation.ctr(x,L),z=Se(P.encrypt(i)),W=dn(Cn([C,z])),B={address:t.address.substring(2).toLowerCase(),id:ADe(d),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:$e(f).substring(2)},ciphertext:$e(z).substring(2),kdf:"scrypt",kdfparams:{salt:$e(u).substring(2),n:p,dklen:32,p:g,r:h},mac:W.substring(2)}};if(o){const I=wp(16),j=new Xc.Counter(I),D=new Xc.ModeOfOperation.ctr(_,j),O=Se(D.encrypt(o)),T=new Date,m=T.getUTCFullYear()+"-"+O1(T.getUTCMonth()+1,2)+"-"+O1(T.getUTCDate(),2)+"T"+O1(T.getUTCHours(),2)+"-"+O1(T.getUTCMinutes(),2)+"-"+O1(T.getUTCSeconds(),2)+".0Z";B["x-ethers"]={client:l,gethFilename:"UTC--"+m+"--"+B.address,mnemonicCounter:$e(I).substring(2),mnemonicCiphertext:$e(O).substring(2),path:a,locale:c,version:"0.1"}}return JSON.stringify(B)})}function MK(t,e,r){if(t5(t)){r&&r(0);const n=U7(t,e);return r&&r(1),Promise.resolve(n)}return r5(t)?DK(t,e,r):Promise.reject(new Error("invalid JSON wallet"))}function $K(t,e){if(t5(t))return U7(t,e);if(r5(t))return OK(t,e);throw new Error("invalid JSON wallet")}const DDe=Object.freeze(Object.defineProperty({__proto__:null,decryptCrowdsale:U7,decryptJsonWallet:MK,decryptJsonWalletSync:$K,decryptKeystore:DK,decryptKeystoreSync:OK,encryptKeystore:LK,getJsonWalletAddress:IDe,isCrowdsaleWallet:t5,isKeystoreWallet:r5},Symbol.toStringTag,{value:"Module"})),LDe="wallet/5.8.0";var hL=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const F0=new ce(LDe);function MDe(t){return t!=null&&Cr(t.privateKey,32)&&t.address!=null}function $De(t){const e=t.mnemonic;return e&&e.phrase}class jd extends Vg{constructor(e,r){if(super(),MDe(e)){const n=new yh(e.privateKey);if(we(this,"_signingKey",()=>n),we(this,"address",Gf(this.publicKey)),this.address!==ln(e.address)&&F0.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),$De(e)){const i=e.mnemonic;we(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||Eg,locale:i.locale||"en"}));const s=this.mnemonic,o=Bo.fromMnemonic(s.phrase,null,s.locale).derivePath(s.path);Gf(o.privateKey)!==this.address&&F0.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else we(this,"_mnemonic",()=>null)}else{if(yh.isSigningKey(e))e.curve!=="secp256k1"&&F0.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),we(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);const n=new yh(e);we(this,"_signingKey",()=>n)}we(this,"_mnemonic",()=>null),we(this,"address",Gf(this.publicKey))}r&&!xb.isProvider(r)&&F0.throwArgumentError("invalid provider","provider",r),we(this,"provider",r||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new jd(this,e)}signTransaction(e){return ti(e).then(r=>{r.from!=null&&(ln(r.from)!==this.address&&F0.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete r.from);
2981const n=this._signingKey().signDigest(dn(dA(r)));return dA(r,n)})}signMessage(e){return hL(this,void 0,void 0,function*(){return rA(this._signingKey().signDigest(N7(e)))})}_signTypedData(e,r,n){return hL(this,void 0,void 0,function*(){const i=yield Xi.resolveNames(e,r,n,s=>(this.provider==null&&F0.throwError("cannot resolve ENS names without a provider",ce.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:s}),this.provider.resolveName(s)));return rA(this._signingKey().signDigest(Xi.hash(i.domain,r,i.value)))})}encrypt(e,r,n){if(typeof r=="function"&&!n&&(n=r,r={}),n&&typeof n!="function")throw new Error("invalid callback");return r||(r={}),LK(this,e,r,n)}static createRandom(e){let r=wp(16);e||(e={}),e.extraEntropy&&(r=Se(ci(dn(Cn([r,e.extraEntropy])),0,16)));const n=e5(r,e.locale);return jd.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,r,n){return MK(e,r,n).then(i=>new jd(i))}static fromEncryptedJsonSync(e,r){return new jd($K(e,r))}static fromMnemonic(e,r,n){return r||(r=Eg),new jd(Bo.fromMnemonic(e,null,n).derivePath(r))}}function UDe(t,e){return Cb(N7(t),e)}function BDe(t,e,r,n){return Cb(Xi.hash(t,e,r),n)}const FDe=Object.freeze(Object.defineProperty({__proto__:null,Wallet:jd,verifyMessage:UDe,verifyTypedData:BDe},Symbol.toStringTag,{value:"Module"})),jDe="networks/5.8.0",pL=new ce(jDe);function zDe(t){return t&&typeof t.renetwork=="function"}function Ya(t){const e=function(r,n){n==null&&(n={});const i=[];if(r.InfuraProvider&&n.infura!=="-")try{i.push(new r.InfuraProvider(t,n.infura))}catch{}if(r.EtherscanProvider&&n.etherscan!=="-")try{i.push(new r.EtherscanProvider(t,n.etherscan))}catch{}if(r.AlchemyProvider&&n.alchemy!=="-")try{i.push(new r.AlchemyProvider(t,n.alchemy))}catch{}if(r.PocketProvider&&n.pocket!=="-"){const s=["goerli","ropsten","rinkeby","sepolia"];try{const o=new r.PocketProvider(t,n.pocket);o.network&&s.indexOf(o.network.name)===-1&&i.push(o)}catch{}}if(r.CloudflareProvider&&n.cloudflare!=="-")try{i.push(new r.CloudflareProvider(t))}catch{}if(r.AnkrProvider&&n.ankr!=="-")try{const s=["ropsten"],o=new r.AnkrProvider(t,n.ankr);o.network&&s.indexOf(o.network.name)===-1&&i.push(o)}catch{}if(r.QuickNodeProvider&&n.quicknode!=="-")try{i.push(new r.QuickNodeProvider(t,n.quicknode))}catch{}if(i.length===0)return null;if(r.FallbackProvider){let s=1;return n.quorum!=null?s=n.quorum:t==="homestead"&&(s=2),new r.FallbackProvider(i,s)}return i[0]};return e.renetwork=function(r){return Ya(r)},e}function x4(t,e){const r=function(n,i){return n.JsonRpcProvider?new n.JsonRpcProvider(t,e):null};return r.renetwork=function(n){return x4(t,n)},r}const gL={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:Ya("homestead")},mL={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:Ya("ropsten")},yL={chainId:63,name:"classicMordor",_defaultProvider:x4("https://www.ethercluster.com/mordor","classicMordor")},zw={unspecified:{chainId:0,name:"unspecified"},homestead:gL,mainnet:gL,morden:{chainId:2,name:"morden"},ropsten:mL,testnet:mL,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:Ya("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:Ya("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:Ya("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"sepolia",_defaultProvider:Ya("sepolia")},holesky:{chainId:17e3,name:"holesky",_defaultProvider:Ya("holesky")},classic:{chainId:61,name:"classic",_defaultProvider:x4("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:yL,classicTestnet:yL,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:x4("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:Ya("matic")},maticmum:{chainId:80001,name:"maticmum",_defaultProvider:Ya("maticmum")},optimism:{chainId:10,name:"optimism",_defaultProvider:Ya("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},"optimism-sepolia":{chainId:11155420,name:"optimism-sepolia"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},"arbitrum-sepolia":{chainId:421614,name:"arbitrum-sepolia"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function WDe(t){if(t==null)return null;if(typeof t=="number"){for(const n in zw){const i=zw[n];if(i.chainId===t)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:t,name:"unknown"}}if(typeof t=="string"){const n=zw[t];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}const e=zw[t.name];if(!e)return typeof t.chainId!="number"&&pL.throwArgumentError("invalid network chainId","network",t),t;t.chainId!==0&&t.chainId!==e.chainId&&pL.throwArgumentError("network chainId mismatch","network",t);let r=t._defaultProvider||null;return r==null&&e._defaultProvider&&(zDe(e._defaultProvider)?r=e._defaultProvider.renetwork(t):r=e._defaultProvider),{name:t.name,chainId:e.chainId,ensAddress:t.ensAddress||e.ensAddress||null,_defaultProvider:r}}const HDe="web/5.8.0";var qDe=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};function VDe(t,e){return qDe(this,void 0,void 0,function*(){e==null&&(e={});const r={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};
2981if(e.skipFetchSetup!==!0&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),e.fetchOptions!=null){const o=e.fetchOptions;o.mode&&(r.mode=o.mode),o.cache&&(r.cache=o.cache),o.credentials&&(r.credentials=o.credentials),o.redirect&&(r.redirect=o.redirect),o.referrer&&(r.referrer=o.referrer)}const n=yield fetch(t,r),i=yield n.arrayBuffer(),s={};return n.headers.forEach?n.headers.forEach((o,a)=>{s[a.toLowerCase()]=o}):n.headers.keys().forEach(o=>{s[o.toLowerCase()]=n.headers.get(o)}),{headers:s,statusCode:n.status,statusMessage:n.statusText,body:Se(new Uint8Array(i))}})}var KDe=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const qa=new ce(HDe);function bL(t){return new Promise(e=>{setTimeout(e,t)})}function nf(t,e){if(t==null)return null;if(typeof t=="string")return t;if(wb(t)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return xd(t)}catch{}return $e(t)}return t}function GDe(t){return ii(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function UK(t,e,r){const n=typeof t=="object"&&t.throttleLimit!=null?t.throttleLimit:12;qa.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);const i=typeof t=="object"?t.throttleCallback:null,s=typeof t=="object"&&typeof t.throttleSlotInterval=="number"?t.throttleSlotInterval:100;qa.assertArgument(s>0&&s%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",s);const o=typeof t=="object"?!!t.errorPassThrough:!1,a={};let c=null;const l={method:"GET"};let u=!1,f=2*60*1e3;if(typeof t=="string")c=t;else if(typeof t=="object"){if((t==null||t.url==null)&&qa.throwArgumentError("missing URL","connection.url",t),c=t.url,typeof t.timeout=="number"&&t.timeout>0&&(f=t.timeout),t.headers)for(const x in t.headers)a[x.toLowerCase()]={key:x,value:String(t.headers[x])},["if-none-match","if-modified-since"].indexOf(x.toLowerCase())>=0&&(u=!0);if(l.allowGzip=!!t.allowGzip,t.user!=null&&t.password!=null){c.substring(0,6)!=="https:"&&t.allowInsecureAuthentication!==!0&&qa.throwError("basic authentication requires a secure https url",ce.errors.INVALID_ARGUMENT,{argument:"url",url:c,user:t.user,password:"[REDACTED]"});const x=t.user+":"+t.password;a.authorization={key:"Authorization",value:"Basic "+S7(ii(x))}}t.skipFetchSetup!=null&&(l.skipFetchSetup=!!t.skipFetchSetup),t.fetchOptions!=null&&(l.fetchOptions=bi(t.fetchOptions))}const d=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),p=c?c.match(d):null;if(p)try{const x={statusCode:200,statusMessage:"OK",headers:{"content-type":p[1]||"text/plain"},body:p[2]?A7(p[3]):GDe(p[3])};let C=x.body;return r&&(C=r(x.body,x)),Promise.resolve(C)}catch(x){qa.throwError("processing response error",ce.errors.SERVER_ERROR,{body:nf(p[1],p[2]),error:x,requestBody:null,requestMethod:"GET",url:c})}e&&(l.method="POST",l.body=e,a["content-type"]==null&&(a["content-type"]={key:"Content-Type",value:"application/octet-stream"}),a["content-length"]==null&&(a["content-length"]={key:"Content-Length",value:String(e.length)}));const h={};Object.keys(a).forEach(x=>{const C=a[x];h[C.key]=C.value}),l.headers=h;const g=function(){let x=null;return{promise:new Promise(function(L,P){f&&(x=setTimeout(()=>{x!=null&&(x=null,P(qa.makeError("timeout",ce.errors.TIMEOUT,{requestBody:nf(l.body,h["content-type"]),requestMethod:l.method,timeout:f,url:c})))},f))}),cancel:function(){x!=null&&(clearTimeout(x),x=null)}}}(),y=function(){return KDe(this,void 0,void 0,function*(){for(let x=0;x<n;x++){let C=null;try{if(C=yield VDe(c,l),x<n){if(C.statusCode===301||C.statusCode===302){const L=C.headers.location||"";if(l.method==="GET"&&L.match(/^https:/)){c=C.headers.location;continue}}else if(C.statusCode===429){let L=!0;if(i&&(L=yield i(x,c)),L){let P=0;const z=C.headers["retry-after"];typeof z=="string"&&z.match(/^[1-9][0-9]*$/)?P=parseInt(z)*1e3:P=s*parseInt(String(Math.random()*Math.pow(2,x))),yield bL(P);continue}}}}catch(L){C=L.response,C==null&&(g.cancel(),qa.throwError("missing response",ce.errors.SERVER_ERROR,{requestBody:nf(l.body,h["content-type"]),requestMethod:l.method,serverError:L,url:c}))}let _=C.body;if(u&&C.statusCode===304?_=null:!o&&(C.statusCode<200||C.statusCode>=300)&&(g.cancel(),qa.throwError("bad response",ce.errors.SERVER_ERROR,{status:C.statusCode,headers:C.headers,body:nf(_,C.headers?C.headers["content-type"]:null),requestBody:nf(l.body,h["content-type"]),requestMethod:l.method,url:c})),r)try{const L=yield r(_,C);return g.cancel(),L}catch(L){if(L.throttleRetry&&x<n){let P=!0;if(i&&(P=yield i(x,c)),P){const z=s*parseInt(String(Math.random()*Math.pow(2,x)));yield bL(z);continue}}g.cancel(),qa.throwError("processing response error",ce.errors.SERVER_ERROR,{body:nf(_,C.headers?C.headers["content-type"]:null),error:L,requestBody:nf(l.body,h["content-type"]),requestMethod:l.method,url:c})}return g.cancel(),_}return qa.throwError("failed response",ce.errors.SERVER_ERROR,{requestBody:nf(l.body,h["content-type"]),requestMethod:l.method,url:c})})}();return Promise.race([g.promise,y])}function n5(t,e,r){let n=(s,o)=>{let a=null;if(s!=null)try{a=JSON.parse(xd(s))}catch(c){qa.throwError("invalid JSON",ce.errors.SERVER_ERROR,{body:s,error:c})}return r&&(a=r(a,o)),a},i=null;if(e!=null){i=ii(e);const s=typeof t=="string"?{url:t}:bi(t);s.headers?Object.keys(s.headers).filter(a=>a.toLowerCase()==="content-type").length!==0||(s.headers=bi(s.headers),s.headers["content-type"]="application/json"):s.headers={"content-type":"application/json"},t=s}return UK(t,i,n)}function vp(t,e){return e||(e={}),e=bi(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(r,n){let i=null,s=!1;const o=()=>s?!1:(s=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{o()&&n(new Error("timeout"))},e.timeout));const a=e.retryLimit;let c=0;
2981function l(){return t().then(function(u){if(u!==void 0)o()&&r(u);else if(e.oncePoll)e.oncePoll.once("poll",l);else if(e.onceBlock)e.onceBlock.once("block",l);else if(!s){if(c++,c>a){o()&&n(new Error("retry limit reached"));return}let f=e.interval*parseInt(String(Math.random()*Math.pow(2,c)));f<e.floor&&(f=e.floor),f>e.ceiling&&(f=e.ceiling),setTimeout(l,f)}return null},function(u){o()&&n(u)})}l()})}const YDe=Object.freeze(Object.defineProperty({__proto__:null,_fetchData:UK,fetchJson:n5,poll:vp},Symbol.toStringTag,{value:"Module"}));var E4="qpzry9x8gf2tvdw0s3jn54khce6mua7l",gA={};for(var Ww=0;Ww<E4.length;Ww++){var B6=E4.charAt(Ww);if(gA[B6]!==void 0)throw new TypeError(B6+" is ambiguous");gA[B6]=Ww}function Fp(t){var e=t>>25;return(t&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function BK(t){for(var e=1,r=0;r<t.length;++r){var n=t.charCodeAt(r);if(n<33||n>126)return"Invalid prefix ("+t+")";e=Fp(e)^n>>5}for(e=Fp(e),r=0;r<t.length;++r){var i=t.charCodeAt(r);e=Fp(e)^i&31}return e}function ZDe(t,e,r){if(r=r||90,t.length+7+e.length>r)throw new TypeError("Exceeds length limit");t=t.toLowerCase();var n=BK(t);if(typeof n=="string")throw new Error(n);for(var i=t+"1",s=0;s<e.length;++s){var o=e[s];if(o>>5)throw new Error("Non 5-bit word");n=Fp(n)^o,i+=E4.charAt(o)}for(s=0;s<6;++s)n=Fp(n);for(n^=1,s=0;s<6;++s){var a=n>>(5-s)*5&31;i+=E4.charAt(a)}return i}function FK(t,e){if(e=e||90,t.length<8)return t+" too short";if(t.length>e)return"Exceeds length limit";var r=t.toLowerCase(),n=t.toUpperCase();if(t!==r&&t!==n)return"Mixed-case string "+t;t=r;var i=t.lastIndexOf("1");if(i===-1)return"No separator character for "+t;if(i===0)return"Missing prefix for "+t;var s=t.slice(0,i),o=t.slice(i+1);if(o.length<6)return"Data too short";var a=BK(s);if(typeof a=="string")return a;for(var c=[],l=0;l<o.length;++l){var u=o.charAt(l),f=gA[u];if(f===void 0)return"Unknown character "+u;a=Fp(a)^f,!(l+6>=o.length)&&c.push(f)}return a!==1?"Invalid checksum for "+t:{prefix:s,words:c}}function JDe(){var t=FK.apply(null,arguments);if(typeof t=="object")return t}function QDe(t){var e=FK.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function i5(t,e,r,n){for(var i=0,s=0,o=(1<<r)-1,a=[],c=0;c<t.length;++c)for(i=i<<e|t[c],s+=e;s>=r;)s-=r,a.push(i>>s&o);if(n)s>0&&a.push(i<<r-s&o);else{if(s>=e)return"Excess padding";if(i<<r-s&o)return"Non-zero padding"}return a}function XDe(t){var e=i5(t,8,5,!0);if(Array.isArray(e))return e}function eLe(t){var e=i5(t,8,5,!0);if(Array.isArray(e))return e;throw new Error(e)}function tLe(t){var e=i5(t,5,8,!1);if(Array.isArray(e))return e}function rLe(t){var e=i5(t,5,8,!1);if(Array.isArray(e))return e;throw new Error(e)}var nLe={decodeUnsafe:JDe,decode:QDe,encode:ZDe,toWordsUnsafe:XDe,toWords:eLe,fromWordsUnsafe:tLe,fromWords:rLe};const wL=is(nLe),s5="providers/5.8.0",D1=new ce(s5);class ft{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){const e={},r=this.address.bind(this),n=this.bigNumber.bind(this),i=this.blockTag.bind(this),s=this.data.bind(this),o=this.hash.bind(this),a=this.hex.bind(this),c=this.number.bind(this),l=this.type.bind(this),u=f=>this.data(f,!0);return e.transaction={hash:o,type:l,accessList:ft.allowNull(this.accessList.bind(this),null),blockHash:ft.allowNull(o,null),blockNumber:ft.allowNull(c,null),transactionIndex:ft.allowNull(c,null),confirmations:ft.allowNull(c,null),from:r,gasPrice:ft.allowNull(n),maxPriorityFeePerGas:ft.allowNull(n),maxFeePerGas:ft.allowNull(n),gasLimit:n,to:ft.allowNull(r,null),value:n,nonce:c,data:s,r:ft.allowNull(this.uint256),s:ft.allowNull(this.uint256),v:ft.allowNull(c),creates:ft.allowNull(r,null),raw:ft.allowNull(s)},e.transactionRequest={from:ft.allowNull(r),nonce:ft.allowNull(c),gasLimit:ft.allowNull(n),gasPrice:ft.allowNull(n),maxPriorityFeePerGas:ft.allowNull(n),maxFeePerGas:ft.allowNull(n),to:ft.allowNull(r),value:ft.allowNull(n),data:ft.allowNull(u),type:ft.allowNull(c),accessList:ft.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:c,blockNumber:c,transactionHash:o,address:r,topics:ft.arrayOf(o),data:s,logIndex:c,blockHash:o},e.receipt={to:ft.allowNull(this.address,null),from:ft.allowNull(this.address,null),
2981contractAddress:ft.allowNull(r,null),transactionIndex:c,root:ft.allowNull(a),gasUsed:n,logsBloom:ft.allowNull(s),blockHash:o,transactionHash:o,logs:ft.arrayOf(this.receiptLog.bind(this)),blockNumber:c,confirmations:ft.allowNull(c,null),cumulativeGasUsed:n,effectiveGasPrice:ft.allowNull(n),status:ft.allowNull(c),type:l},e.block={hash:ft.allowNull(o),parentHash:o,number:c,timestamp:c,nonce:ft.allowNull(a),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:ft.allowNull(r),extraData:s,transactions:ft.allowNull(ft.arrayOf(o)),baseFeePerGas:ft.allowNull(n)},e.blockWithTransactions=bi(e.block),e.blockWithTransactions.transactions=ft.allowNull(ft.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:ft.allowNull(i,void 0),toBlock:ft.allowNull(i,void 0),blockHash:ft.allowNull(o,void 0),address:ft.allowNull(r,void 0),topics:ft.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:ft.allowNull(c),blockHash:ft.allowNull(o),transactionIndex:c,removed:ft.allowNull(this.boolean.bind(this)),address:r,data:ft.allowFalsish(s,"0x"),topics:ft.arrayOf(o),transactionHash:o,logIndex:c},e}accessList(e){return f0(e||[])}number(e){return e==="0x"?0:De.from(e).toNumber()}type(e){return e==="0x"||e==null?0:De.from(e).toNumber()}bigNumber(e){return De.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,r){return typeof e=="string"&&(!r&&e.substring(0,2)!=="0x"&&(e="0x"+e),Cr(e))?e.toLowerCase():D1.throwArgumentError("invalid hash","value",e)}data(e,r){const n=this.hex(e,r);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return ln(e)}callAddress(e){if(!Cr(e,32))return null;const r=ln(ci(e,12));return r===Uke?null:r}contractAddress(e){return x7(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||Cr(e))return qx(e);throw new Error("invalid blockTag")}hash(e,r){const n=this.hex(e,r);return yl(n)!==32?D1.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;const r=De.from(e);try{return r.toNumber()}catch{}return null}uint256(e){if(!Cr(e))throw new Error("invalid uint256");return bn(e,32)}_block(e,r){e.author!=null&&e.miner==null&&(e.miner=e.author);const n=e._difficulty!=null?e._difficulty:e.difficulty,i=ft.check(r,e);return i._difficulty=n==null?null:De.from(n),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return ft.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&De.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);const r=ft.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;Cr(n)&&(n=De.from(n).toNumber()),r.chainId=n}else{let n=e.networkId;n==null&&r.v==null&&(n=e.chainId),Cr(n)&&(n=De.from(n).toNumber()),typeof n!="number"&&r.v!=null&&(n=(r.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),r.chainId=n}return r.blockHash&&r.blockHash.replace(/0/g,"")==="x"&&(r.blockHash=null),r}transaction(e){return vK(e)}receiptLog(e){return ft.check(this.formats.receiptLog,e)}receipt(e){const r=ft.check(this.formats.receipt,e);if(r.root!=null)if(r.root.length<=4){const n=De.from(r.root).toNumber();n===0||n===1?(r.status!=null&&r.status!==n&&D1.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=n,delete r.root):D1.throwArgumentError("invalid alt-root-status","value.root",r.root)}else r.root.length!==66&&D1.throwArgumentError("invalid root hash","value.root",r.root);return r.status!=null&&(r.byzantium=!0),r}topics(e){return Array.isArray(e)?e.map(r=>this.topics(r)):e!=null?this.hash(e,!0):null}filter(e){return ft.check(this.formats.filter,e)}filterLog(e){return ft.check(this.formats.filterLog,e)}static check(e,r){const n={};for(const i in e)try{const s=e[i](r[i]);s!==void 0&&(n[i]=s)}catch(s){throw s.checkKey=i,s.checkValue=r[i],s}return n}static allowNull(e,r){return function(n){return n==null?r:e(n)}}static allowFalsish(e,r){return function(n){return n?e(n):r}}static arrayOf(e){return function(r){if(!Array.isArray(r))throw new Error("not an array");const n=[];return r.forEach(function(i){n.push(e(i))}),n}}}var qt=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const fr=new ce(s5),iLe=10;function vL(t){return t==null?"null":(yl(t)!==32&&fr.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function xL(t){for(t=t.slice();t.length>0&&t[t.length-1]==null;)t.pop();return t.map(e=>{if(Array.isArray(e)){const r={};e.forEach(i=>
2981{r[vL(i)]=!0});const n=Object.keys(r);return n.sort(),n.join("|")}else return vL(e)}).join("&")}function sLe(t){return t===""?[]:t.split(/&/g).map(e=>{if(e==="")return[];const r=e.split("|").map(n=>n==="null"?null:n);return r.length===1?r[0]:r})}function j0(t){if(typeof t=="string"){if(t=t.toLowerCase(),yl(t)===32)return"tx:"+t;if(t.indexOf(":")===-1)return t}else{if(Array.isArray(t))return"filter:*:"+xL(t);if(QPe.isForkEvent(t))throw fr.warn("not implemented"),new Error("not implemented");if(t&&typeof t=="object")return"filter:"+(t.address||"*")+":"+xL(t.topics||[])}throw new Error("invalid event - "+t)}function L1(){return new Date().getTime()}function EL(t){return new Promise(e=>{setTimeout(e,t)})}const oLe=["block","network","pending","poll"];let aLe=class{constructor(e,r,n){we(this,"tag",e),we(this,"listener",r),we(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){const e=this.tag.split(":");if(e[0]!=="filter")return null;const r=e[1],n=sLe(e[2]),i={};return n.length>0&&(i.topics=n),r&&r!=="*"&&(i.address=r),i}pollable(){return this.tag.indexOf(":")>=0||oLe.indexOf(this.tag)>=0}};const cLe={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function F6(t){return bn(De.from(t).toHexString(),32)}function CL(t){return vg.encode(Cn([t,ci(_u(_u(t)),0,4)]))}const jK=new RegExp("^(ipfs)://(.*)$","i"),_L=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),jK,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Lv(t,e){try{return xd(ky(t,e))}catch{}return null}function ky(t,e){if(t==="0x")return null;const r=De.from(ci(t,e,e+32)).toNumber(),n=De.from(ci(t,r,r+32)).toNumber();return ci(t,r+32,r+32+n)}function j6(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):fr.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function AL(t){const e=Se(t);if(e.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(e,32-e.length),r}function lLe(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}function zK(t){const e=[];let r=0;for(let n=0;n<t.length;n++)e.push(null),r+=32;for(let n=0;n<t.length;n++){const i=Se(t[n]);e[n]=AL(r),e.push(AL(i.length)),e.push(lLe(i)),r+=32+Math.ceil(i.length/32)*32}return Fs(e)}class SL{constructor(e,r,n,i){we(this,"provider",e),we(this,"name",n),we(this,"address",e.formatter.address(r)),we(this,"_resolvedAddress",i)}supportsWildcard(){return this._supportsEip2544||(this._supportsEip2544=this.provider.call({to:this.address,data:"0x01ffc9a79061b92300000000000000000000000000000000000000000000000000000000"}).then(e=>De.from(e).eq(1)).catch(e=>{if(e.code===ce.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,r){return qt(this,void 0,void 0,function*(){const n={to:this.address,ccipReadEnabled:!0,data:Fs([e,Gm(this.name),r||"0x"])};let i=!1;(yield this.supportsWildcard())&&(i=!0,n.data=Fs(["0x9061b923",zK([jV(this.name),n.data])]));try{let s=yield this.provider.call(n);return Se(s).length%32===4&&fr.throwError("resolver threw error",ce.errors.CALL_EXCEPTION,{transaction:n,data:s}),i&&(s=ky(s,0)),s}catch(s){if(s.code===ce.errors.CALL_EXCEPTION)return null;throw s}})}_fetchBytes(e,r){return qt(this,void 0,void 0,function*(){const n=yield this._fetch(e,r);return n!=null?ky(n,0):null})}_getAddress(e,r){const n=cLe[String(e)];if(n==null&&fr.throwError(`unsupported coin type: ${e}`,ce.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(r);const i=Se(r);if(n.p2pkh!=null){const s=r.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(s){const o=parseInt(s[1],16);if(s[2].length===o*2&&o>=1&&o<=75)return CL(Cn([[n.p2pkh],"0x"+s[2]]))}}if(n.p2sh!=null){const s=r.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(s){const o=parseInt(s[1],16);if(s[2].length===o*2&&o>=1&&o<=75)return CL(Cn([[n.p2sh],"0x"+s[2]]))}}if(n.prefix!=null){const s=i[1];let o=i[0];
2981if(o===0?s!==20&&s!==32&&(o=-1):o=-1,o>=0&&i.length===2+s&&s>=1&&s<=75){const a=wL.toWords(i.slice(2));return a.unshift(o),wL.encode(n.prefix,a)}}return null}getAddress(e){return qt(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{const i=yield this._fetch("0x3b3b57de");return i==="0x"||i===IV?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===ce.errors.CALL_EXCEPTION)return null;throw i}const r=yield this._fetchBytes("0xf1cb7e06",F6(e));if(r==null||r==="0x")return null;const n=this._getAddress(e,r);return n==null&&fr.throwError("invalid or unsupported coin data",ce.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:r}),n})}getAvatar(){return qt(this,void 0,void 0,function*(){const e=[{type:"name",content:this.name}];try{const r=yield this.getText("avatar");if(r==null)return null;for(let n=0;n<_L.length;n++){const i=r.match(_L[n]);if(i==null)continue;const s=i[1].toLowerCase();switch(s){case"https":return e.push({type:"url",content:r}),{linkage:e,url:r};case"data":return e.push({type:"data",content:r}),{linkage:e,url:r};case"ipfs":return e.push({type:"ipfs",content:r}),{linkage:e,url:j6(r)};case"erc721":case"erc1155":{const o=s==="erc721"?"0xc87b56dd":"0x0e89341c";e.push({type:s,content:r});const a=this._resolvedAddress||(yield this.getAddress()),c=(i[2]||"").split("/");if(c.length!==2)return null;const l=yield this.provider.formatter.address(c[0]),u=bn(De.from(c[1]).toHexString(),32);if(s==="erc721"){const g=this.provider.formatter.callAddress(yield this.provider.call({to:l,data:Fs(["0x6352211e",u])}));if(a!==g)return null;e.push({type:"owner",content:g})}else if(s==="erc1155"){const g=De.from(yield this.provider.call({to:l,data:Fs(["0x00fdd58e",bn(a,32),u])}));if(g.isZero())return null;e.push({type:"balance",content:g.toString()})}const f={to:this.provider.formatter.address(c[0]),data:Fs([o,u])};let d=Lv(yield this.provider.call(f),0);if(d==null)return null;e.push({type:"metadata-url-base",content:d}),s==="erc1155"&&(d=d.replace("{id}",u.substring(2)),e.push({type:"metadata-url-expanded",content:d})),d.match(/^ipfs:/i)&&(d=j6(d)),e.push({type:"metadata-url",content:d});const p=yield n5(d);if(!p)return null;e.push({type:"metadata",content:JSON.stringify(p)});let h=p.image;if(typeof h!="string")return null;if(!h.match(/^(https:\/\/|data:)/i)){if(h.match(jK)==null)return null;e.push({type:"url-ipfs",content:h}),h=j6(h)}return e.push({type:"url",content:h}),{linkage:e,url:h}}}}}catch{}return null})}getContentHash(){return qt(this,void 0,void 0,function*(){const e=yield this._fetchBytes("0xbc1c58d1");if(e==null||e==="0x")return null;const r=e.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(r){const o=parseInt(r[3],16);if(r[4].length===o*2)return"ipfs://"+vg.encode("0x"+r[1])}const n=e.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(n){const o=parseInt(n[3],16);if(n[4].length===o*2)return"ipns://"+vg.encode("0x"+n[1])}const i=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(i&&i[1].length===32*2)return"bzz://"+i[1];const s=e.match(/^0x90b2c605([0-9a-f]*)$/);if(s&&s[1].length===34*2){const o={"=":"","+":"-","/":"_"};return"sia://"+S7("0x"+s[1]).replace(/[=+\/]/g,c=>o[c])}return fr.throwError("invalid or unsupported content hash data",ce.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return qt(this,void 0,void 0,function*(){let r=ii(e);r=Cn([F6(64),F6(r.length),r]),r.length%32!==0&&(r=Cn([r,bn("0x",32-e.length%32)]));const n=yield this._fetchBytes("0x59d1d43c",$e(r));return n==null||n==="0x"?null:xd(n)})}}let z6=null,uLe=1;class fLe extends xb{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),we(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(r=>{}),this._ready().catch(r=>{});else{const r=ic(new.target,"getNetwork")(e);r?(we(this,"_network",r),this.emit("network",r,null)):fr.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return qt(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||fr.throwError("no network detected",ce.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:we(this,"_network",e),this.emit
2981("network",e,null))}return this._network})}get ready(){return vp(()=>this._ready().then(e=>e,e=>{if(!(e.code===ce.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return z6==null&&(z6=new ft),z6}static getNetwork(e){return WDe(e??"homestead")}ccipReadFetch(e,r,n){return qt(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;const i=e.to.toLowerCase(),s=r.toLowerCase(),o=[];for(let a=0;a<n.length;a++){const c=n[a],l=c.replace("{sender}",i).replace("{data}",s),u=c.indexOf("{data}")>=0?null:JSON.stringify({data:s,sender:i}),f=yield n5({url:l,errorPassThrough:!0},u,(p,h)=>(p.status=h.statusCode,p));if(f.data)return f.data;const d=f.message||"unknown error";if(f.status>=400&&f.status<500)return fr.throwError(`response not found during CCIP fetch: ${d}`,ce.errors.SERVER_ERROR,{url:c,errorMessage:d});o.push(d)}return fr.throwError(`error encountered during CCIP fetch: ${o.map(a=>JSON.stringify(a)).join(", ")}`,ce.errors.SERVER_ERROR,{urls:n,errorMessages:o})})}_getInternalBlockNumber(e){return qt(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const i=this._internalBlockNumber;try{const s=yield i;if(L1()-s.respTime<=e)return s.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}const r=L1(),n=ti({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:s})=>{if(s)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),s;const o=L1();return i=De.from(i).toNumber(),i<this._maxInternalBlockNumber&&(i=this._maxInternalBlockNumber),this._maxInternalBlockNumber=i,this._setFastBlockNumber(i),{blockNumber:i,reqTime:r,respTime:o}});return this._internalBlockNumber=n,n.catch(i=>{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return qt(this,void 0,void 0,function*(){const e=uLe++,r=[];let n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)fr.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",fr.makeError("network block skew detected",ce.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let i=this._emitted.block+1;i<=n;i++)this.emit("block",i);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;const s=this._emitted[i];s!=="pending"&&n-s>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(i=>{switch(i.type){case"tx":{const s=i.hash;let o=this.getTransactionReceipt(s).then(a=>(!a||a.blockNumber==null||(this._emitted["t:"+s]=a.blockNumber,this.emit(s,a)),null)).catch(a=>{this.emit("error",a)});r.push(o);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=n-1);const s=i.filter;s.fromBlock=i._lastBlockNumber+1,s.toBlock=n;const o=s.toBlock-this._maxFilterBlockRange;o>s.fromBlock&&(s.fromBlock=o),s.fromBlock<0&&(s.fromBlock=0);const a=this.getLogs(s).then(c=>{i._inflight=!1,c.length!==0&&c.forEach(l=>{l.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=l.blockNumber),this._emitted["b:"+l.blockHash]=l.blockNumber,this._emitted["t:"+l.transactionHash]=l.blockNumber,this.emit(s,l)})}).catch(c=>{this.emit("error",c),i._inflight=!1});r.push(a)}break}}}),this._lastBlockNumber=n,Promise.all(r).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return qt(this,void 0,void 0,function*(){return fr.throwError("provider does not support network detection",ce.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return qt(this,void 0,void 0,function*(){const e=yield this._ready(),r=yield this.detectNetwork();if(e.chainId!==r.chainId){if(this.anyNetwork)return this._network=r,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit
2981("network",r,e),yield EL(0),this._network;const n=fr.makeError("underlying network changed",ce.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:r});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){const e=L1();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(r=>((this._fastBlockNumber==null||r>this._fastBlockNumber)&&(this._fastBlockNumber=r),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&e<this._fastBlockNumber||(this._fastQueryDate=L1(),(this._fastBlockNumber==null||e>this._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,r,n){return qt(this,void 0,void 0,function*(){return this._waitForTransaction(e,r??1,n||0,null)})}_waitForTransaction(e,r,n,i){return qt(this,void 0,void 0,function*(){const s=yield this.getTransactionReceipt(e);return(s?s.confirmations:0)>=r?s:new Promise((o,a)=>{const c=[];let l=!1;const u=function(){return l?!0:(l=!0,c.forEach(d=>{d()}),!1)},f=d=>{d.confirmations<r||u()||o(d)};if(this.on(e,f),c.push(()=>{this.removeListener(e,f)}),i){let d=i.startBlock,p=null;const h=g=>qt(this,void 0,void 0,function*(){l||(yield EL(1e3),this.getTransactionCount(i.from).then(y=>qt(this,void 0,void 0,function*(){if(!l){if(y<=i.nonce)d=g;else{{const x=yield this.getTransaction(e);if(x&&x.blockNumber!=null)return}for(p==null&&(p=d-3,p<i.startBlock&&(p=i.startBlock));p<=g;){if(l)return;const x=yield this.getBlockWithTransactions(p);for(let C=0;C<x.transactions.length;C++){const _=x.transactions[C];if(_.hash===e)return;if(_.from===i.from&&_.nonce===i.nonce){if(l)return;const L=yield this.waitForTransaction(_.hash,r);if(u())return;let P="replaced";_.data===i.data&&_.to===i.to&&_.value.eq(i.value)?P="repriced":_.data==="0x"&&_.from===_.to&&_.value.isZero()&&(P="cancelled"),a(fr.makeError("transaction was replaced",ce.errors.TRANSACTION_REPLACED,{cancelled:P==="replaced"||P==="cancelled",reason:P,replacement:this._wrapTransaction(_),hash:e,receipt:L}));return}}p++}}l||this.once("block",h)}}),y=>{l||this.once("block",h)}))});if(l)return;this.once("block",h),c.push(()=>{this.removeListener("block",h)})}if(typeof n=="number"&&n>0){const d=setTimeout(()=>{u()||a(fr.makeError("timeout exceeded",ce.errors.TIMEOUT,{timeout:n}))},n);d.unref&&d.unref(),c.push(()=>{clearTimeout(d)})}})})}getBlockNumber(){return qt(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return qt(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return De.from(e)}catch(r){return fr.throwError("bad result from backend",ce.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:r})}})}getBalance(e,r){return qt(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield ti({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getBalance",n);try{return De.from(i)}catch(s){return fr.throwError("bad result from backend",ce.errors.SERVER_ERROR,{method:"getBalance",params:n,result:i,error:s})}})}getTransactionCount(e,r){return qt(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield ti({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getTransactionCount",n);try{return De.from(i).toNumber()}catch(s){return fr.throwError("bad result from backend",ce.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:i,error:s})}})}getCode(e,r){return qt(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield ti({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getCode",n);try{return $e(i)}catch(s){return fr.throwError("bad result from backend",ce.errors.SERVER_ERROR,{method:"getCode",params:n,result:i,error:s})}})}getStorageAt(e,r,n){return qt(this,void 0,void 0,function*(){yield this.getNetwork();const i=yield ti({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Prom
2981ise.resolve(r).then(o=>qx(o))}),s=yield this.perform("getStorageAt",i);try{return $e(s)}catch(o){return fr.throwError("bad result from backend",ce.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:s,error:o})}})}_wrapTransaction(e,r,n){if(r!=null&&yl(r)!==32)throw new Error("invalid response - sendTransaction");const i=e;return r!=null&&e.hash!==r&&fr.throwError("Transaction hash mismatch from Provider.sendTransaction.",ce.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:r}),i.wait=(s,o)=>qt(this,void 0,void 0,function*(){s==null&&(s=1),o==null&&(o=0);let a;s!==0&&n!=null&&(a={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});const c=yield this._waitForTransaction(e.hash,s,o,a);return c==null&&s===0?null:(this._emitted["t:"+e.hash]=c.blockNumber,c.status===0&&fr.throwError("transaction failed",ce.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:c}),c)}),i}sendTransaction(e){return qt(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Promise.resolve(e).then(s=>$e(s)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);const i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const s=yield this.perform("sendTransaction",{signedTransaction:r});return this._wrapTransaction(n,s,i)}catch(s){throw s.transaction=n,s.transactionHash=n.hash,s}})}_getTransactionRequest(e){return qt(this,void 0,void 0,function*(){const r=yield e,n={};return["from","to"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s?this._getAddress(s):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s?De.from(s):null))}),["type"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s??null))}),r.accessList&&(n.accessList=this.formatter.accessList(r.accessList)),["data"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s?$e(s):null))}),this.formatter.transactionRequest(yield ti(n))})}_getFilter(e){return qt(this,void 0,void 0,function*(){e=yield e;const r={};return e.address!=null&&(r.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(r[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(r[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield ti(r))})}_call(e,r,n){return qt(this,void 0,void 0,function*(){n>=iLe&&fr.throwError("CCIP read exceeded maximum redirections",ce.errors.SERVER_ERROR,{redirects:n,transaction:e});const i=e.to,s=yield this.perform("call",{transaction:e,blockTag:r});if(n>=0&&r==="latest"&&i!=null&&s.substring(0,10)==="0x556f1830"&&yl(s)%32===4)try{const o=ci(s,4),a=ci(o,0,32);De.from(a).eq(i)||fr.throwError("CCIP Read sender did not match",ce.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:s});const c=[],l=De.from(ci(o,32,64)).toNumber(),u=De.from(ci(o,l,l+32)).toNumber(),f=ci(o,l+32);for(let x=0;x<u;x++){const C=Lv(f,x*32);C==null&&fr.throwError("CCIP Read contained corrupt URL string",ce.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:s}),c.push(C)}const d=ky(o,64);De.from(ci(o,100,128)).isZero()||fr.throwError("CCIP Read callback selector included junk",ce.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:s});const p=ci(o,96,100),h=ky(o,128),g=yield this.ccipReadFetch(e,d,c);g==null&&fr.throwError("CCIP Read disabled or provided no URLs",ce.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:s});const y={to:i,data:Fs([p,zK([g,h])])};return this._call(y,r,n+1)}catch(o){if(o.code===ce.errors.SERVER_ERROR)throw o}try{return $e(s)}catch(o){return fr.throwError("bad result from backend",ce.errors.SERVER_ERROR,{method:"call",params:{transaction:e,blockTag:r},result:s,error:o})}})}call(e,r){return qt(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield ti({transaction:this._getTransactionRequest(e),blockTag:this._getBlockTag(r),ccipReadEnabled:Promise.resolve(e.cci
2981pReadEnabled)});return this._call(n.transaction,n.blockTag,n.ccipReadEnabled?0:-1)})}estimateGas(e){return qt(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield ti({transaction:this._getTransactionRequest(e)}),n=yield this.perform("estimateGas",r);try{return De.from(n)}catch(i){return fr.throwError("bad result from backend",ce.errors.SERVER_ERROR,{method:"estimateGas",params:r,result:n,error:i})}})}_getAddress(e){return qt(this,void 0,void 0,function*(){e=yield e,typeof e!="string"&&fr.throwArgumentError("invalid address or ENS name","name",e);const r=yield this.resolveName(e);return r==null&&fr.throwError("ENS name not configured",ce.errors.UNSUPPORTED_OPERATION,{operation:`resolveName(${JSON.stringify(e)})`}),r})}_getBlock(e,r){return qt(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let n=-128;const i={includeTransactions:!!r};if(Cr(e,32))i.blockHash=e;else try{i.blockTag=yield this._getBlockTag(e),Cr(i.blockTag)&&(n=parseInt(i.blockTag.substring(2),16))}catch{fr.throwArgumentError("invalid block hash or block tag","blockHashOrBlockTag",e)}return vp(()=>qt(this,void 0,void 0,function*(){const s=yield this.perform("getBlock",i);if(s==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&n>this._emitted.block?null:void 0;if(r){let o=null;for(let c=0;c<s.transactions.length;c++){const l=s.transactions[c];if(l.blockNumber==null)l.confirmations=0;else if(l.confirmations==null){o==null&&(o=yield this._getInternalBlockNumber(100+2*this.pollingInterval));let u=o-l.blockNumber+1;u<=0&&(u=1),l.confirmations=u}}const a=this.formatter.blockWithTransactions(s);return a.transactions=a.transactions.map(c=>this._wrapTransaction(c)),a}return this.formatter.block(s)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return qt(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return vp(()=>qt(this,void 0,void 0,function*(){const n=yield this.perform("getTransaction",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;const i=this.formatter.transactionResponse(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let o=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;o<=0&&(o=1),i.confirmations=o}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return qt(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return vp(()=>qt(this,void 0,void 0,function*(){const n=yield this.perform("getTransactionReceipt",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;const i=this.formatter.receipt(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let o=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;o<=0&&(o=1),i.confirmations=o}return i}),{oncePoll:this})})}getLogs(e){return qt(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield ti({filter:this._getFilter(e)}),n=yield this.perform("getLogs",r);return n.forEach(i=>{i.removed==null&&(i.removed=!1)}),ft.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return qt(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return qt(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&fr.throwArgumentError("invalid BlockTag","blockTag",e);let r=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return r+=e,r<0&&(r=0),this.formatter.blockTag(r)}return this.formatter.blockTag(e)})}getResolver(e){return qt(this,void 0,void 0,function*(){let r=e;for(;;){if(r===""||r==="."||e!=="eth"&&r==="eth")return null;const n=yield this._getResolver(r,"getResolver");if(n!=null){const i=new SL(this,n,e);return r!==e&&!(yield i.supportsWildcard())?null:i}r=r.split(".").slice(1).join(".")}})}_getResolver(e,r){return qt(this,void 0,void 0,function*(){r==null&&(r="ENS");const n=yield this.getNetwork();n.ensAddress||fr.throwError("network does not support ENS",ce.errors.UNSUPPORTED_OPERATION,{operation:r,network:n.name});try{const i=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+Gm(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return qt(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(Cr(e))throw n}typeof e!="string"&&fr.throwArgumentError("invalid ENS name","name",e);const r=yield this.getResolver(e);return r?yield r.getAddress():null})}lookupAddress(e){return qt(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);const r=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(r,"lookupAddress");if(n==null)return null;const i=Lv(yield this.call({to:n,data:"0x691f3431"+Gm(r).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return qt(this,void 0,void 0,function*(){let r=null;if(Cr(e)){const s=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",o=yield this._getResolver(s,"getAvatar");if(!o)return null;r=new SL(this,o,s);try{const a=yield r.getAvatar();if(a)return a.url}catch(a){if(a.code!==ce.errors.CALL_EXCEPTION)throw a}try{const a=Lv(yield this.call({to:o,data:"0x691f3431"+Gm(s).substring(2)}),0);r=yield this.getResolver(a)}catch(a){if(a.code!==ce.errors.CALL_EXCEPTION)throw a;return null}}else if(r=yield this.getResolver(e),!r)return null;const n=yield r.getAvatar();return n==null?null:n.url})}perform(e,r){return fr.throwError(e+" not implemented",ce.errors.NOT_IMPLEMENT
2981ED,{operation:e})}_startEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_addEventListener(e,r,n){const i=new aLe(j0(e),r,n);return this._events.push(i),this._startEvent(i),this}on(e,r){return this._addEventListener(e,r,!1)}once(e,r){return this._addEventListener(e,r,!0)}emit(e,...r){let n=!1,i=[],s=j0(e);return this._events=this._events.filter(o=>o.tag!==s?!0:(setTimeout(()=>{o.listener.apply(this,r)},0),n=!0,o.once?(i.push(o),!1):!0)),i.forEach(o=>{this._stopEvent(o)}),n}listenerCount(e){if(!e)return this._events.length;let r=j0(e);return this._events.filter(n=>n.tag===r).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let r=j0(e);return this._events.filter(n=>n.tag===r).map(n=>n.listener)}off(e,r){if(r==null)return this.removeAllListeners(e);const n=[];let i=!1,s=j0(e);return this._events=this._events.filter(o=>o.tag!==s||o.listener!=r||i?!0:(i=!0,n.push(o),!1)),n.forEach(o=>{this._stopEvent(o)}),this}removeAllListeners(e){let r=[];if(e==null)r=this._events,this._events=[];else{const n=j0(e);this._events=this._events.filter(i=>i.tag!==n?!0:(r.push(i),!1))}return r.forEach(n=>{this._stopEvent(n)}),this}}var Kl=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const gi=new ce(s5),dLe=["call","estimateGas"];function Zm(t,e){if(t==null)return null;if(typeof t.message=="string"&&t.message.match("reverted")){const r=Cr(t.data)?t.data:null;if(!e||r)return{message:t.message,data:r}}if(typeof t=="object"){for(const r in t){const n=Zm(t[r],e);if(n)return n}return null}if(typeof t=="string")try{return Zm(JSON.parse(t),e)}catch{}return null}function WK(t,e,r){const n=r.transaction||r.signedTransaction;if(t==="call"){const s=Zm(e,!0);if(s)return s.data;gi.throwError("missing revert data in call exception; Transaction reverted without a reason string",ce.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(t==="estimateGas"){let s=Zm(e.body,!1);s==null&&(s=Zm(e,!1)),s&&gi.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",ce.errors.UNPREDICTABLE_GAS_LIMIT,{reason:s.message,method:t,transaction:n,error:e})}let i=e.message;throw e.code===ce.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&gi.throwError("insufficient funds for intrinsic transaction cost",ce.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),i.match(/nonce (is )?too low/i)&&gi.throwError("nonce has already been used",ce.errors.NONCE_EXPIRED,{error:e,method:t,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&gi.throwError("replacement fee too low",ce.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),i.match(/only replay-protected/i)&&gi.throwError("legacy pre-eip-155 transactions not supported",ce.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),dLe.indexOf(t)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&gi.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",ce.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:n}),e}function NL(t){return new Promise(function(e){setTimeout(e,t)})}function hLe(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}function M1(t){return t&&t.toLowerCase()}const mA={};class HK extends Vg{constructor(e,r,n){if(super(),e!==mA)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");we(this,"provider",r),n==null&&(n=0),typeof n=="string"?(we(this,"_address",this.provider.formatter.address(n)),we(this,"_index",null)):typeof n=="number"?(we(this,"_index",n),we(this,"_address",null)):gi.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return gi.throwError("cannot alter JSON-RPC Signer connection",ce.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new pLe(mA,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&gi.throwError("unknown account #"+this._index,ce.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=bi(e);const r=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));
2981if(e.gasLimit==null){const n=bi(e);n.from=r,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>Kl(this,void 0,void 0,function*(){if(n==null)return null;const i=yield this.provider.resolveName(n);return i==null&&gi.throwArgumentError("provided ENS name resolves to null","tx.to",n),i}))),ti({tx:ti(e),sender:r}).then(({tx:n,sender:i})=>{n.from!=null?n.from.toLowerCase()!==i&&gi.throwArgumentError("from address mismatch","transaction",e):n.from=i;const s=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[s]).then(o=>o,o=>(typeof o.message=="string"&&o.message.match(/user denied/i)&&gi.throwError("user rejected transaction",ce.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),WK("sendTransaction",o,s)))})}signTransaction(e){return gi.throwError("signing transactions is unsupported",ce.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return Kl(this,void 0,void 0,function*(){const r=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield vp(()=>Kl(this,void 0,void 0,function*(){const i=yield this.provider.getTransaction(n);if(i!==null)return this.provider._wrapTransaction(i,n,r)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=n,i}})}signMessage(e){return Kl(this,void 0,void 0,function*(){const r=typeof e=="string"?ii(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[$e(r),n.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&gi.throwError("user rejected signing",ce.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),i}})}_legacySignMessage(e){return Kl(this,void 0,void 0,function*(){const r=typeof e=="string"?ii(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),$e(r)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&gi.throwError("user rejected signing",ce.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),i}})}_signTypedData(e,r,n){return Kl(this,void 0,void 0,function*(){const i=yield Xi.resolveNames(e,r,n,o=>this.provider.resolveName(o)),s=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[s.toLowerCase(),JSON.stringify(Xi.getPayload(i.domain,r,i.value))])}catch(o){throw typeof o.message=="string"&&o.message.match(/user denied/i)&&gi.throwError("user rejected signing",ce.errors.ACTION_REJECTED,{action:"_signTypedData",from:s,messageData:{domain:i.domain,types:r,value:i.value}}),o}})}unlock(e){return Kl(this,void 0,void 0,function*(){const r=this.provider,n=yield this.getAddress();return r.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}}class pLe extends HK{sendTransaction(e){return this.sendUncheckedTransaction(e).then(r=>({hash:r,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(r,n)}))}}const gLe={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class qK extends fLe{constructor(e,r){let n=r;n==null&&(n=new Promise((i,s)=>{setTimeout(()=>{this.detectNetwork().then(o=>{i(o)},o=>{s(o)})},0)})),super(n),e||(e=ic(this.constructor,"defaultUrl")()),typeof e=="string"?we(this,"connection",Object.freeze({url:e})):we(this,"connection",Object.freeze(bi(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return Kl(this,void 0,void 0,function*(){yield NL(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){const r=ic(this.constructor,"getNetwork");try{return r(De.from(e).toNumber())}catch(n){return gi.throwError("could not detect network",ce.errors.NETWORK_E
2981RROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return gi.throwError("could not detect network",ce.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new HK(mA,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(r=>this.formatter.address(r)))}send(e,r){const n={method:e,params:r,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:bl(n),provider:this});const i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];const s=n5(this.connection,JSON.stringify(n),hLe).then(o=>(this.emit("debug",{action:"response",request:n,response:o,provider:this}),o),o=>{throw this.emit("debug",{action:"response",error:o,request:n,provider:this}),o});return i&&(this._cache[e]=s,setTimeout(()=>{this._cache[e]=null},0)),s}prepareRequest(e,r){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[M1(r.address),r.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[M1(r.address),r.blockTag]];case"getCode":return["eth_getCode",[M1(r.address),r.blockTag]];case"getStorageAt":return["eth_getStorageAt",[M1(r.address),bn(r.position,32),r.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[r.signedTransaction]];case"getBlock":return r.blockTag?["eth_getBlockByNumber",[r.blockTag,!!r.includeTransactions]]:r.blockHash?["eth_getBlockByHash",[r.blockHash,!!r.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[r.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[r.transactionHash]];case"call":return["eth_call",[ic(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0}),r.blockTag]];case"estimateGas":return["eth_estimateGas",[ic(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0})]];case"getLogs":return r.filter&&r.filter.address!=null&&(r.filter.address=M1(r.filter.address)),["eth_getLogs",[r.filter]]}return null}perform(e,r){return Kl(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){const i=r.transaction;if(i&&i.type!=null&&De.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const s=yield this.getFeeData();s.maxFeePerGas==null&&s.maxPriorityFeePerGas==null&&(r=bi(r),r.transaction=bi(i),delete r.transaction.type)}}const n=this.prepareRequest(e,r);n==null&&gi.throwError(e+" not implemented",ce.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(i){return WK(e,i,r)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;const e=this,r=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=r,r.then(function(n){function i(){e.send("eth_getFilterChanges",[n]).then(function(s){if(e._pendingFilter!=r)return null;let o=Promise.resolve();return s.forEach(function(a){e._emitted["t:"+a.toLowerCase()]="pending",o=o.then(function(){return e.getTransaction(a).then(function(c){return e.emit("pending",c),null})})}),o.then(function(){return NL(1e3)})}).then(function(){if(e._pendingFilter!=r){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){i()},0),null}).catch(s=>{})}return i(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,r){const n=bi(gLe);if(r)for(const s in r)r[s]&&(n[s]=!0);b7(e,n);const i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(s){if(e[s]==null)return;const o=qx(De.from(e[s]));s==="gasLimit"&&(s="gas"),i[s]=o}),["from","to","data"].forEach(function(s){e[s]!=null&&(i[s]=$e(e[s]))}),e.accessList&&(i.accessList=f0(e.accessList)),i}}const IL=new ce(s5);let mLe=1;function TL(t,e){const r="Web3LegacyFetcher";return function(n,i){const s={method:n,params:i,id:mLe++,jsonrpc:"2.0"};return new Promise((o,a)=>{this.emit("debug",{action:"request",fetcher:r,request:bl(s),provider:this}),e(s,(c,l)=>
2981{if(c)return this.emit("debug",{action:"response",fetcher:r,error:c,request:s,provider:this}),a(c);if(this.emit("debug",{action:"response",fetcher:r,request:s,response:l,provider:this}),l.error){const u=new Error(l.error.message);return u.code=l.error.code,u.data=l.error.data,a(u)}o(l.result)})})}}function yLe(t){return function(e,r){r==null&&(r=[]);const n={method:e,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:bl(n),provider:this}),t.request(n).then(i=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:i,provider:this}),i),i=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:i,provider:this}),i})}}class W6 extends qK{constructor(e,r){e==null&&IL.throwArgumentError("missing provider","provider",e);let n=null,i=null,s=null;typeof e=="function"?(n="unknown:",i=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),s=e,e.request?(n===""&&(n="eip-1193:"),i=yLe(e)):e.sendAsync?i=TL(e,e.sendAsync.bind(e)):e.send?i=TL(e,e.send.bind(e)):IL.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,r),we(this,"jsonRpcFetchFunc",i),we(this,"provider",s)}send(e,r){return this.jsonRpcFetchFunc(e,r)}}const bLe="solidity/5.8.0",wLe=new RegExp("^bytes([0-9]+)$"),vLe=new RegExp("^(u?int)([0-9]*)$"),xLe=new RegExp("^(.*)\\[([0-9]*)\\]$"),ELe="0000000000000000000000000000000000000000000000000000000000000000",J0=new ce(bLe);function VK(t,e,r){switch(t){case"address":return r?qm(e,32):Se(e);case"string":return ii(e);case"bytes":return Se(e);case"bool":return e=e?"0x01":"0x00",r?qm(e,32):Se(e)}let n=t.match(vLe);if(n){let i=parseInt(n[2]||"256");return(n[2]&&String(i)!==n[2]||i%8!==0||i===0||i>256)&&J0.throwArgumentError("invalid number type","type",t),r&&(i=256),e=De.from(e).toTwos(i),qm(e,i/8)}if(n=t.match(wLe),n){const i=parseInt(n[1]);return(String(i)!==n[1]||i===0||i>32)&&J0.throwArgumentError("invalid bytes type","type",t),Se(e).byteLength!==i&&J0.throwArgumentError(`invalid value for ${t}`,"value",e),r?Se((e+ELe).substring(0,66)):e}if(n=t.match(xLe),n&&Array.isArray(e)){const i=n[1];parseInt(n[2]||String(e.length))!=e.length&&J0.throwArgumentError(`invalid array length for ${t}`,"value",e);const o=[];return e.forEach(function(a){o.push(VK(i,a,!0))}),Cn(o)}return J0.throwArgumentError("invalid type","type",t)}function F7(t,e){t.length!=e.length&&J0.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);const r=[];return t.forEach(function(n,i){r.push(VK(n,e[i]))}),$e(Cn(r))}function CLe(t,e){return dn(F7(t,e))}function _Le(t,e){return _u(F7(t,e))}const ALe=Object.freeze(Object.defineProperty({__proto__:null,keccak256:CLe,pack:F7,sha256:_Le},Symbol.toStringTag,{value:"Module"})),SLe="units/5.8.0",KK=new ce(SLe),GK=["wei","kwei","mwei","gwei","szabo","finney","ether"];function NLe(t){const e=String(t).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||t==="."||t==="-.")&&KK.throwArgumentError("invalid value","value",t);let r=e[0],n="";for(r.substring(0,1)==="-"&&(n="-",r=r.substring(1));r.substring(0,1)==="0";)r=r.substring(1);r===""&&(r="0");let i="";for(e.length===2&&(i="."+(e[1]||"0"));i.length>2&&i[i.length-1]==="0";)i=i.substring(0,i.length-1);const s=[];for(;r.length;)if(r.length<=3){s.unshift(r);break}else{const o=r.length-3;s.unshift(r.substring(o)),r=r.substring(0,o)}return n+s.join(",")+i}function j7(t,e){if(typeof e=="string"){const r=GK.indexOf(e);r!==-1&&(e=3*r)}return Tv(t,e??18)}function z7(t,e){if(typeof t!="string"&&KK.throwArgumentError("value must be a string","value",t),typeof e=="string"){const r=GK.indexOf(e);r!==-1&&(e=3*r)}return Lc(t,e??18)}function ILe(t){return j7(t,18)}function TLe(t){return z7(t,18)}const kLe=Object.freeze(Object.defineProperty({__proto__:null,commify:NLe,formatEther:ILe,formatUnits:j7,parseEther:TLe,parseUnits:z7},Symbol.toStringTag,{value:"Module"}));var YK={};const PLe=Vn(GPe),RLe=Vn(kke),OLe=Vn(dPe),DLe=Vn(iDe),LLe=Vn(ike),MLe=Vn(qPe),$Le=Vn(wDe),ULe=Vn(DDe),BLe=Vn(xke),FLe=Vn(rke),kL=Vn(cDe),jLe=Vn(ALe),zLe=Vn(CDe),WLe=Vn(hke),HLe=Vn(Cke),qLe=Vn(FOe),PL=Vn(cPe),VLe=Vn(GOe),KLe=Vn(kLe),GLe=Vn(FDe),YLe=Vn(YDe);(function(t){var e=li&&li.__createBinding||(Object.create?function(D,O,T,m){m===void 0&&(m=T),Object.defineProperty(D,m,{enumerable:!0,get:function(){return O[T]}})}:function(D,O,T,m){m===void 0&&(m=T),D[m]=O[T]}),r=li&&li.__setModuleDefault||(Object.create?function(D,O){Object.defineProperty(D,"default",{enumerable:!0,value:O})}:function(D,O){D.default=O}),n=li&&li.__importStar||function(D){if(D&&D.__esModule)return D;var O={};if(D!=null)for(var T in D)T!=="default"&&Object.prototype.hasOwnProperty.call(D,T)&&e(O,D,T);return r(O,D),O};
2981Object.defineProperty(t,"__esModule",{value:!0}),t.formatBytes32String=t.Utf8ErrorFuncs=t.toUtf8String=t.toUtf8CodePoints=t.toUtf8Bytes=t._toEscapedUtf8String=t.nameprep=t.hexDataSlice=t.hexDataLength=t.hexZeroPad=t.hexValue=t.hexStripZeros=t.hexConcat=t.isHexString=t.hexlify=t.base64=t.base58=t.TransactionDescription=t.LogDescription=t.Interface=t.SigningKey=t.HDNode=t.defaultPath=t.isBytesLike=t.isBytes=t.zeroPad=t.stripZeros=t.concat=t.arrayify=t.shallowCopy=t.resolveProperties=t.getStatic=t.defineReadOnly=t.deepCopy=t.checkProperties=t.poll=t.fetchJson=t._fetchData=t.RLP=t.Logger=t.checkResultErrors=t.FormatTypes=t.ParamType=t.FunctionFragment=t.EventFragment=t.ErrorFragment=t.ConstructorFragment=t.Fragment=t.defaultAbiCoder=t.AbiCoder=void 0,t.Indexed=t.Utf8ErrorReason=t.UnicodeNormalizationForm=t.SupportedAlgorithm=t.mnemonicToSeed=t.isValidMnemonic=t.entropyToMnemonic=t.mnemonicToEntropy=t.getAccountPath=t.verifyTypedData=t.verifyMessage=t.recoverPublicKey=t.computePublicKey=t.recoverAddress=t.computeAddress=t.getJsonWalletAddress=t.TransactionTypes=t.serializeTransaction=t.parseTransaction=t.accessListify=t.joinSignature=t.splitSignature=t.soliditySha256=t.solidityKeccak256=t.solidityPack=t.shuffled=t.randomBytes=t.sha512=t.sha256=t.ripemd160=t.keccak256=t.computeHmac=t.commify=t.parseUnits=t.formatUnits=t.parseEther=t.formatEther=t.isAddress=t.getCreate2Address=t.getContractAddress=t.getIcapAddress=t.getAddress=t._TypedDataEncoder=t.id=t.isValidName=t.namehash=t.hashMessage=t.dnsEncode=t.parseBytes32String=void 0;var i=PLe;Object.defineProperty(t,"AbiCoder",{enumerable:!0,get:function(){return i.AbiCoder}}),Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return i.checkResultErrors}}),Object.defineProperty(t,"ConstructorFragment",{enumerable:!0,get:function(){return i.ConstructorFragment}}),Object.defineProperty(t,"defaultAbiCoder",{enumerable:!0,get:function(){return i.defaultAbiCoder}}),Object.defineProperty(t,"ErrorFragment",{enumerable:!0,get:function(){return i.ErrorFragment}}),Object.defineProperty(t,"EventFragment",{enumerable:!0,get:function(){return i.EventFragment}}),Object.defineProperty(t,"FormatTypes",{enumerable:!0,get:function(){return i.FormatTypes}}),Object.defineProperty(t,"Fragment",{enumerable:!0,get:function(){return i.Fragment}}),Object.defineProperty(t,"FunctionFragment",{enumerable:!0,get:function(){return i.FunctionFragment}}),Object.defineProperty(t,"Indexed",{enumerable:!0,get:function(){return i.Indexed}}),Object.defineProperty(t,"Interface",{enumerable:!0,get:function(){return i.Interface}}),Object.defineProperty(t,"LogDescription",{enumerable:!0,get:function(){return i.LogDescription}}),Object.defineProperty(t,"ParamType",{enumerable:!0,get:function(){return i.ParamType}}),Object.defineProperty(t,"TransactionDescription",{enumerable:!0,get:function(){return i.TransactionDescription}});var s=RLe;Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return s.getAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return s.getCreate2Address}}),Object.defineProperty(t,"getContractAddress",{enumerable:!0,get:function(){return s.getContractAddress}}),Object.defineProperty(t,"getIcapAddress",{enumerable:!0,get:function(){return s.getIcapAddress}}),Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return s.isAddress}});var o=n(OLe);t.base64=o;var a=DLe;Object.defineProperty(t,"base58",{enumerable:!0,get:function(){return a.Base58}});var c=LLe;Object.defineProperty(t,"arrayify",{enumerable:!0,get:function(){return c.arrayify}}),Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return c.concat}}),Object.defineProperty(t,"hexConcat",{enumerable:!0,get:function(){return c.hexConcat}}),Object.defineProperty(t,"hexDataSlice",{enumerable:!0,get:function(){return c.hexDataSlice}}),Object.defineProperty(t,"hexDataLength",{enumerable:!0,get:function(){return c.hexDataLength}}),Object.defineProperty(t,"hexlify",{enumerable:!0,get:function(){return c.hexlify}}),Object.defineProperty(t,"hexStripZeros",{enumerable:!0,get:function(){return c.hexStripZeros}}),Object.defineProperty(t,"hexValue",{enumerable:!0,get:function(){return c.hexValue}}),Object.defineProperty(t,"hexZeroPad",{enumerable:!0,get:function(){return c.hexZeroPad}}),Object.defineProperty(t,"isBytes",{enumerable:!0,get:function(){return c.isBytes}}),Object.defineProperty(t,"isBytesLike",{enumerable:!0,get:function(){return c.isBytesLike}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return c.isHexString}}),Object.defineProperty(t,"joinSignature",{enumerable:!0,get:function(){return c.joinSignature}}),Object.defineProperty(t,"zeroPad",{enumerable:!0,get:function(){return c.zeroPad}}),Object.defineProperty(t,"splitSignature",{enumerable:!0,get:function(){return c.splitSignature}}),Object.defineProperty(t,"stripZeros",{enumerable:!0,get:function(){return c.stripZeros}});var l=MLe;Object.defineProperty(t,"_TypedDataEncoder",{enumerable:!0,get:function(){return l._TypedDataEncoder}}),Object.defineProperty(t,"dnsEncode",{enumerable:!0,get:function(){return l.dnsEncode}}),Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return l.hashMessage}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return l.id}}),Object.defineProperty(t,"isValidName",{enumerable:!0,get:function(){return l.isValidName}}),Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return l.namehash}});var u=$Le;Object.defineProperty(t,"defaultPath",{enumerable:!0,get:function(){return u.defaultPath}}),Object.defineProperty(t,"entropyToMnemonic",{enumerable:!0,get:function(){return u.entropyToMnemonic}}),Object.defineProperty(t,"getAccountPath",{enumerable:!0,get:function(){return u.getAccountPath}}),Object.defineProperty(t,"HDNode",{enumerable:!0,get:function(){return u.HDNode}}),Object.defineProperty(t,"isValidMnemonic",{enumerable:!0,get:function(){return u.isValidMnemonic}}),Object.defineProperty(t,"mnemonicToEntropy",{enumerable:!0,get:function(){return u.mnemonicToEntropy}}),Object.defineProperty(t,"mnemonicToSeed",{enumerable:!0,get:function(){return u.mnemonicToSeed}});var f=ULe;Object.defineProperty(t,"getJsonWalletAddress",{enumerable:!0,get:function(){return f.getJsonWalletAddress}});var d=BLe;Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return d.keccak256}});var p=FLe;Object.defineProperty(t,"Logger",{enumerable:!0,get:function(){return p.Logger}});var h=kL;Object.defineProperty(t,"computeHmac",{enumerable:!0,get:function(){return h.computeHmac}}),Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return h.ripemd160}}),Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return h.sha256}}),Object.defineProperty(t,"sha512",{enumerable:!0,get:function(){return h.sha512}});var g=jLe;Object.defineProperty(t,"solidityKeccak256",{enumerable:!0,get:function(){return g.keccak256}}),Object.defineProperty(t,"solidityPack",{enumerable:!0,get:function(){return g.pack}}),Object.defineProperty(t,"soliditySha256",{enumerable:!0,get:function(){return g.sha256}});var y=zLe;Object.defineProperty(t,"randomBytes",{enumerable:!0,get:function(){return y.randomBytes}}),Object.defineProperty(t,"shuffled",{enumerable:!0,get:function(){return y.shuffled}});var x=WLe;Object.defineProperty(t,"checkProperties",{enumerable:!0,get:function(){return x.checkProperties}}),Object.defineProperty(t,"deepCopy",{enumerable:!0,get:function(){return x.deepCopy}}),Object.defineProperty(t,"defineReadOnly",{enumerable:!0,get:function(){return x.defineReadOnly}}),Object.defineProperty(t,"getStatic",{enumerable:!0,get:function(){return x.get
2981Static}}),Object.defineProperty(t,"resolveProperties",{enumerable:!0,get:function(){return x.resolveProperties}}),Object.defineProperty(t,"shallowCopy",{enumerable:!0,get:function(){return x.shallowCopy}});var C=n(HLe);t.RLP=C;var _=qLe;Object.defineProperty(t,"computePublicKey",{enumerable:!0,get:function(){return _.computePublicKey}}),Object.defineProperty(t,"recoverPublicKey",{enumerable:!0,get:function(){return _.recoverPublicKey}}),Object.defineProperty(t,"SigningKey",{enumerable:!0,get:function(){return _.SigningKey}});var L=PL;Object.defineProperty(t,"formatBytes32String",{enumerable:!0,get:function(){return L.formatBytes32String}}),Object.defineProperty(t,"nameprep",{enumerable:!0,get:function(){return L.nameprep}}),Object.defineProperty(t,"parseBytes32String",{enumerable:!0,get:function(){return L.parseBytes32String}}),Object.defineProperty(t,"_toEscapedUtf8String",{enumerable:!0,get:function(){return L._toEscapedUtf8String}}),Object.defineProperty(t,"toUtf8Bytes",{enumerable:!0,get:function(){return L.toUtf8Bytes}}),Object.defineProperty(t,"toUtf8CodePoints",{enumerable:!0,get:function(){return L.toUtf8CodePoints}}),Object.defineProperty(t,"toUtf8String",{enumerable:!0,get:function(){return L.toUtf8String}}),Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return L.Utf8ErrorFuncs}});var P=VLe;Object.defineProperty(t,"accessListify",{enumerable:!0,get:function(){return P.accessListify}}),Object.defineProperty(t,"computeAddress",{enumerable:!0,get:function(){return P.computeAddress}}),Object.defineProperty(t,"parseTransaction",{enumerable:!0,get:function(){return P.parse}}),Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return P.recoverAddress}}),Object.defineProperty(t,"serializeTransaction",{enumerable:!0,get:function(){return P.serialize}}),Object.defineProperty(t,"TransactionTypes",{enumerable:!0,get:function(){return P.TransactionTypes}});var z=KLe;Object.defineProperty(t,"commify",{enumerable:!0,get:function(){return z.commify}}),Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return z.formatEther}}),Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return z.parseEther}}),Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return z.formatUnits}}),Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return z.parseUnits}});var W=GLe;Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return W.verifyMessage}}),Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return W.verifyTypedData}});var B=YLe;Object.defineProperty(t,"_fetchData",{enumerable:!0,get:function(){return B._fetchData}}),Object.defineProperty(t,"fetchJson",{enumerable:!0,get:function(){return B.fetchJson}}),Object.defineProperty(t,"poll",{enumerable:!0,get:function(){return B.poll}});var I=kL;Object.defineProperty(t,"SupportedAlgorithm",{enumerable:!0,get:function(){return I.SupportedAlgorithm}});var j=PL;Object.defineProperty(t,"UnicodeNormalizationForm",{enumerable:!0,get:function(){return j.UnicodeNormalizationForm}}),Object.defineProperty(t,"Utf8ErrorReason",{enumerable:!0,get:function(){return j.Utf8ErrorReason}})})(YK);const Pd={signMessage:async(t,e,r)=>{if(!e)throw new Error("signMessage - provider is undefined");const n=Cr(t)?t:$e(ii(t));return await e.request({method:"personal_sign",params:[n,r]})},estimateGas:async(t,e,r,n)=>{if(!e)throw new Error("estimateGas - provider is undefined");if(!r)throw new Error("estimateGas - address is undefined");if(t.chainNamespace&&t.chainNamespace!=="eip155")throw new Error("estimateGas - chainNamespace is not eip155");const i={from:t.address,to:t.to,data:t.data,type:0};return(await new W6(e,n).getSigner(r).estimateGas(i)).toBigInt()},sendTransaction:async(t,e,r,n)=>{if(!e)throw new Error("sendTransaction - provider is undefined");if(!r)throw new Error("sendTransaction - address is undefined");if(t.chainNamespace&&t.chainNamespace!=="eip155")throw new Error("sendTransaction - chainNamespace is not eip155");const i={to:t.to,value:t.value,gasLimit:t.gas,gasPrice:t.gasPrice,data:t.data,type:0}
2981,c=await(await new W6(e,n).getSigner(r).sendTransaction(i)).wait();return(c==null?void 0:c.blockHash)||null},writeContract:async(t,e,r,n)=>{if(!e)throw new Error("writeContract - provider is undefined");if(!r)throw new Error("writeContract - address is undefined");const s=new W6(e,n).getSigner(r),o=new rDe(t.tokenAddress,t.abi,s);if(!o||!t.method)throw new Error("Contract method is undefined");const a=o[t.method];if(a)return await a(...t.args);throw new Error("Contract method is undefined")},parseWalletCapabilities:t=>{try{return JSON.parse(t)}catch{throw new Error("Error parsing wallet capabilities")}},parseUnits:(t,e)=>z7(t,e).toBigInt(),formatUnits:j7};class ZLe extends cV{constructor(){super({adapterType:fe.ADAPTER_TYPES.ETHERS5,namespace:fe.CHAIN.EVM}),this.balancePromises={}}async createEthersConfig(e){if(!e.metadata)return;let r;function n(){if(r)return r;if(!(typeof window>"u")&&window.ethereum)return r=window.ethereum,r}async function i(){const{SafeProvider:a}=await Ie(async()=>{const{SafeProvider:d}=await import("./SafeProvider-C8DyH3ec.js");return{SafeProvider:d}},__vite__mapDeps([138,139])),{default:c}=await Ie(async()=>{const{default:d}=await import("./index-DUobKHF_.js").then(p=>p.e);return{default:d}},[]),l=new c,u=await l.safe.getInfo(),f=new a(u,l);return await f.connect().catch(d=>{console.info("Failed to auto-connect to Safe:",d)}),f}async function s(){var a,c,l;try{const{createCoinbaseWalletSDK:u}=await Ie(async()=>{const{createCoinbaseWalletSDK:d}=await import("./index-gv00RbZk.js");return{createCoinbaseWalletSDK:d}},[]);return typeof window>"u"?void 0:u({appName:(a=e==null?void 0:e.metadata)==null?void 0:a.name,appLogoUrl:(c=e==null?void 0:e.metadata)==null?void 0:c.icons[0],appChainIds:((l=e.networks)==null?void 0:l.map(d=>d.id))||[1,84532],preference:{options:e.coinbasePreference??"all"}}).getProvider()}catch(u){console.error("Failed to import Coinbase Wallet SDK:",u);return}}const o={metadata:e.metadata};if(e.enableInjected!==!1&&(o.injected=n()),e.enableCoinbase!==!1){const a=await s();a&&(o.coinbase=a)}if(it.isSafeApp()){const a=await i();a&&(o.safe=a)}return o.EIP6963=e.enableEIP6963!==!1,o}async signMessage(e){const{message:r,address:n,provider:i}=e;if(!i)throw new Error("Provider is undefined");try{return{signature:await Pd.signMessage(r,i,n)}}catch{throw new Error("EthersAdapter:signMessage - Sign message failed")}}async sendTransaction(e){var n;if(!e.provider)throw new Error("Provider is undefined");return{hash:await Pd.sendTransaction({value:Number.isNaN(Number(e.value))?BigInt(0):BigInt(e.value),to:e.to,data:e.data?e.data:"0x",gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,address:ct.state.address},e.provider,ct.state.address,Number((n=e.caipNetwork)==null?void 0:n.id))}}async writeContract(e){var i;if(!e.provider)throw new Error("Provider is undefined");const{address:r}=Bs.parseCaipAddress(e.caipAddress);return{hash:await Pd.writeContract(e,e.provider,r,Number((i=e.caipNetwork)==null?void 0:i.id))}}async estimateGas(e){const{provider:r,caipNetwork:n,address:i}=e;if(!r)throw new Error("Provider is undefined");try{return{gas:await Pd.estimateGas({data:e.data,to:e.to,address:i},r,i,Number(n==null?void 0:n.id))}}catch{throw new Error("EthersAdapter:estimateGas - Estimate gas failed")}}parseUnits(e){return Pd.parseUnits(e.value,e.decimals)}formatUnits(e){return Pd.formatUnits(e.value,e.decimals)}async syncConnection(e){const{id:r,chainId:n}=e,i=this.connectors.find(c=>c.id===r),s=i==null?void 0:i.provider;if(!s)throw new Error("Provider not found");const o=await s.request({method:"eth_requestAccounts"}),a=await s.request({method:"eth_chainId"});if(this.listenProviderEvents(r,s),!o[0])throw new Error("No accounts found");if(!(i!=null&&i.type))throw new Error("Connector type not found");return{address:o[0],chainId:Number(a)||Number(n),provider:s,type:i.type,id:r}}async syncConnectors(e){var n;this.ethersConfig=await this.createEthersConfig(e),(n=this.ethersConfig)!=null&&n.EIP6963&&this.listenInjectedConnector(!0),Object.keys(this.ethersConfig||{}).filter(i=>i!=="metadata"&&i!=="EIP6963").forEach(i=>
2981{var a,c;const s=i==="coinbase"?"coinbaseWalletSDK":i,o=i===fe.CONNECTOR_ID.INJECTED;this.namespace&&this.addConnector({id:s,explorerId:Vc.ConnectorExplorerIds[s],imageUrl:(a=e==null?void 0:e.connectorImages)==null?void 0:a[s],name:Vc.ConnectorNamesMap[s]||"Unknown",imageId:Vc.ConnectorImageIds[s],type:Vc.ConnectorTypesMap[s]??"EXTERNAL",info:o?void 0:{rdns:s},chain:this.namespace,chains:[],provider:(c=this.ethersConfig)==null?void 0:c[i]})})}async disconnectAll(){return{connections:await Promise.all(this.connections.map(async r=>{const n=this.connectors.find(i=>Ui.isLowerCaseMatch(i.id,r.connectorId));if(!n)throw new Error("Connector not found");return await this.disconnect({id:n.id}),r}))}}async syncConnections({connectToFirstConnector:e,getConnectorStorageInfo:r}){var n;await((n=this.connectionManager)==null?void 0:n.syncConnections({connectors:this.connectors,caipNetworks:this.getCaipNetworks(),universalProvider:this.universalProvider,onConnection:this.addConnection.bind(this),onListenProvider:this.listenProviderEvents.bind(this),getConnectionStatusInfo(i){return r(i)}})),e&&this.emitFirstAvailableConnection()}async setUniversalProvider(e){this.universalProvider=e;const r=fe.CONNECTOR_ID.WALLET_CONNECT;return al.listenWcProvider({universalProvider:e,namespace:fe.CHAIN.EVM,onConnect:n=>this.onConnect(n,r),onDisconnect:()=>this.onDisconnect(r),onAccountsChanged:n=>this.onAccountsChanged(n,r,!1),onChainChanged:n=>this.onChainChanged(n,r)}),this.addConnector(new g7({provider:e,caipNetworks:this.getCaipNetworks(),namespace:fe.CHAIN.EVM})),Promise.resolve()}eip6963EventHandler(e){var r;if(e.detail){const{info:n,provider:i}=e.detail;if(!((r=this.connectors)==null?void 0:r.find(o=>o.name===(n==null?void 0:n.name)))){const o=Vc.ConnectorTypesMap[fe.CONNECTOR_ID.EIP6963],a=(n==null?void 0:n.rdns)||(n==null?void 0:n.name)||(n==null?void 0:n.uuid);this.namespace&&a&&this.addConnector({id:a,type:o,imageUrl:n==null?void 0:n.icon,name:(n==null?void 0:n.name)||"Unknown",provider:i,info:n,chain:this.namespace,chains:[]})}}}listenInjectedConnector(e){if(typeof window<"u"&&e){const r=this.eip6963EventHandler.bind(this);window.addEventListener(Yr.EIP6963_ANNOUNCE_EVENT,r),window.dispatchEvent(new Event(Yr.EIP6963_REQUEST_EVENT))}}async connect({id:e,address:r,type:n,chainId:i,socialUri:s}){var f;const o=this.connectors.find(d=>Ui.isLowerCaseMatch(d.id,e));if(!o)throw new Error("Connector not found");const a=(f=this.connectionManager)==null?void 0:f.getConnection({address:r,connectorId:e,connections:this.connections,connectors:this.connectors});if(a){const d=a.caipNetwork;if(!d)throw new Error("Ethers5Adapter:connect - could not find the caipNetwork to connect");if(a.account)return this.emit("accountChanged",{address:a.account.address,chainId:d.id,connector:o}),{address:a.account.address,chainId:d.id,provider:o.provider,type:o.type,id:e}}const c=o==null?void 0:o.provider;if(!c)throw new Error("Provider not found");let l=[],u;if(n==="AUTH"){const{address:d,accounts:p}=await Fo.authConnectorAuthenticate({authConnector:c,chainNamespace:fe.CHAIN.EVM,chainId:i,socialUri:s,preferredAccountType:Vo("eip155")}),h=this.getCaipNetworks().find(g=>g.id.toString()===(i==null?void 0:i.toString()));l=[d],this.addConnection({connectorId:e,accounts:p?p.map(g=>({address:g.address})):l.map(g=>({address:g})),caipNetwork:h,auth:{name:Oe.getConnectedSocialProvider(),username:Oe.getConnectedSocialUsername()}}),this.emit("accountChanged",{address:l[0],chainId:Number(i),connector:o})}else{l=await c.request({method:"eth_requestAccounts"}),u=await c.request({method:"eth_chainId"});const d=this.getCaipNetworks().find(p=>p.id.toString()===(i==null?void 0:i.toString()));if(u!==i){if(!d)throw new Error("Ethers5Adapter:connect - could not find the caipNetwork to switch");try{await this.switchNetwork({caipNetwork:d,provider:c,providerType:n})}catch{throw new Error("Ethers5Adapter:connect - Switch network failed")}}this.emit("accountChanged",{address:l[0],chainId:Number(i),connector:o}),this.addConnection({connectorId:e,accounts:l.map(p=>({address:p})),caipNetwork:d}
2981),o.id!==fe.CONNECTOR_ID.WALLET_CONNECT&&this.listenProviderEvents(e,c)}return{address:l[0],chainId:Number(i),provider:c,type:n,id:e}}async getAccounts(e){var o;const r=this.connectors.find(a=>a.id===e.id),n=r==null?void 0:r.provider;if(!n||!r)throw new Error("Provider not found");const i=(o=this.connectionManager)==null?void 0:o.getConnection({connectorId:e.id,connections:this.connections,connectors:this.connectors});if(i)return{accounts:i.accounts.map(({address:a})=>it.createAccount(fe.CHAIN.EVM,a,"eoa"))};if(e.id===fe.CONNECTOR_ID.AUTH){const a=r.provider;if(!a.user)return{accounts:[]};const{accounts:c,address:l}=a.user;return Promise.resolve({accounts:(c||[{address:l,type:"eoa"}]).map(u=>it.createAccount(fe.CHAIN.EVM,u.address,u.type))})}return{accounts:(await n.request({method:"eth_requestAccounts"})).map(a=>it.createAccount(fe.CHAIN.EVM,a,"eoa"))}}async reconnect(e){const{id:r,chainId:n}=e,i=this.connectors.find(s=>s.id===r);i&&i.type==="AUTH"&&n&&await Fo.authConnectorAuthenticate({authConnector:i.provider,chainNamespace:fe.CHAIN.EVM,chainId:n,preferredAccountType:Vo("eip155")})}async disconnect(e){var r,n;if(e.id){const i=this.connectors.find(o=>Ui.isLowerCaseMatch(o.id,e.id));if(!i)throw new Error("Connector not found");const s=(r=this.connectionManager)==null?void 0:r.getConnection({connectorId:e.id,connections:this.connections,connectors:this.connectors});switch(i.type){case Yr.CONNECTOR_TYPE_WALLET_CONNECT:i.provider.session&&i.provider.disconnect();break;case Yr.CONNECTOR_TYPE_AUTH:await((n=i.provider)==null?void 0:n.disconnect());break;case Yr.CONNECTOR_TYPE_ANNOUNCED:case Yr.CONNECTOR_TYPE_EXTERNAL:await this.revokeProviderPermissions(i.provider);break;default:throw new Error("Unsupported provider type")}return i.id&&(this.removeProviderListeners(i.id),this.deleteConnection(i.id)),this.connections.length===0?this.emit("disconnect"):this.emitFirstAvailableConnection(),{connections:s?[s]:[]}}return this.disconnectAll()}async getBalance(e){const r=e.address,n=this.getCaipNetworks().find(i=>{var s;return i.id.toString()===((s=e.chainId)==null?void 0:s.toString())});if(!r)return Promise.resolve({balance:"0.00",symbol:"ETH"});if(n){const i=`${n.caipNetworkId}:${r}`,s=this.balancePromises[i];if(s)return s;const o=Oe.getNativeBalanceCacheForCaipAddress(i);if(o)return{balance:o.balance,symbol:o.symbol};const a=new qK(n.rpcUrls.default.http[0],{chainId:n.id,name:n.name});if(a)try{return this.balancePromises[i]=new Promise(async c=>{try{const l=await a.getBalance(r),u=YK.formatEther(l);Oe.updateNativeBalanceCache({caipAddress:i,balance:u,symbol:n.nativeCurrency.symbol,timestamp:Date.now()}),c({balance:u,symbol:n.nativeCurrency.symbol})}catch{c({balance:"0.00",symbol:"ETH"})}}).finally(()=>{delete this.balancePromises[i]}),this.balancePromises[i]||{balance:"0.00",symbol:"ETH"}}catch{return{balance:"0.00",symbol:"ETH"}}}return{balance:"0.00",symbol:"ETH"}}async switchNetwork(e){var s,o;const{caipNetwork:r,provider:n,providerType:i}=e;if(i==="AUTH"){await super.switchNetwork(e);return}try{await n.request({method:"wallet_switchEthereumChain",params:[{chainId:Mp.numberToHexString(r.id)}]})}catch(a){if(a.code===ru.ERROR_CODE_UNRECOGNIZED_CHAIN_ID||a.code===ru.ERROR_INVALID_CHAIN_ID||a.code===ru.ERROR_CODE_DEFAULT||((o=(s=a==null?void 0:a.data)==null?void 0:s.originalError)==null?void 0:o.code)===ru.ERROR_CODE_UNRECOGNIZED_CHAIN_ID)await Mp.addEthereumChain(n,r);else if(i==="ANNOUNCED"||i==="EXTERNAL"||i==="INJECTED")throw new Error("Chain is not supported")}}getWalletConnectProvider(){var e;return(e=this.connectors.find(r=>r.type==="WALLET_CONNECT"))==null?void 0:e.provider}async revokeProviderPermissions(e){try{(await e.request({method:"wallet_getPermissions"})).find(i=>i.parentCapability==="eth_accounts")&&await e.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]})}catch(r){console.info("Could not revoke permissions from wallet. Disconnecting...",r)}}async getCapabilities(e){var i,s;const r=jr.getProvider(fe.CHAIN.EVM);if(!r)throw new Error("Provider is undefined");const n=(s=(i=r.session)==null?void 0:i.sessionProperties)==null?void 0:s.capabilities;if(n){const a=Pd.parseWalletCapabilities(n)[e];if(a)return a}return await r.request({method:"wallet_getCapabilities",params:[e]})}async grantPermissions(e){const r=jr.getProvider(fe.CHAIN.EVM);if(!r)throw new Error("Provider is undefined");return await r.request({method:"wallet_grantPermissions",params:e})}async revokePermissions(e){const r=jr.getProvider(fe.CHAIN.EVM);if(!r)throw new Error("Provider is undefined");return await r.request({method:"wallet_revokePermissions",params:[e]})}async walletGetAssets(e){const r=jr.getProvider(fe.CHAIN.EVM);if(!r)throw new Error("Provider is undefined");return await r.request({method:"wallet_getAssets",params:[e]})}}function JLe(t={}){const{nonce:e,onScriptLoadSuccess:r,onScriptLoadError:n}=t,[i,s]=se.useState(!1),o=se.useRef(r);o.current=r;const a=se.useRef(n);return a.current=n,se.useEffect(()=>{const c=document.createElement("script");return c.src="https://accounts.google.com/gsi/client",c.async=!0,c.defer=!0,c.nonce=e,c.onload=()=>{var l;s(!0),(l=o.current)===null||l===void 0||l.call(o)},c.onerror=()=>{var l;s(!1),(l=a.current)===null||l===void 0||l.call(a)},document.body.appendChild(c),()=>{document.body.removeChild(c)}},[e]),i}const ZK=se.createContext(null);function QLe({clientId:t,nonce:e,onScriptLoadSuccess:r,onScriptLoadError:n,children:i}){const s=JLe({nonce:e,onScriptLoadSuccess:r,onScriptLoadError:n}),o=se.useMemo(()=>({clientId:t,scriptLoadedSuccessfully:s}),[t,s]);return Be.createElement(ZK.Provider,{value:o},i)}function XLe(){const t=se.useContext(ZK);if(!t)throw new Error("Google OAuth components must be used within GoogleOAuthProvider");return t}
2981function dBe({flow:t="implicit",scope:e="",onSuccess:r,onError:n,onNonOAuthError:i,overrideScope:s,state:o,...a}){const{clientId:c,scriptLoadedSuccessfully:l}=XLe(),u=se.useRef(),f=se.useRef(r);f.current=r;const d=se.useRef(n);d.current=n;const p=se.useRef(i);p.current=i,se.useEffect(()=>{var y,x;if(!l)return;const C=t==="implicit"?"initTokenClient":"initCodeClient",_=(x=(y=window==null?void 0:window.google)===null||y===void 0?void 0:y.accounts)===null||x===void 0?void 0:x.oauth2[C]({client_id:c,scope:s?e:`openid profile email ${e}`,callback:L=>{var P,z;if(L.error)return(P=d.current)===null||P===void 0?void 0:P.call(d,L);(z=f.current)===null||z===void 0||z.call(f,L)},error_callback:L=>{var P;(P=p.current)===null||P===void 0||P.call(p,L)},state:o,...a});u.current=_},[c,l,t,e,o]);const h=se.useCallback(y=>{var x;return(x=u.current)===null||x===void 0?void 0:x.requestAccessToken(y)},[]),g=se.useCallback(()=>{var y;return(y=u.current)===null||y===void 0?void 0:y.requestCode()},[]);return t==="implicit"?h:g}const{slice:eMe,forEach:tMe}=[];function rMe(t){return tMe.call(eMe.call(arguments,1),e=>{if(e)for(const r in e)t[r]===void 0&&(t[r]=e[r])}),t}
vendor: 6,442 bytes, line 2981
2981function nMe(t){return typeof t!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(r=>r.test(t))}const RL=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,iMe=function(t,e){const n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},i=encodeURIComponent(e);let s=`${t}=${i}`;if(n.maxAge>0){const o=n.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(o)}`}if(n.domain){if(!RL.test(n.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${n.domain}`}if(n.path){if(!RL.test(n.path))throw new TypeError("option path is invalid");s+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(s+="; HttpOnly"),n.secure&&(s+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return n.partitioned&&(s+="; Partitioned"),s},OL={create(t,e,r,n){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+r*60*1e3)),n&&(i.domain=n),document.cookie=iMe(t,e,i)},read(t){const e=`${t}=`,r=document.cookie.split(";");for(let n=0;n<r.length;n++){let i=r[n];for(;i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(e)===0)return i.substring(e.length,i.length)}return null},remove(t,e){this.create(t,"",-1,e)}};var sMe={name:"cookie",lookup(t){let{lookupCookie:e}=t;if(e&&typeof document<"u")return OL.read(e)||void 0},cacheUserLanguage(t,e){let{lookupCookie:r,cookieMinutes:n,cookieDomain:i,cookieOptions:s}=e;r&&typeof document<"u"&&OL.create(r,t,n,i,s)}},oMe={name:"querystring",lookup(t){var n;let{lookupQuerystring:e}=t,r;if(typeof window<"u"){let{search:i}=window.location;!window.location.search&&((n=window.location.hash)==null?void 0:n.indexOf("?"))>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const o=i.substring(1).split("&");for(let a=0;a<o.length;a++){const c=o[a].indexOf("=");c>0&&o[a].substring(0,c)===e&&(r=o[a].substring(c+1))}}return r}},aMe={name:"hash",lookup(t){var i;let{lookupHash:e,lookupFromHashIndex:r}=t,n;if(typeof window<"u"){const{hash:s}=window.location;if(s&&s.length>2){const o=s.substring(1);if(e){const a=o.split("&");for(let c=0;c<a.length;c++){const l=a[c].indexOf("=");l>0&&a[c].substring(0,l)===e&&(n=a[c].substring(l+1))}}if(n)return n;if(!n&&r>-1){const a=s.match(/\/([a-zA-Z-]*)/g);return Array.isArray(a)?(i=a[typeof r=="number"?r:0])==null?void 0:i.replace("/",""):void 0}}}return n}};let z0=null;const DL=()=>{if(z0!==null)return z0;try{if(z0=typeof window<"u"&&window.localStorage!==null,!z0)return!1;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{z0=!1}return z0};var cMe={name:"localStorage",lookup(t){let{lookupLocalStorage:e}=t;if(e&&DL())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupLocalStorage:r}=e;r&&DL()&&window.localStorage.setItem(r,t)}};let W0=null;const LL=()=>{if(W0!==null)return W0;try{if(W0=typeof window<"u"&&window.sessionStorage!==null,!W0)return!1;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{W0=!1}return W0};var lMe={name:"sessionStorage",lookup(t){let{lookupSessionStorage:e}=t;if(e&&LL())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupSessionStorage:r}=e;r&&LL()&&window.sessionStorage.setItem(r,t)}},uMe={name:"navigator",lookup(t){const e=[];if(typeof navigator<"u"){const{languages:r,userLanguage:n,language:i}=navigator;if(r)for(let s=0;s<r.length;s++)e.push(r[s]);n&&e.push(n),i&&e.push(i)}return e.length>0?e:void 0}},fMe={name:"htmlTag",lookup(t){let{htmlTag:e}=t,r;const n=e||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(r=n.getAttribute("lang")),r}},dMe={name:"path",lookup(t){var i;let{lookupFromPathIndex:e}=t;if(typeof window>"u")return;const r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(r)?(i=r[typeof e=="number"?e:0])==null?void 0:i.replace("/",""):void 0}},hMe={name:"subdomain",lookup(t){var i,s;let{lookupFromSubdomainIndex:e}=t;const r=typeof e=="number"?e+1:1,n=typeof window<"u"&&((s=(i=window.location)==null?void 0:i.hostname)==null?void 0:s.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(n)return n[r]}};let JK=!1;try{document.cookie,JK=!0}catch{}const QK=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];JK||QK.splice(1,1);const pMe=()=>({order:QK,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t});class XK{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,r)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=rMe(r,this.options||{},pMe()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(sMe),this.addDetector(oMe),this.addDetector(cMe),this.addDetector(lMe),this.addDetector(uMe),this.addDetector(fMe),this.addDetector(dMe),this.addDetector(hMe),this.addDetector(aMe)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,r=[];return e.forEach(n=>{if(this.detectors[n]){let i=this.detectors[n].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(r=r.concat(i))}}
2981),r=r.filter(n=>n!=null&&!nMe(n)).map(n=>this.options.convertDetectedLanguage(n)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}cacheUserLanguage(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||r.forEach(n=>{this.detectors[n]&&this.detectors[n].cacheUserLanguage(e,this.options)}))}}XK.type="languageDetector";function yA(t){"@babel/helpers - typeof";return yA=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yA(t)}function eG(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":yA(XMLHttpRequest))==="object"}function gMe(t){return!!t&&typeof t.then=="function"}function mMe(t){return gMe(t)?t:Promise.resolve(t)}function ML(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function $L(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ML(Object(r),!0).forEach(function(n){yMe(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ML(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function yMe(t,e,r){return(e=bMe(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function bMe(t){var e=wMe(t,"string");return Vh(e)=="symbol"?e:e+""}function wMe(t,e){if(Vh(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Vh(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Vh(t){"@babel/helpers - typeof";return Vh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vh(t)}var dd=typeof fetch=="function"?fetch:void 0;typeof global<"u"&&global.fetch?dd=global.fetch:typeof window<"u"&&window.fetch&&(dd=window.fetch);var Py;eG()&&(typeof global<"u"&&global.XMLHttpRequest?Py=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(Py=window.XMLHttpRequest));var C4;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?C4=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(C4=window.ActiveXObject));typeof dd!="function"&&(dd=void 0);if(!dd&&!Py&&!C4)try{Ie(()=>import("./browser-ponyfill-3g4SCP-u.js").then(t=>t.b),[]).then(function(t){dd=t.default}).catch(function(){})}catch{}var bA=function(e,r){if(r&&Vh(r)==="object"){var n="";for(var i in r)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(r[i]);if(!n)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+n.slice(1)}return e},UL=function(e,r,n,i){var s=function(c){if(!c.ok)return n(c.statusText||"Error",{status:c.status});c.text().then(function(l){n(null,{status:c.status,data:l})}).catch(n)};if(i){var o=i(e,r);if(o instanceof Promise){o.then(s).catch(n);return}}typeof fetch=="function"?fetch(e,r).then(s).catch(n):dd(e,r).then(s).catch(n)},BL=!1,vMe=function(e,r,n,i){e.queryStringParams&&(r=bA(r,e.queryStringParams));var s=$L({},typeof e.customHeaders=="function"?e.customHeaders():e.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(s["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),n&&(s["Content-Type"]="application/json");var o=typeof e.requestOptions=="function"?e.requestOptions(n):e.requestOptions,a=$L({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:s},BL?{}:o),c=typeof e.alternateFetch=="function"&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{UL(r,a,i,c)}catch(l){if(!o||Object.keys(o).length===0||!l.message||l.message.indexOf("not implemented")<0)return i(l);
vendor: 4,868 bytes, line 2981
2981try{Object.keys(o).forEach(function(u){delete a[u]}),UL(r,a,i,c),BL=!0}catch(u){i(u)}}},xMe=function(e,r,n,i){n&&Vh(n)==="object"&&(n=bA("",n).slice(1)),e.queryStringParams&&(r=bA(r,e.queryStringParams));try{var s=Py?new Py:new C4("MSXML2.XMLHTTP.3.0");s.open(n?"POST":"GET",r,1),e.crossDomain||s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.withCredentials=!!e.withCredentials,n&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.overrideMimeType&&s.overrideMimeType("application/json");var o=e.customHeaders;if(o=typeof o=="function"?o():o,o)for(var a in o)s.setRequestHeader(a,o[a]);s.onreadystatechange=function(){s.readyState>3&&i(s.status>=400?s.statusText:null,{status:s.status,data:s.responseText})},s.send(n)}catch(c){console&&console.log(c)}},EMe=function(e,r,n,i){if(typeof n=="function"&&(i=n,n=void 0),i=i||function(){},dd&&r.indexOf("file:")!==0)return vMe(e,r,n,i);if(eG()||typeof ActiveXObject=="function")return xMe(e,r,n,i);i(new Error("No fetch and no xhr implementation found!"))};function Cg(t){"@babel/helpers - typeof";return Cg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cg(t)}function FL(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function H6(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?FL(Object(r),!0).forEach(function(n){tG(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):FL(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function CMe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _Me(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,rG(n.key),n)}}function AMe(t,e,r){return e&&_Me(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function tG(t,e,r){return(e=rG(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function rG(t){var e=SMe(t,"string");return Cg(e)=="symbol"?e:e+""}function SMe(t,e){if(Cg(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Cg(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var NMe=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(r){return JSON.parse(r)},stringify:JSON.stringify,parsePayload:function(r,n,i){return tG({},n,i||"")},parseLoadPayload:function(r,n){},request:EMe,reloadInterval:typeof window<"u"?!1:60*60*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},nG=function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};CMe(this,t),this.services=e,this.options=r,this.allOptions=n,this.type="backend",this.init(e,r,n)}return AMe(t,[{key:"init",value:function(r){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=r,this.options=H6(H6(H6({},NMe()),this.options||{}),i),this.allOptions=s,this.services&&this.options.reloadInterval){var o=setInterval(function(){return n.reload()},this.options.reloadInterval);Cg(o)==="object"&&typeof o.unref=="function"&&o.unref()}}},{key:"readMulti",value:function(r,n,i){this._readAny(r,r,n,n,i)}},{key:"read",value:function(r,n,i){this._readAny([r],r,[n],n,i)}},{key:"_readAny",value:function(r,n,i,s,o){var a=this,c=this.options.loadPath;typeof this.options.loadPath=="function"&&(c=this.options.loadPath(r,i)),c=mMe(c),c.then(function(l){if(!l)return o(null,{});var u=a.services.interpolator.interpolate(l,{lng:r.join("+"),ns:i.join("+")});a.loadUrl(u,o,n,s)})}},{key:"loadUrl",value:function(r,n,i,s){var o=this,a=typeof i=="string"?[i]:i,c=typeof s=="string"?[s]:s,l=this.options.parseLoadPayload(a,c);this.options.request(this.options,r,l,function(u,f){if(f&&(f.status>=500&&f.status<600||!f.status))return n("failed loading "+r+"; status code: "+f.status,!0);if(f&&f.status>=400&&f.status<500)return n("failed loading "+r+"; status code: "+f.status,!1);if(!f&&u&&u.message){var d=u.message.toLowerCase(),p=["failed","fetch","network","load"].find(function(y){return d.indexOf(y)>-1});if(p)return n("failed loading "+r+": "+u.message,!0)}if(u)return n(u,!1);var h,g;
2981try{typeof f.data=="string"?h=o.options.parse(f.data,i,s):h=f.data}catch{g="failed parsing "+r+" to json"}if(g)return n(g,!1);n(null,h)})}},{key:"create",value:function(r,n,i,s,o){var a=this;if(this.options.addPath){typeof r=="string"&&(r=[r]);var c=this.options.parsePayload(n,i,s),l=0,u=[],f=[];r.forEach(function(d){var p=a.options.addPath;typeof a.options.addPath=="function"&&(p=a.options.addPath(d,n));var h=a.services.interpolator.interpolate(p,{lng:d,ns:n});a.options.request(a.options,h,c,function(g,y){l+=1,u.push(g),f.push(y),l===r.length&&typeof o=="function"&&o(u,f)})})}}},{key:"reload",value:function(){var r=this,n=this.services,i=n.backendConnector,s=n.languageUtils,o=n.logger,a=i.language;if(!(a&&a.toLowerCase()==="cimode")){var c=[],l=function(f){var d=s.toResolveHierarchy(f);d.forEach(function(p){c.indexOf(p)<0&&c.push(p)})};l(a),this.allOptions.preload&&this.allOptions.preload.forEach(function(u){return l(u)}),c.forEach(function(u){r.allOptions.ns.forEach(function(f){i.read(u,f,"read",null,null,function(d,p){d&&o.warn("loading namespace ".concat(f," for language ").concat(u," failed"),d),!d&&p&&o.log("loaded namespace ".concat(f," for language ").concat(u),p),i.loaded("".concat(u,"|").concat(f),d,p)})})})}}}])}();nG.type="backend";Zs.use(nG).use(XK).use(yQ).init({fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1},backend:{loadPath:"/locales/{{lng}}/{{ns}}.json"},ns:["common","home","landing","about","community","contact","faq","whitepaper","auth","guidance","dashboard","games","challenges","assessments","subscription","ai_space","ai_vault","ai_myth","ai_arena","ai_failure","ai_blog","archetypes"],defaultNS:"common",detection:{order:["localStorage","navigator"],caches:["localStorage"]}});const IMe=q6.createRoot(document.getElementById("root")),TMe=`${window.location.origin}/tonconnect-manifest.json`,kMe="48713007905-mpuqg526hfo2kcs0g14qj263f6kpjk6j.apps.googleusercontent.com",PMe="2aca272d18deb10ff748260da5f78bfd",RMe={name:"Skilleareum",description:"Skilleareum Ecosystem",url:"https://skilleareum.ai/",icons:["https://skilleareum.ai/favicon.png"]};({...aV});QTe({adapters:[new ZLe],networks:[aV,FTe,jTe],metadata:RMe,projectId:PMe,features:{analytics:!0}});IMe.render(w.jsx(Be.StrictMode,{children:w.jsx(PJ,{children:w.jsx(QLe,{clientId:kMe,children:w.jsx(QQ,{store:qB,children:w.jsxs(h0e,{manifestUrl:TMe,children:[w.jsx(Aoe,{}),w.jsx(nie,{})]})})})})}));export{li as $,pie as A,Cte as B,Vn as C,PZ as D,fX as E,ni as F,KMe as G,nse as H,qMe as I,JMe as J,WMe as K,Oc as L,QMe as M,qK as N,nie as O,u$e as P,rDe as Q,l$e as R,hC as S,VMe as T,OMe as U,G5 as V,Be as W,HMe as X,Us as Y,Zs as Z,Mae as _,$y as a,Fe as a$,ps as a0,gT as a1,CI as a2,cX as a3,dX as a4,qB as a5,pU as a6,q8 as a7,mQ as a8,pQ as a9,hX as aA,t$e as aB,r$e as aC,e$e as aD,ZMe as aE,s$e as aF,zMe as aG,ka as aH,xc as aI,Fk as aJ,Ape as aK,Rpe as aL,qj as aM,dS as aN,jk as aO,Dpe as aP,L$e as aQ,Spe as aR,Ppe as aS,Ipe as aT,Kj as aU,dh as aV,Vj as aW,Dp as aX,Nv as aY,Wr as aZ,nBe as a_,_h as aa,oQ as ab,cQ as ac,dQ as ad,bQ as ae,lX as af,f$e as ag,G_ as ah,jr as ai,XUe as aj,uBe as ak,eBe as al,W6 as am,Nke as an,z7 as ao,j7 as ap,Uke as aq,Kke as ar,c$e as as,DMe as at,$Me as au,BMe as av,k$e as aw,P$e as ax,R$e as ay,O$e as az,Ah as b,nwe as b$,co as b0,tu as b1,Zr as b2,aBe as b3,fe as b4,Im as b5,ct as b6,it as b7,on as b8,Vo as b9,Tt as bA,xpe as bB,mS as bC,Fj as bD,Gr as bE,Uj as bF,GC as bG,Qa as bH,hv as bI,Bs as bJ,K0e as bK,Av as bL,$3 as bM,Ui as bN,At as bO,X_ as bP,V0 as bQ,Qpe as bR,Fo as bS,oBe as bT,rwe as bU,bUe as bV,BP as bW,Jz as bX,ey as bY,Zbe as bZ,Zz as b_,X as ba,Pi as bb,Jc as bc,Lt as bd,Xq as be,eA as bf,gg as bg,lBe as bh,Ie as bi,$i as bj,cBe as bk,jo as bl,We as bm,Ee as bn,Yr as bo,vTe as bp,Ci as bq,xTe as br,Oe as bs,Ms as bt,Ds as bu,Wi as bv,_n as bw,iBe as bx,W0e as by,ea as bz,tX as c,wUe as c0,yUe as c1,z3 as c2,xUe as c3,vUe as c4,dBe as d,jMe as e,GMe as f,i$e as g,qn as h,ese as i,w as j,n$e as k,Nu as l,iie as m,pX as n,Af as o,is as p,gX as q,se as r,Xie as s,UMe as t,Zo as u,YMe as v,XMe as w,FMe as x,o$e as y,a$e as z};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.